in amoro-format-mixed/amoro-mixed-trino/src/main/java/org/apache/amoro/trino/MixedFormatModule.java [79:171]
public void configure(Binder binder) {
binder.bind(TypeManager.class).toInstance(typeManager);
configBinder(binder).bindConfig(MixedFormatConfig.class);
binder.bind(IcebergSessionProperties.class).in(Scopes.SINGLETON);
binder.bind(KeyedConnectorSplitManager.class).in(Scopes.SINGLETON);
binder.bind(KeyedPageSourceProvider.class).in(Scopes.SINGLETON);
binder
.bind(MixedFormatCatalogFactory.class)
.to(DefaultMixedFormatCatalogFactory.class)
.in(Scopes.SINGLETON);
binder
.bind(TrinoCatalogFactory.class)
.to(MixedFormatTrinoCatalogFactory.class)
.in(Scopes.SINGLETON);
binder.bind(MixedFormatTransactionManager.class).in(Scopes.SINGLETON);
binder.bind(MixedFormatMetadataFactory.class).in(Scopes.SINGLETON);
binder.bind(TableStatisticsWriter.class).in(Scopes.SINGLETON);
binder
.bind(ConnectorSplitManager.class)
.to(MixedFormatConnectorSplitManager.class)
.in(Scopes.SINGLETON);
binder
.bind(ConnectorPageSourceProvider.class)
.to(MixedFormatPageSourceProvider.class)
.in(Scopes.SINGLETON);
configBinder(binder).bindConfig(HiveMetastoreConfig.class);
configBinder(binder).bindConfig(IcebergConfig.class);
newSetBinder(binder, SessionPropertiesProvider.class)
.addBinding()
.to(MixedFormatSessionProperties.class)
.in(Scopes.SINGLETON);
binder.bind(IcebergTableProperties.class).in(Scopes.SINGLETON);
binder.bind(IcebergSplitManager.class).in(Scopes.SINGLETON);
binder.bind(IcebergPageSourceProvider.class).in(Scopes.SINGLETON);
binder
.bind(ConnectorPageSinkProvider.class)
.to(IcebergPageSinkProvider.class)
.in(Scopes.SINGLETON);
binder
.bind(ConnectorNodePartitioningProvider.class)
.to(IcebergNodePartitioningProvider.class)
.in(Scopes.SINGLETON);
configBinder(binder).bindConfig(OrcReaderConfig.class);
configBinder(binder).bindConfig(OrcWriterConfig.class);
configBinder(binder).bindConfig(ParquetReaderConfig.class);
configBinder(binder).bindConfig(ParquetWriterConfig.class);
jsonCodecBinder(binder).bindJsonCodec(CommitTaskData.class);
binder.bind(FileFormatDataSourceStats.class).in(Scopes.SINGLETON);
newExporter(binder).export(FileFormatDataSourceStats.class).withGeneratedName();
binder.bind(IcebergFileWriterFactory.class).in(Scopes.SINGLETON);
newExporter(binder).export(IcebergFileWriterFactory.class).withGeneratedName();
Multibinder<Procedure> procedures = newSetBinder(binder, Procedure.class);
procedures.addBinding().toProvider(RollbackToSnapshotProcedure.class).in(Scopes.SINGLETON);
Multibinder<TableProcedureMetadata> tableProcedures =
newSetBinder(binder, TableProcedureMetadata.class);
tableProcedures.addBinding().toProvider(OptimizeTableProcedure.class).in(Scopes.SINGLETON);
tableProcedures
.addBinding()
.toProvider(ExpireSnapshotsTableProcedure.class)
.in(Scopes.SINGLETON);
tableProcedures
.addBinding()
.toProvider(RemoveOrphanFilesTableProcedure.class)
.in(Scopes.SINGLETON);
// hdfs
ConfigBinder.configBinder(binder).bindConfig(HdfsConfig.class);
binder
.bind(HdfsConfiguration.class)
.to(MixedFormatHdfsConfiguration.class)
.in(Scopes.SINGLETON);
binder
.bind(HdfsAuthentication.class)
.to(MixedFormatHdfsAuthentication.class)
.in(Scopes.SINGLETON);
binder.bind(HdfsEnvironment.class).in(Scopes.SINGLETON);
binder.bind(NamenodeStats.class).in(Scopes.SINGLETON);
ExportBinder.newExporter(binder).export(NamenodeStats.class).withGeneratedName();
}