@@ -122,27 +122,6 @@ stages:
122
122
cp $env:temp\CosmosDbEmulatorCert.cer .
123
123
keytool -keystore cacerts -importcert -noprompt -trustcacerts -alias CosmosDbEmulatorCert -file CosmosDbEmulatorCert.cer -storepass changeit
124
124
displayName: 'Create Java TrustStore'
125
- - powershell : |
126
- $downloadTarget = Join-Path -Path $env:temp -ChildPath "hadoopsource.zip"
127
- $targetDir = "D:\Hadoop"
128
- Write-Host "Downloading and extracting Hadoop winutils - https://aka.ms/cosmos-hadoop-for-spark-ci-pipeline2"
129
- Write-Host "Target: $targetDir"
130
- Invoke-WebRequest "https://aka.ms/cosmos-hadoop-for-spark-ci-pipeline2" -OutFile $downloadTarget
131
- if (Test-Path $targetDir) { Remove-Item -Recurse -Force $targetDir }
132
- Expand-Archive -LiteralPath $downloadTarget -DestinationPath $targetDir
133
- Write-Host "Copying binaries to windows sytem32 folder"
134
- Copy-Item -Path "D:\Hadoop\bin\*" -Destination "C:\Windows\System32" -Recurse
135
- Write-Host "Updating environment variables for Hadoop usage"
136
- [System.Environment]::SetEnvironmentVariable("HADOOP_HOME", "D:\Hadoop", [System.EnvironmentVariableTarget]::Machine)
137
- $hadoopHome = [System.Environment]::GetEnvironmentVariable("HADOOP_HOME", [System.EnvironmentVariableTarget]::Machine)
138
- Write-Host "New HADOOP_HOME environment variable: $hadoopHome"
139
- $path = [System.Environment]::GetEnvironmentVariable("Path", [System.EnvironmentVariableTarget]::Machine)
140
- Write-Host "Original Path environment variable: $path"
141
- $newPath = $path + ";D:\Hadoop\bin"
142
- [System.Environment]::SetEnvironmentVariable("Path", $newPath,[System.EnvironmentVariableTarget]::Machine)
143
- $updatedPath = [System.Environment]::GetEnvironmentVariable("Path", [System.EnvironmentVariableTarget]::Machine)
144
- Write-Host "New Path environment variable: $updatedPath"
145
- displayName: 'Download and Extract Hadoop winutils and update env variables for Hadoop usage'
146
125
147
126
# The Prerelease and Release stages are conditioned on whether we are building a pull request and the branch.
148
127
- ${{if and(ne(variables['Build.Reason'], 'PullRequest'), eq(variables['System.TeamProject'], 'internal'))}} :
0 commit comments