rahil-c commented on code in PR #19698:
URL: https://github.com/apache/hudi/pull/19698#discussion_r3839312786


##########
hudi-utilities/src/main/java/org/apache/hudi/utilities/sources/helpers/CloudObjectMaterializer.java:
##########
@@ -0,0 +1,73 @@
+/*
+ * 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.sources.helpers;
+
+import org.apache.hudi.common.config.TypedProperties;
+import org.apache.hudi.common.util.Option;
+import org.apache.hudi.utilities.schema.SchemaProvider;
+
+import org.apache.spark.sql.Dataset;
+import org.apache.spark.sql.Row;
+import org.apache.spark.sql.SparkSession;
+
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * Turns the cloud objects an incremental source has selected into rows. 
Selecting which objects
+ * to read is common to every payload, so it stays in {@link 
CloudDataFetcher}; how those objects
+ * become rows is not, which is what implementations supply.
+ *
+ * <p>Three concerns move together and so belong on one type: the predicate 
that decides which
+ * object keys are eligible, how many Spark partitions the batch is spread 
over, and the read
+ * itself. A columnar reader selects by data-file format, sizes partitions by 
bytes scanned and
+ * defers to a Spark datasource; a reader that parses documents selects by 
document extension,
+ * sizes partitions by the bytes it will actually parse, and builds rows 
itself.
+ */
+public interface CloudObjectMaterializer extends Serializable {

Review Comment:
   I would like to us go deep on the need for the following interface? Prior to 
the interface how did objects get materailzied? Lets think carefully on what 
the right abstractions are here around handling structed and unstructured data.



##########
hudi-utilities/src/main/java/org/apache/hudi/utilities/sources/helpers/CloudObjectMaterializer.java:
##########
@@ -0,0 +1,73 @@
+/*
+ * 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.sources.helpers;
+
+import org.apache.hudi.common.config.TypedProperties;
+import org.apache.hudi.common.util.Option;
+import org.apache.hudi.utilities.schema.SchemaProvider;
+
+import org.apache.spark.sql.Dataset;
+import org.apache.spark.sql.Row;
+import org.apache.spark.sql.SparkSession;
+
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * Turns the cloud objects an incremental source has selected into rows. 
Selecting which objects
+ * to read is common to every payload, so it stays in {@link 
CloudDataFetcher}; how those objects
+ * become rows is not, which is what implementations supply.
+ *
+ * <p>Three concerns move together and so belong on one type: the predicate 
that decides which
+ * object keys are eligible, how many Spark partitions the batch is spread 
over, and the read
+ * itself. A columnar reader selects by data-file format, sizes partitions by 
bytes scanned and
+ * defers to a Spark datasource; a reader that parses documents selects by 
document extension,
+ * sizes partitions by the bytes it will actually parse, and builds rows 
itself.
+ */
+public interface CloudObjectMaterializer extends Serializable {

Review Comment:
   I would like to us go deep on the need for the following interface? Prior to 
the interface how did objects get materailzied? Lets think carefully on what 
the right abstractions are here around handling structured and unstructured 
data.



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