-
Notifications
You must be signed in to change notification settings - Fork 18
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
DM-46919: Extend the http frontend of Qserv to support pushing CSV files in the multipart/form-data body #876
base: main
Are you sure you want to change the base?
Conversation
ba72521
to
f8b0c67
Compare
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.
Looks good, just minor comments.
doc/admin/data-table-indexes.rst
Outdated
types (numeric, etc.). Otherwise, an index creation request will fail. | ||
|
||
``ascending`` : *number* | ||
The required sorting order of the column in the index. It translates into ``ASC`` or ``DESC`` optiona |
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.
optiona -> options
doc/admin/data-table-indexes.rst
Outdated
The required *base* name of the table where the index will be created. | ||
|
||
``overlap`` : *number* := ``0`` | ||
The optional *overlap* flagg indicating a sub-type of the *chunk* table. The value should be one of the following: |
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.
flagg -> flag
doc/admin/data-table-indexes.rst
Outdated
``table`` : *string* | ||
The name of the table for which the indexes are required to be collected. | ||
|
||
The optional query parameyter is |
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.
parameyter -> parameter
doc/admin/data-table-indexes.rst
Outdated
The optional query parameyter is | ||
|
||
``overlap`` : *number* := ``0`` | ||
The optional *overlap* flagg indicating a sub-type of the *chunk* table. The value should be one of the following: |
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.
flagg -> flag
| "longitude_key" : "dec" | | | ||
| } | **Note**: Attributes ``latitude_key`` and | | ||
| | ``longitude_key`` were not provided. | | ||
| | is allowed for the dependent tables. | |
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.
is -> This is
* @param databaseName The name of the database to be verified. | ||
* @throw http::Error if the name is too short, or it doesn't start with the required prefix. | ||
*/ | ||
void verifyUserDatabaseName(std::string const& func, std::string const& databaseName) const; |
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.
I think this could be static.
* @param tableName The name of the table to be verified. | ||
* @throw http::Error if the name is too short, or it starts with the reserved prefix. | ||
*/ | ||
void verifyUserTableName(std::string const& func, std::string const& tableName) const; |
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.
I think this could be static.
// Some value of the parameters are still required by the Replication/Ingest system's API. | ||
unsigned int defaultNumStripes = 340; | ||
unsigned int defaultNumSubStripes = 3; | ||
float defaultOverlap = 0.01667; |
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.
These appear to be placeholder values that aren't really used? It would be nice to get rid of them to prevent future confusion.
json data = json::object({{"database", databaseName}, | ||
{"num_stripes", ::defaultNumStripes}, | ||
{"num_sub_stripes", ::defaultNumSubStripes}, | ||
{"overlap", ::defaultOverlap}}); |
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.
The comment at definition of these values leads me to believe they have no real effect here. Maybe they should have have values that indicate that? A replicated table effectively has 0 stripes, 0 substripes, and 0 overlap. If it's a partioned tables, these should be real values.
Request::Request(function<Result()> const& req, shared_ptr<ResultQueue> resultQueue) | ||
: _req(req), _resultQueue(resultQueue) {} | ||
|
||
void Request::operator()() { _resultQueue->push(_req()); } |
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.
I have a minor complaint about operator()(). It can be very difficult to find all instances where it is called when the ide isn't doing a good job. grep "()" generates vast numbers of false positives.
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.
Good point.
…tted requests The new version of the class allows sending file attachments in the streaming mode, along with parts.
The rafactoring prepares ground for introducing another implementation of the REST API for ingesting tables in the "multi-part/form" body. The new intermediate base class will prevent code duplication after adding the second module.
Refactored the command line application qserv-czar-http to use Boost options for command line parsing. Extended the integration test scripts and the configuration file accordingly.
f8b0c67
to
4b08a3b
Compare
No description provided.