Skip to content

Instantly share code, notes, and snippets.

@shivaram
Created May 10, 2017 21:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shivaram/bd5d17c31ce9d89035559fa956f59fc1 to your computer and use it in GitHub Desktop.
Save shivaram/bd5d17c31ce9d89035559fa956f59fc1 to your computer and use it in GitHub Desktop.
Powershell script to install winutils
# ========================== 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