Support Questions

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

Unable to run Hive query through putty

avatar
Explorer

Hi Team,

We are trying to insert data into Hive QL , however it's failing.

 

Error message as under :

 

 

The error message is as under 

 

ERROR : Failed to execute tez graph.
java.io.IOException: The ownership on the staging directory hdfs://<OneFSShare>.dev.cds:8020/tmp/hive/<hive_user>/_tez_session_dir/f8ad4086-ef7b-4194-a050-d15dba6913ca is not as expected. It is owned by root. The directory must be owned by the submitter <hive_user> or by <hive_user>

 

Pls suggest.

 

The following folder is owned by root instead of <hive-user>

hdfs://<OneFSShare>.dev.cds:8020/tmp/hive/<hive_user>/_tez_session_dir/f8ad4086-ef7b-4194-a050-d15dba6913ca 

 

 

20 REPLIES 20

avatar
Master Mentor

@ARVINDR 

In a usual setup, the hive service should run on a master node and you run hive client on the client nodes ie. edge nodes and data nodes because during deployment Ambari copies the master configuration to all clients host e.g copy hive config to all host where hive client has been installed.

 

avatar
Explorer

Right @Shelton

 

Is there any way to modify service user account in Ambari

 

we need to change value for hive to hive_xxxx which has been configured at Isilon side.

Due to this we are getting hive error & it needs to be fixed as above as per Linux admin team.

 

e.g. 

within Ambari we need to change following hive user to hive_xxx

 

Service Users and Groups

Hive User

hive

 

avatar
Explorer

Hi @Shelton 

Is it possible to change the service user name through linux?

If so pls share the details.

 

 

Thanks !

avatar
Master Mentor

@ARVINDR 

Yes, its possible first questions first Don't attempt this if this is a production cluster  !!! Only when it's your scratch/dev cluster.

  • What is the HDP version?
  • The username mapping is managed by the Isilon admin  I don't know how the authorization works maybe the HDP admin user has been delegated to Isilon where changing it at the cluster level won't synchronize with the OS.

After the above response, we can come up with a procedure 

 

 

 

avatar
Explorer

Hi @Shelton,

 

HDP version is 3.0.1

We managed to change the hive user name in service accounts.

However , hive is unable to come up with below error

 

Error: org.apache.hive.jdbc.ZooKeeperHiveClientException : Unable to read HiveServer2 configs from ZooKeeper (state=,code=0)

 

Pls advise.

 

Thanks !

avatar
New Contributor

33

avatar
Explorer

Hi @dayphache

 

Could you pls elaborate your response ?

I can see only 33 in the reply , didin't get what it means.

avatar
Explorer

 

getting below error for HivServer2 

 

2020-03-26 05:36:05,838 - call['/usr/hdp/current/zookeeper-client/bin/zkCli.sh -server <master node server>:2181,us01qc1hdpdn01.dev.cds:2181,<date node server>:2181 ls /hiveserver2 | grep 'serverUri=''] {} 2020-03-26 05:36:06,497 - call returned (1, 'Node does not exist: /hiveserver2') 2020-03-26 05:36:06,498 - Will retry 1 time(s), caught exception: ZooKeeper node /hiveserver2 is not ready yet. Sleeping for 10 sec(s)

 

avatar
Master Mentor

@ARVINDR 

There is something you got to investigate. The correct output should look like below. I remember answering such a question something I need to locate the solution  

 

[zk: localhost:2181(CONNECTED) o] ls /hiveserver2 
[serverUri=hdp2.test.com:10000;version=1.2.1000.2.6.2.0-205;sequence=0000000061] 
[zk: localhost:2181(CONNECTED) 1] 

Can you get the ACL for that znode

[zk: localhost:2181(CONNECTED) 0] getAcl /hiveserver2
'world,'anyone
: cdrwa
[zk: localhost:2181(CONNECTED) 1]

 

The above is for a non-kerberized cluster . Please revert

avatar
Explorer

Hi @Shelton

Getting same message 

 

[zk: localhost:2181(CONNECTED) 8] getAcl /hiveserver2

Node does not exist: /hiveserver2​

[zk: localhost:2181(CONNECTED) 9]​