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.

Not able to run HDFS command

Solved Go to solution
Highlighted

Not able to run HDFS command

Explorer

Logged in as root (SSH)

I am using this: hdfs dfs -mkdir test

mkdir: `test': No such file or directory ( getting this error)

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: Not able to run HDFS command

@laki cheli

Please try to create the home directory for that particular user and run the command 'hdfs dfs -mkdir test'.

In your case I can see you logged in as root account, please login as hdfs account and create root account HDFS home directory and then run your command as root user.

Step 1: Login as hdfs account

Step 2: hdfs dfs -mkdir -p /user/root/

Step 3: hdfs dfs chown root /user/root/

Step 4: Login back as root account again

Step 5: Run your command 'hdfs dfs -mkdir test'

Step 6: Now you can see test directory under root account using 'hdfs dfs -ls ' or hdfs dfs -ls /user/root/'

Hope this helps you.

View solution in original post

3 REPLIES 3
Highlighted

Re: Not able to run HDFS command

@laki cheli

Please try to create the home directory for that particular user and run the command 'hdfs dfs -mkdir test'.

In your case I can see you logged in as root account, please login as hdfs account and create root account HDFS home directory and then run your command as root user.

Step 1: Login as hdfs account

Step 2: hdfs dfs -mkdir -p /user/root/

Step 3: hdfs dfs chown root /user/root/

Step 4: Login back as root account again

Step 5: Run your command 'hdfs dfs -mkdir test'

Step 6: Now you can see test directory under root account using 'hdfs dfs -ls ' or hdfs dfs -ls /user/root/'

Hope this helps you.

View solution in original post

Re: Not able to run HDFS command

Contributor

@laki cheli

after logging as root you su to hdfs (su hdfs) and run the rest of the commands to create the directories.

Highlighted

Re: Not able to run HDFS command

Explorer

great, worked like charm

Don't have an account?
Coming from Hortonworks? Activate your account here