hbase-env.sh 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. #
  2. #/**
  3. # * Copyright 2007 The Apache Software Foundation
  4. # *
  5. # * Licensed to the Apache Software Foundation (ASF) under one
  6. # * or more contributor license agreements. See the NOTICE file
  7. # * distributed with this work for additional information
  8. # * regarding copyright ownership. The ASF licenses this file
  9. # * to you under the Apache License, Version 2.0 (the
  10. # * "License"); you may not use this file except in compliance
  11. # * with the License. You may obtain a copy of the License at
  12. # *
  13. # * http://www.apache.org/licenses/LICENSE-2.0
  14. # *
  15. # * Unless required by applicable law or agreed to in writing, software
  16. # * distributed under the License is distributed on an "AS IS" BASIS,
  17. # * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  18. # * See the License for the specific language governing permissions and
  19. # * limitations under the License.
  20. # */
  21. # Set environment variables here.
  22. # This script sets variables multiple times over the course of starting an hbase process,
  23. # so try to keep things idempotent unless you want to take an even deeper look
  24. # into the startup scripts (bin/hbase, etc.)
  25. # The java implementation to use. Java 1.6 required.
  26. export JAVA_HOME=/opt/jdk1.6.0_45
  27. # Extra Java CLASSPATH elements. Optional.
  28. # export HBASE_CLASSPATH=
  29. # The maximum amount of heap to use, in MB. Default is 1000.
  30. # export HBASE_HEAPSIZE=1000
  31. # Extra Java runtime options.
  32. # Below are what we set by default. May only work with SUN JVM.
  33. # For more on why as well as other possible settings,
  34. # see http://wiki.apache.org/hadoop/PerformanceTuning
  35. export HBASE_OPTS="-XX:+UseConcMarkSweepGC"
  36. export HBASE_MASTER_OPTS=" -Xmx1G -Xms1G "
  37. export HBASE_REGIONSERVER_OPTS=" -Xmx8G -Xms8G -XX:+CMSIncrementalMode "
  38. # Uncomment one of the below three options to enable java garbage collection logging for the server-side processes.
  39. # This enables basic gc logging to the .out file.
  40. # export SERVER_GC_OPTS="-verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps"
  41. # This enables basic gc logging to its own file.
  42. # If FILE-PATH is not replaced, the log file(.gc) would still be generated in the HBASE_LOG_DIR .
  43. # export SERVER_GC_OPTS="-verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps -Xloggc:<FILE-PATH>"
  44. # 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+.
  45. # If FILE-PATH is not replaced, the log file(.gc) would still be generated in the HBASE_LOG_DIR .
  46. # export SERVER_GC_OPTS="-verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps -Xloggc:<FILE-PATH> -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=1 -XX:GCLogFileSize=512M"
  47. # Uncomment one of the below three options to enable java garbage collection logging for the client processes.
  48. # This enables basic gc logging to the .out file.
  49. # export CLIENT_GC_OPTS="-verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps"
  50. # This enables basic gc logging to its own file.
  51. # If FILE-PATH is not replaced, the log file(.gc) would still be generated in the HBASE_LOG_DIR .
  52. # export CLIENT_GC_OPTS="-verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps -Xloggc:<FILE-PATH>"
  53. # 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+.
  54. # If FILE-PATH is not replaced, the log file(.gc) would still be generated in the HBASE_LOG_DIR .
  55. # export CLIENT_GC_OPTS="-verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps -Xloggc:<FILE-PATH> -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=1 -XX:GCLogFileSize=512M"
  56. # Uncomment below if you intend to use the EXPERIMENTAL off heap cache.
  57. # export HBASE_OPTS="$HBASE_OPTS -XX:MaxDirectMemorySize="
  58. # Set hbase.offheapcache.percentage in hbase-site.xml to a nonzero value.
  59. # Uncomment and adjust to enable JMX exporting
  60. # See jmxremote.password and jmxremote.access in $JRE_HOME/lib/management to configure remote password access.
  61. # More details at: http://java.sun.com/javase/6/docs/technotes/guides/management/agent.html
  62. #
  63. # export HBASE_JMX_BASE="-Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false"
  64. # export HBASE_MASTER_OPTS="$HBASE_MASTER_OPTS $HBASE_JMX_BASE -Dcom.sun.management.jmxremote.port=10101"
  65. # export HBASE_REGIONSERVER_OPTS="$HBASE_REGIONSERVER_OPTS $HBASE_JMX_BASE -Dcom.sun.management.jmxremote.port=10102"
  66. # export HBASE_THRIFT_OPTS="$HBASE_THRIFT_OPTS $HBASE_JMX_BASE -Dcom.sun.management.jmxremote.port=10103"
  67. # export HBASE_ZOOKEEPER_OPTS="$HBASE_ZOOKEEPER_OPTS $HBASE_JMX_BASE -Dcom.sun.management.jmxremote.port=10104"
  68. # File naming hosts on which HRegionServers will run. $HBASE_HOME/conf/regionservers by default.
  69. # export HBASE_REGIONSERVERS=${HBASE_HOME}/conf/regionservers
  70. # File naming hosts on which backup HMaster will run. $HBASE_HOME/conf/backup-masters by default.
  71. # export HBASE_BACKUP_MASTERS=${HBASE_HOME}/conf/backup-masters
  72. # Extra ssh options. Empty by default.
  73. # export HBASE_SSH_OPTS="-o ConnectTimeout=1 -o SendEnv=HBASE_CONF_DIR"
  74. # Where log files are stored. $HBASE_HOME/logs by default.
  75. # export HBASE_LOG_DIR=${HBASE_HOME}/logs
  76. # Enable remote JDWP debugging of major HBase processes. Meant for Core Developers
  77. # export HBASE_MASTER_OPTS="$HBASE_MASTER_OPTS -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8070"
  78. # export HBASE_REGIONSERVER_OPTS="$HBASE_REGIONSERVER_OPTS -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8071"
  79. # export HBASE_THRIFT_OPTS="$HBASE_THRIFT_OPTS -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8072"
  80. # export HBASE_ZOOKEEPER_OPTS="$HBASE_ZOOKEEPER_OPTS -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8073"
  81. # A string representing this instance of hbase. $USER by default.
  82. # export HBASE_IDENT_STRING=$USER
  83. # The scheduling priority for daemon processes. See 'man nice'.
  84. # export HBASE_NICENESS=10
  85. # The directory where pid files are stored. /tmp by default.
  86. # export HBASE_PID_DIR=/var/hadoop/pids
  87. # Seconds to sleep between slave commands. Unset by default. This
  88. # can be useful in large clusters, where, e.g., slave rsyncs can
  89. # otherwise arrive faster than the master can service them.
  90. # export HBASE_SLAVE_SLEEP=0.1
  91. # Tell HBase whether it should manage it's own instance of Zookeeper or not.
  92. export HBASE_MANAGES_ZK=false