jackjlli commented on a change in pull request #7427:
URL: https://github.com/apache/pinot/pull/7427#discussion_r715023534
##########
File path:
pinot-controller/src/main/java/org/apache/pinot/controller/api/upload/ZKOperator.java
##########
@@ -65,7 +65,14 @@ public void completeSegmentOperations(String
tableNameWithType, SegmentMetadata
String segmentName = segmentMetadata.getName();
ZNRecord segmentMetadataZNRecord =
_pinotHelixResourceManager.getSegmentMetadataZnRecord(tableNameWithType,
segmentName);
+ boolean refreshOnly =
+
Boolean.parseBoolean(headers.getHeaderString(FileUploadDownloadClient.CustomHeaders.REFRESH_ONLY));
if (segmentMetadataZNRecord == null) {
+ if (refreshOnly) {
+ throw new ControllerApplicationException(LOGGER,
+ "Cannot refresh non-existing segment, aborted uploading segment: "
+ segmentName + " of table: "
+ + tableNameWithType, Response.Status.GONE);
Review comment:
If we decided to use a new response status, please update description in
the resource level as well.
##########
File path:
pinot-plugins/pinot-minion-tasks/pinot-minion-builtin-tasks/src/main/java/org/apache/pinot/plugin/minion/tasks/converttorawindex/ConvertToRawIndexTaskGenerator.java
##########
@@ -94,8 +97,16 @@ public String getTaskType() {
String columnsToConvertConfig =
taskConfigs.get(MinionConstants.ConvertToRawIndexTask.COLUMNS_TO_CONVERT_KEY);
// Generate tasks
+ List<SegmentZKMetadata> offlineSegmentsZKMetadata =
_clusterInfoAccessor.getSegmentsZKMetadata(offlineTableName);
+ SegmentLineage segmentLineage =
_clusterInfoAccessor.getSegmentLineage(offlineTableName);
+ Set<String> preSelectedSegmentsBasedOnLineage = new HashSet<>();
+ for (SegmentZKMetadata offlineSegmentZKMetadata :
offlineSegmentsZKMetadata) {
+
preSelectedSegmentsBasedOnLineage.add(offlineSegmentZKMetadata.getSegmentName());
+ }
+
SegmentLineageUtils.filterSegmentsBasedOnLineageInplace(preSelectedSegmentsBasedOnLineage,
segmentLineage);
Review comment:
sed 's/Inplace/InPlace/'?
--
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]