最近有項目需求,flink寫hive,暫不考慮性能要求。用hive jdbc簡單封裝了個sinkToHive,在開啟kerberos的環境中,遇到如題的錯誤。
還有一個現象就是,首次hive操作是成功的,之后才是java.sql.SQLException: org.apache.thrift.transport.TTransportException: SASL authentication not complete
問題就出在:
PreparedStatement
ResultSet
這兩項應該先於Connection close