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

Add glob support #105

Open
FmLiu opened this issue Aug 31, 2018 · 1 comment
Open

Add glob support #105

FmLiu opened this issue Aug 31, 2018 · 1 comment

Comments

@FmLiu
Copy link

FmLiu commented Aug 31, 2018

As title said, I didn't find any method in Client could support a path like '/user/*/{1,2,3}'.

If I wanna to delete some dir like /user/*/{1,2,3}.

hadoop fs -rm -r /user/*/{1,2,3} 

Above shell cmd can do it easily, but I can't find any way to do this in python api such easily.

I want to know that if any method in Client or other class can help me in above situation.

@mtth
Copy link
Owner

mtth commented Nov 20, 2018

HdfsCLI doesn't have any logic to handle * or brace expansion currently. This could be a good feature to add. I'm actually surprised the WebHDFS API itself doesn't support globbing if the hadoop CLI does; it seems valuable enough to belong there rather than in client code.

@mtth mtth changed the title How to delete or list dir/files like /user/*/{1,2,3} in python hdfs api Add glob support Nov 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants