hadoop-env.cmd 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  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 Set Hadoop-specific environment variables here.
  17. @rem The only required environment variable is JAVA_HOME. All others are
  18. @rem optional. When running a distributed configuration it is best to
  19. @rem set JAVA_HOME in this file, so that it is correctly defined on
  20. @rem remote nodes.
  21. @rem The java implementation to use. Required.
  22. set JAVA_HOME=%JAVA_HOME%
  23. @rem The jsvc implementation to use. Jsvc is required to run secure datanodes.
  24. @rem set JSVC_HOME=%JSVC_HOME%
  25. @rem set HADOOP_CONF_DIR=
  26. @rem Extra Java CLASSPATH elements. Automatically insert capacity-scheduler.
  27. if exist %HADOOP_HOME%\contrib\capacity-scheduler (
  28. if not defined HADOOP_CLASSPATH (
  29. set HADOOP_CLASSPATH=%HADOOP_HOME%\contrib\capacity-scheduler\*.jar
  30. ) else (
  31. set HADOOP_CLASSPATH=%HADOOP_CLASSPATH%;%HADOOP_HOME%\contrib\capacity-scheduler\*.jar
  32. )
  33. )
  34. @rem The maximum amount of heap to use, in MB. Default is 1000.
  35. @rem set HADOOP_HEAPSIZE=
  36. @rem set HADOOP_NAMENODE_INIT_HEAPSIZE=""
  37. @rem Extra Java runtime options. Empty by default.
  38. @rem set HADOOP_OPTS=%HADOOP_OPTS% -Djava.net.preferIPv4Stack=true
  39. @rem Command specific options appended to HADOOP_OPTS when specified
  40. if not defined HADOOP_SECURITY_LOGGER (
  41. set HADOOP_SECURITY_LOGGER=INFO,RFAS
  42. )
  43. if not defined HDFS_AUDIT_LOGGER (
  44. set HDFS_AUDIT_LOGGER=INFO,NullAppender
  45. )
  46. set HADOOP_NAMENODE_OPTS=-Dhadoop.security.logger=%HADOOP_SECURITY_LOGGER% -Dhdfs.audit.logger=%HDFS_AUDIT_LOGGER% %HADOOP_NAMENODE_OPTS%
  47. set HADOOP_DATANODE_OPTS=-Dhadoop.security.logger=ERROR,RFAS %HADOOP_DATANODE_OPTS%
  48. set HADOOP_SECONDARYNAMENODE_OPTS=-Dhadoop.security.logger=%HADOOP_SECURITY_LOGGER% -Dhdfs.audit.logger=%HDFS_AUDIT_LOGGER% %HADOOP_SECONDARYNAMENODE_OPTS%
  49. @rem The following applies to multiple commands (fs, dfs, fsck, distcp etc)
  50. set HADOOP_CLIENT_OPTS=-Xmx512m %HADOOP_CLIENT_OPTS%
  51. @rem set HADOOP_JAVA_PLATFORM_OPTS="-XX:-UsePerfData %HADOOP_JAVA_PLATFORM_OPTS%"
  52. @rem On secure datanodes, user to run the datanode as after dropping privileges
  53. set HADOOP_SECURE_DN_USER=%HADOOP_SECURE_DN_USER%
  54. @rem Where log files are stored. %HADOOP_HOME%/logs by default.
  55. @rem set HADOOP_LOG_DIR=%HADOOP_LOG_DIR%\%USERNAME%
  56. @rem Where log files are stored in the secure data environment.
  57. set HADOOP_SECURE_DN_LOG_DIR=%HADOOP_LOG_DIR%\%HADOOP_HDFS_USER%
  58. @rem The directory where pid files are stored. /tmp by default.
  59. @rem NOTE: this should be set to a directory that can only be written to by
  60. @rem the user that will run the hadoop daemons. Otherwise there is the
  61. @rem potential for a symlink attack.
  62. set HADOOP_PID_DIR=%HADOOP_PID_DIR%
  63. set HADOOP_SECURE_DN_PID_DIR=%HADOOP_PID_DIR%
  64. @rem A string representing this instance of hadoop. %USERNAME% by default.
  65. set HADOOP_IDENT_STRING=%USERNAME%