hdfs
hdfs copied to clipboard
Add glob support
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.
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.