Skip to content
This repository has been archived by the owner on Jun 23, 2022. It is now read-only.

feat(bulk_load): add start bulk load http interface #693

Merged
merged 4 commits into from
Dec 17, 2020

Conversation

hycdong
Copy link
Contributor

@hycdong hycdong commented Dec 17, 2020

This pull request adds a new http interface for meta server to start bulk load.

@@ -6,11 +6,15 @@

#include <algorithm>

#include <dsn/cpp/json_helper.h>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can move this line to the corresponding cpp file

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This update is for further pull request, I will add structure in .h file using json serilization.

Copy link
Contributor

@levy5307 levy5307 Dec 17, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So I think you can add this line in the future pull request, because it's meaningless for this pr.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is still useful for this pull request, I use NON_MEMBER_JSON_SERIALIZATION marco to make structure start_bulk_load_request json-serializable. As your comment shows, I can add this in meta_http_service.cpp, but considering it will finally move into .h file, I did it in this pull request.

resp.body = "remote_root_path should not be empty";
resp.status_code = http_status_code::bad_request;
return;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this simple args validate put client side?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In current implmetation, client and server both will validate arguments.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will implement HTTP argument validation in later PR. I actually did it in my staging branch. But haven't ready for review yet. Got no time to make it steady.

resp.body = "remote_root_path should not be empty";
resp.status_code = http_status_code::bad_request;
return;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will implement HTTP argument validation in later PR. I actually did it in my staging branch. But haven't ready for review yet. Got no time to make it steady.

@neverchanje neverchanje merged commit 1d88c1d into XiaoMi:master Dec 17, 2020
@hycdong hycdong deleted the add_start_bulk_load_http branch December 28, 2020 07:48
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants