mapred-config.cmd 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. @echo off
  2. @rem Licensed to the Apache Software Foundation (ASF) under one or more
  3. @rem contributor license agreements. See the NOTICE file distributed with
  4. @rem this work for additional information regarding copyright ownership.
  5. @rem The ASF licenses this file to You under the Apache License, Version 2.0
  6. @rem (the "License"); you may not use this file except in compliance with
  7. @rem the License. You may obtain a copy of the License at
  8. @rem
  9. @rem http://www.apache.org/licenses/LICENSE-2.0
  10. @rem
  11. @rem Unless required by applicable law or agreed to in writing, software
  12. @rem distributed under the License is distributed on an "AS IS" BASIS,
  13. @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. @rem See the License for the specific language governing permissions and
  15. @rem limitations under the License.
  16. @rem included in all the hdfs scripts with source command
  17. @rem should not be executed directly
  18. if not defined HADOOP_BIN_PATH (
  19. set HADOOP_BIN_PATH=%~dp0
  20. )
  21. if "%HADOOP_BIN_PATH:~-1%" == "\" (
  22. set HADOOP_BIN_PATH=%HADOOP_BIN_PATH:~0,-1%
  23. )
  24. set DEFAULT_LIBEXEC_DIR=%HADOOP_BIN_PATH%\..\libexec
  25. if not defined HADOOP_LIBEXEC_DIR (
  26. set HADOOP_LIBEXEC_DIR=%DEFAULT_LIBEXEC_DIR%
  27. )
  28. if exist %HADOOP_LIBEXEC_DIR%\hadoop-config.cmd (
  29. call %HADOOP_LIBEXEC_DIR%\hadoop-config.cmd %*
  30. ) else if exist %HADOOP_COMMON_HOME%\libexec\hadoop-config.cmd (
  31. call %HADOOP_COMMON_HOME%\libexec\hadoop-config.cmd %*
  32. ) else if exist %HADOOP_HOME%\libexec\hadoop-config.cmd (
  33. call %HADOOP_HOME%\libexec\hadoop-config.cmd %*
  34. ) else (
  35. echo Hadoop common not found.
  36. )
  37. :eof