This is an automated email from the ASF dual-hosted git repository.
jermy pushed a commit to branch master
in repository
https://gitbox.apache.org/repos/asf/incubator-hugegraph-toolchain.git
The following commit(s) were added to refs/heads/master by this push:
new 1fdc4efd fix hbase loader options (#548)
1fdc4efd is described below
commit 1fdc4efd55c2715641f875494703586a321c22ad
Author: Liu Xiao <[email protected]>
AuthorDate: Sat Dec 9 23:41:46 2023 +0800
fix hbase loader options (#548)
---
.../loader/direct/loader/HBaseDirectLoader.java | 4 +--
.../hugegraph/loader/executor/LoadOptions.java | 40 +++++++++++++---------
2 files changed, 25 insertions(+), 19 deletions(-)
diff --git
a/hugegraph-loader/src/main/java/org/apache/hugegraph/loader/direct/loader/HBaseDirectLoader.java
b/hugegraph-loader/src/main/java/org/apache/hugegraph/loader/direct/loader/HBaseDirectLoader.java
index 7456e927..fd1a0236 100644
---
a/hugegraph-loader/src/main/java/org/apache/hugegraph/loader/direct/loader/HBaseDirectLoader.java
+++
b/hugegraph-loader/src/main/java/org/apache/hugegraph/loader/direct/loader/HBaseDirectLoader.java
@@ -74,10 +74,10 @@ public class HBaseDirectLoader extends
DirectLoader<ImmutableBytesWritable, KeyV
String tableName = null;
if (struct.edges().size() > 0) {
- tableName = this.loadOptions.edgeTablename;
+ tableName = this.loadOptions.edgeTableName;
} else if (struct.vertices().size() > 0) {
- tableName = this.loadOptions.vertexTablename;
+ tableName = this.loadOptions.vertexTableName;
}
return tableName;
diff --git
a/hugegraph-loader/src/main/java/org/apache/hugegraph/loader/executor/LoadOptions.java
b/hugegraph-loader/src/main/java/org/apache/hugegraph/loader/executor/LoadOptions.java
index fb2a7d9d..d2a8a454 100644
---
a/hugegraph-loader/src/main/java/org/apache/hugegraph/loader/executor/LoadOptions.java
+++
b/hugegraph-loader/src/main/java/org/apache/hugegraph/loader/executor/LoadOptions.java
@@ -209,28 +209,34 @@ public class LoadOptions implements Serializable {
description = "Sink to different storage")
public boolean sinkType = true;
+ @Parameter(names = {"--vertex-partitions"}, arity = 1,
+ validateWith = {PositiveValidator.class},
+ description = "The number of partitions of the HBase vertex
table")
+ public int vertexPartitions = 64;
+
@Parameter(names = {"--edge-partitions"}, arity = 1,
+ validateWith = {PositiveValidator.class},
description = "The number of partitions of the HBase edge
table")
public int edgePartitions = 64;
- @Parameter(names = {"--vertex-partitions"}, arity = 1,
- description = "The number of partitions of the HBase vertex
table")
- public int vertexPartitions = 64;
+ @Parameter(names = {"--vertex-table-name"}, arity = 1,
+ description = "HBase vertex table name")
+ public String vertexTableName;
- @Parameter(names = {"edgeTablename"}, arity = 1,
- description = "edgeTablename")
- public String edgeTablename;
- @Parameter(names = {"vertexTablename"}, arity = 1,
- description = "vertexTablename")
- public String vertexTablename;
- @Parameter(names = {"hbaseZKQuorum"}, arity = 1,
- description = "hbaseZKQuorum")
+ @Parameter(names = {"--edge-table-name"}, arity = 1,
+ description = "HBase edge table name")
+ public String edgeTableName;
+
+ @Parameter(names = {"--hbase-zk-quorum"}, arity = 1,
+ description = "HBase zookeeper quorum")
public String hbaseZKQuorum;
- @Parameter(names = {"hbaseZKPort"}, arity = 1,
- description = "hbaseZKPort")
+
+ @Parameter(names = {"--hbase-zk-port"}, arity = 1,
+ description = "HBase zookeeper port")
public String hbaseZKPort;
- @Parameter(names = {"hbaseZKParent"}, arity = 1,
- description = "hbaseZKParent")
+
+ @Parameter(names = {"--hbase-zk-parent"}, arity = 1,
+ description = "HBase zookeeper parent")
public String hbaseZKParent;
public String workModeString() {
@@ -292,8 +298,8 @@ public class LoadOptions implements Serializable {
public void copyBackendStoreInfo (BackendStoreInfo backendStoreInfo) {
E.checkArgument(null != backendStoreInfo, "The backendStoreInfo can't
be null");
- this.edgeTablename = backendStoreInfo.getEdgeTablename();
- this.vertexTablename = backendStoreInfo.getVertexTablename();
+ this.edgeTableName = backendStoreInfo.getEdgeTablename();
+ this.vertexTableName = backendStoreInfo.getVertexTablename();
this.hbaseZKParent = backendStoreInfo.getHbaseZKParent();
this.hbaseZKPort = backendStoreInfo.getHbaseZKPort();
this.hbaseZKQuorum = backendStoreInfo.getHbaseZKQuorum();