diff --git a/hetu-docs/en/connector/HBase.md b/hetu-docs/en/connector/HBase.md
index 0876de8f4..d48ef2a5e 100644
--- a/hetu-docs/en/connector/HBase.md
+++ b/hetu-docs/en/connector/HBase.md
@@ -96,7 +96,7 @@ debug=true;
| row_id | String | The first column name | No | row_id is the column name corresponding to rowkey in the hbase table |
| hbase_table_name | String | null | No | hbase_table_name specifies the tablespace and table name on the hbase data source to be linked, use ":" connect tablespace and table name, the default tablespace is "default". |
| external | Boolean | true | No | If external is true, it means that the table is a mapping table of the table in the hbase data source. It does not support deleting the original table on the hbase data source; if external is false, the table on hbase data source will be deleted at the same time as the local hbase table is deleted. |
-
+| split\_by\_char| String| 0~9,a~z,A~Z| No| split\_by\_char is the basis for sharding, if the first character of rowkey consists of digits, sharding can be performed based on different digits to improve concurrency. Different types of symbols are separated by commas. If this parameter is set incorrectly, the query result may be incomplete. Set it based on the actual rowkey.|
## Data Types
diff --git a/hetu-docs/zh/connector/HBase.md b/hetu-docs/zh/connector/HBase.md
index 1875c7774..c7cfa5ecd 100644
--- a/hetu-docs/zh/connector/HBase.md
+++ b/hetu-docs/zh/connector/HBase.md
@@ -97,6 +97,7 @@ debug=true;
| row\_id| String| 第一个列名| 否| row\_id为HBase表中RowKey对应的列名|
| hbase\_table\_name| String| NULL| 否| hbase\_table\_name指定要链接的HBase数据源上的表空间和表名,使用“:”连接表空间和表名,默认表空间为“default”。|
| external| Boolean| true| 否| 如果external为true,表示该表是HBase数据源中表的映射表。不支持删除HBase数据源上原有的表。当external为false时,删除本地HBase表的同时也会删除HBase数据源上的表。|
+| split\_by\_char| String| 0~9,a~z,A~Z| 否| split\_by\_char为分片切割的依据,若RowKey的第一个字符由数字构成,则可以根据不同的数字进行分片切割,提高查询并发度。不同类型的符号用逗号隔开。如果设置不当,会导致查询数据结果不完整,请根据RowKey的实际情况进行配置。|
## 数据说明
diff --git a/hetu-hbase/pom.xml b/hetu-hbase/pom.xml
index 70c6dfe50..3e1e5b090 100644
--- a/hetu-hbase/pom.xml
+++ b/hetu-hbase/pom.xml
@@ -37,29 +37,6 @@
-
- org.weakref
- jmxutils
- ${dep.jmxutils.version}
- compile
-
-
-
- io.prestosql.hadoop
- hadoop-apache
- ${dep.prestosql.apache.hadoop.version}
-
-
- org.antlr
- antlr4-runtime
-
-
- com.fasterxml.jackson.core
- jackson-databind
-
-
-
-
commons-codec
commons-codec
@@ -71,6 +48,11 @@
hetu-common
+
+ io.prestosql.hadoop
+ hadoop-apache
+
+
io.hetu.core
@@ -149,127 +131,23 @@
${version.commons-lang3}
-
- org.apache.hbase
- hbase-common
- ${version.hbase}
-
-
- commons-codec
- commons-codec
-
-
- jackson-databind
- com.fasterxml.jackson.core
-
-
- hadoop-common
- org.apache.hadoop
-
-
- guice-servlet
- com.google.inject.extensions
-
-
- jackson-annotations
- com.fasterxml.jackson.core
-
-
- commons-logging
- commons-logging
-
-
- jaxb-api
- javax.xml.bind
-
-
- jackson-jaxrs-json-provider
- com.fasterxml.jackson.jaxrs
-
-
- jackson-module-jaxb-annotations
- com.fasterxml.jackson.module
-
-
- jackson-core
- com.fasterxml.jackson.core
-
-
- hadoop-yarn-common
- org.apache.hadoop
-
-
- junit
- junit
-
-
- protobuf-java
- com.google.protobuf
-
-
- hadoop-annotations
- org.apache.hadoop
-
-
- jetty-util
- org.mortbay.jetty
-
-
- hadoop-mapreduce-client-core
- org.apache.hadoop
-
-
- error_prone_annotations
- com.google.errorprone
-
-
-
-
org.apache.hbase
hbase-client
${version.hbase}
- commons-codec
- commons-codec
-
-
- htrace-core4
- org.apache.htrace
+ error_prone_annotations
+ com.google.errorprone
jcodings
org.jruby.jcodings
-
- jackson-databind
- com.fasterxml.jackson.core
-
-
- hbase-common
- org.apache.hbase
-
-
- commons-logging
- commons-logging
-
-
- junit
- junit
-
hadoop-common
org.apache.hadoop
-
- netty-all
- io.netty
-
-
- hadoop-mapreduce-client-core
- org.apache.hadoop
-
hadoop-auth
org.apache.hadoop
@@ -287,6 +165,19 @@
com.fasterxml.jackson.core
runtime
+
+
+ org.apache.hbase
+ hbase-common
+ ${version.hbase}
+
+
+ hadoop-common
+ org.apache.hadoop
+
+
+
+
org.testng
@@ -294,10 +185,27 @@
test
+
+ org.weakref
+ jmxutils
+ ${dep.jmxutils.version}
+ compile
+
+
io.hetu.core
presto-tests
test
+
+
+ plexus-cipher
+ org.sonatype.plexus
+
+
+ plexus-classworlds
+ org.codehaus.plexus
+
+
@@ -353,4 +261,4 @@
-
+
\ No newline at end of file
diff --git a/hetu-hbase/src/main/java/io/hetu/core/plugin/hbase/conf/HBaseTableProperties.java b/hetu-hbase/src/main/java/io/hetu/core/plugin/hbase/conf/HBaseTableProperties.java
index fa2a444c0..9e1f0bad1 100644
--- a/hetu-hbase/src/main/java/io/hetu/core/plugin/hbase/conf/HBaseTableProperties.java
+++ b/hetu-hbase/src/main/java/io/hetu/core/plugin/hbase/conf/HBaseTableProperties.java
@@ -78,6 +78,10 @@ public final class HBaseTableProperties
* hbase_table_name
*/
public static final String HBASE_TABLE_NAME = "hbase_table_name";
+ /**
+ * split_by_char
+ */
+ public static final String SPLIT_BY_CHAR = "split_by_char";
private static final String COLON_SPLITTER = ":";
private static final String COMMA_SPLITTER = ",";
private static final String PIPE_SPLITTER = "\\|";
@@ -146,8 +150,14 @@ public final class HBaseTableProperties
"Point to the table of hbase, establish the mapping of external access",
null,
false);
+ PropertyMetadata s8 =
+ stringProperty(
+ SPLIT_BY_CHAR,
+ "Create multi-splits by the first char of rowKey",
+ "0~9,a~z,A~Z",
+ false);
- tableProperties = ImmutableList.of(s1, s2, s3, s4, s5, s6, s7);
+ tableProperties = ImmutableList.of(s1, s2, s3, s4, s5, s6, s7, s8);
}
public List> getTableProperties()
@@ -165,16 +175,14 @@ public final class HBaseTableProperties
*/
public static Optional