-
-
Save shivaram/bd5d17c31ce9d89035559fa956f59fc1 to your computer and use it in GitHub Desktop.
Powershell script to install winutils
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ========================== Hadoop bin package | |
$hadoopVer = "2.6.4" | |
$hadoopPath = "$tools\hadoop" | |
if (!(Test-Path $hadoopPath)) { | |
New-Item -ItemType Directory -Force -Path $hadoopPath | Out-Null | |
} | |
Push-Location $hadoopPath | |
$url = "https://github.com/steveloughran/winutils/archive/master.zip" | |
$output = "winutils-master.zip" | |
(New-Object System.Net.WebClient).DownloadFile($url, $output) | |
# extract | |
Invoke-Expression "unzip winutils-master.zip" | |
# add hadoop bin to environment variables | |
$env:HADOOP_HOME = "$hadoopPath/winutils-master/hadoop-$hadoopVer" | |
$env:Path += ";$env:HADOOP_HOME\bin" | |
Pop-Location |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment