diff --git a/hugegraph-dist/src/assembly/static/bin/init-store.sh b/hugegraph-dist/src/assembly/static/bin/init-store.sh index 4905ecb952..c310055ce6 100755 --- a/hugegraph-dist/src/assembly/static/bin/init-store.sh +++ b/hugegraph-dist/src/assembly/static/bin/init-store.sh @@ -30,7 +30,7 @@ cd $TOP echo "Initializing HugeGraph Store..." -$JAVA -cp $LIB/hugegraph-dist-*.jar -Djava.ext.dirs=$LIB:$PLUGINS \ +$JAVA -cp $LIB/hugegraph-dist-*.jar -Djava.ext.dirs=$LIB:$PLUGINS:$JAVA_HOME/jre/lib/ext \ com.baidu.hugegraph.cmd.InitStore \ "$CONF"/gremlin-server.yaml "$CONF"/rest-server.properties diff --git a/hugegraph-hbase/src/main/java/com/baidu/hugegraph/backend/store/hbase/HbaseOptions.java b/hugegraph-hbase/src/main/java/com/baidu/hugegraph/backend/store/hbase/HbaseOptions.java index ae74610fe0..34cca5baad 100644 --- a/hugegraph-hbase/src/main/java/com/baidu/hugegraph/backend/store/hbase/HbaseOptions.java +++ b/hugegraph-hbase/src/main/java/com/baidu/hugegraph/backend/store/hbase/HbaseOptions.java @@ -114,6 +114,14 @@ public static synchronized HbaseOptions instance() { "/etc/krb5.conf" ); + public static final ConfigOption HBASE_HBASE_SITE = + new ConfigOption<>( + "hbase.hbase_site", + "The HBase's configuration file", + null, + "/etc/hbase/conf/hdfs-site.xml" + ); + public static final ConfigOption HBASE_KERBEROS_PRINCIPAL = new ConfigOption<>( "hbase.kerberos_principal", diff --git a/hugegraph-hbase/src/main/java/com/baidu/hugegraph/backend/store/hbase/HbaseSessions.java b/hugegraph-hbase/src/main/java/com/baidu/hugegraph/backend/store/hbase/HbaseSessions.java index 336a6640c4..8ac922280c 100644 --- a/hugegraph-hbase/src/main/java/com/baidu/hugegraph/backend/store/hbase/HbaseSessions.java +++ b/hugegraph-hbase/src/main/java/com/baidu/hugegraph/backend/store/hbase/HbaseSessions.java @@ -33,6 +33,7 @@ import java.util.concurrent.Future; import org.apache.hadoop.conf.Configuration; +import org.apache.hadoop.fs.Path; import org.apache.hadoop.hbase.Cell; import org.apache.hadoop.hbase.CellScanner; import org.apache.hadoop.hbase.CellUtil; @@ -135,6 +136,9 @@ public synchronized void open() throws IOException { hConfig.setInt("hbase.hconnection.threads.max", config.get(HbaseOptions.HBASE_THREADS_MAX)); + String hbaseSite = config.get(HbaseOptions.HBASE_HBASE_SITE); + hConfig.addResource(new Path(hbaseSite)); + if(isEnableKerberos) { String krb5Conf = config.get(HbaseOptions.HBASE_KRB5_CONF); System.setProperty("java.security.krb5.conf", krb5Conf);