diff --git src/main/docbkx/configuration.xml src/main/docbkx/configuration.xml index 5949b0a..898aa85 100644 --- src/main/docbkx/configuration.xml +++ src/main/docbkx/configuration.xml @@ -62,6 +62,11 @@ Script for Windows and Linux / Unix environments to set up the working environment for HBase, including the location of Java, Java options, and other environment variables. The file contains many commented-out examples to provide guidance. + + In HBase 0.98.5 and newer, you must set JAVA_HOME on each node of + your cluster. hbase-env.sh provides a handy mechanism to do + this. + @@ -177,6 +182,12 @@ + + In HBase 0.98.5 and newer, you must set JAVA_HOME on each node of + your cluster. hbase-env.sh provides a handy mechanism to do + this. + + Operating System Utilities @@ -1187,27 +1198,17 @@ example9 xml:id="hbase_env"> <filename>hbase-env.sh</filename> - Below we use a diff to show the differences from default in the - hbase-env.sh file. Here we are setting the HBase heap to be 4G - instead of the default 1G. + The following lines in the hbase-env.sh file show how to set the + JAVA_HOME environment variable (required for HBase 0.98.5 and newer) and + set the heap to 4 GB (rather than the default value of 1 GB). If you copy and paste this + example, be sure to adjust the JAVA_HOME to suit your environment. +# The java implementation to use. +export JAVA_HOME=/usr/java/jdk1.7.0/ -$ git diff hbase-env.sh -diff --git a/conf/hbase-env.sh b/conf/hbase-env.sh -index e70ebc6..96f8c27 100644 ---- a/conf/hbase-env.sh -+++ b/conf/hbase-env.sh -@@ -31,7 +31,7 @@ export JAVA_HOME=/usr/lib//jvm/java-6-sun/ - # export HBASE_CLASSPATH= - - # The maximum amount of heap to use, in MB. Default is 1000. --# export HBASE_HEAPSIZE=1000 -+export HBASE_HEAPSIZE=4096 - - # Extra Java runtime options. - # Below are what we set by default. May only work with SUN JVM. - +# The maximum amount of heap to use, in MB. Default is 1000. +export HBASE_HEAPSIZE=4096 Use rsync to copy the content of the conf diff --git src/main/docbkx/getting_started.xml src/main/docbkx/getting_started.xml index b1ff0ea..2e0ee4e 100644 --- src/main/docbkx/getting_started.xml +++ src/main/docbkx/getting_started.xml @@ -33,9 +33,9 @@
Introduction - will get you up and running on a single-node, standalone instance of - HBase. + will get you up and running on a single-node, standalone + instance of HBase, followed by a pseudo-distributed single-machine instance, and finally a + fully-distributed cluster.
]]>-hadoop2/ + For HBase 0.98.5 and later, you are required to set the JAVA_HOME + environment variable before starting HBase. Prior to 0.98.5, HBase attempted to detect + the location of Java if the variables was not set. You can set the variable via your + operating system's usual mechanism, but HBase provides a central mechanism, + conf/hbase-env.sh. Edit this file, uncomment the line starting + with JAVA_HOME, and set it to the appropriate location for your + operating system. The JAVA_HOME variable should be set to a directory + which contains the executable file bin/java. Most modern Linux + operating systems provide a mechanism, such as /usr/bin/alternatives on RHEL or CentOS, + for transparently switching between versions of executables such as Java. In this case, + you can set JAVA_HOME to the directory containing the symbolic link to + bin/java, which is usually /usr. + JAVA_HOME=/usr + + These instructions assume that each node of your cluster uses the same + configuration. If this is not the case, you may need to set JAVA_HOME + separately for each node. + + + Edit conf/hbase-site.xml, which is the main HBase configuration file. At this time, you only need to specify the directory on the local filesystem where HBase and Zookeeper write data. By default, a new directory is created under /tmp. Many