@@ -23,6 +23,13 @@ cd $SCRIPTDIR;
2323# Load Omid environment variables
2424source omid-env.sh
2525
26+ # Load HBase environent variables
27+ if [ -r " ${HBASE_CONF_DIR} /hbase-env.sh" ]; then
28+ echo Loading " ${HBASE_CONF_DIR} /hbase-env.sh"
29+ # The main thing here is HBASE_OPTS
30+ source " ${HBASE_CONF_DIR} /hbase-env.sh"
31+ fi
32+
2633# Configure classpath...
2734CLASSPATH=../conf:${HBASE_CONF_DIR} :${HADOOP_CONF_DIR}
2835
@@ -39,6 +46,12 @@ for j in ../lib/*.jar; do
3946 CLASSPATH=$CLASSPATH :$j
4047done
4148
49+ if [ -z ${OMID_OPTS+x} ]; then
50+ OPTS=" $HBASE_OPTS " ;
51+ else
52+ OPTS=" $OMID_OPTS "
53+ fi
54+
4255# JVM detection and list of JDK11 options copied from HBase with slight modifications
4356
4457function read_java_version() {
@@ -70,7 +83,7 @@ function parse_java_major_version() {
7083
7184add_jdk11_jvm_flags () {
7285 # Keep in sync with omid-surefire.jdk11.flags in the root pom.xml
73- OMID_OPTS =" $OMID_OPTS -Dorg.apache.hbase.thirdparty.io.netty.tryReflectionSetAccessible=true --add-modules jdk.unsupported --add-opens java.base/java.io=ALL-UNNAMED --add-opens java.base/java.nio=ALL-UNNAMED --add-opens java.base/sun.nio.ch=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/jdk.internal.ref=ALL-UNNAMED --add-opens java.base/java.lang.reflect=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.util.concurrent=ALL-UNNAMED --add-exports java.base/jdk.internal.misc=ALL-UNNAMED --add-exports java.security.jgss/sun.security.krb5=ALL-UNNAMED --add-exports java.base/sun.net.dns=ALL-UNNAMED --add-exports java.base/sun.net.util=ALL-UNNAMED"
86+ OPTS =" $OPTS -Dorg.apache.hbase.thirdparty.io.netty.tryReflectionSetAccessible=true --add-modules jdk.unsupported --add-opens java.base/java.io=ALL-UNNAMED --add-opens java.base/java.nio=ALL-UNNAMED --add-opens java.base/sun.nio.ch=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/jdk.internal.ref=ALL-UNNAMED --add-opens java.base/java.lang.reflect=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.util.concurrent=ALL-UNNAMED --add-exports java.base/jdk.internal.misc=ALL-UNNAMED --add-exports java.security.jgss/sun.security.krb5=ALL-UNNAMED --add-exports java.base/sun.net.dns=ALL-UNNAMED --add-exports java.base/sun.net.util=ALL-UNNAMED"
7487}
7588
7689setup_jdk_options () {
@@ -126,7 +139,7 @@ setup_jdk_options() {
126139}
127140
128141tso () {
129- exec java $JVM_FLAGS $OMID_OPTS -cp $CLASSPATH org.apache.omid.tso.TSOServer $@
142+ exec java $JVM_FLAGS $OPTS -cp $CLASSPATH org.apache.omid.tso.TSOServer $@
130143}
131144
132145tsoRelauncher () {
@@ -137,11 +150,11 @@ tsoRelauncher() {
137150}
138151
139152createHBaseCommitTable () {
140- exec java $OMID_OPTS -cp $CLASSPATH org.apache.omid.tools.hbase.OmidTableManager commit-table $@
153+ exec java $JVM_FLAGS $OPTS -cp $CLASSPATH org.apache.omid.tools.hbase.OmidTableManager commit-table $@
141154}
142155
143156createHBaseTimestampTable () {
144- exec java $OMID_OPTS -cp $CLASSPATH org.apache.omid.tools.hbase.OmidTableManager timestamp-table $@
157+ exec java $JVM_FLAGS $OPTS -cp $CLASSPATH org.apache.omid.tools.hbase.OmidTableManager timestamp-table $@
145158}
146159
147160usage () {
0 commit comments