diff --git a/hudi-client/hudi-client-common/src/main/java/org/apache/hudi/table/action/commit/AbstractMergeHelper.java b/hudi-client/hudi-client-common/src/main/java/org/apache/hudi/table/action/commit/AbstractMergeHelper.java index 1bbffadb3..8c92b0033 100644 --- a/hudi-client/hudi-client-common/src/main/java/org/apache/hudi/table/action/commit/AbstractMergeHelper.java +++ b/hudi-client/hudi-client-common/src/main/java/org/apache/hudi/table/action/commit/AbstractMergeHelper.java @@ -94,7 +94,7 @@ public abstract class AbstractMergeHelper bootstrapReader = HoodieFileReaderFactory.getFileReader(bootstrapFileConfig, externalFilePath); + HoodieFileReader bootstrapReader = HoodieFileReaderFactory.getFileReader(bootstrapFileConfig, externalFilePath); Schema bootstrapReadSchema; if (externalSchemaTransformation) { bootstrapReadSchema = bootstrapReader.getSchema(); diff --git a/hudi-client/hudi-spark-client/src/main/java/org/apache/hudi/table/action/commit/SparkMergeHelper.java b/hudi-client/hudi-spark-client/src/main/java/org/apache/hudi/table/action/commit/SparkMergeHelper.java index 697b5ac41..2d130e35d 100644 --- a/hudi-client/hudi-spark-client/src/main/java/org/apache/hudi/table/action/commit/SparkMergeHelper.java +++ b/hudi-client/hudi-spark-client/src/main/java/org/apache/hudi/table/action/commit/SparkMergeHelper.java @@ -76,7 +76,7 @@ public class SparkMergeHelper extends AbstractMer } BoundedInMemoryExecutor wrapper = null; - HoodieFileReader reader = HoodieFileReaderFactory.getFileReader(cfgForHoodieFile, mergeHandle.getOldFilePath()); + HoodieFileReader reader = HoodieFileReaderFactory.getFileReader(cfgForHoodieFile, mergeHandle.getOldFilePath()); try { final Iterator readerIterator; if (baseFile.getBootstrapBaseFile().isPresent()) { diff --git a/hudi-common/src/main/java/org/apache/hudi/io/storage/HoodieFileReaderFactory.java b/hudi-common/src/main/java/org/apache/hudi/io/storage/HoodieFileReaderFactory.java index 3c97b3665..ff559c559 100644 --- a/hudi-common/src/main/java/org/apache/hudi/io/storage/HoodieFileReaderFactory.java +++ b/hudi-common/src/main/java/org/apache/hudi/io/storage/HoodieFileReaderFactory.java @@ -19,7 +19,6 @@ package org.apache.hudi.io.storage; import org.apache.hudi.common.fs.FSUtils; -import org.apache.hudi.common.model.HoodieRecordPayload; import org.apache.avro.generic.IndexedRecord; import org.apache.hadoop.conf.Configuration; @@ -33,8 +32,7 @@ import static org.apache.hudi.common.model.HoodieFileFormat.HFILE; public class HoodieFileReaderFactory { - public static HoodieFileReader getFileReader( - Configuration conf, Path path) throws IOException { + public static HoodieFileReader getFileReader(Configuration conf, Path path) throws IOException { final String extension = FSUtils.getFileExtension(path.toString()); if (PARQUET.getFileExtension().equals(extension)) { return newParquetFileReader(conf, path); @@ -46,13 +44,11 @@ public class HoodieFileReaderFactory { throw new UnsupportedOperationException(extension + " format not supported yet."); } - private static HoodieFileReader newParquetFileReader( - Configuration conf, Path path) throws IOException { + private static HoodieFileReader newParquetFileReader(Configuration conf, Path path) { return new HoodieParquetReader<>(conf, path); } - private static HoodieFileReader newHFileFileReader( - Configuration conf, Path path) throws IOException { + private static HoodieFileReader newHFileFileReader(Configuration conf, Path path) throws IOException { CacheConfig cacheConfig = new CacheConfig(conf); return new HoodieHFileReader<>(conf, path, cacheConfig); }