jackjlli commented on a change in pull request #7810:
URL: https://github.com/apache/pinot/pull/7810#discussion_r754590771
##########
File path:
pinot-controller/src/main/java/org/apache/pinot/controller/api/resources/PinotSegmentUploadDownloadRestletResource.java
##########
@@ -554,11 +554,14 @@ public Response startReplaceSegments(
throw new ControllerApplicationException(LOGGER, "Table type should
either be offline or realtime",
Response.Status.BAD_REQUEST);
}
- String tableNameWithType =
TableNameBuilder.forType(tableType).tableNameWithType(tableName);
+ String tableNameWithType =
+
ResourceUtils.getExistingTableNamesWithType(_pinotHelixResourceManager,
tableName, tableType, LOGGER).get(0);
String segmentLineageEntryId = _pinotHelixResourceManager
.startReplaceSegments(tableNameWithType,
startReplaceSegmentsRequest.getSegmentsFrom(),
startReplaceSegmentsRequest.getSegmentsTo(), forceCleanup);
return
Response.ok(JsonUtils.newObjectNode().put("segmentLineageEntryId",
segmentLineageEntryId)).build();
+ } catch (WebApplicationException wae) {
Review comment:
Good catch! Added.
--
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]