hadoop - Oozie hive action with kerberos on HDP-1.3.3 -
i'm trying execute hive script oozie hive action on kerberos enabled environment.
here workflow.xml
<action name="hive-to-hdfs"> <hive xmlns="uri:oozie:hive-action:0.2"> <job-tracker>${jobtracker}</job-tracker> <name-node>${namenode}</name-node> <job-xml>hive-site.xml</job-xml> <configuration> <property> <name>mapred.job.queue.name</name> <value>${queuename}</value> </property> </configuration> <script>script.q</script> <param>hive_export_time=${hiveexporttime}</param> </hive> <ok to="pass"/> <error to="fail"/>
i'm facing issue when trying connect hive metastore.
6870 [main] info hive.metastore - trying connect metastore uri thrift://10.0.0.242:9083 heart beat heart beat 67016 [main] warn hive.metastore - set_ugi() not successful, cause: new client talking old server. continuing without it. org.apache.thrift.transport.ttransportexception: java.net.sockettimeoutexception: read timed out @ org.apache.thrift.transport.tiostreamtransport.read(tiostreamtransport.java:129) @ org.apache.thrift.transport.ttransport.readall(ttransport.java:84) @ org.apache.thrift.protocol.tbinaryprotocol.readall(tbinaryprotocol.java:378) @ org.apache.thrift.protocol.tbinaryprotocol.readi32(tbinaryprotocol.java:297)
67018 [main] info hive.metastore - waiting 1 seconds before next connection attempt. 68018 [main] info hive.metastore - connected metastore. heart beat heart beat 128338 [main] warn org.apache.hadoop.hive.metastore.retryingmetastoreclient - metastoreclient lost connection. attempting reconnect. org.apache.thrift.transport.ttransportexception: java.net.sockettimeoutexception: read timed out @ org.apache.thrift.transport.tiostreamtransport.read(tiostreamtransport.java:129) @ org.apache.thrift.transport.ttransport.readall(ttransport.java:84) @ org.apache.thrift.protocol.tbinaryprotocol.readall(tbinaryprotocol.java:378) @ org.apache.thrift.protocol.tbinaryprotocol.readi32(tbinaryprotocol.java:297)
129339 [main] info hive.metastore - trying connect metastore uri thrift://10.0.0.242:9083 heart beat heart beat 189390 [main] warn hive.metastore - set_ugi() not successful, cause: new client talking old server. continuing without it. org.apache.thrift.transport.ttransportexception: java.net.sockettimeoutexception: read timed out @ org.apache.thrift.transport.tiostreamtransport.read(tiostreamtransport.java:129) @ org.apache.thrift.transport.ttransport.readall(ttransport.java:84) @ org.apache.thrift.protocol.tbinaryprotocol.readall(tbinaryprotocol.java:378) @ org.apache.thrift.protocol.tbinaryprotocol.readi32(tbinaryprotocol.java:297)
189391 [main] info hive.metastore - waiting 1 seconds before next connection attempt. 190391 [main] info hive.metastore - connected metastore. heart beat heart beat 250449 [main] error org.apache.hadoop.hive.ql.parse.semanticanalyzer - org.apache.hadoop.hive.ql.metadata.hiveexception: unable fetch table session_master @ org.apache.hadoop.hive.ql.metadata.hive.gettable(hive.java:953) @ org.apache.hadoop.hive.ql.metadata.hive.gettable(hive.java:887) @ org.apache.hadoop.hive.ql.parse.semanticanalyzer.getmetadata(semanticanalyzer.java:1083) @ org.apache.hadoop.hive.ql.parse.semanticanalyzer.getmetadata(semanticanalyzer.java:1059)
when disable kerberos security workflow works fine
to enable oozie hive action function on secured cluster need include <credentials> section credential of type 'hcat' workflow.
your workflow like:
<workflow-app name='workflow' xmlns='uri:oozie:workflow:0.1'> <credentials> <credential name='hcat' type='hcat'> <property> <name>hcat.metastore.uri</name> <value>hcat_uri</value> </property> <property> <name>hcat.metastore.principal</name> <value>hcat_principal</value> </property> </credential> </credentials> <action name="hive-to-hdfs" cred="hcat"> <hive xmlns="uri:oozie:hive-action:0.2"> <job-tracker>${jobtracker}</job-tracker> <name-node>${namenode}</name-node> <job-xml>hive-site.xml</job-xml> <configuration> <property> <name>mapred.job.queue.name</name> <value>${queuename}</value> </property> </configuration> <script>script.q</script> <param>hive_export_time=${hiveexporttime}</param> </hive> <ok to="pass"/> <error to="fail"/> </action> </workflow> there oozie documentation feature.
Comments
Post a Comment