lokeshj1703 commented on code in PR #7982:
URL: https://github.com/apache/hudi/pull/7982#discussion_r1111813328


##########
hudi-utilities/src/main/java/org/apache/hudi/utilities/deltastreamer/BaseQuarantineTableWriter.java:
##########
@@ -0,0 +1,70 @@
+/*
+ * 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.utilities.deltastreamer;
+
+import org.apache.hudi.common.config.TypedProperties;
+import org.apache.hudi.common.model.HoodieAvroRecord;
+import org.apache.hudi.common.util.Option;
+import org.apache.hudi.config.HoodieWriteConfig;
+
+import org.apache.hadoop.fs.FileSystem;
+import org.apache.spark.api.java.JavaRDD;
+import org.apache.spark.api.java.JavaSparkContext;
+import org.apache.spark.sql.SparkSession;
+
+public abstract class BaseQuarantineTableWriter<T extends QuarantineEvent> {
+
+  public static String QUARANTINE_PAYLOAD_CLASS = 
"org.apache.hudi.common.model.OverwriteWithLatestAvroPayload";
+
+  public static String QUARANTINE_TABLE_CURRUPT_RECORD_COL_NAME = 
"_corrupt_record";
+
+  public BaseQuarantineTableWriter(HoodieDeltaStreamer.Config cfg, 
SparkSession sparkSession,
+                                   TypedProperties props, JavaSparkContext 
jssc, FileSystem fs) {
+  }
+
+  public abstract HoodieWriteConfig getQuarantineTableWriteConfig();
+
+  public abstract HoodieDeltaStreamer.Config getSourceDeltaStreamerConfig();
+
+  /***
+   *
+   * @param errorEvent
+   */
+  public abstract void addErrorEvents(JavaRDD<T> errorEvent);

Review Comment:
   Addressed in latest commit.



##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/config/HoodieQuarantineTableConfig.java:
##########
@@ -0,0 +1,61 @@
+/*
+ * 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.config;
+
+import org.apache.hudi.common.config.ConfigClassProperty;
+import org.apache.hudi.common.config.ConfigGroups;
+import org.apache.hudi.common.config.ConfigProperty;
+
+import javax.annotation.concurrent.Immutable;
+
+@Immutable
+@ConfigClassProperty(name = "Quarantine table Configs",
+    groupName = ConfigGroups.Names.WRITE_CLIENT,
+    description = "Configurations that are required for Quarantine table 
configs")
+public class HoodieQuarantineTableConfig {
+  public static final ConfigProperty<Boolean> QUARANTINE_TABLE_ENABLED = 
ConfigProperty
+      .key("hoodie.deltastreamer.quarantinetable.enable")
+      .defaultValue(false)
+      .withDocumentation("config to enable quarantine table");
+
+  public static final ConfigProperty<String> QUARANTINE_TABLE_BASE_PATH = 
ConfigProperty
+      .key("hoodie.deltastreamer.quarantinetable.base.path")
+      .noDefaultValue()
+      .withDocumentation("base path for quarantine table");
+
+  public static final ConfigProperty<String> QUARANTINE_TARGET_TABLE = 
ConfigProperty
+      .key("hoodie.deltastreamer.quarantinetable.target.table.name")
+      .noDefaultValue()
+      .withDocumentation("target table name for quarantine table");
+
+  public static final ConfigProperty<Integer> 
QUARANTINE_TABLE_UPSERT_PARALLELISM_VALUE = ConfigProperty
+      .key("hoodie.deltastreamer.quarantinetable.upsert.shuffle.parallelism")
+      .defaultValue(200)
+      .withDocumentation("config to set upsert shuffle parallelism");
+
+  public static final ConfigProperty<Integer> 
QUARANTINE_TABLE_INSERT_PARALLELISM_VALUE = ConfigProperty
+      .key("hoodie.deltastreamer.quarantinetable.insert.shuffle.parallelism")
+      .defaultValue(200)
+      .withDocumentation("config to set insert shuffle parallelism");
+
+  public static final ConfigProperty<String> QUARANTINE_TABLE_WRITER_CLASS = 
ConfigProperty
+      .key("hoodie.deltastreamer.quarantinetable.writer.class")
+      .noDefaultValue()
+      .withDocumentation("Class which handles the quarantine table writes");

Review Comment:
   Addressed in latest commit.



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to