Support Questions

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

Unable to create directory in HDFS

avatar
Explorer

HI, I am not able to create directory into the root/user folder into the HDFS. I tried creating hdfs user with admin privileges but no luck.

1 ACCEPTED SOLUTION

avatar
Master Mentor
hide-solution

This problem has been solved!

Want to get a detailed solution you have to login/registered on the community

Register/Login
6 REPLIES 6

avatar
Master Mentor
hide-solution

This problem has been solved!

Want to get a detailed solution you have to login/registered on the community

Register/Login

avatar
Master Mentor

avatar
Explorer

Thank you , I was able to create the directory but I am not sure what may be the reason behind "New Directroy" option is still disable.

avatar
Master Mentor

@Amit Sharma

sudo -u hdfs hdfs dfs -mkdir /user/username
sudo -u hdfs hdfs dfs -chown -R username:hdfs /user/username

avatar
Explorer

@Artem Eevits , @avatar imageNeeraj Sabharwal I have 2 issues seems those are related to this problem.

1. I do not ahve upload button enabled

2. I am getting below error when I am trying to create tables.

org.apache.ambari.view.utils.hdfs.HdfsApiException: HDFS020 Could not write file /user/admin/hive/jobs/hive-job-3-2016-02-29_10-05/query.hql

org.apache.ambari.view.utils.hdfs.HdfsApiException: HDFS020 Could not write file /user/admin/hive/jobs/hive-job-3-2016-02-29_10-05/query.hql
	at org.apache.ambari.view.utils.hdfs.HdfsUtil.putStringToFile(HdfsUtil.java:51)
	at org.apache.ambari.view.hive.resources.jobs.viewJobs.JobControllerImpl.setupQueryFile(JobControllerImpl.java:326)
	at org.apache.ambari.view.hive.resources.jobs.viewJobs.JobControllerImpl.setupQueryFileIfNotPresent(JobControllerImpl.java:252)
	at org.apache.ambari.view.hive.resources.jobs.viewJobs.JobControllerImpl.afterCreation(JobControllerImpl.java:238)
	at org.apache.ambari.view.hive.resources.jobs.viewJobs.JobResourceManager.create(JobResourceManager.java:57)
	at org.apache.ambari.view.hive.resources.jobs.JobService.create(JobService.java:403)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

avatar
Explorer

@Artem Eevits , @avatar imageNeeraj Sabharwal . Thank you both of you... I am all set..