Support Questions

Find answers, ask questions, and share your expertise
Celebrating as our community reaches 100,000 members! Thank you!

Delegation token issue while executing hive query


i am executing the hive query but when i do so i ma getting below error :

java.sql.SQLException: Error while processing statement: FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.tez.TezTask. Vertex failed, vertexName=Map 8, vertexId=vertex_1530387194612_0030_4_00, diagnostics=[Vertex vertex_1530387194612_0030_4_00 [Map 8] killed/failed due to:ROOT_INPUT_INIT_FAILURE, Vertex Input: tbtbotabel_db2_orc initializer failed, vertex=vertex_1530387194612_0030_4_00 [Map 8], java.util.concurrent.ExecutionException: org.apache.hadoop.ipc.RemoteException($InvalidToken): token (HDFS_DELEGATION_TOKEN token 214816 for hive) can't be found in cache

I can see error is because of HDFS_DELEGATION_TOKEN for hive can not be found

what are the resoluton steps and what lead to this issue ?


@Anurag Mishra

Add the property "tez.cancel.delegation.tokens.on.completion=false" in Custom tez-site via Ambari and restart Hive/Tez services.

Let me know how it goes.


@Sandeep Nemuri

Hi Sandeep ,

Thanks for your response , but could you please explain what is the root cause of this issue , since from the falcon user also I tried to read hdfs and I was getting the same issue as I am doing this from hive user . however in falcon reading hdfs through webhdfs had solved the issue . I was creating a falcon cluster entity from falcon cli .

I wanted to understand the root cause because I am experiencing the same issue from different users as well.

Thanks in Advance.