You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've started docker and tried with a local test, however, I got the following error after the dbt run 17:28:42 Encountered an error: Runtime Error Runtime Error Error running query: java.lang.NoSuchMethodError: org.apache.spark.sql.catalyst.parser.ParserUtils$.withOrigin(Lorg/antlr/v4/runtime/ParserRuleContext;Lscala/Function0;)Ljava/lang/Object
I debugged and found that the Spark is running but I can't connect to Hive.
The Spark and Hive versions in the docker container are:
Spark: 3.3.2
Hive: 2.3.
If I try to connect Hive with beeline, I got the following error:
beeline> !connect jdbc:hive2://localhost:10000/default
Connecting to jdbc:hive2://localhost:10000/default
Enter username for jdbc:hive2://localhost:10000/default: dbt
Enter password for jdbc:hive2://localhost:10000/default: ***
17:35:13.134 [main] ERROR org.apache.hive.jdbc.HiveConnection - Error opening session
org.apache.thrift.transport.TTransportException: null
at org.apache.thrift.transport.TIOStreamTransport.read(TIOStreamTransport.java:132) ~[libthrift-0.12.0.jar:0.12.0]
at org.apache.thrift.transport.TTransport.readAll(TTransport.java:86) ~[libthrift-0.12.0.jar:0.12.0]
at org.apache.thrift.transport.TSaslTransport.readLength(TSaslTransport.java:374) ~[libthrift-0.12.0.jar:0.12.0]
at org.apache.thrift.transport.TSaslTransport.readFrame(TSaslTransport.java:451) ~[libthrift-0.12.0.jar:0.12.0]
at org.apache.thrift.transport.TSaslTransport.read(TSaslTransport.java:433) ~[libthrift-0.12.0.jar:0.12.0]
at org.apache.thrift.transport.TSaslClientTransport.read(TSaslClientTransport.java:38) ~[libthrift-0.12.0.jar:0.12.0]
at org.apache.thrift.transport.TTransport.readAll(TTransport.java:86) ~[libthrift-0.12.0.jar:0.12.0]
at org.apache.thrift.protocol.TBinaryProtocol.readAll(TBinaryProtocol.java:425) ~[libthrift-0.12.0.jar:0.12.0]
at org.apache.thrift.protocol.TBinaryProtocol.readI32(TBinaryProtocol.java:321) ~[libthrift-0.12.0.jar:0.12.0]
at org.apache.thrift.protocol.TBinaryProtocol.readMessageBegin(TBinaryProtocol.java:225) ~[libthrift-0.12.0.jar:0.12.0]
at org.apache.thrift.TServiceClient.receiveBase(TServiceClient.java:77) ~[libthrift-0.12.0.jar:0.12.0]
at org.apache.hive.service.rpc.thrift.TCLIService$Client.recv_OpenSession(TCLIService.java:176) ~[hive-service-rpc-3.1.2.jar:3.1.2]
at org.apache.hive.service.rpc.thrift.TCLIService$Client.OpenSession(TCLIService.java:163) ~[hive-service-rpc-3.1.2.jar:3.1.2]
at org.apache.hive.jdbc.HiveConnection.openSession(HiveConnection.java:680) ~[hive-jdbc-2.3.9.jar:2.3.9]
at org.apache.hive.jdbc.HiveConnection.(HiveConnection.java:200) ~[hive-jdbc-2.3.9.jar:2.3.9]
at org.apache.hive.jdbc.HiveDriver.connect(HiveDriver.java:107) ~[hive-jdbc-2.3.9.jar:2.3.9]
at java.sql.DriverManager.getConnection(DriverManager.java:664) ~[?:1.8.0_432]
at java.sql.DriverManager.getConnection(DriverManager.java:208) ~[?:1.8.0_432]
at org.apache.hive.beeline.DatabaseConnection.connect(DatabaseConnection.java:145) ~[hive-beeline-2.3.9.jar:2.3.9]
at org.apache.hive.beeline.DatabaseConnection.getConnection(DatabaseConnection.java:209) ~[hive-beeline-2.3.9.jar:2.3.9]
at org.apache.hive.beeline.Commands.connect(Commands.java:1641) ~[hive-beeline-2.3.9.jar:2.3.9]
at org.apache.hive.beeline.Commands.connect(Commands.java:1536) ~[hive-beeline-2.3.9.jar:2.3.9]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_432]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_432]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_432]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_432]
at org.apache.hive.beeline.ReflectiveCommandHandler.execute(ReflectiveCommandHandler.java:56) ~[hive-beeline-2.3.9.jar:2.3.9]
at org.apache.hive.beeline.BeeLine.execCommandWithPrefix(BeeLine.java:1273) ~[hive-beeline-2.3.9.jar:2.3.9]
at org.apache.hive.beeline.BeeLine.dispatch(BeeLine.java:1312) ~[hive-beeline-2.3.9.jar:2.3.9]
at org.apache.hive.beeline.BeeLine.execute(BeeLine.java:1178) ~[hive-beeline-2.3.9.jar:2.3.9]
at org.apache.hive.beeline.BeeLine.begin(BeeLine.java:1033) ~[hive-beeline-2.3.9.jar:2.3.9]
at org.apache.hive.beeline.BeeLine.mainWithInputRedirection(BeeLine.java:519) ~[hive-beeline-2.3.9.jar:2.3.9]
at org.apache.hive.beeline.BeeLine.main(BeeLine.java:501) ~[hive-beeline-2.3.9.jar:2.3.9]
Error: Could not open client transport with JDBC Uri: jdbc:hive2://localhost:10000/default: Could not establish connection to jdbc:hive2://localhost:10000/default: null (state=08S01,code=0)
I then connected to spark shell directly and tried to test Hive by spark.sql("CREATE TABLE IF NOT EXISTS test_table (id INT, name STRING) USING hive").
Afterwards, I got the following error
ANTLR Tool version 4.7 used for code generation does not match the current runtime version 4.8ANTLR Tool version 4.7 used for code generation does not match the current runtime version 4.8java.lang.NoSuchMethodError: org.apache.spark.sql.catalyst.parser.ParserUtils$.withOrigin(Lorg/antlr/v4/runtime/ParserRuleContext;Lscala/Function0;)Ljava/lang/Object;
at org.apache.spark.sql.parser.HoodieSqlCommonAstBuilder.visitSingleStatement(HoodieSqlCommonAstBuilder.scala:37)
at org.apache.spark.sql.parser.HoodieSqlCommonAstBuilder.visitSingleStatement(HoodieSqlCommonAstBuilder.scala:31)
at org.apache.hudi.spark.sql.parser.HoodieSqlCommonParser$SingleStatementContext.accept(HoodieSqlCommonParser.java:107)
at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visit(AbstractParseTreeVisitor.java:18)
at org.apache.spark.sql.parser.HoodieCommonSqlParser.$anonfun$parsePlan$1(HoodieCommonSqlParser.scala:42)
at org.apache.spark.sql.parser.HoodieCommonSqlParser.parse(HoodieCommonSqlParser.scala:84)
at org.apache.spark.sql.parser.HoodieCommonSqlParser.parsePlan(HoodieCommonSqlParser.scala:41)
at org.apache.spark.sql.SparkSession.$anonfun$sql$2(SparkSession.scala:620)
at org.apache.spark.sql.catalyst.QueryPlanningTracker.measurePhase(QueryPlanningTracker.scala:111)
at org.apache.spark.sql.SparkSession.$anonfun$sql$1(SparkSession.scala:620)
at org.apache.spark.sql.SparkSession.withActive(SparkSession.scala:779)
at org.apache.spark.sql.SparkSession.sql(SparkSession.scala:617)
Has anyone encountered the same issue? Can anyone tell me how to solve this issue?
Many thanks in advance!
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi all,
I've started docker and tried with a local test, however, I got the following error after the dbt run
17:28:42 Encountered an error: Runtime Error Runtime Error Error running query: java.lang.NoSuchMethodError: org.apache.spark.sql.catalyst.parser.ParserUtils$.withOrigin(Lorg/antlr/v4/runtime/ParserRuleContext;Lscala/Function0;)Ljava/lang/Object
I debugged and found that the Spark is running but I can't connect to Hive.
The Spark and Hive versions in the docker container are:
If I try to connect Hive with beeline, I got the following error:
I then connected to spark shell directly and tried to test Hive by
spark.sql("CREATE TABLE IF NOT EXISTS test_table (id INT, name STRING) USING hive")
.Afterwards, I got the following error
Has anyone encountered the same issue? Can anyone tell me how to solve this issue?
Many thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions