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