Support Questions

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

HDPF user

avatar
Rising Star

Once I fire the command hdfs dfs -ls /user/:- please check the hdpuser1. why it showing in a double cot.

Please refer screenshot. can anyone help me on that how to remove the double cot?user.jpg

1 ACCEPTED SOLUTION

avatar
Super Guru

@ANSARI FAHEEM AHMED,

hdfs accepts directories with quotes. may be the directory was created using the below command

hdfs dfs -mkdir /user/\"hdpuser\"

Please check the screenshot.

39932-screen-shot-2017-10-25-at-10039-pm.png

View solution in original post

3 REPLIES 3

avatar
Master Mentor

@ANSARI FAHEEM AHMED

It depends how you created the user and his home directory? Using some API calls (like webhdfs) or some other tool?

While creating the Home directory Or the username if you will use \"hdpuser1\" then only you will see that kind of directory.

Example: (Correct Way)

[hdfs@sandbox ~]$ hdfs dfs -ls /user
Found 11 items
drwxr-xr-x   - admin     hadoop          0 2017-10-18 12:01 /user/admin
drwxrwx---   - ambari-qa hdfs            0 2017-06-25 10:43 /user/ambari-qa
drwxr-xr-x   - hbase     hdfs            0 2017-07-03 19:08 /user/hbase
drwxr-xr-x   - hcat      hdfs            0 2017-06-25 10:47 /user/hcat
drwxr-xr-x   - hdfs      hdfs            0 2017-10-25 07:27 /user/hdpuser1
drwxr-xr-x   - hive      hdfs            0 2017-10-24 06:40 /user/hive
drwxrwxr-x   - livy      hdfs            0 2017-08-14 17:46 /user/livy
drwxr-xr-x   - maria_dev hadoop          0 2017-10-21 11:01 /user/maria_dev
drwxrwxr-x   - oozie     hdfs            0 2017-08-05 14:40 /user/oozie
drwxr-xr-x   - root      hdfs            0 2017-10-21 13:41 /user/root
drwxrwxr-x   - spark     hdfs            0 2017-08-14 17:46 /user/spark

.

Incorrect Way:

[hdfs@sandbox ~]$ hdfs dfs -mkdir /user/\"hdpuser1\"
[hdfs@sandbox ~]$ hdfs dfs -ls /user
Found 12 items
drwxr-xr-x   - hdfs      hdfs            0 2017-10-25 07:28 /user/"hdpuser1"
drwxr-xr-x   - admin     hadoop          0 2017-10-18 12:01 /user/admin
drwxrwx---   - ambari-qa hdfs            0 2017-06-25 10:43 /user/ambari-qa
drwxr-xr-x   - hbase     hdfs            0 2017-07-03 19:08 /user/hbase
drwxr-xr-x   - hcat      hdfs            0 2017-06-25 10:47 /user/hcat
drwxr-xr-x   - hdfs      hdfs            0 2017-10-25 07:27 /user/hdpuser1
drwxr-xr-x   - hive      hdfs            0 2017-10-24 06:40 /user/hive
drwxrwxr-x   - livy      hdfs            0 2017-08-14 17:46 /user/livy
drwxr-xr-x   - maria_dev hadoop          0 2017-10-21 11:01 /user/maria_dev
drwxrwxr-x   - oozie     hdfs            0 2017-08-05 14:40 /user/oozie
drwxr-xr-x   - root      hdfs            0 2017-10-21 13:41 /user/root
drwxrwxr-x   - spark     hdfs            0 2017-08-14 17:46 /user/spark

.

avatar
Master Mentor

@ANSARI FAHEEM AHMED

Can you please let us know how you created that user & HDFS Directory (The exact command that you used)

Or you used some other tool / Java code to do that?

Or if you used any AD/LDAP to sync the users?

avatar
Super Guru

@ANSARI FAHEEM AHMED,

hdfs accepts directories with quotes. may be the directory was created using the below command

hdfs dfs -mkdir /user/\"hdpuser\"

Please check the screenshot.

39932-screen-shot-2017-10-25-at-10039-pm.png