Created
March 12, 2015 18:15
-
-
Save jthelin/afd5a64d765fae54abde to your computer and use it in GitHub Desktop.
DShell.cmd - Simple wrapper around Hadoop's distributed shell prog org.apache.hadoop.yarn.applications.distributedshell.Client
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
@setlocal | |
@Echo OFF | |
if "%1" == "" ( | |
set ShellCmd=-help | |
) else ( | |
set ShellCmd=-shell_command %1 | |
shift | |
) | |
if "%1" == "" ( | |
set ShellArgs= | |
) else ( | |
set ShellArgs=-shell_args %* | |
) | |
set HadoopCmd=%HADOOP_HOME%\bin\hadoop.cmd | |
call "%HadoopCmd%" org.apache.hadoop.yarn.applications.distributedshell.Client -jar "%HADOOP_HOME%\share\hadoop\yarn\hadoop-yarn-applications-distributedshell-2.6.0.jar" %ShellCmd% %ShellArgs% | |
if ERRORLEVEL 1 ( | |
Echo Error %ERRORLEVEL% from DShell cmd: %ShellCmd% %ShellArgs% | |
exit /B %ERRORLEVEL% | |
) else ( | |
Echo DShell cmd completed successfully: %ShellCmd% %ShellArgs% | |
exit /B 0 | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment