java.sql.SQLException: org.apache.thrift.transport.TTransportException in hive?

前端 未结 1 1141
轻奢々
轻奢々 2020-12-03 11:46

I\'m trying to create table in hive with java. I found

java.sql.SQLException: org.apache.thrift.transport.TTransportException

while executing

相关标签:
1条回答
  • 2020-12-03 12:26

    It is a very generic error message describing that the hiveserver is having a problem and suggesting you to take a look at the Hive logs. If you access the hive logs and find the exception call stack, you can find the root cause or if you share the exception, I might be able to help you.

    Most common problems I have seen as:

    1. Issues with meta store related with concurrency

    2. When you start hive server as $hive --service yourhiveserver and keep it running for days and then run your code, it is possible that your connection is broker to server and you will get exact same error. If you reconnect to server and this error will go away. This is only because after some time wait_time expired and disconnect happen.

    3. Port specific errors

    Be sure to setup an open Port for your Hive Server and set it as below before starting hive server:

     $export HIVE_PORT=10000
     $hive --service hiveserver
     $ _run_your_code
    

    There could be other reasons, however your best option is to check the call stack in hive logs to root cause and solve the problem.

    0 讨论(0)
提交回复
热议问题