snleee commented on a change in pull request #6932: URL: https://github.com/apache/incubator-pinot/pull/6932#discussion_r639492701
########## File path: pinot-core/src/main/java/org/apache/pinot/core/minion/rollup/MergeRollupSegmentConverter.java ########## @@ -45,16 +49,16 @@ private TableConfig _tableConfig; private String _tableName; private String _segmentName; - private MergeType _mergeType; + private CollectorType _collectorType; Review comment: I think that we can just revert these changes back. Your separate PR for migrating from to `SegmentProcessingFramework` will deprecate the usage of `MergeRollupSegmentConverter` ########## File path: pinot-plugins/pinot-minion-tasks/pinot-minion-builtin-tasks/src/main/java/org/apache/pinot/plugin/minion/tasks/merge_rollup/MergeRollupTaskUtils.java ########## @@ -0,0 +1,119 @@ +/** + * 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.plugin.minion.tasks.merge_rollup; + +import com.google.common.base.Preconditions; +import java.util.HashMap; +import java.util.Map; +import org.apache.commons.lang3.StringUtils; +import org.apache.pinot.common.minion.MergeRollupTaskMetadata; +import org.apache.pinot.core.common.MinionConstants; +import org.apache.pinot.core.segment.processing.collector.ValueAggregatorFactory; +import org.apache.pinot.pql.parsers.utils.Pair; +import org.apache.pinot.spi.utils.TimeUtils; + + +public class MergeRollupTaskUtils { Review comment: Can we add the unit test for this util class? ########## File path: pinot-core/src/main/java/org/apache/pinot/core/minion/rollup/CollectorType.java ########## @@ -22,23 +22,23 @@ import java.util.Map; -public enum MergeType { +public enum CollectorType { Review comment: I would prefer to keep this as `mergeType`, not the collector type. I updated the design doc. ########## File path: pinot-common/src/main/java/org/apache/pinot/common/minion/MergeRollupTaskMetadata.java ########## @@ -0,0 +1,95 @@ +/** + * 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>watermarkMap</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 { + + public enum Granularity { Review comment: Let's discuss where we should put this. I think that we will use this enum very frequently from other classes as well (e.g. task scheduler, task executor etc). So, having `MergeRollupTaskMetadata.Granularity` may not be the cleanest name. -- 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