Created 10-25-2017 07:12 AM
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
Created on 10-25-2017 07:31 AM - edited 08-17-2019 05:21 PM
hdfs accepts directories with quotes. may be the directory was created using the below command
hdfs dfs -mkdir /user/\"hdpuser\"
Please check the screenshot.
Created 10-25-2017 07:30 AM
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
Created 10-25-2017 07:33 AM
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?
Created on 10-25-2017 07:31 AM - edited 08-17-2019 05:21 PM
hdfs accepts directories with quotes. may be the directory was created using the below command
hdfs dfs -mkdir /user/\"hdpuser\"
Please check the screenshot.