krishan1390 commented on code in PR #17632:
URL: https://github.com/apache/pinot/pull/17632#discussion_r2767058240
##########
pinot-plugins/pinot-minion-tasks/pinot-minion-builtin-tasks/src/main/java/org/apache/pinot/plugin/minion/tasks/BaseSingleSegmentConversionExecutor.java:
##########
@@ -184,22 +188,28 @@ public SegmentConversionResult
executeTask(PinotTaskConfig pinotTaskConfig)
httpHeaders.add(segmentZKMetadataCustomMapModifierHeader);
httpHeaders.addAll(AuthProviderUtils.toRequestHeaders(authProvider));
- // Set parameters for upload request.
- NameValuePair enableParallelPushProtectionParameter =
- new
BasicNameValuePair(FileUploadDownloadClient.QueryParameters.ENABLE_PARALLEL_PUSH_PROTECTION,
"true");
- NameValuePair tableNameParameter = new
BasicNameValuePair(FileUploadDownloadClient.QueryParameters.TABLE_NAME,
- TableNameBuilder.extractRawTableName(tableNameWithType));
- NameValuePair tableTypeParameter = new
BasicNameValuePair(FileUploadDownloadClient.QueryParameters.TABLE_TYPE,
-
TableNameBuilder.getTableTypeFromTableName(tableNameWithType).toString());
- List<NameValuePair> parameters =
- Arrays.asList(enableParallelPushProtectionParameter,
tableNameParameter, tableTypeParameter);
-
- // Upload the tarred segment
- _eventObserver.notifyProgress(_pinotTaskConfig, "Uploading segment: " +
segmentName);
+ // Set parameters for upload request (shared with metadata push).
+ List<NameValuePair> parameters =
getSegmentPushCommonParams(tableNameWithType);
+
+ // Upload the tarred segment using the configured push mode (TAR or
METADATA)
+ BatchConfigProperties.SegmentPushType pushType =
getSegmentPushType(configs);
+ _eventObserver.notifyProgress(_pinotTaskConfig, "Uploading segment: " +
segmentName + " (push mode: " + pushType
+ + ")");
boolean uploadSuccessful = true;
try {
- SegmentConversionUtils.uploadSegment(configs, httpHeaders, parameters,
tableNameWithType, segmentName,
- uploadURL, convertedTarredSegmentFile);
+ switch (pushType) {
+ case TAR:
+ SegmentConversionUtils.uploadSegment(configs, httpHeaders,
parameters, tableNameWithType, segmentName,
+ uploadURL, convertedTarredSegmentFile);
+ break;
+ case METADATA:
+ case URI:
Review Comment:
BaseMultipleSegmentsConversionExecutor doesn't support URI mode. Is it fine
to add here ?
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]