-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Support list files through RESTful API #17685
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM for the initial testing.
@JiamingMai Thanks for your nice work!
Meanwhile, @LuQQiu would you mind also having a quick look at this API code change? We could update our Python client-side code to use this API for listing directories.
* See the NOTICE file distributed with this work for information regarding copyright ownership. | ||
*/ | ||
|
||
package alluxio.worker.http; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for also adding a unit test.
switch (requestMapping) { | ||
case "page": | ||
return doGetPage(parametersMap, channel, httpRequest); | ||
case "files": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JiamingMai can it be "list" or other keywords since the directory may contain all subdir?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, left one minor minor comment lol
This is an exciting feature! Do you have any plans to support more file attributes, such as length and last modification time? |
alluxio-bot, merge this please |
Support list files through RESTful API
Usage example:
HTTP GET request http://localhost:28080/files?path=/test
ls
files of the path/test
and response a JSON string