satishkotha commented on a change in pull request #2275:
URL: https://github.com/apache/hudi/pull/2275#discussion_r548366489



##########
File path: 
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/table/action/cluster/strategy/UpdateStrategy.java
##########
@@ -0,0 +1,65 @@
+/*
+ * 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.hudi.table.action.cluster.strategy;
+
+import org.apache.hudi.client.common.HoodieEngineContext;
+import org.apache.hudi.common.model.HoodieFileGroupId;
+import org.apache.hudi.common.model.HoodieRecordPayload;
+import org.apache.hudi.table.action.commit.SmallFile;
+
+import java.util.List;
+import java.util.Set;
+import java.util.stream.Collectors;
+
+/**
+ * When file groups in clustering, write records to these file group need to 
check.
+ */
+public abstract class UpdateStrategy<T extends HoodieRecordPayload<T>, I>  {
+
+  private final HoodieEngineContext engineContext;
+
+  protected UpdateStrategy(HoodieEngineContext engineContext) {
+    this.engineContext = engineContext;
+  }
+
+  /**
+   * Check the update records to the file group in clustering.
+   * @param fileGroupsInPendingClustering
+   * @param taggedRecordsRDD the records will write, can get the update record,
+   *                        future can update tagged records location to a 
different fileId.
+   */
+  public abstract void apply(Set<HoodieFileGroupId> 
fileGroupsInPendingClustering, I taggedRecordsRDD);

Review comment:
       can you change it to retrun taggedRecords? You can just simply return 
same taggedRecordsRDD. This will be helpful later on if we want to store 
updates in a different file group and later reconcile.




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


Reply via email to