Member since
03-05-2019
2
Posts
0
Kudos Received
0
Solutions
04-23-2021
07:50 AM
Hi All, We have developed Java Application to extract the data from hive database. Currently hive2 server is enabled with kerberos and SSL. In our application we are using Cloudera Drive com.cloudera.hive.jdbc41.HS2Driver The application is running in Linux and installed Kerberos client as well. Before application triggers, script will perform knit to generate the token. Below is the connection String "jdbc:hive2://servername:10000/databasename;SSL=1;SSLTrustStore=path;AuthMeth=1;KrbHostFQDN=<krbhostFQDN>;KrbServiceName=<krbservicename>;KrbRealm=<krbrealm>" Application is unable to connect and throwing error message as shown in below. Really appreciate for any help. Thanks!
... View more
Labels:
- Labels:
-
Apache Hive
-
Kerberos
01-20-2021
02:12 AM
Hi All, Currently we are building a Java application to connect hive database to perform data transfer. We are encountering issue while issuing the below query through java application "select count(*) from tablename where partition_key='xxxxx'". The above table is partitioned by partition_key column. below is the complete error log from Java ### Error querying database. Cause: java.sql.SQLException: [Cloudera][HiveJDBCDriver](500051) ERROR processing query/statement. Error Code: [Cloudera][JSQLEngine](12010) The table "dbname"."tablename" could not be found., SQL state: HY000, Query: select count(*) from dbname.tablename where partition_key='201912310002' . ### The error may exist in com/hds/datatransfer/mapper/hive/HiveRepository.java (best guess) ### The error may involve com.hds.datatransfer.mapper.hive.HiveRepository.test1 ### The error occurred while executing a query ### SQL: select count(*) from dbname.tablename where partition_key='201912310002' ### Cause: java.sql.SQLException: [Cloudera][HiveJDBCDriver](500051) ERROR processing query/statement. Error Code: [Cloudera][JSQLEngine](12010) The table "dbname"."tablename " could not be found., SQL state: HY000, Query: select count(*) from dbname.tablename where partition_key='201912310002' . This table is stored as ORC file format Note: same query if I run it in any editor, it is working fine. And also we observed that if Java application perform count operation on non partition table, it is working. We are unsure about this strange behavior, can you please help me on this. Thanks!
... View more
Labels:
- Labels:
-
Apache Hive