chenboat commented on a change in pull request #6567: URL: https://github.com/apache/incubator-pinot/pull/6567#discussion_r599979721
########## File path: pinot-common/src/main/java/org/apache/pinot/common/utils/fetcher/SegmentFetcherFactory.java ########## @@ -118,6 +125,47 @@ public static void fetchSegmentToLocal(String uri, File dest) fetchSegmentToLocal(new URI(uri), dest); } + /** + * Fetches a segment from a given URI and untar the segment file to the dest dir (i.e., tableDataDir + segmentName). + */ + public static void fetchAndUntarSegmentToLocal(String uri, File tableDataDir, String segmentName) Review comment: Done. Good catch. Use the existing downloadSegmentFromDeepstore() method which does the same function. ########## File path: pinot-controller/src/main/java/org/apache/pinot/controller/api/resources/PinotSegmentUploadDownloadRestletResource.java ########## @@ -403,10 +414,13 @@ private void decryptFile(String crypterClassName, File tempEncryptedFile, File t // it keeps it at the downloadURI header that is set. We will not support this endpoint going forward. public void uploadSegmentAsJson(String segmentJsonStr, @ApiParam(value = "Name of the table") @QueryParam(FileUploadDownloadClient.QueryParameters.TABLE_NAME) String tableName, + @ApiParam(value = "Type of the table") @QueryParam(FileUploadDownloadClient.QueryParameters.TABLE_TYPE) @DefaultValue("OFFLINE") String tableType, @ApiParam(value = "Whether to enable parallel push protection") @DefaultValue("false") @QueryParam(FileUploadDownloadClient.QueryParameters.ENABLE_PARALLEL_PUSH_PROTECTION) boolean enableParallelPushProtection, @Context HttpHeaders headers, @Context Request request, @Suspended final AsyncResponse asyncResponse) { try { - asyncResponse.resume(uploadSegment(tableName, null, enableParallelPushProtection, headers, request, false)); + asyncResponse.resume( + uploadSegment(tableName, "OFFLINE".equalsIgnoreCase(tableType) ? TableType.OFFLINE : TableType.REALTIME, null, Review comment: done. ########## File path: pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/assignment/segment/RealtimeSegmentAssignment.java ########## @@ -19,6 +19,7 @@ package org.apache.pinot.controller.helix.core.assignment.segment; import com.google.common.base.Preconditions; + Review comment: done. -- 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: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org