chenboat commented on a change in pull request #5700:
URL: https://github.com/apache/incubator-pinot/pull/5700#discussion_r459670728



##########
File path: 
pinot-core/src/main/java/org/apache/pinot/core/data/manager/realtime/SegmentCommitterFactory.java
##########
@@ -29,18 +33,35 @@
 public class SegmentCommitterFactory {
   private static Logger LOGGER;
   private final ServerSegmentCompletionProtocolHandler _protocolHandler;
+  private final TableConfig _tableConfig;
+  private final ServerMetrics _serverMetrics;
+  private final IndexLoadingConfig _indexLoadingConfig;
 
-  public SegmentCommitterFactory(Logger segmentLogger, 
ServerSegmentCompletionProtocolHandler protocolHandler) {
+  public SegmentCommitterFactory(Logger segmentLogger, 
ServerSegmentCompletionProtocolHandler protocolHandler,
+      TableConfig tableConfig, IndexLoadingConfig indexLoadingConfig, 
ServerMetrics serverMetrics) {
     LOGGER = segmentLogger;
     _protocolHandler = protocolHandler;
+    _tableConfig = tableConfig;
+    _indexLoadingConfig = indexLoadingConfig;
+    _serverMetrics = serverMetrics;
   }
 
-  public SegmentCommitter 
createSplitSegmentCommitter(SegmentCompletionProtocol.Request.Params params,
-      SegmentUploader segmentUploader) {
-    return new SplitSegmentCommitter(LOGGER, _protocolHandler, params, 
segmentUploader);
-  }
+  public SegmentCommitter createSegmentCommitter(boolean isSplitCommit, 
SegmentCompletionProtocol.Request.Params params,
+      String controllerVipUrl) throws URISyntaxException {
+    if (!isSplitCommit) {
+      return new DefaultSegmentCommitter(LOGGER, _protocolHandler, params);
+    }
+    SegmentUploader segmentUploader;
+    if (_tableConfig.getValidationConfig().getPeerSegmentDownloadScheme() != 
null) {

Review comment:
       done.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to