yarn-env.sh 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. # Licensed to the Apache Software Foundation (ASF) under one or more
  2. # contributor license agreements. See the NOTICE file distributed with
  3. # this work for additional information regarding copyright ownership.
  4. # The ASF licenses this file to You under the Apache License, Version 2.0
  5. # (the "License"); you may not use this file except in compliance with
  6. # the License. You may obtain a copy of the License at
  7. #
  8. # http://www.apache.org/licenses/LICENSE-2.0
  9. #
  10. # Unless required by applicable law or agreed to in writing, software
  11. # distributed under the License is distributed on an "AS IS" BASIS,
  12. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. # See the License for the specific language governing permissions and
  14. # limitations under the License.
  15. ##
  16. ## THIS FILE ACTS AS AN OVERRIDE FOR hadoop-env.sh FOR ALL
  17. ## WORK DONE BY THE yarn AND RELATED COMMANDS.
  18. ##
  19. ## Precedence rules:
  20. ##
  21. ## yarn-env.sh > hadoop-env.sh > hard-coded defaults
  22. ##
  23. ## YARN_xyz > HADOOP_xyz > hard-coded defaults
  24. ##
  25. ###
  26. # Generic settings for YARN
  27. ###
  28. # User for YARN daemons
  29. export HADOOP_YARN_USER=${HADOOP_YARN_USER:-yarn}
  30. #
  31. # By default, YARN will use HADOOP_CONF_DIR. Specify a custom
  32. # YARN_CONF_DIR here
  33. # export YARN_CONF_DIR="${YARN_CONF_DIR:-$HADOOP_YARN_HOME/conf}"
  34. #
  35. # Override Hadoop's log directory & file
  36. # export YARN_LOG_DIR="$HADOOP_YARN_HOME/logs"
  37. # export YARN_LOGFILE='yarn.log'
  38. # Need a custom-to-YARN service-level authorization policy file?
  39. # export YARN_POLICYFILE="yarn-policy.xml"
  40. #Override the log4j settings for all YARN apps
  41. # export YARN_ROOT_LOGGER="INFO,console"
  42. ###
  43. # Resource Manager specific parameters
  44. ###
  45. # Specify the max heapsize for the ResourceManager using a numerical value
  46. # in the scale of MB. For example, to specify an jvm option of -Xmx1000m, set
  47. # the value to 1000.
  48. # This value will be overridden by an Xmx setting specified in either YARN_OPTS,
  49. # HADOOP_OPTS, and/or YARN_RESOURCEMANAGER_OPTS.
  50. # If not specified, the default value will be picked from either YARN_HEAPMAX
  51. # or JAVA_HEAP_MAX with YARN_HEAPMAX as the preferred option of the two.
  52. #
  53. #export YARN_RESOURCEMANAGER_HEAPSIZE=1000
  54. # Specify the JVM options to be used when starting the ResourceManager.
  55. # These options will be appended to the options specified as YARN_OPTS
  56. # and therefore may override any similar flags set in YARN_OPTS
  57. #
  58. # Examples for a Sun/Oracle JDK:
  59. # a) override the appsummary log file:
  60. # export YARN_RESOURCEMANAGER_OPTS="-Dyarn.server.resourcemanager.appsummary.log.file=rm-appsummary.log -Dyarn.server.resourcemanager.appsummary.logger=INFO,RMSUMMARY"
  61. #
  62. # b) Set JMX options
  63. # export YARN_RESOURCEMANAGER_OPTS="-Dcom.sun.management.jmxremote=true -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.port=1026"
  64. #
  65. # c) Set garbage collection logs from hadoop-env.sh
  66. # export YARN_RESOURCE_MANAGER_OPTS="${HADOOP_GC_SETTINGS} -Xloggc:${HADOOP_LOG_DIR}/gc-rm.log-$(date +'%Y%m%d%H%M')"
  67. #
  68. # d) ... or set them directly
  69. # export YARN_RESOURCEMANAGER_OPTS="-verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps -Xloggc:${HADOOP_LOG_DIR}/gc-rm.log-$(date +'%Y%m%d%H%M')"
  70. #
  71. #
  72. # export YARN_RESOURCEMANAGER_OPTS=
  73. ###
  74. # Node Manager specific parameters
  75. ###
  76. # Specify the max Heapsize for the NodeManager using a numerical value
  77. # in the scale of MB. For example, to specify an jvm option of -Xmx1000m, set
  78. # the value to 1000.
  79. # This value will be overridden by an Xmx setting specified in either YARN_OPTS,
  80. # HADOOP_OPTS, and/or YARN_NODEMANAGER_OPTS.
  81. # If not specified, the default value will be picked from either YARN_HEAPMAX
  82. # or JAVA_HEAP_MAX with YARN_HEAPMAX as the preferred option of the two.
  83. #
  84. #export YARN_NODEMANAGER_HEAPSIZE=1000
  85. # Specify the JVM options to be used when starting the NodeManager.
  86. # These options will be appended to the options specified as YARN_OPTS
  87. # and therefore may override any similar flags set in YARN_OPTS
  88. #
  89. # See ResourceManager for some examples
  90. #
  91. #export YARN_NODEMANAGER_OPTS=
  92. ###
  93. # TimeLineServer specifc parameters
  94. ###
  95. # Specify the max Heapsize for the timeline server using a numerical value
  96. # in the scale of MB. For example, to specify an jvm option of -Xmx1000m, set
  97. # the value to 1000.
  98. # This value will be overridden by an Xmx setting specified in either YARN_OPTS,
  99. # HADOOP_OPTS, and/or YARN_TIMELINESERVER_OPTS.
  100. # If not specified, the default value will be picked from either YARN_HEAPMAX
  101. # or JAVA_HEAP_MAX with YARN_HEAPMAX as the preferred option of the two.
  102. #
  103. #export YARN_TIMELINESERVER_HEAPSIZE=1000
  104. # Specify the JVM options to be used when starting the TimeLineServer.
  105. # These options will be appended to the options specified as YARN_OPTS
  106. # and therefore may override any similar flags set in YARN_OPTS
  107. #
  108. # See ResourceManager for some examples
  109. #
  110. #export YARN_TIMELINESERVER_OPTS=