Support Questions

Find answers, ask questions, and share your expertise

Can not create a Path from an empty string for hdfs ls command to list contents of har files

avatar
Rising Star

Hi,

 

We are using CDH 5.9.2  14-node cloudera cluster. I have har file archived from multiple directories.

 

However when I tried to check the contents of har file ,I got the error as below.

 

hdfs dfs -ls har:///user/user1/HDFSArchival/Output1/Archive-16-11-2017-02-20.har
-ls: Can not create a Path from an empty string
Usage: hadoop fs [generic options] -ls [-C] [-d] [-h] [-q] [-R] [-t] [-S] [-r] [-u] [<path> ...]

 

I am able to check the size of har file though.

 

 hdfs dfs -du -s -h /user/user1/HDFSArchival/Output1/Archive-16-11-2017-02-20.har
3.2 G 9.6 G /user/user1/HDFSArchival/Output1/Archive-16-11-2017-02-20.har

 

When I was looking for the error, got to know about the bug in CDH4.4.0.1 (and possibly earlier) in the globbing functionality inside .HAR files, implemented in the methods FileSystem::globStatus() and FileSystem::globStatusInternal().

 

Is the bug still present in CDH 5.9 also?

 

Can you please help me to solve this?

 

Thanks,

Priya

3 REPLIES 3

avatar
Rising Star

Hi,

 

Can anyone help me on this please?

 

Thanks,

Priya

avatar
Explorer

HAR works for me on cdh5.11.0. But i think should be ok for cdh5.9.0 as well. 

can you share how you generate the HAR files?

avatar
Rising Star
@Harry,

I am using command line option hadoop archive -archiveName archive-file-name input-path output-path for generating har files.

Thanks,
Priya