Reply
Explorer
Posts: 7
Registered: ‎09-10-2015

Join Condition fails with hive view of hbase is created using the Hbase storage handler

[ Edited ]

Hi All,

 

We are using CDH 5.10.2 version and enabled Kerberos Security in the cluster. We have encountered one issue while executing analytics job during the query execution. As per our findings, it seems Cloudera 5.10.2 is not supporting 'joining condition' with hive view of hbase (using Hbase storage handler). This hive view of hbase is created using the Hbase storage handler.

We tried to create views in hive for two hive table and when we executed a query using left join and it is working fine. Also joining with tables in hive is working as expected.

But the join condition is not working with hive view of hbase using Hbase storage handler.

 

Please suggest if any recommendation for this issue.

 

Thank you in advance.

 

Regards,

Parshuram

Contributor
Posts: 52
Registered: ‎01-08-2016

Re: Join Condition fails with hive view of hbase is created using the Hbase storage handler

Hello,

 

I would request you to share the error that you are getting.

Explorer
Posts: 7
Registered: ‎09-10-2015

Re: Join Condition fails with hive view of hbase is created using the Hbase storage handler

Hi,

 

Thanks for your reply. Please find the below log.

 

2018-01-05 16:54:28,007 INFO org.apache.hadoop.hive.ql.exec.Utilities: [HiveServer2-Background-Pool: Thread-329]: Serializing MapredLocalWork via kryo
2018-01-05 16:54:28,015 INFO org.apache.hadoop.hive.ql.log.PerfLogger: [HiveServer2-Background-Pool: Thread-329]: </PERFLOG method=serializePlan start=1515151468007 end=1515151468015 duration=8 from=org.apache.hadoop.hive.ql.exec.Utilities>
2018-01-05 16:54:28,066 WARN org.apache.hadoop.hive.conf.HiveConf: [HiveServer2-Background-Pool: Thread-329]: HiveConf of name hive.server2.idle.session.timeout_check_operation does not exist
2018-01-05 16:54:28,066 WARN org.apache.hadoop.hive.conf.HiveConf: [HiveServer2-Background-Pool: Thread-329]: HiveConf of name hive.entity.capture.input.URI does not exist
2018-01-05 16:54:28,080 INFO org.apache.hadoop.hdfs.DFSClient: [HiveServer2-Background-Pool: Thread-329]: Created token for retailuser: HDFS_DELEGATION_TOKEN owner=retailuser, renewer=hive, realUser=hive/ip-10-0-0-22.us-east-2.compute.internal@CIIRETAIL.COM, issueDate=1515151468078, maxDate=1515756268078, sequenceNumber=1020, masterKeyId=40 on 10.0.0.22:8020
2018-01-05 16:54:28,081 INFO org.apache.hadoop.hive.ql.exec.mr.MapredLocalTask: [HiveServer2-Background-Pool: Thread-329]: Executing: /opt/cloudera/parcels/CDH-5.10.2-1.cdh5.10.2.p0.5/lib/hadoop/bin/hadoop jar /opt/cloudera/parcels/CDH-5.10.2-1.cdh5.10.2.p0.5/jars/hive-common-1.1.0-cdh5.10.2.jar org.apache.hadoop.hive.ql.exec.mr.ExecDriver -localtask -plan file:/tmp/hive/3b87a939-7487-487c-9f47-a811f1298a3a/hive_2018-01-05_16-54-02_207_3782765080345085912-8/-local-10009/plan.xml -jobconffile file:/tmp/hive/3b87a939-7487-487c-9f47-a811f1298a3a/hive_2018-01-05_16-54-02_207_3782765080345085912-8/-local-10010/jobconf.xml
2018-01-05 16:55:20,667 ERROR org.apache.hadoop.hive.ql.exec.Task: [HiveServer2-Background-Pool: Thread-329]: Execution failed with exit status: 2
2018-01-05 16:55:20,667 ERROR org.apache.hadoop.hive.ql.exec.Task: [HiveServer2-Background-Pool: Thread-329]: Obtaining error information
2018-01-05 16:55:20,667 ERROR org.apache.hadoop.hive.ql.exec.Task: [HiveServer2-Background-Pool: Thread-329]:
Task failed!
Task ID:
Stage-6

Logs:

2018-01-05 16:55:20,667 ERROR org.apache.hadoop.hive.ql.exec.Task: [HiveServer2-Background-Pool: Thread-329]: /var/log/hive/hadoop-cmf-hive-HIVESERVER2-ip-10-0-0-22.us-east-2.compute.internal.log.out
2018-01-05 16:55:20,668 ERROR org.apache.hadoop.hive.ql.exec.mr.MapredLocalTask: [HiveServer2-Background-Pool: Thread-329]: Execution failed with exit status: 2
2018-01-05 16:55:20,678 ERROR org.apache.hadoop.hive.ql.Driver: [HiveServer2-Background-Pool: Thread-329]: FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.mr.MapredLocalTask
2018-01-05 16:55:20,678 INFO org.apache.hadoop.hive.ql.log.PerfLogger: [HiveServer2-Background-Pool: Thread-329]: </PERFLOG method=Driver.execute start=1515151442596 end=1515151520678 duration=78082 from=org.apache.hadoop.hive.ql.Driver>
2018-01-05 16:55:20,679 INFO org.apache.hadoop.hive.ql.Driver: [HiveServer2-Background-Pool: Thread-329]: MapReduce Jobs Launched:
2018-01-05 16:55:20,679 INFO org.apache.hadoop.hive.ql.Driver: [HiveServer2-Background-Pool: Thread-329]: Stage-Stage-1: Map: 1 Reduce: 1 Cumulative CPU: 5.03 sec HDFS Read: 17110 HDFS Write: 27404 SUCCESS

2018-01-05 16:55:20,679 INFO org.apache.hadoop.hive.ql.Driver: [HiveServer2-Background-Pool: Thread-329]: Total MapReduce CPU Time Spent: 5 seconds 30 msec
2018-01-05 16:55:20,679 INFO org.apache.hadoop.hive.ql.Driver: [HiveServer2-Background-Pool: Thread-329]: Completed executing command(queryId=hive_20180105165454_87a17f78-a8c8-44a3-93ef-cad1eb692894); Time taken: 78.082 seconds
2018-01-05 16:55:20,679 INFO org.apache.hadoop.hive.ql.log.PerfLogger: [HiveServer2-Background-Pool: Thread-329]: <PERFLOG method=releaseLocks from=org.apache.hadoop.hive.ql.Driver>
2018-01-05 16:55:20,706 INFO org.apache.hadoop.hive.ql.log.PerfLogger: [HiveServer2-Background-Pool: Thread-329]: </PERFLOG method=releaseLocks start=1515151520679 end=1515151520706 duration=27 from=org.apache.hadoop.hive.ql.Driver>
2018-01-05 16:55:20,714 ERROR org.apache.hive.service.cli.operation.Operation: [HiveServer2-Background-Pool: Thread-329]: Error running hive query:
org.apache.hive.service.cli.HiveSQLException: Error while processing statement: FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.mr.MapredLocalTask
at org.apache.hive.service.cli.operation.Operation.toSQLException(Operation.java:400)
at org.apache.hive.service.cli.operation.SQLOperation.runQuery(SQLOperation.java:239)
at org.apache.hive.service.cli.operation.SQLOperation.access$300(SQLOperation.java:88)
at org.apache.hive.service.cli.operation.SQLOperation$3$1.run(SQLOperation.java:293)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:415)
at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1920)
at org.apache.hive.service.cli.operation.SQLOperation$3.run(SQLOperation.java:306)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
2018-01-05 16:55:20,719 INFO org.apache.hive.service.cli.operation.OperationManager: [HiveServer2-Handler-Pool: Thread-218]: Closing operation: OperationHandle [opType=EXECUTE_STATEMENT, getHandleIdentifier()=008f7bff-e516-4d2b-bbc9-feb6f6a0ba63]
2018-01-05 16:55:20,719 INFO org.apache.hadoop.hive.ql.exec.ListSinkOperator: [HiveServer2-Handler-Pool: Thread-218]: 115 finished. closing...
2018-01-05 16:55:20,719 INFO org.apache.hadoop.hive.ql.exec.ListSinkOperator: [HiveServer2-Handler-Pool: Thread-218]: 115 Close done
2018-01-05 17:02:10,584 INFO org.apache.hive.service.cli.operation.OperationManager: [HiveServer2-Handler-Pool: Thread-218]: Adding operation: OperationHandle [opType=EXECUTE_STATEMENT, getHandleIdentifier()=2ac13d32-1c91-4d9f-8513-8ebea9ee7bc4]
2018-01-05 17:02:10,585 INFO org.apache.hadoop.hive.ql.log.PerfLogger: [HiveServer2-Handler-Pool: Thread-218]: <PERFLOG method=compile from=org.apache.hadoop.hive.ql.Driver>

 

 

Contributor
Posts: 52
Registered: ‎01-08-2016

Re: Join Condition fails with hive view of hbase is created using the Hbase storage handler

Thank you for sharing the info.

 

It seems that you may be hitting a bug HIVE-12160. A crude workaround could be to use hive.auto.convert.join=false, please bear in mind that this MAY have impact to the performance.

 

Alternatively, you can create HS2 ktgt on regular basis.

 

Explorer
Posts: 7
Registered: ‎09-10-2015

Re: Join Condition fails with hive view of hbase is created using the Hbase storage handler

Thank you for your reply.

 

Regarding "Alternatively, you can create HS2 ktgt on regular basis." can you please guide me how to create the HS2 ktgt ticket on regular basis ? 

 

Thanks in advance :)

 

Contributor
Posts: 52
Registered: ‎01-08-2016

Re: Join Condition fails with hive view of hbase is created using the Hbase storage handler

kinit -k -t <process dir>/<hs2 keytab> <hs2 principal name>

Above needs to be ran regularly. Please bear in mind this is an alternative method.

 

Announcements