Support Questions

Find answers, ask questions, and share your expertise
Announcements
Welcome to the upgraded Community! Read this blog to see What’s New!

Unable to create directory in HDFS

avatar
New Contributor

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
@Amit Sharma

Whats the error?

su - hdfs

hdfs dfs -mkdir /tmp/test

Is your cluster up ? Please share more details on your environment.

View solution in original post

6 REPLIES 6

avatar
@Amit Sharma

Whats the error?

su - hdfs

hdfs dfs -mkdir /tmp/test

Is your cluster up ? Please share more details on your environment.

avatar

avatar
New Contributor

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
Mentor

@Amit Sharma

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

avatar
New Contributor

@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
New Contributor

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

Labels