snleee commented on a change in pull request #4454: Add table and segment name
header for segment push
URL: https://github.com/apache/incubator-pinot/pull/4454#discussion_r306530823
##########
File path:
pinot-controller/src/main/java/org/apache/pinot/controller/api/resources/PinotSegmentUploadRestletResource.java
##########
@@ -288,7 +288,15 @@ private SuccessResponse uploadSegment(FormDataMultiPart
multiPart, boolean enabl
throw new UnsupportedOperationException("Unsupported upload type: "
+ uploadType);
}
- String rawTableName = segmentMetadata.getTableName();
+ // Fetch raw table name. Try to derive the table name from the header
and then from segment metadata
+ String rawTableName;
+ List<String> tableNameHeader =
headers.getRequestHeader(CommonConstants.Controller.TABLE_NAME_HTTP_HEADER);
+ if (tableNameHeader != null) {
Review comment:
`We should not be decoding the metadata if headers are present. ` I believe
the current behavior is that?
As for config, I was thinking of the following steps for deprecating table
name from the segment metadata in the future.
1. File another PR that deprecates `tableName` from segment metadata ->
adding deprecated annotation
2. Keep deprecated fileds for 0.2.0 Apache release
3. Remove tableName from the code when we release 0.3.0 Apache release (when
we do that, I was planning to make the code to reject push if header doesn't
have the table name)
do you still think that we need the configuration to reject the segment?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]