Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the issue that ShardingSphere cannot connect to HiveServer2 using remote Hive Metastore Server #33837

Merged
merged 1 commit into from
Nov 30, 2024

Conversation

linghengqian
Copy link
Member

@linghengqian linghengqian commented Nov 28, 2024

For #29052.

Changes proposed in this pull request:

com.zaxxer.hikari.pool.HikariPool$PoolInitializationException: Failed to initialize pool: java.util.concurrent.ExecutionException: java.lang.NoClassDefFoundError: org/apache/hadoop/mapred/JobConf

	at com.zaxxer.hikari.pool.HikariPool.throwPoolInitializationException(HikariPool.java:596)
	at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:582)
	at com.zaxxer.hikari.pool.HikariPool.<init>(HikariPool.java:115)
	at com.zaxxer.hikari.HikariDataSource.<init>(HikariDataSource.java:81)
Caused by: java.util.concurrent.ExecutionException: java.lang.NoClassDefFoundError: org/apache/hadoop/mapred/JobConf
	at java.base/java.util.concurrent.FutureTask.report(FutureTask.java:122)
	at java.base/java.util.concurrent.FutureTask.get(FutureTask.java:191)
	at org.apache.shardingsphere.infra.database.core.metadata.data.loader.MetaDataLoader.load(MetaDataLoader.java:68)
	... 31 more
Caused by: java.lang.NoClassDefFoundError: org/apache/hadoop/mapred/JobConf
	at org.apache.hadoop.hive.conf.HiveConf.initialize(HiveConf.java:6491)
	at org.apache.hadoop.hive.conf.HiveConf.<init>(HiveConf.java:6449)
	at org.apache.shardingsphere.infra.database.hive.metadata.data.loader.HiveMetaDataLoader.load(HiveMetaDataLoader.java:71)
	at org.apache.shardingsphere.infra.database.core.metadata.data.loader.MetaDataLoader.load(MetaDataLoader.java:85)
Caused by: java.lang.ClassNotFoundException: org.apache.hadoop.mapred.JobConf
	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
	at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:525)
	... 108 more

Before committing this PR, I'm sure that I have checked the following options:

  • My code follows the code of conduct of this project.
  • I have self-reviewed the commit code.
  • I have (or in comment I request) added corresponding labels for the pull request.
  • I have passed maven check locally : ./mvnw clean install -B -T1C -Dmaven.javadoc.skip -Dmaven.jacoco.skip -e.
  • I have made corresponding changes to the documentation.
  • I have added corresponding unit tests for my changes.
  • I have updated the Release Notes of the current development version. For more details, see Update Release Note

@linghengqian linghengqian force-pushed the testcontainers-java branch 2 times, most recently from 22ae9c1 to 98a3641 Compare November 29, 2024 07:23
@linghengqian linghengqian changed the title Fixes the issue that ShardingSphere cannot connect to HiveServer2 using remote Hive Metastore Server Fix the issue that ShardingSphere cannot connect to HiveServer2 using remote Hive Metastore Server Nov 29, 2024
@linghengqian linghengqian force-pushed the testcontainers-java branch 2 times, most recently from eb3367c to e7b5841 Compare November 29, 2024 16:19
@linghengqian linghengqian marked this pull request as ready for review November 30, 2024 03:20
@linghengqian linghengqian added this to the 5.5.2 milestone Nov 30, 2024
Comment on lines +193 to +203
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-mapreduce-client-core</artifactId>
<version>${hadoop.version}</version>
<exclusions>
<exclusion>
<groupId>*</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@terrymanu terrymanu merged commit a12eb27 into apache:master Nov 30, 2024
148 checks passed
@linghengqian linghengqian deleted the testcontainers-java branch November 30, 2024 03:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants