Jackie-Jiang commented on code in PR #17194:
URL: https://github.com/apache/pinot/pull/17194#discussion_r2566650634
##########
pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/realtime/PinotLLCRealtimeSegmentManager.java:
##########
@@ -2264,17 +2264,17 @@ private boolean isTmpAndCanDelete(String filePath,
Set<String> downloadUrls, Pin
* @return the set of consuming segments for which commit was initiated
*/
public Set<String> forceCommit(String tableNameWithType, @Nullable String
partitionGroupIdsToCommit,
- @Nullable String segmentsToCommit, ForceCommitBatchConfig batchConfig) {
+ @Nullable String segmentsToCommit, @Nullable ForceCommitBatchConfig
batchConfig) {
Review Comment:
Could `batchConfig` be `null`?
##########
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:
Consider renaming the class. It is not for force commit 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]