[MINOR] remove unused generics type (#2163)
This commit is contained in:
@@ -94,7 +94,7 @@ public abstract class AbstractMergeHelper<T extends HoodieRecordPayload, I, K, O
|
|||||||
Schema readSchema, boolean externalSchemaTransformation) throws IOException {
|
Schema readSchema, boolean externalSchemaTransformation) throws IOException {
|
||||||
Path externalFilePath = new Path(baseFile.getBootstrapBaseFile().get().getPath());
|
Path externalFilePath = new Path(baseFile.getBootstrapBaseFile().get().getPath());
|
||||||
Configuration bootstrapFileConfig = new Configuration(table.getHadoopConf());
|
Configuration bootstrapFileConfig = new Configuration(table.getHadoopConf());
|
||||||
HoodieFileReader<GenericRecord> bootstrapReader = HoodieFileReaderFactory.<T, GenericRecord>getFileReader(bootstrapFileConfig, externalFilePath);
|
HoodieFileReader<GenericRecord> bootstrapReader = HoodieFileReaderFactory.<GenericRecord>getFileReader(bootstrapFileConfig, externalFilePath);
|
||||||
Schema bootstrapReadSchema;
|
Schema bootstrapReadSchema;
|
||||||
if (externalSchemaTransformation) {
|
if (externalSchemaTransformation) {
|
||||||
bootstrapReadSchema = bootstrapReader.getSchema();
|
bootstrapReadSchema = bootstrapReader.getSchema();
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ public class SparkMergeHelper<T extends HoodieRecordPayload> extends AbstractMer
|
|||||||
}
|
}
|
||||||
|
|
||||||
BoundedInMemoryExecutor<GenericRecord, GenericRecord, Void> wrapper = null;
|
BoundedInMemoryExecutor<GenericRecord, GenericRecord, Void> wrapper = null;
|
||||||
HoodieFileReader<GenericRecord> reader = HoodieFileReaderFactory.<T, GenericRecord>getFileReader(cfgForHoodieFile, mergeHandle.getOldFilePath());
|
HoodieFileReader<GenericRecord> reader = HoodieFileReaderFactory.<GenericRecord>getFileReader(cfgForHoodieFile, mergeHandle.getOldFilePath());
|
||||||
try {
|
try {
|
||||||
final Iterator<GenericRecord> readerIterator;
|
final Iterator<GenericRecord> readerIterator;
|
||||||
if (baseFile.getBootstrapBaseFile().isPresent()) {
|
if (baseFile.getBootstrapBaseFile().isPresent()) {
|
||||||
|
|||||||
@@ -19,7 +19,6 @@
|
|||||||
package org.apache.hudi.io.storage;
|
package org.apache.hudi.io.storage;
|
||||||
|
|
||||||
import org.apache.hudi.common.fs.FSUtils;
|
import org.apache.hudi.common.fs.FSUtils;
|
||||||
import org.apache.hudi.common.model.HoodieRecordPayload;
|
|
||||||
|
|
||||||
import org.apache.avro.generic.IndexedRecord;
|
import org.apache.avro.generic.IndexedRecord;
|
||||||
import org.apache.hadoop.conf.Configuration;
|
import org.apache.hadoop.conf.Configuration;
|
||||||
@@ -33,8 +32,7 @@ import static org.apache.hudi.common.model.HoodieFileFormat.HFILE;
|
|||||||
|
|
||||||
public class HoodieFileReaderFactory {
|
public class HoodieFileReaderFactory {
|
||||||
|
|
||||||
public static <T extends HoodieRecordPayload, R extends IndexedRecord> HoodieFileReader<R> getFileReader(
|
public static <R extends IndexedRecord> HoodieFileReader<R> getFileReader(Configuration conf, Path path) throws IOException {
|
||||||
Configuration conf, Path path) throws IOException {
|
|
||||||
final String extension = FSUtils.getFileExtension(path.toString());
|
final String extension = FSUtils.getFileExtension(path.toString());
|
||||||
if (PARQUET.getFileExtension().equals(extension)) {
|
if (PARQUET.getFileExtension().equals(extension)) {
|
||||||
return newParquetFileReader(conf, path);
|
return newParquetFileReader(conf, path);
|
||||||
@@ -46,13 +44,11 @@ public class HoodieFileReaderFactory {
|
|||||||
throw new UnsupportedOperationException(extension + " format not supported yet.");
|
throw new UnsupportedOperationException(extension + " format not supported yet.");
|
||||||
}
|
}
|
||||||
|
|
||||||
private static <T extends HoodieRecordPayload, R extends IndexedRecord> HoodieFileReader<R> newParquetFileReader(
|
private static <R extends IndexedRecord> HoodieFileReader<R> newParquetFileReader(Configuration conf, Path path) {
|
||||||
Configuration conf, Path path) throws IOException {
|
|
||||||
return new HoodieParquetReader<>(conf, path);
|
return new HoodieParquetReader<>(conf, path);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static <T extends HoodieRecordPayload, R extends IndexedRecord> HoodieFileReader<R> newHFileFileReader(
|
private static <R extends IndexedRecord> HoodieFileReader<R> newHFileFileReader(Configuration conf, Path path) throws IOException {
|
||||||
Configuration conf, Path path) throws IOException {
|
|
||||||
CacheConfig cacheConfig = new CacheConfig(conf);
|
CacheConfig cacheConfig = new CacheConfig(conf);
|
||||||
return new HoodieHFileReader<>(conf, path, cacheConfig);
|
return new HoodieHFileReader<>(conf, path, cacheConfig);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user