hbase-env.sh 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. #
  2. #/**
  3. # * Licensed to the Apache Software Foundation (ASF) under one
  4. # * or more contributor license agreements. See the NOTICE file
  5. # * distributed with this work for additional information
  6. # * regarding copyright ownership. The ASF licenses this file
  7. # * to you under the Apache License, Version 2.0 (the
  8. # * "License"); you may not use this file except in compliance
  9. # * with the License. You may obtain a copy of the License at
  10. # *
  11. # * http://www.apache.org/licenses/LICENSE-2.0
  12. # *
  13. # * Unless required by applicable law or agreed to in writing, software
  14. # * distributed under the License is distributed on an "AS IS" BASIS,
  15. # * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  16. # * See the License for the specific language governing permissions and
  17. # * limitations under the License.
  18. # */
  19. # Set environment variables here.
  20. # This script sets variables multiple times over the course of starting an hbase process,
  21. # so try to keep things idempotent unless you want to take an even deeper look
  22. # into the startup scripts (bin/hbase, etc.)
  23. # The java implementation to use. Java 1.7+ required.
  24. export JAVA_HOME=/share/lib/jdk
  25. # Extra Java CLASSPATH elements. Optional.
  26. # export HBASE_CLASSPATH=
  27. # The maximum amount of heap to use. Default is left to JVM default.
  28. # export HBASE_HEAPSIZE=1G
  29. # Uncomment below if you intend to use off heap cache. For example, to allocate 8G of
  30. # offheap, set the value to "8G".
  31. # export HBASE_OFFHEAPSIZE=1G
  32. # Extra Java runtime options.
  33. # Below are what we set by default. May only work with SUN JVM.
  34. # For more on why as well as other possible settings,
  35. # see http://wiki.apache.org/hadoop/PerformanceTuning
  36. export HBASE_OPTS="-XX:+UseConcMarkSweepGC"
  37. # Configure PermSize. Only needed in JDK7. You can safely remove it for JDK8+
  38. #export HBASE_MASTER_OPTS="$HBASE_MASTER_OPTS -XX:PermSize=128m -XX:MaxPermSize=128m"
  39. #export HBASE_REGIONSERVER_OPTS="$HBASE_REGIONSERVER_OPTS -XX:PermSize=128m -XX:MaxPermSize=128m"
  40. # Uncomment one of the below three options to enable java garbage collection logging for the server-side processes.
  41. # This enables basic gc logging to the .out file.
  42. # export SERVER_GC_OPTS="-verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps"
  43. # This enables basic gc logging to its own file.
  44. # If FILE-PATH is not replaced, the log file(.gc) would still be generated in the HBASE_LOG_DIR .
  45. # export SERVER_GC_OPTS="-verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps -Xloggc:<FILE-PATH>"
  46. # This enables basic GC logging to its own file with automatic log rolling. Only applies to jdk 1.6.0_34+ and 1.7.0_2+.
  47. # If FILE-PATH is not replaced, the log file(.gc) would still be generated in the HBASE_LOG_DIR .
  48. # export SERVER_GC_OPTS="-verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps -Xloggc:<FILE-PATH> -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=1 -XX:GCLogFileSize=512M"
  49. # Uncomment one of the below three options to enable java garbage collection logging for the client processes.
  50. # This enables basic gc logging to the .out file.
  51. # export CLIENT_GC_OPTS="-verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps"
  52. # This enables basic gc logging to its own file.
  53. # If FILE-PATH is not replaced, the log file(.gc) would still be generated in the HBASE_LOG_DIR .
  54. # export CLIENT_GC_OPTS="-verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps -Xloggc:<FILE-PATH>"
  55. # This enables basic GC logging to its own file with automatic log rolling. Only applies to jdk 1.6.0_34+ and 1.7.0_2+.
  56. # If FILE-PATH is not replaced, the log file(.gc) would still be generated in the HBASE_LOG_DIR .
  57. # export CLIENT_GC_OPTS="-verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps -Xloggc:<FILE-PATH> -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=1 -XX:GCLogFileSize=512M"
  58. # See the package documentation for org.apache.hadoop.hbase.io.hfile for other configurations
  59. # needed setting up off-heap block caching.
  60. # Uncomment and adjust to enable JMX exporting
  61. # See jmxremote.password and jmxremote.access in $JRE_HOME/lib/management to configure remote password access.
  62. # More details at: http://java.sun.com/javase/6/docs/technotes/guides/management/agent.html
  63. # NOTE: HBase provides an alternative JMX implementation to fix the random ports issue, please see JMX
  64. # section in HBase Reference Guide for instructions.
  65. # export HBASE_JMX_BASE="-Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false"
  66. # export HBASE_MASTER_OPTS="$HBASE_MASTER_OPTS $HBASE_JMX_BASE -Dcom.sun.management.jmxremote.port=10101"
  67. # export HBASE_REGIONSERVER_OPTS="$HBASE_REGIONSERVER_OPTS $HBASE_JMX_BASE -Dcom.sun.management.jmxremote.port=10102"
  68. # export HBASE_THRIFT_OPTS="$HBASE_THRIFT_OPTS $HBASE_JMX_BASE -Dcom.sun.management.jmxremote.port=10103"
  69. # export HBASE_ZOOKEEPER_OPTS="$HBASE_ZOOKEEPER_OPTS $HBASE_JMX_BASE -Dcom.sun.management.jmxremote.port=10104"
  70. # export HBASE_REST_OPTS="$HBASE_REST_OPTS $HBASE_JMX_BASE -Dcom.sun.management.jmxremote.port=10105"
  71. # File naming hosts on which HRegionServers will run. $HBASE_HOME/conf/regionservers by default.
  72. # export HBASE_REGIONSERVERS=${HBASE_HOME}/conf/regionservers
  73. # Uncomment and adjust to keep all the Region Server pages mapped to be memory resident
  74. #HBASE_REGIONSERVER_MLOCK=true
  75. #HBASE_REGIONSERVER_UID="hbase"
  76. # File naming hosts on which backup HMaster will run. $HBASE_HOME/conf/backup-masters by default.
  77. # export HBASE_BACKUP_MASTERS=${HBASE_HOME}/conf/backup-masters
  78. # Extra ssh options. Empty by default.
  79. # export HBASE_SSH_OPTS="-o ConnectTimeout=1 -o SendEnv=HBASE_CONF_DIR"
  80. # Where log files are stored. $HBASE_HOME/logs by default.
  81. # export HBASE_LOG_DIR=${HBASE_HOME}/logs
  82. # Enable remote JDWP debugging of major HBase processes. Meant for Core Developers
  83. # export HBASE_MASTER_OPTS="$HBASE_MASTER_OPTS -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8070"
  84. # export HBASE_REGIONSERVER_OPTS="$HBASE_REGIONSERVER_OPTS -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8071"
  85. # export HBASE_THRIFT_OPTS="$HBASE_THRIFT_OPTS -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8072"
  86. # export HBASE_ZOOKEEPER_OPTS="$HBASE_ZOOKEEPER_OPTS -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8073"
  87. # A string representing this instance of hbase. $USER by default.
  88. # export HBASE_IDENT_STRING=$USER
  89. # The scheduling priority for daemon processes. See 'man nice'.
  90. # export HBASE_NICENESS=10
  91. # The directory where pid files are stored. /tmp by default.
  92. # export HBASE_PID_DIR=/var/hadoop/pids
  93. # Seconds to sleep between slave commands. Unset by default. This
  94. # can be useful in large clusters, where, e.g., slave rsyncs can
  95. # otherwise arrive faster than the master can service them.
  96. # export HBASE_SLAVE_SLEEP=0.1
  97. # Tell HBase whether it should manage it's own instance of Zookeeper or not.
  98. # export HBASE_MANAGES_ZK=true
  99. # The default log rolling policy is RFA, where the log file is rolled as per the size defined for the
  100. # RFA appender. Please refer to the log4j.properties file to see more details on this appender.
  101. # In case one needs to do log rolling on a date change, one should set the environment property
  102. # HBASE_ROOT_LOGGER to "<DESIRED_LOG LEVEL>,DRFA".
  103. # For example:
  104. # HBASE_ROOT_LOGGER=INFO,DRFA
  105. # The reason for changing default to RFA is to avoid the boundary case of filling out disk space as
  106. # DRFA doesn't put any cap on the log size. Please refer to HBase-5655 for more context.