yihua commented on a change in pull request #4417:
URL: https://github.com/apache/hudi/pull/4417#discussion_r782374037
##########
File path:
hudi-hadoop-mr/src/main/java/org/apache/hudi/hadoop/HoodieHFileInputFormat.java
##########
@@ -137,15 +55,6 @@ protected HoodieDefaultTimeline
filterInstantsTimeline(HoodieDefaultTimeline tim
@Override
protected boolean isSplitable(FileSystem fs, Path filename) {
// This file isn't splittable.
- return false;
- }
-
- public void setConf(Configuration conf) {
- this.conf = conf;
- }
-
- @Override
- public Configuration getConf() {
- return conf;
+ return includeLogFilesForSnapShotView();
Review comment:
Is the splitable property related to whether the log files are included?
If not, the literal should be used for better clarity.
##########
File path:
hudi-hadoop-mr/src/main/java/org/apache/hudi/hadoop/HoodieParquetInputFormat.java
##########
@@ -250,6 +122,61 @@ protected FileSplit makeSplit(Path file, long start, long
length,
return split;
}
+ private RecordReader<NullWritable, ArrayWritable>
getRecordReaderInternal(InputSplit split,
+
JobConf job,
+
Reporter reporter) throws IOException {
+ return mapredParquetInputFormat.getRecordReader(split, job, reporter);
Review comment:
I see that `MapredParquetInputFormat::getRecordReader` references member
variable `realInput` inside and it is passed in through one constructor
variant, whereas this class uses the constructor with empty arg. Do we need to
consider the following as well?
```
protected MapredParquetInputFormat(final ParquetInputFormat<ArrayWritable>
inputFormat) {
this.realInput = inputFormat;
vectorizedSelf = new VectorizedParquetInputFormat();
}
```
##########
File path:
hudi-hadoop-mr/src/main/java/org/apache/hudi/hadoop/HoodieFileInputFormatBase.java
##########
@@ -0,0 +1,138 @@
+/*
+ * 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.hadoop;
+
+import org.apache.hadoop.conf.Configurable;
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.fs.FileStatus;
+import org.apache.hadoop.fs.Path;
+import org.apache.hadoop.io.ArrayWritable;
+import org.apache.hadoop.io.NullWritable;
+import org.apache.hadoop.mapred.FileInputFormat;
+import org.apache.hadoop.mapred.JobConf;
+import org.apache.hadoop.mapreduce.Job;
+import org.apache.hudi.common.table.HoodieTableMetaClient;
+import org.apache.hudi.common.table.timeline.HoodieInstant;
+import org.apache.hudi.common.table.timeline.HoodieTimeline;
+import org.apache.hudi.common.util.Option;
+import org.apache.hudi.hadoop.utils.HoodieHiveUtils;
+import org.apache.hudi.hadoop.utils.HoodieInputFormatUtils;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * TODO java-doc
Review comment:
nit: docs can be put in now :)
--
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]