snleee commented on a change in pull request #6932:
URL: https://github.com/apache/incubator-pinot/pull/6932#discussion_r634029191



##########
File path: 
pinot-common/src/main/java/org/apache/pinot/common/minion/MergeRollupTaskMetadata.java
##########
@@ -0,0 +1,86 @@
+/**
+ * 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.common.minion;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import java.util.HashMap;
+import java.util.Map;
+import org.apache.helix.ZNRecord;
+import org.apache.pinot.spi.utils.JsonUtils;
+
+
+/**
+ * Metadata for the minion task of type <code>MergeRollupTask</code>.
+ * The <code>watermarkMsMap</code> denotes the time (exclusive) upto which 
tasks have been executed for the bucket granularity.
+ *
+ * This gets serialized and stored in zookeeper under the path 
MINION_TASK_METADATA/MergeRollupTask/tableNameWithType
+ */
+public class MergeRollupTaskMetadata {
+
+  private static final String WATERMARK_KEY_PREFIX = "watermarkMs_";
+
+  private final String _tableNameWithType;
+  private final Map<String, Long> _watermarkMsMap;

Review comment:
       `watermarkMap`?
   
   Also, please add the comment on what's the key/value.

##########
File path: 
pinot-common/src/main/java/org/apache/pinot/common/minion/MergeRollupTaskMetadata.java
##########
@@ -0,0 +1,86 @@
+/**
+ * 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.common.minion;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import java.util.HashMap;
+import java.util.Map;
+import org.apache.helix.ZNRecord;
+import org.apache.pinot.spi.utils.JsonUtils;
+
+
+/**
+ * Metadata for the minion task of type <code>MergeRollupTask</code>.
+ * The <code>watermarkMsMap</code> denotes the time (exclusive) upto which 
tasks have been executed for the bucket granularity.
+ *
+ * This gets serialized and stored in zookeeper under the path 
MINION_TASK_METADATA/MergeRollupTask/tableNameWithType
+ */
+public class MergeRollupTaskMetadata {
+
+  private static final String WATERMARK_KEY_PREFIX = "watermarkMs_";
+
+  private final String _tableNameWithType;
+  private final Map<String, Long> _watermarkMsMap;

Review comment:
       Maybe `Map<Granularity, Long>` would be better?

##########
File path: 
pinot-core/src/main/java/org/apache/pinot/core/minion/rollup/MergeRollupSegmentConverter.java
##########
@@ -177,7 +177,7 @@ public Builder setSegmentName(String segmentName) {
     }
 
     public MergeRollupSegmentConverter build() {
-      return new MergeRollupSegmentConverter(_inputIndexDirs, _workingDir, 
_tableName, _segmentName, _mergeType,
+      return new MergeRollupSegmentConverter(_inputIndexDirs, _workingDir, 
_tableName, _segmentName, _collectorType,

Review comment:
       `MergeRollupSegmentConverter` is actually the old code and we should 
deprecate this. We now need to use `SegmentProcessorFramework`. Can you add the 
comment? We can address this from another PR. Please refer to 
`RealtimeToOfflineSegmentsTaskExecutor` on how to use segment processing 
framework.

##########
File path: 
pinot-core/src/main/java/org/apache/pinot/core/common/MinionConstants.java
##########
@@ -58,8 +60,27 @@ private MinionConstants() {
   }
 
   public static class MergeRollupTask {
-    public static final String TASK_TYPE = "mergeRollupTask";
-    public static final String MERGE_TYPE_KEY = "mergeTypeKey";
+    public static final String TASK_TYPE = "MergeRollupTask";
+
+    public static final String COLLECTOR_TYPE_KEY = "collectorType";
+
+    // Rollup aggregate function related configs
+    public static final String AGGREGATE_KEY_PREFIX = "aggregate";
+
+    // Merge properties related configs
+    public static final String MERGE_KEY_PREFIX = "merge";
+    public enum Granularity {

Review comment:
       I think that we should put `Granularity` somewhere else. We can put this 
somewhere together with `MergeRollupTaskMetadata`




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