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

Support list files through RESTful API #17685

Merged
merged 2 commits into from
Jul 7, 2023

Conversation

JiamingMai
Copy link
Contributor

@JiamingMai JiamingMai commented Jun 25, 2023

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
image

@JiamingMai JiamingMai self-assigned this Jun 25, 2023
@JiamingMai JiamingMai added the type-feature This issue is a feature request label Jun 25, 2023
Copy link
Member

@ChunxuTang ChunxuTang left a 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;
Copy link
Member

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":
Copy link
Contributor

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?

Copy link
Contributor

@LuQQiu LuQQiu left a 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

@humengyu2012
Copy link
Contributor

This is an exciting feature! Do you have any plans to support more file attributes, such as length and last modification time?

@LuQQiu
Copy link
Contributor

LuQQiu commented Jul 7, 2023

alluxio-bot, merge this please

@alluxio-bot alluxio-bot merged commit c0af506 into Alluxio:main Jul 7, 2023
@JiamingMai JiamingMai deleted the http-server branch July 11, 2023 13:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-feature This issue is a feature request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants