Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make the ls command compatible with hdfs dfs -ls #18

Open
prateek opened this issue May 4, 2016 · 0 comments
Open

Make the ls command compatible with hdfs dfs -ls #18

prateek opened this issue May 4, 2016 · 0 comments

Comments

@prateek
Copy link

prateek commented May 4, 2016

Two parts:

  • Make hh ls accept the same flags as hdfs dfs -ls
Usage: hadoop fs [generic options] -ls [-d] [-h] [-R] [<path> ...]
  • The output of hh ls should be the same structure as hdfs dfs -ls.

e.g. -

[~]$ hdfs dfs -ls /user/prungta
Found 3 items
drwx------   - prungta supergroup          0 2016-04-28 17:00 /user/prungta/.Trash
drwxr-xr-x   - prungta supergroup          0 2016-04-29 23:24 /user/prungta/.sparkStaging
drwx------   - prungta supergroup          0 2016-05-03 18:34 /user/prungta/.staging
[~]$ hh ls /user/prungta
Found 3 items
drwx------ - prungta supergroup 0 2016-04-29 00:00 .Trash
drwxr-xr-x - prungta supergroup 0 2016-04-30 06:24 .sparkStaging
drwx------ - prungta supergroup 0 2016-05-04 01:34 .staging

Looks like hh is doing three things differently:

  • the tab between group and size
  • timezone handling (using utc instead of localtime)
  • auto truncating the output of the paths to not include the full path
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant