You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2019/09/10 00:34:44 UTC
[GitHub] [incubator-pinot] mcvsubbu commented on a change in pull request
#4592: Refactor Realtime Segment Data Manager to remove repeat logic
mcvsubbu commented on a change in pull request #4592: Refactor Realtime Segment Data Manager to remove repeat logic
URL: https://github.com/apache/incubator-pinot/pull/4592#discussion_r322508502
##########
File path: pinot-core/src/main/java/org/apache/pinot/core/data/manager/realtime/SegmentCommitter.java
##########
@@ -0,0 +1,108 @@
+package org.apache.pinot.core.data.manager.realtime;
+
+import java.io.File;
+import org.apache.pinot.common.protocols.SegmentCompletionProtocol;
+import org.apache.pinot.core.segment.index.loader.IndexLoadingConfig;
+import org.apache.pinot.server.realtime.ServerSegmentCompletionProtocolHandler;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+/**
+ * Segment committer class commits realtime segments through both split commit and regular commit pathways.
+ */
+public class SegmentCommitter {
+
+ private boolean _isSplitCommit;
+ private String _segmentNameStr;
+ private ServerSegmentCompletionProtocolHandler _protocolHandler;
+ private IndexLoadingConfig _indexLoadingConfig;
+ private SegmentCompletionProtocol.Response _prevResponse;
+ private SegmentCompletionProtocol.Request.Params _params;
+
+ private final Logger SEGMENT_LOGGER;
+
+ public SegmentCommitter(boolean isSplitCommit, String segmentNameStr, ServerSegmentCompletionProtocolHandler protocolHandler,
+ IndexLoadingConfig indexLoadingConfig, SegmentCompletionProtocol.Response prevResponse, SegmentCompletionProtocol.Request.Params params) {
+ _isSplitCommit = isSplitCommit;
+ _segmentNameStr = segmentNameStr;
+ _protocolHandler = protocolHandler;
+ _indexLoadingConfig = indexLoadingConfig;
+ _prevResponse = prevResponse;
+ _params = params;
+
+ SEGMENT_LOGGER = LoggerFactory.getLogger(LLRealtimeSegmentDataManager.class.getName() + "_" + _segmentNameStr);
Review comment:
this is already computed in LLRealtimeSegmentDataManager. Can we pass this in the constructor?
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org