Hey,
The following lines in the hbase-env.sh file shows how to set the JAVA_HOME environment variable (required for HBase) 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/lib/java/jdk1.8.0/
The maximum amount of heap to use. Default is left to JVM default.
export HBASE_HEAPSIZE=4G