cnfree0355 commented on issue #8368:
URL: https://github.com/apache/hudi/issues/8368#issuecomment-1578039056

   > > `spark.sql.hive.metastore.version` is not supported in hudi. hudi not 
compatible with all hive metastore version like Spark.
   > > @huangxiaopingRD @ad1happy2go
   > > hudi is 0.11.1 ,just I want to use spark3+, I find  spark3.2.3 is work 
fine in hive and hudi table without  set
   > 
   > ```
   > spark.sql.hive.metastore.version=2.1.1
   > 
spark.sql.hive.metastore.jars=/opt/cloudera/parcels/CDH-6.3.2-1.cdh6.3.2.p0.1605554/lib/hive/lib/*
   > ```
   
   ## Hello, I have a same problem with you . when I use the sql as below
   ```sql
   create table h2 using hudi
   options (type = 'cow', primaryKey = 'id')
   partitioned by (dt)
   as
   select 1 as id, 'a1' as name, 10 as price, 1000 as dt;
   
   ```
   And the error is 
   ```log
   org.apache.thrift.TApplicationException: Required field 'client_protocol' is 
unset! Struct:TOpenSessionReq(client_protocol:null, 
configuration:{use:database=default})
        at org.apache.thrift.TServiceClient.receiveBase(TServiceClient.java:79)
        at 
org.apache.hive.service.rpc.thrift.TCLIService$Client.recv_OpenSession(TCLIService.java:176)
        at 
org.apache.hive.service.rpc.thrift.TCLIService$Client.OpenSession(TCLIService.java:163)
        at 
org.apache.hive.jdbc.HiveConnection.openSession(HiveConnection.java:578)
        at org.apache.hive.jdbc.HiveConnection.<init>(HiveConnection.java:188)
        at org.apache.hive.jdbc.HiveDriver.connect(HiveDriver.java:107)
        at java.sql.DriverManager.getConnection(DriverManager.java:664)
        at java.sql.DriverManager.getConnection(DriverManager.java:247)
        at 
org.apache.hudi.hive.ddl.JDBCExecutor.createHiveConnection(JDBCExecutor.java:104)
        at org.apache.hudi.hive.ddl.JDBCExecutor.<init>(JDBCExecutor.java:59)
        at 
org.apache.hudi.hive.HoodieHiveSyncClient.<init>(HoodieHiveSyncClient.java:93)
        at 
org.apache.hudi.hive.HiveSyncTool.initSyncClient(HiveSyncTool.java:119)
        at org.apache.hudi.hive.HiveSyncTool.<init>(HiveSyncTool.java:113)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    .......
        ... 74 more
   Caused by: java.sql.SQLException: Could not establish connection to 
jdbc:hive2://hadoop7809.xx.com:10000: Required field 'client_protocol' is 
unset! Struct:TOpenSessionReq(client_protocol:null, 
configuration:{use:database=default})
        at 
org.apache.hive.jdbc.HiveConnection.openSession(HiveConnection.java:590)
        at org.apache.hive.jdbc.HiveConnection.<init>(HiveConnection.java:188)
        ... 78 more
   Caused by: org.apache.thrift.TApplicationException: Required field 
'client_protocol' is unset! Struct:TOpenSessionReq(client_protocol:null, 
configuration:{use:database=default})
   ```
   My enviroment is 
   ```
   
   - hudi 0.13
   - spark 3.2.2
   - hive hive2.1.1-cdh6.3.2
   
   ```
   By the way ,**spark.sql.hive.metastore.version** can't work for me 
   As you mentioned above you solved it ,please help me what is the reason for 
this problem of mine .tanks!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to