mcvsubbu 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_r306553765
 
 

 ##########
 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:
   ah, sorry I did not consider that we need segment metadata for creating 
segment zk metadata. Yes, your approach seems fine.

----------------------------------------------------------------
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]

Reply via email to