Jackie-Jiang commented on code in PR #17194:
URL: https://github.com/apache/pinot/pull/17194#discussion_r2608726081
##########
pinot-controller/src/main/java/org/apache/pinot/controller/api/resources/PinotRealtimeTableResource.java:
##########
@@ -114,13 +114,29 @@ public class PinotRealtimeTableResource {
public Response pauseConsumption(
@ApiParam(value = "Name of the table", required = true)
@PathParam("tableName") String tableName,
@ApiParam(value = "Comment on pausing the consumption")
@QueryParam("comment") String comment,
+ @ApiParam(value = "Max number of consuming segments to commit at once")
+ @QueryParam("batchSize")
@DefaultValue(ForceCommitBatchConfig.DEFAULT_BATCH_SIZE + "") int batchSize,
+ @ApiParam(value = "How often to check whether the current batch of
segments have been successfully committed or"
+ + " not")
+ @QueryParam("batchStatusCheckIntervalSec")
+ @DefaultValue(ForceCommitBatchConfig.DEFAULT_STATUS_CHECK_INTERVAL_SEC +
"") int batchStatusCheckIntervalSec,
+ @ApiParam(value = "Timeout based on which the controller will stop
checking the forceCommit status of the batch"
+ + " of segments and throw an exception")
+ @QueryParam("batchStatusCheckTimeoutSec")
+ @DefaultValue(ForceCommitBatchConfig.DEFAULT_STATUS_CHECK_TIMEOUT_SEC +
"") int batchStatusCheckTimeoutSec,
@Context HttpHeaders headers) {
tableName = DatabaseUtils.translateTableName(tableName, headers);
String tableNameWithType =
TableNameBuilder.REALTIME.tableNameWithType(tableName);
validateTable(tableNameWithType);
+ ForceCommitBatchConfig batchConfig;
+ try {
+ batchConfig = ForceCommitBatchConfig.of(batchSize,
batchStatusCheckIntervalSec, batchStatusCheckTimeoutSec);
Review Comment:
Sounds good. `BatchConfig` is a better name
--
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]