Skip to content

Commit

Permalink
Rename AvroFileWriterFactory
Browse files Browse the repository at this point in the history
  • Loading branch information
electrum committed Jul 14, 2023
1 parent 703cc2a commit 462c5dc
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import io.trino.hdfs.TrinoFileSystemCache;
import io.trino.hdfs.TrinoFileSystemCacheStats;
import io.trino.plugin.base.CatalogName;
import io.trino.plugin.hive.avro.AvroHiveFileWriterFactory;
import io.trino.plugin.hive.avro.AvroFileWriterFactory;
import io.trino.plugin.hive.avro.AvroHivePageSourceFactory;
import io.trino.plugin.hive.fs.CachingDirectoryLister;
import io.trino.plugin.hive.fs.TransactionScopeCachingDirectoryListerFactory;
Expand Down Expand Up @@ -161,7 +161,7 @@ public void configure(Binder binder)
fileWriterFactoryBinder.addBinding().to(SimpleSequenceFileWriterFactory.class).in(Scopes.SINGLETON);
fileWriterFactoryBinder.addBinding().to(OrcFileWriterFactory.class).in(Scopes.SINGLETON);
fileWriterFactoryBinder.addBinding().to(RcFileFileWriterFactory.class).in(Scopes.SINGLETON);
fileWriterFactoryBinder.addBinding().to(AvroHiveFileWriterFactory.class).in(Scopes.SINGLETON);
fileWriterFactoryBinder.addBinding().to(AvroFileWriterFactory.class).in(Scopes.SINGLETON);

configBinder(binder).bindConfig(ParquetReaderConfig.class);
configBinder(binder).bindConfig(ParquetWriterConfig.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,15 @@
import static io.trino.plugin.hive.util.HiveUtil.getColumnTypes;
import static java.util.Objects.requireNonNull;

public class AvroHiveFileWriterFactory
public class AvroFileWriterFactory
implements HiveFileWriterFactory
{
private final TrinoFileSystemFactory fileSystemFactory;
private final TypeManager typeManager;
private final NodeVersion nodeVersion;

@Inject
public AvroHiveFileWriterFactory(
public AvroFileWriterFactory(
TrinoFileSystemFactory fileSystemFactory,
TypeManager typeManager,
NodeVersion nodeVersion)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
import io.trino.hive.formats.compression.CompressionKind;
import io.trino.orc.OrcReaderOptions;
import io.trino.orc.OrcWriterOptions;
import io.trino.plugin.hive.avro.AvroHiveFileWriterFactory;
import io.trino.plugin.hive.avro.AvroFileWriterFactory;
import io.trino.plugin.hive.avro.AvroHivePageSourceFactory;
import io.trino.plugin.hive.line.CsvFileWriterFactory;
import io.trino.plugin.hive.line.CsvPageSourceFactory;
Expand Down Expand Up @@ -434,7 +434,7 @@ public void testAvro(int rowCount, long fileSizePadding)
.withColumns(getTestColumnsSupportedByAvro())
.withRowsCount(rowCount)
.withFileSizePadding(fileSizePadding)
.withFileWriterFactory(new AvroHiveFileWriterFactory(FILE_SYSTEM_FACTORY, TESTING_TYPE_MANAGER, new NodeVersion("test_version")))
.withFileWriterFactory(new AvroFileWriterFactory(FILE_SYSTEM_FACTORY, TESTING_TYPE_MANAGER, new NodeVersion("test_version")))
.isReadableByPageSource(new AvroHivePageSourceFactory(FILE_SYSTEM_FACTORY, STATS))
.isReadableByRecordCursor(createGenericHiveRecordCursorProvider(HDFS_ENVIRONMENT));
}
Expand Down Expand Up @@ -599,7 +599,7 @@ public void testTruncateVarcharColumn()
assertThatFileFormat(AVRO)
.withWriteColumns(ImmutableList.of(writeColumn))
.withReadColumns(ImmutableList.of(readColumn))
.withFileWriterFactory(new AvroHiveFileWriterFactory(FILE_SYSTEM_FACTORY, TESTING_TYPE_MANAGER, new NodeVersion("test_version")))
.withFileWriterFactory(new AvroFileWriterFactory(FILE_SYSTEM_FACTORY, TESTING_TYPE_MANAGER, new NodeVersion("test_version")))
.isReadableByRecordCursor(createGenericHiveRecordCursorProvider(HDFS_ENVIRONMENT))
.isReadableByPageSource(new AvroHivePageSourceFactory(FILE_SYSTEM_FACTORY, STATS));

Expand Down Expand Up @@ -638,7 +638,7 @@ public void testAvroProjectedColumns(int rowCount)
.withWriteColumns(writeColumns)
.withReadColumns(readColumns)
.withRowsCount(rowCount)
.withFileWriterFactory(new AvroHiveFileWriterFactory(FILE_SYSTEM_FACTORY, TESTING_TYPE_MANAGER, new NodeVersion("test_version")))
.withFileWriterFactory(new AvroFileWriterFactory(FILE_SYSTEM_FACTORY, TESTING_TYPE_MANAGER, new NodeVersion("test_version")))
.isReadableByRecordCursorPageSource(createGenericHiveRecordCursorProvider(HDFS_ENVIRONMENT))
.isReadableByPageSource(new AvroHivePageSourceFactory(FILE_SYSTEM_FACTORY, STATS));
}
Expand Down

0 comments on commit 462c5dc

Please sign in to comment.