jamesyfshao commented on a change in pull request #5394:
URL: https://github.com/apache/incubator-pinot/pull/5394#discussion_r446713828



##########
File path: 
pinot-core/src/main/java/org/apache/pinot/core/data/manager/callback/DataManagerCallback.java
##########
@@ -0,0 +1,106 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.pinot.core.data.manager.callback;
+
+import org.apache.pinot.core.data.manager.SegmentDataManager;
+import org.apache.pinot.spi.annotations.InterfaceStability;
+import org.apache.pinot.spi.data.readers.GenericRow;
+import org.apache.pinot.spi.stream.MessageBatch;
+import org.apache.pinot.spi.stream.StreamPartitionMsgOffset;
+
+import java.io.IOException;
+
+/**
+ * Component inject to {@link 
org.apache.pinot.core.data.manager.SegmentDataManager} for handling extra logic 
for
+ * upsert-enabled pinot ingestion mode.
+ */
+@InterfaceStability.Evolving
+public interface DataManagerCallback {

Review comment:
       > the interface definition should go into pinot-spi
   
   I looked into the option of moving them to the pinot-spi package. However I 
don't think we are able to do that at the moment due to the 
IndexSegmentCallback class need to read the internal data of offset column to 
build the offset -> docId mapping. WIthout this information we are not able to 
update the virtual columns for records by lookin up their offset. And because 
of the offset columns data are stored with the forward-index related class and 
they are visible in pinot-core package only, moving them out to pinot-spi 
package will make it hard for us to achieve the same functionality.
   
   
   
   > A suggestion to make it more readable. All callback methods should be 
named starting with "on". So, `onSegmentConsumingToOnline` or 
`onSegmentOfflineToOnline`, or `onSegmentStartConsuming`, etc.
   
   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:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org
For additional commands, e-mail: commits-h...@pinot.apache.org

Reply via email to