This is an automated email from the ASF dual-hosted git repository.
duanzhengqiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git
The following commit(s) were added to refs/heads/master by this push:
new c47c1009d1b Support Hive integration module to connect to HiveServer2
4.0.1 (#33212)
c47c1009d1b is described below
commit c47c1009d1b1ee16ddde56ab8e9ebb46bff5b5e3
Author: Ling Hengqian <[email protected]>
AuthorDate: Fri Oct 11 19:22:20 2024 +0800
Support Hive integration module to connect to HiveServer2 4.0.1 (#33212)
---
RELEASE-NOTES.md | 1 +
.../graalvm-native-image/_index.cn.md | 16 ++++++++--------
.../graalvm-native-image/_index.en.md | 18 +++++++++---------
.../reflect-config.json | 9 +++++++--
.../resource-config.json | 2 +-
pom.xml | 4 ++--
.../test/natived/jdbc/databases/HiveTest.java | 2 +-
7 files changed, 29 insertions(+), 23 deletions(-)
diff --git a/RELEASE-NOTES.md b/RELEASE-NOTES.md
index f9e0670f4d7..92803d94769 100644
--- a/RELEASE-NOTES.md
+++ b/RELEASE-NOTES.md
@@ -42,6 +42,7 @@
1. DistSQL: Check user privilege when registering or altering storage unit -
[#32172](https://github.com/apache/shardingsphere/pull/32172)
1. Infra: Enable Safe Composition of Metadata for ShardingSphere Proxy Native
- [#33179](https://github.com/apache/shardingsphere/pull/33179)
1. Infra: Support compiling and using ShardingSphere under OpenJDK 23 -
[#33025](https://github.com/apache/shardingsphere/pull/33025)
+1. Hive: Support Hive integration module to connect to HiveServer2 4.0.1 -
[#33212](https://github.com/apache/shardingsphere/pull/33212)
### Bug Fix
diff --git
a/docs/document/content/user-manual/shardingsphere-jdbc/graalvm-native-image/_index.cn.md
b/docs/document/content/user-manual/shardingsphere-jdbc/graalvm-native-image/_index.cn.md
index 6bf283d7683..661c116ab3f 100644
---
a/docs/document/content/user-manual/shardingsphere-jdbc/graalvm-native-image/_index.cn.md
+++
b/docs/document/content/user-manual/shardingsphere-jdbc/graalvm-native-image/_index.cn.md
@@ -47,7 +47,7 @@ java.beans.Introspector was unintentionally initialized at
build time. To see wh
<plugin>
<groupId>org.graalvm.buildtools</groupId>
<artifactId>native-maven-plugin</artifactId>
- <version>0.10.2</version>
+ <version>0.10.3</version>
<extensions>true</extensions>
<configuration>
<buildArgs>
@@ -85,12 +85,12 @@ java.beans.Introspector was unintentionally initialized at
build time. To see wh
```groovy
plugins {
- id 'org.graalvm.buildtools.native' version '0.10.2'
+ id 'org.graalvm.buildtools.native' version '0.10.3'
}
dependencies {
implementation
'org.apache.shardingsphere:shardingsphere-jdbc:${shardingsphere.version}'
- implementation(group: 'org.graalvm.buildtools', name:
'graalvm-reachability-metadata', version: '0.10.2', classifier: 'repository',
ext: 'zip')
+ implementation(group: 'org.graalvm.buildtools', name:
'graalvm-reachability-metadata', version: '0.10.3', classifier: 'repository',
ext: 'zip')
}
graalvmNative {
@@ -289,8 +289,8 @@ Caused by: java.io.UnsupportedEncodingException: Codepage
Cp1252 is not supporte
ClickHouse 不支持 ShardingSphere 集成级别的本地事务,XA 事务和 Seata AT 模式事务,更多讨论位于
https://github.com/ClickHouse/clickhouse-docs/issues/2300 。
-7. 当需要通过 ShardingSphere JDBC 使用 Hive 方言时,受
https://issues.apache.org/jira/browse/HIVE-28308 影响,
-用户不应该使用 `classifier` 为 `standalone` 的
`org.apache.hive:hive-jdbc:4.0.0`,以避免依赖冲突。
+7. 当需要通过 ShardingSphere JDBC 使用 Hive 方言时,受
https://issues.apache.org/jira/browse/HIVE-28445 影响,
+用户不应该使用 `classifier` 为 `standalone` 的
`org.apache.hive:hive-jdbc:4.0.1`,以避免依赖冲突。
可能的配置例子如下,
```xml
@@ -314,12 +314,12 @@ ClickHouse 不支持 ShardingSphere 集成级别的本地事务,XA 事务和 S
<dependency>
<groupId>org.apache.hive</groupId>
<artifactId>hive-jdbc</artifactId>
- <version>4.0.0</version>
+ <version>4.0.1</version>
</dependency>
<dependency>
<groupId>org.apache.hive</groupId>
<artifactId>hive-service</artifactId>
- <version>4.0.0</version>
+ <version>4.0.1</version>
</dependency>
<dependency>
<groupId>org.apache.hadoop</groupId>
@@ -355,7 +355,7 @@ ClickHouse 不支持 ShardingSphere 集成级别的本地事务,XA 事务和 S
<dependency>
<groupId>io.github.linghengqian</groupId>
<artifactId>hive-server2-jdbc-driver-thin</artifactId>
- <version>1.2.0</version>
+ <version>1.5.0</version>
<exclusions>
<exclusion>
<groupId>com.fasterxml.woodstox</groupId>
diff --git
a/docs/document/content/user-manual/shardingsphere-jdbc/graalvm-native-image/_index.en.md
b/docs/document/content/user-manual/shardingsphere-jdbc/graalvm-native-image/_index.en.md
index ebee77e8a20..4783a5a4356 100644
---
a/docs/document/content/user-manual/shardingsphere-jdbc/graalvm-native-image/_index.en.md
+++
b/docs/document/content/user-manual/shardingsphere-jdbc/graalvm-native-image/_index.en.md
@@ -20,7 +20,7 @@ https://sdkman.io/jdks#nik and https://sdkman.io/jdks#mandrel
.
Users can still use the old versions of GraalVM CE such as `21.0.2-graalce` on
SDKMAN! to build the GraalVM Native Image product of ShardingSphere.
However, this will cause the failure of building the GraalVM Native Image when
integrating some third-party dependencies.
-A typical example is related to the `org.apache.hive:hive-jdbc:4.0.0`
HiveServer2 JDBC Driver, which uses AWT-related classes.
+A typical example is related to the `org.apache.hive:hive-jdbc:4.0.1`
HiveServer2 JDBC Driver, which uses AWT-related classes.
GraalVM CE only supports AWT for GraalVM CE For JDK22 and higher versions.
```shell
@@ -49,7 +49,7 @@ and the documentation of GraalVM Native Build Tools shall
prevail.
<plugin>
<groupId>org.graalvm.buildtools</groupId>
<artifactId>native-maven-plugin</artifactId>
- <version>0.10.2</version>
+ <version>0.10.3</version>
<extensions>true</extensions>
<configuration>
<buildArgs>
@@ -89,12 +89,12 @@ Reference
https://github.com/graalvm/native-build-tools/issues/572 .
```groovy
plugins {
- id 'org.graalvm.buildtools.native' version '0.10.2'
+ id 'org.graalvm.buildtools.native' version '0.10.3'
}
dependencies {
implementation
'org.apache.shardingsphere:shardingsphere-jdbc:${shardingsphere.version}'
- implementation(group: 'org.graalvm.buildtools', name:
'graalvm-reachability-metadata', version: '0.10.2', classifier: 'repository',
ext: 'zip')
+ implementation(group: 'org.graalvm.buildtools', name:
'graalvm-reachability-metadata', version: '0.10.3', classifier: 'repository',
ext: 'zip')
}
graalvmNative {
@@ -302,8 +302,8 @@ Possible configuration examples are as follows,
ClickHouse does not support local transactions, XA transactions, and Seata AT
mode transactions at the ShardingSphere integration level.
More discussion is at
https://github.com/ClickHouse/clickhouse-docs/issues/2300 .
-7. When using the Hive dialect through ShardingSphere JDBC, affected by
https://issues.apache.org/jira/browse/HIVE-28308 ,
- users should not use `org.apache.hive:hive-jdbc:4.0.0` with `classifier` as
`standalone` to avoid dependency conflicts.
+7. When using the Hive dialect through ShardingSphere JDBC, affected by
https://issues.apache.org/jira/browse/HIVE-28445 ,
+ users should not use `org.apache.hive:hive-jdbc:4.0.1` with `classifier` as
`standalone` to avoid dependency conflicts.
Possible configuration examples are as follows,
```xml
@@ -327,12 +327,12 @@ More discussion is at
https://github.com/ClickHouse/clickhouse-docs/issues/2300
<dependency>
<groupId>org.apache.hive</groupId>
<artifactId>hive-jdbc</artifactId>
- <version>4.0.0</version>
+ <version>4.0.1</version>
</dependency>
<dependency>
<groupId>org.apache.hive</groupId>
<artifactId>hive-service</artifactId>
- <version>4.0.0</version>
+ <version>4.0.1</version>
</dependency>
<dependency>
<groupId>org.apache.hadoop</groupId>
@@ -369,7 +369,7 @@ An example of a possible configuration is as follows,
<dependency>
<groupId>io.github.linghengqian</groupId>
<artifactId>hive-server2-jdbc-driver-thin</artifactId>
- <version>1.2.0</version>
+ <version>1.5.0</version>
<exclusions>
<exclusion>
<groupId>com.fasterxml.woodstox</groupId>
diff --git
a/infra/reachability-metadata/src/main/resources/META-INF/native-image/org.apache.shardingsphere/generated-reachability-metadata/reflect-config.json
b/infra/reachability-metadata/src/main/resources/META-INF/native-image/org.apache.shardingsphere/generated-reachability-metadata/reflect-config.json
index 25f9e4ae8b8..405b84f3f5c 100644
---
a/infra/reachability-metadata/src/main/resources/META-INF/native-image/org.apache.shardingsphere/generated-reachability-metadata/reflect-config.json
+++
b/infra/reachability-metadata/src/main/resources/META-INF/native-image/org.apache.shardingsphere/generated-reachability-metadata/reflect-config.json
@@ -72,7 +72,7 @@
"name":"[Lcom.zaxxer.hikari.util.ConcurrentBag$IConcurrentBagEntry;"
},
{
-
"condition":{"typeReachable":"org.apache.shardingsphere.proxy.frontend.mysql.command.query.text.query.MySQLComQueryPacketExecutor"},
+
"condition":{"typeReachable":"org.apache.shardingsphere.proxy.backend.connector.jdbc.datasource.JDBCBackendDataSource"},
"name":"[Lcom.zaxxer.hikari.util.ConcurrentBag$IConcurrentBagEntry;"
},
{
@@ -2085,7 +2085,7 @@
"queryAllDeclaredMethods":true
},
{
-
"condition":{"typeReachable":"org.apache.shardingsphere.mode.manager.cluster.listener.DatabaseMetaDataChangedListener$$Lambda/0x00007f6cc7b257d8"},
+
"condition":{"typeReachable":"org.apache.shardingsphere.mode.manager.cluster.listener.DatabaseMetaDataChangedListener$$Lambda/0x00007fb983b253a8"},
"name":"org.apache.shardingsphere.mode.manager.cluster.event.subscriber.dispatch.MetaDataChangedSubscriber"
},
{
@@ -3617,5 +3617,10 @@
{
"condition":{"typeReachable":"org.apache.shardingsphere.proxy.initializer.BootstrapInitializer"},
"name":"org.apache.shardingsphere.transaction.yaml.config.YamlTransactionRuleConfigurationCustomizer"
+},
+{
+
"condition":{"typeReachable":"org.apache.shardingsphere.infra.executor.kernel.ExecutorEngine"},
+ "name":"sun.security.provider.SecureRandom",
+ "methods":[{"name":"<init>","parameterTypes":[] },
{"name":"<init>","parameterTypes":["java.security.SecureRandomParameters"] }]
}
]
\ No newline at end of file
diff --git
a/infra/reachability-metadata/src/main/resources/META-INF/native-image/org.apache.shardingsphere/generated-reachability-metadata/resource-config.json
b/infra/reachability-metadata/src/main/resources/META-INF/native-image/org.apache.shardingsphere/generated-reachability-metadata/resource-config.json
index 1e6e0a5c8c6..f8c9f865e31 100644
---
a/infra/reachability-metadata/src/main/resources/META-INF/native-image/org.apache.shardingsphere/generated-reachability-metadata/resource-config.json
+++
b/infra/reachability-metadata/src/main/resources/META-INF/native-image/org.apache.shardingsphere/generated-reachability-metadata/resource-config.json
@@ -241,7 +241,7 @@
"condition":{"typeReachable":"org.apache.shardingsphere.proxy.backend.handler.ProxyBackendHandlerFactory"},
"pattern":"\\QMETA-INF/services/org.apache.shardingsphere.infra.executor.checker.SQLExecutionChecker\\E"
}, {
-
"condition":{"typeReachable":"org.apache.shardingsphere.proxy.frontend.mysql.command.query.text.query.MySQLComQueryPacketExecutor"},
+
"condition":{"typeReachable":"org.apache.shardingsphere.infra.executor.kernel.ExecutorEngine"},
"pattern":"\\QMETA-INF/services/org.apache.shardingsphere.infra.executor.sql.hook.SQLExecutionHook\\E"
}, {
"condition":{"typeReachable":"org.apache.shardingsphere.infra.executor.sql.prepare.AbstractExecutionPrepareEngine"},
diff --git a/pom.xml b/pom.xml
index 0ecf28f179a..ae0bae5c2a6 100644
--- a/pom.xml
+++ b/pom.xml
@@ -125,8 +125,8 @@
<opengauss.version>3.1.0-og</opengauss.version>
<mariadb-java-client.version>2.4.2</mariadb-java-client.version>
<clickhouse-jdbc.version>0.6.3</clickhouse-jdbc.version>
- <hive.version>4.0.0</hive.version>
-
<hive-server2-jdbc-driver-thin.version>1.2.0</hive-server2-jdbc-driver-thin.version>
+ <hive.version>4.0.1</hive.version>
+
<hive-server2-jdbc-driver-thin.version>1.5.0</hive-server2-jdbc-driver-thin.version>
<presto.version>0.288.1</presto.version>
<hikari-cp.version>4.0.3</hikari-cp.version>
diff --git
a/test/native/src/test/java/org/apache/shardingsphere/test/natived/jdbc/databases/HiveTest.java
b/test/native/src/test/java/org/apache/shardingsphere/test/natived/jdbc/databases/HiveTest.java
index 53e53ce118c..44d50722036 100644
---
a/test/native/src/test/java/org/apache/shardingsphere/test/natived/jdbc/databases/HiveTest.java
+++
b/test/native/src/test/java/org/apache/shardingsphere/test/natived/jdbc/databases/HiveTest.java
@@ -50,7 +50,7 @@ class HiveTest {
@SuppressWarnings("resource")
@Container
- public static final GenericContainer<?> CONTAINER = new
GenericContainer<>(DockerImageName.parse("apache/hive:4.0.0"))
+ public static final GenericContainer<?> CONTAINER = new
GenericContainer<>(DockerImageName.parse("apache/hive:4.0.1"))
.withEnv("SERVICE_NAME", "hiveserver2")
.withExposedPorts(10000, 10002);