Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Can not access Hive view in Ambari

Can not access Hive view in Ambari

New Contributor

Hi,

I am loging to Ambari using an admin account, when I wan to access the Hive views in AMbari, it fails for service checks and prompts below:

Service 'userhome' check failed: java.io.FileNotFoundException: File does not exist: /user/admin at sun.reflect.GeneratedConstructorAccessor966.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:422)

Can someone suggest me how to resolve this error?

3 REPLIES 3

Re: Can not access Hive view in Ambari

Super Mentor

@Lucky_Luke

Are you sure that you have created the following directory in HDFS before accessing hive view?

The Hive View stores user metadata in HDFS. By default, the location in HDFS for this metadata is /user/${username} where ${username} is the username of the currently logged in user that is accessing the Hive View.

 # sudo -u hdfs hadoop fs  -mkdir /user/admin
 # sudo -u hdfs hadoop fs  -chown admin:hadoop /user/admin

.

As soon as you login to hive view with some user (in your case 'admin' user) so the ambari will expect that in the HDFS you have created a directory with proper permission for that your. Else the "userhome' check will fail as it is happening in your case. So you should create those directories prior to accessing the views.

.

If you log in to ambari hive view with some other user say "abcduser' then you should do the same for 'abcduser' directory before accessing hive view.

 # sudo -u hdfs hadoop fs  -mkdir /user/abcduser
 # sudo -u hdfs hadoop fs  -chown abcduser:hadoop /user/abcduser

.

Please see: http://docs.hortonworks.com/HDPDocuments/Ambari-2.4.2.0/bk_ambari-views/content/setup_HDFS_user_dire...

Apart from the above link it will be best to go through the other prerequisite of using hive view from doc: http://docs.hortonworks.com/HDPDocuments/Ambari-2.4.2.0/bk_ambari-views/content/ch_using_hive_view.h...

Highlighted

Re: Can not access Hive view in Ambari

New Contributor

HI, I am accessing Hive editor by running the first command. what is admin:hadoop and why it is not just admin?

Re: Can not access Hive view in Ambari

Super Mentor

@Lucky_Luke

admin:hadoop => username:groupname

By running the command we are telling that the ownership of the /user/admin directory will be for user "admin" or for anyone who belongs to group "hadoop".

admin => Is the currently logged in username.

hadoop => Is the group name.

http://docs.hortonworks.com/HDPDocuments/Ambari-2.4.2.0/bk_ambari-views/content/setup_HDFS_user_dire...