diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/FileFormatDataSourceStats.java b/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/metrics/FileFormatDataSourceStats.java similarity index 98% rename from plugin/trino-hive/src/main/java/io/trino/plugin/hive/FileFormatDataSourceStats.java rename to lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/metrics/FileFormatDataSourceStats.java index 8ff9f2b3ed6..3f2d0cd70fb 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/FileFormatDataSourceStats.java +++ b/lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/metrics/FileFormatDataSourceStats.java @@ -11,7 +11,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.trino.plugin.hive; +package io.trino.plugin.base.metrics; import io.airlift.stats.DistributionStat; import io.airlift.stats.TimeStat; diff --git a/plugin/trino-delta-lake/src/main/java/io/trino/plugin/deltalake/DeltaLakeMergeSink.java b/plugin/trino-delta-lake/src/main/java/io/trino/plugin/deltalake/DeltaLakeMergeSink.java index e8344b7e395..329039d98e2 100644 --- a/plugin/trino-delta-lake/src/main/java/io/trino/plugin/deltalake/DeltaLakeMergeSink.java +++ b/plugin/trino-delta-lake/src/main/java/io/trino/plugin/deltalake/DeltaLakeMergeSink.java @@ -29,9 +29,9 @@ import io.trino.parquet.metadata.ParquetMetadata; import io.trino.parquet.reader.MetadataReader; import io.trino.parquet.writer.ParquetWriterOptions; +import io.trino.plugin.base.metrics.FileFormatDataSourceStats; import io.trino.plugin.deltalake.delete.RoaringBitmapArray; import io.trino.plugin.deltalake.transactionlog.DeletionVectorEntry; -import io.trino.plugin.hive.FileFormatDataSourceStats; import io.trino.plugin.hive.ReaderPageSource; import io.trino.plugin.hive.parquet.ParquetFileWriter; import io.trino.plugin.hive.parquet.ParquetPageSourceFactory; diff --git a/plugin/trino-delta-lake/src/main/java/io/trino/plugin/deltalake/DeltaLakeModule.java b/plugin/trino-delta-lake/src/main/java/io/trino/plugin/deltalake/DeltaLakeModule.java index 3026b015b3e..7c62bdb8776 100644 --- a/plugin/trino-delta-lake/src/main/java/io/trino/plugin/deltalake/DeltaLakeModule.java +++ b/plugin/trino-delta-lake/src/main/java/io/trino/plugin/deltalake/DeltaLakeModule.java @@ -22,6 +22,7 @@ import com.google.inject.multibindings.Multibinder; import io.airlift.configuration.AbstractConfigurationAwareModule; import io.trino.filesystem.cache.CacheKeyProvider; +import io.trino.plugin.base.metrics.FileFormatDataSourceStats; import io.trino.plugin.base.security.ConnectorAccessControlModule; import io.trino.plugin.base.session.SessionPropertiesProvider; import io.trino.plugin.deltalake.cache.DeltaLakeCacheKeyProvider; @@ -47,7 +48,6 @@ import io.trino.plugin.deltalake.transactionlog.writer.TransactionLogSynchronizer; import io.trino.plugin.deltalake.transactionlog.writer.TransactionLogSynchronizerManager; import io.trino.plugin.deltalake.transactionlog.writer.TransactionLogWriterFactory; -import io.trino.plugin.hive.FileFormatDataSourceStats; import io.trino.plugin.hive.PropertiesSystemTableProvider; import io.trino.plugin.hive.SystemTableProvider; import io.trino.plugin.hive.metastore.thrift.TranslateHiveViews; diff --git a/plugin/trino-delta-lake/src/main/java/io/trino/plugin/deltalake/DeltaLakePageSinkProvider.java b/plugin/trino-delta-lake/src/main/java/io/trino/plugin/deltalake/DeltaLakePageSinkProvider.java index 2df8a695152..f84ee23de32 100644 --- a/plugin/trino-delta-lake/src/main/java/io/trino/plugin/deltalake/DeltaLakePageSinkProvider.java +++ b/plugin/trino-delta-lake/src/main/java/io/trino/plugin/deltalake/DeltaLakePageSinkProvider.java @@ -19,11 +19,11 @@ import io.trino.filesystem.Location; import io.trino.filesystem.TrinoFileSystemFactory; import io.trino.parquet.ParquetReaderOptions; +import io.trino.plugin.base.metrics.FileFormatDataSourceStats; import io.trino.plugin.deltalake.procedure.DeltaLakeTableExecuteHandle; import io.trino.plugin.deltalake.procedure.DeltaTableOptimizeHandle; import io.trino.plugin.deltalake.transactionlog.MetadataEntry; import io.trino.plugin.deltalake.transactionlog.ProtocolEntry; -import io.trino.plugin.hive.FileFormatDataSourceStats; import io.trino.plugin.hive.NodeVersion; import io.trino.plugin.hive.parquet.ParquetReaderConfig; import io.trino.spi.PageIndexerFactory; diff --git a/plugin/trino-delta-lake/src/main/java/io/trino/plugin/deltalake/DeltaLakePageSourceProvider.java b/plugin/trino-delta-lake/src/main/java/io/trino/plugin/deltalake/DeltaLakePageSourceProvider.java index 3754810240b..80d32276fb8 100644 --- a/plugin/trino-delta-lake/src/main/java/io/trino/plugin/deltalake/DeltaLakePageSourceProvider.java +++ b/plugin/trino-delta-lake/src/main/java/io/trino/plugin/deltalake/DeltaLakePageSourceProvider.java @@ -28,12 +28,12 @@ import io.trino.parquet.metadata.FileMetadata; import io.trino.parquet.metadata.ParquetMetadata; import io.trino.parquet.reader.MetadataReader; +import io.trino.plugin.base.metrics.FileFormatDataSourceStats; import io.trino.plugin.deltalake.delete.PageFilter; import io.trino.plugin.deltalake.delete.PositionDeleteFilter; import io.trino.plugin.deltalake.delete.RoaringBitmapArray; import io.trino.plugin.deltalake.transactionlog.DeletionVectorEntry; import io.trino.plugin.deltalake.transactionlog.DeltaLakeSchemaSupport.ColumnMappingMode; -import io.trino.plugin.hive.FileFormatDataSourceStats; import io.trino.plugin.hive.HiveColumnHandle; import io.trino.plugin.hive.HiveColumnProjectionInfo; import io.trino.plugin.hive.HivePageSourceProvider; diff --git a/plugin/trino-delta-lake/src/main/java/io/trino/plugin/deltalake/functions/tablechanges/TableChangesFunctionProcessor.java b/plugin/trino-delta-lake/src/main/java/io/trino/plugin/deltalake/functions/tablechanges/TableChangesFunctionProcessor.java index 7f5d4b8a88c..59a2d87850a 100644 --- a/plugin/trino-delta-lake/src/main/java/io/trino/plugin/deltalake/functions/tablechanges/TableChangesFunctionProcessor.java +++ b/plugin/trino-delta-lake/src/main/java/io/trino/plugin/deltalake/functions/tablechanges/TableChangesFunctionProcessor.java @@ -20,9 +20,9 @@ import io.trino.filesystem.TrinoFileSystemFactory; import io.trino.filesystem.TrinoInputFile; import io.trino.parquet.ParquetReaderOptions; +import io.trino.plugin.base.metrics.FileFormatDataSourceStats; import io.trino.plugin.deltalake.DeltaLakeColumnHandle; import io.trino.plugin.deltalake.DeltaLakePageSource; -import io.trino.plugin.hive.FileFormatDataSourceStats; import io.trino.plugin.hive.ReaderPageSource; import io.trino.plugin.hive.parquet.ParquetPageSourceFactory; import io.trino.spi.Page; diff --git a/plugin/trino-delta-lake/src/main/java/io/trino/plugin/deltalake/functions/tablechanges/TableChangesProcessorProvider.java b/plugin/trino-delta-lake/src/main/java/io/trino/plugin/deltalake/functions/tablechanges/TableChangesProcessorProvider.java index b0a7c74b454..dba52836029 100644 --- a/plugin/trino-delta-lake/src/main/java/io/trino/plugin/deltalake/functions/tablechanges/TableChangesProcessorProvider.java +++ b/plugin/trino-delta-lake/src/main/java/io/trino/plugin/deltalake/functions/tablechanges/TableChangesProcessorProvider.java @@ -17,8 +17,8 @@ import io.trino.filesystem.TrinoFileSystemFactory; import io.trino.parquet.ParquetReaderOptions; import io.trino.plugin.base.classloader.ClassLoaderSafeTableFunctionSplitProcessor; +import io.trino.plugin.base.metrics.FileFormatDataSourceStats; import io.trino.plugin.deltalake.DeltaLakeConfig; -import io.trino.plugin.hive.FileFormatDataSourceStats; import io.trino.plugin.hive.parquet.ParquetReaderConfig; import io.trino.spi.connector.ConnectorSession; import io.trino.spi.connector.ConnectorSplit; diff --git a/plugin/trino-delta-lake/src/main/java/io/trino/plugin/deltalake/transactionlog/TableSnapshot.java b/plugin/trino-delta-lake/src/main/java/io/trino/plugin/deltalake/transactionlog/TableSnapshot.java index 97940bfb1ce..7c0c624cdda 100644 --- a/plugin/trino-delta-lake/src/main/java/io/trino/plugin/deltalake/transactionlog/TableSnapshot.java +++ b/plugin/trino-delta-lake/src/main/java/io/trino/plugin/deltalake/transactionlog/TableSnapshot.java @@ -20,12 +20,12 @@ import io.trino.filesystem.TrinoFileSystem; import io.trino.filesystem.TrinoInputFile; import io.trino.parquet.ParquetReaderOptions; +import io.trino.plugin.base.metrics.FileFormatDataSourceStats; import io.trino.plugin.deltalake.DeltaLakeColumnHandle; import io.trino.plugin.deltalake.transactionlog.checkpoint.CheckpointEntryIterator; import io.trino.plugin.deltalake.transactionlog.checkpoint.CheckpointSchemaManager; import io.trino.plugin.deltalake.transactionlog.checkpoint.LastCheckpoint; import io.trino.plugin.deltalake.transactionlog.checkpoint.TransactionLogTail; -import io.trino.plugin.hive.FileFormatDataSourceStats; import io.trino.spi.TrinoException; import io.trino.spi.connector.ConnectorSession; import io.trino.spi.connector.SchemaTableName; diff --git a/plugin/trino-delta-lake/src/main/java/io/trino/plugin/deltalake/transactionlog/TransactionLogAccess.java b/plugin/trino-delta-lake/src/main/java/io/trino/plugin/deltalake/transactionlog/TransactionLogAccess.java index 4a4c758e75a..e0a12e7ae84 100644 --- a/plugin/trino-delta-lake/src/main/java/io/trino/plugin/deltalake/transactionlog/TransactionLogAccess.java +++ b/plugin/trino-delta-lake/src/main/java/io/trino/plugin/deltalake/transactionlog/TransactionLogAccess.java @@ -29,6 +29,7 @@ import io.trino.filesystem.TrinoFileSystemFactory; import io.trino.filesystem.TrinoInputFile; import io.trino.parquet.ParquetReaderOptions; +import io.trino.plugin.base.metrics.FileFormatDataSourceStats; import io.trino.plugin.deltalake.DeltaLakeColumnHandle; import io.trino.plugin.deltalake.DeltaLakeColumnMetadata; import io.trino.plugin.deltalake.DeltaLakeConfig; @@ -37,7 +38,6 @@ import io.trino.plugin.deltalake.transactionlog.checkpoint.CheckpointSchemaManager; import io.trino.plugin.deltalake.transactionlog.checkpoint.LastCheckpoint; import io.trino.plugin.deltalake.transactionlog.checkpoint.TransactionLogTail; -import io.trino.plugin.hive.FileFormatDataSourceStats; import io.trino.plugin.hive.parquet.ParquetReaderConfig; import io.trino.spi.TrinoException; import io.trino.spi.connector.ConnectorSession; diff --git a/plugin/trino-delta-lake/src/main/java/io/trino/plugin/deltalake/transactionlog/checkpoint/CheckpointEntryIterator.java b/plugin/trino-delta-lake/src/main/java/io/trino/plugin/deltalake/transactionlog/checkpoint/CheckpointEntryIterator.java index a8f1998803e..97fd60f8e48 100644 --- a/plugin/trino-delta-lake/src/main/java/io/trino/plugin/deltalake/transactionlog/checkpoint/CheckpointEntryIterator.java +++ b/plugin/trino-delta-lake/src/main/java/io/trino/plugin/deltalake/transactionlog/checkpoint/CheckpointEntryIterator.java @@ -23,6 +23,7 @@ import io.trino.parquet.Column; import io.trino.parquet.Field; import io.trino.parquet.ParquetReaderOptions; +import io.trino.plugin.base.metrics.FileFormatDataSourceStats; import io.trino.plugin.deltalake.DeltaHiveTypeTranslator; import io.trino.plugin.deltalake.DeltaLakeColumnHandle; import io.trino.plugin.deltalake.DeltaLakeColumnMetadata; @@ -36,7 +37,6 @@ import io.trino.plugin.deltalake.transactionlog.SidecarEntry; import io.trino.plugin.deltalake.transactionlog.TransactionEntry; import io.trino.plugin.deltalake.transactionlog.statistics.DeltaLakeParquetFileStatistics; -import io.trino.plugin.hive.FileFormatDataSourceStats; import io.trino.plugin.hive.HiveColumnHandle; import io.trino.plugin.hive.HiveColumnHandle.ColumnType; import io.trino.plugin.hive.HiveColumnProjectionInfo; diff --git a/plugin/trino-delta-lake/src/main/java/io/trino/plugin/deltalake/transactionlog/checkpoint/CheckpointWriterManager.java b/plugin/trino-delta-lake/src/main/java/io/trino/plugin/deltalake/transactionlog/checkpoint/CheckpointWriterManager.java index 663349d1257..5403ad33628 100644 --- a/plugin/trino-delta-lake/src/main/java/io/trino/plugin/deltalake/transactionlog/checkpoint/CheckpointWriterManager.java +++ b/plugin/trino-delta-lake/src/main/java/io/trino/plugin/deltalake/transactionlog/checkpoint/CheckpointWriterManager.java @@ -20,11 +20,11 @@ import io.trino.filesystem.TrinoFileSystem; import io.trino.filesystem.TrinoFileSystemFactory; import io.trino.filesystem.TrinoOutputFile; +import io.trino.plugin.base.metrics.FileFormatDataSourceStats; import io.trino.plugin.deltalake.transactionlog.DeltaLakeTransactionLogEntry; import io.trino.plugin.deltalake.transactionlog.TableSnapshot; import io.trino.plugin.deltalake.transactionlog.TableSnapshot.MetadataAndProtocolEntry; import io.trino.plugin.deltalake.transactionlog.TransactionLogAccess; -import io.trino.plugin.hive.FileFormatDataSourceStats; import io.trino.plugin.hive.NodeVersion; import io.trino.spi.TrinoException; import io.trino.spi.connector.ConnectorSession; diff --git a/plugin/trino-delta-lake/src/test/java/io/trino/plugin/deltalake/TestDeltaLakeBasic.java b/plugin/trino-delta-lake/src/test/java/io/trino/plugin/deltalake/TestDeltaLakeBasic.java index 8d0d81bd876..8d1db3984a1 100644 --- a/plugin/trino-delta-lake/src/test/java/io/trino/plugin/deltalake/TestDeltaLakeBasic.java +++ b/plugin/trino-delta-lake/src/test/java/io/trino/plugin/deltalake/TestDeltaLakeBasic.java @@ -31,6 +31,7 @@ import io.trino.parquet.metadata.ParquetMetadata; import io.trino.parquet.reader.MetadataReader; import io.trino.parquet.reader.ParquetReader; +import io.trino.plugin.base.metrics.FileFormatDataSourceStats; import io.trino.plugin.deltalake.transactionlog.AddFileEntry; import io.trino.plugin.deltalake.transactionlog.DeletionVectorEntry; import io.trino.plugin.deltalake.transactionlog.DeltaLakeSchemaSupport.ColumnMappingMode; @@ -39,7 +40,6 @@ import io.trino.plugin.deltalake.transactionlog.ProtocolEntry; import io.trino.plugin.deltalake.transactionlog.checkpoint.CheckpointSchemaManager; import io.trino.plugin.deltalake.transactionlog.statistics.DeltaLakeFileStatistics; -import io.trino.plugin.hive.FileFormatDataSourceStats; import io.trino.plugin.hive.parquet.TrinoParquetDataSource; import io.trino.spi.Page; import io.trino.spi.block.Block; diff --git a/plugin/trino-delta-lake/src/test/java/io/trino/plugin/deltalake/TestDeltaLakeNodeLocalDynamicSplitPruning.java b/plugin/trino-delta-lake/src/test/java/io/trino/plugin/deltalake/TestDeltaLakeNodeLocalDynamicSplitPruning.java index 93f75996217..23290483a40 100644 --- a/plugin/trino-delta-lake/src/test/java/io/trino/plugin/deltalake/TestDeltaLakeNodeLocalDynamicSplitPruning.java +++ b/plugin/trino-delta-lake/src/test/java/io/trino/plugin/deltalake/TestDeltaLakeNodeLocalDynamicSplitPruning.java @@ -26,9 +26,9 @@ import io.trino.parquet.writer.ParquetSchemaConverter; import io.trino.parquet.writer.ParquetWriter; import io.trino.parquet.writer.ParquetWriterOptions; +import io.trino.plugin.base.metrics.FileFormatDataSourceStats; import io.trino.plugin.deltalake.transactionlog.MetadataEntry; import io.trino.plugin.deltalake.transactionlog.ProtocolEntry; -import io.trino.plugin.hive.FileFormatDataSourceStats; import io.trino.plugin.hive.HiveTransactionHandle; import io.trino.plugin.hive.parquet.ParquetReaderConfig; import io.trino.plugin.hive.parquet.ParquetWriterConfig; diff --git a/plugin/trino-delta-lake/src/test/java/io/trino/plugin/deltalake/TestDeltaLakePageSink.java b/plugin/trino-delta-lake/src/test/java/io/trino/plugin/deltalake/TestDeltaLakePageSink.java index ec8a53db706..9de235859e5 100644 --- a/plugin/trino-delta-lake/src/test/java/io/trino/plugin/deltalake/TestDeltaLakePageSink.java +++ b/plugin/trino-delta-lake/src/test/java/io/trino/plugin/deltalake/TestDeltaLakePageSink.java @@ -22,8 +22,8 @@ import io.trino.filesystem.hdfs.HdfsFileSystemFactory; import io.trino.operator.FlatHashStrategyCompiler; import io.trino.operator.GroupByHashPageIndexerFactory; +import io.trino.plugin.base.metrics.FileFormatDataSourceStats; import io.trino.plugin.deltalake.transactionlog.ProtocolEntry; -import io.trino.plugin.hive.FileFormatDataSourceStats; import io.trino.plugin.hive.HiveTransactionHandle; import io.trino.plugin.hive.NodeVersion; import io.trino.plugin.hive.parquet.ParquetReaderConfig; diff --git a/plugin/trino-delta-lake/src/test/java/io/trino/plugin/deltalake/TestDeltaLakeSplitManager.java b/plugin/trino-delta-lake/src/test/java/io/trino/plugin/deltalake/TestDeltaLakeSplitManager.java index 5a7e1ca39cd..77931849788 100644 --- a/plugin/trino-delta-lake/src/test/java/io/trino/plugin/deltalake/TestDeltaLakeSplitManager.java +++ b/plugin/trino-delta-lake/src/test/java/io/trino/plugin/deltalake/TestDeltaLakeSplitManager.java @@ -22,6 +22,7 @@ import io.trino.filesystem.cache.DefaultCachingHostAddressProvider; import io.trino.filesystem.hdfs.HdfsFileSystemFactory; import io.trino.filesystem.memory.MemoryFileSystemFactory; +import io.trino.plugin.base.metrics.FileFormatDataSourceStats; import io.trino.plugin.deltalake.metastore.DeltaLakeTableMetadataScheduler; import io.trino.plugin.deltalake.metastore.file.DeltaLakeFileMetastoreTableOperationsProvider; import io.trino.plugin.deltalake.statistics.CachingExtendedStatisticsAccess; @@ -38,7 +39,6 @@ import io.trino.plugin.deltalake.transactionlog.writer.NoIsolationSynchronizer; import io.trino.plugin.deltalake.transactionlog.writer.TransactionLogSynchronizerManager; import io.trino.plugin.deltalake.transactionlog.writer.TransactionLogWriterFactory; -import io.trino.plugin.hive.FileFormatDataSourceStats; import io.trino.plugin.hive.HiveTransactionHandle; import io.trino.plugin.hive.NodeVersion; import io.trino.plugin.hive.metastore.HiveMetastoreFactory; diff --git a/plugin/trino-delta-lake/src/test/java/io/trino/plugin/deltalake/TestTransactionLogAccess.java b/plugin/trino-delta-lake/src/test/java/io/trino/plugin/deltalake/TestTransactionLogAccess.java index 23e1d26fcd2..3593fc783ef 100644 --- a/plugin/trino-delta-lake/src/test/java/io/trino/plugin/deltalake/TestTransactionLogAccess.java +++ b/plugin/trino-delta-lake/src/test/java/io/trino/plugin/deltalake/TestTransactionLogAccess.java @@ -23,6 +23,7 @@ import io.opentelemetry.sdk.trace.data.SpanData; import io.trino.filesystem.hdfs.HdfsFileSystemFactory; import io.trino.filesystem.tracing.TracingFileSystemFactory; +import io.trino.plugin.base.metrics.FileFormatDataSourceStats; import io.trino.plugin.deltalake.transactionlog.AddFileEntry; import io.trino.plugin.deltalake.transactionlog.MetadataEntry; import io.trino.plugin.deltalake.transactionlog.ProtocolEntry; @@ -31,7 +32,6 @@ import io.trino.plugin.deltalake.transactionlog.TransactionLogAccess; import io.trino.plugin.deltalake.transactionlog.checkpoint.CheckpointSchemaManager; import io.trino.plugin.deltalake.transactionlog.statistics.DeltaLakeFileStatistics; -import io.trino.plugin.hive.FileFormatDataSourceStats; import io.trino.plugin.hive.parquet.ParquetReaderConfig; import io.trino.plugin.hive.parquet.ParquetWriterConfig; import io.trino.spi.connector.ColumnMetadata; diff --git a/plugin/trino-delta-lake/src/test/java/io/trino/plugin/deltalake/statistics/TestDeltaLakeFileBasedTableStatisticsProvider.java b/plugin/trino-delta-lake/src/test/java/io/trino/plugin/deltalake/statistics/TestDeltaLakeFileBasedTableStatisticsProvider.java index cf35046b63e..8f39f6f6a07 100644 --- a/plugin/trino-delta-lake/src/test/java/io/trino/plugin/deltalake/statistics/TestDeltaLakeFileBasedTableStatisticsProvider.java +++ b/plugin/trino-delta-lake/src/test/java/io/trino/plugin/deltalake/statistics/TestDeltaLakeFileBasedTableStatisticsProvider.java @@ -16,6 +16,7 @@ import com.google.common.collect.ImmutableMap; import com.google.common.io.Resources; import io.airlift.json.JsonCodecFactory; +import io.trino.plugin.base.metrics.FileFormatDataSourceStats; import io.trino.plugin.deltalake.DeltaLakeColumnHandle; import io.trino.plugin.deltalake.DeltaLakeConfig; import io.trino.plugin.deltalake.DeltaLakeSessionProperties; @@ -25,7 +26,6 @@ import io.trino.plugin.deltalake.transactionlog.TableSnapshot; import io.trino.plugin.deltalake.transactionlog.TransactionLogAccess; import io.trino.plugin.deltalake.transactionlog.checkpoint.CheckpointSchemaManager; -import io.trino.plugin.hive.FileFormatDataSourceStats; import io.trino.plugin.hive.parquet.ParquetReaderConfig; import io.trino.plugin.hive.parquet.ParquetWriterConfig; import io.trino.spi.connector.ColumnHandle; diff --git a/plugin/trino-delta-lake/src/test/java/io/trino/plugin/deltalake/transactionlog/TestTableSnapshot.java b/plugin/trino-delta-lake/src/test/java/io/trino/plugin/deltalake/transactionlog/TestTableSnapshot.java index 69c52363cd2..130c788225d 100644 --- a/plugin/trino-delta-lake/src/test/java/io/trino/plugin/deltalake/transactionlog/TestTableSnapshot.java +++ b/plugin/trino-delta-lake/src/test/java/io/trino/plugin/deltalake/transactionlog/TestTableSnapshot.java @@ -22,10 +22,10 @@ import io.trino.filesystem.hdfs.HdfsFileSystemFactory; import io.trino.filesystem.tracing.TracingFileSystemFactory; import io.trino.parquet.ParquetReaderOptions; +import io.trino.plugin.base.metrics.FileFormatDataSourceStats; import io.trino.plugin.deltalake.DeltaLakeConfig; import io.trino.plugin.deltalake.transactionlog.checkpoint.CheckpointSchemaManager; import io.trino.plugin.deltalake.transactionlog.checkpoint.LastCheckpoint; -import io.trino.plugin.hive.FileFormatDataSourceStats; import io.trino.plugin.hive.parquet.ParquetReaderConfig; import io.trino.spi.connector.SchemaTableName; import io.trino.spi.predicate.TupleDomain; diff --git a/plugin/trino-delta-lake/src/test/java/io/trino/plugin/deltalake/transactionlog/checkpoint/TestCheckpointEntryIterator.java b/plugin/trino-delta-lake/src/test/java/io/trino/plugin/deltalake/transactionlog/checkpoint/TestCheckpointEntryIterator.java index 390a10be3de..dda31dd1f91 100644 --- a/plugin/trino-delta-lake/src/test/java/io/trino/plugin/deltalake/transactionlog/checkpoint/TestCheckpointEntryIterator.java +++ b/plugin/trino-delta-lake/src/test/java/io/trino/plugin/deltalake/transactionlog/checkpoint/TestCheckpointEntryIterator.java @@ -24,6 +24,7 @@ import io.trino.filesystem.TrinoOutputFile; import io.trino.filesystem.hdfs.HdfsFileSystemFactory; import io.trino.parquet.writer.ParquetWriterOptions; +import io.trino.plugin.base.metrics.FileFormatDataSourceStats; import io.trino.plugin.deltalake.DeltaLakeColumnHandle; import io.trino.plugin.deltalake.DeltaLakeConfig; import io.trino.plugin.deltalake.transactionlog.AddFileEntry; @@ -32,7 +33,6 @@ import io.trino.plugin.deltalake.transactionlog.ProtocolEntry; import io.trino.plugin.deltalake.transactionlog.RemoveFileEntry; import io.trino.plugin.deltalake.transactionlog.statistics.DeltaLakeParquetFileStatistics; -import io.trino.plugin.hive.FileFormatDataSourceStats; import io.trino.plugin.hive.parquet.ParquetReaderConfig; import io.trino.spi.predicate.Domain; import io.trino.spi.predicate.TupleDomain; diff --git a/plugin/trino-delta-lake/src/test/java/io/trino/plugin/deltalake/transactionlog/checkpoint/TestCheckpointWriter.java b/plugin/trino-delta-lake/src/test/java/io/trino/plugin/deltalake/transactionlog/checkpoint/TestCheckpointWriter.java index 173303df846..fc6bf36e053 100644 --- a/plugin/trino-delta-lake/src/test/java/io/trino/plugin/deltalake/transactionlog/checkpoint/TestCheckpointWriter.java +++ b/plugin/trino-delta-lake/src/test/java/io/trino/plugin/deltalake/transactionlog/checkpoint/TestCheckpointWriter.java @@ -22,6 +22,7 @@ import io.trino.filesystem.TrinoInputFile; import io.trino.filesystem.TrinoOutputFile; import io.trino.filesystem.hdfs.HdfsFileSystemFactory; +import io.trino.plugin.base.metrics.FileFormatDataSourceStats; import io.trino.plugin.deltalake.DeltaLakeConfig; import io.trino.plugin.deltalake.transactionlog.AddFileEntry; import io.trino.plugin.deltalake.transactionlog.DeltaLakeTransactionLogEntry; @@ -32,7 +33,6 @@ import io.trino.plugin.deltalake.transactionlog.statistics.DeltaLakeFileStatistics; import io.trino.plugin.deltalake.transactionlog.statistics.DeltaLakeJsonFileStatistics; import io.trino.plugin.deltalake.transactionlog.statistics.DeltaLakeParquetFileStatistics; -import io.trino.plugin.hive.FileFormatDataSourceStats; import io.trino.plugin.hive.parquet.ParquetReaderConfig; import io.trino.spi.block.Block; import io.trino.spi.block.SqlRow; diff --git a/plugin/trino-delta-lake/src/test/java/io/trino/plugin/deltalake/transactionlog/statistics/TestDeltaLakeFileStatistics.java b/plugin/trino-delta-lake/src/test/java/io/trino/plugin/deltalake/transactionlog/statistics/TestDeltaLakeFileStatistics.java index 8159b9b9fce..c873c20a414 100644 --- a/plugin/trino-delta-lake/src/test/java/io/trino/plugin/deltalake/transactionlog/statistics/TestDeltaLakeFileStatistics.java +++ b/plugin/trino-delta-lake/src/test/java/io/trino/plugin/deltalake/transactionlog/statistics/TestDeltaLakeFileStatistics.java @@ -18,6 +18,7 @@ import io.airlift.json.ObjectMapperProvider; import io.trino.filesystem.TrinoInputFile; import io.trino.filesystem.local.LocalInputFile; +import io.trino.plugin.base.metrics.FileFormatDataSourceStats; import io.trino.plugin.deltalake.DeltaLakeColumnHandle; import io.trino.plugin.deltalake.DeltaLakeConfig; import io.trino.plugin.deltalake.transactionlog.DeltaLakeTransactionLogEntry; @@ -25,7 +26,6 @@ import io.trino.plugin.deltalake.transactionlog.ProtocolEntry; import io.trino.plugin.deltalake.transactionlog.checkpoint.CheckpointEntryIterator; import io.trino.plugin.deltalake.transactionlog.checkpoint.CheckpointSchemaManager; -import io.trino.plugin.hive.FileFormatDataSourceStats; import io.trino.plugin.hive.parquet.ParquetReaderConfig; import io.trino.spi.predicate.TupleDomain; import io.trino.spi.type.ArrayType; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveModule.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveModule.java index 3ad1ad2fb12..4aedf0a0786 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveModule.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveModule.java @@ -21,6 +21,7 @@ import com.google.inject.Scopes; import com.google.inject.Singleton; import com.google.inject.multibindings.Multibinder; +import io.trino.plugin.base.metrics.FileFormatDataSourceStats; import io.trino.plugin.hive.avro.AvroFileWriterFactory; import io.trino.plugin.hive.avro.AvroPageSourceFactory; import io.trino.plugin.hive.fs.CachingDirectoryLister; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/SortingFileWriter.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/SortingFileWriter.java index 9b76e94226e..e5bb3cd59ec 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/SortingFileWriter.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/SortingFileWriter.java @@ -24,6 +24,7 @@ import io.trino.orc.OrcDataSource; import io.trino.orc.OrcDataSourceId; import io.trino.orc.OrcReaderOptions; +import io.trino.plugin.base.metrics.FileFormatDataSourceStats; import io.trino.plugin.hive.orc.HdfsOrcDataSource; import io.trino.plugin.hive.util.MergingPageIterator; import io.trino.plugin.hive.util.SortBuffer; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/orc/HdfsOrcDataSource.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/orc/HdfsOrcDataSource.java index 05aef24b475..005af727bbd 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/orc/HdfsOrcDataSource.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/orc/HdfsOrcDataSource.java @@ -19,7 +19,7 @@ import io.trino.orc.AbstractOrcDataSource; import io.trino.orc.OrcDataSourceId; import io.trino.orc.OrcReaderOptions; -import io.trino.plugin.hive.FileFormatDataSourceStats; +import io.trino.plugin.base.metrics.FileFormatDataSourceStats; import io.trino.spi.TrinoException; import java.io.IOException; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/orc/OrcDeleteDeltaPageSource.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/orc/OrcDeleteDeltaPageSource.java index d4408445718..b948206a8bb 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/orc/OrcDeleteDeltaPageSource.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/orc/OrcDeleteDeltaPageSource.java @@ -26,7 +26,7 @@ import io.trino.orc.OrcReader; import io.trino.orc.OrcReaderOptions; import io.trino.orc.OrcRecordReader; -import io.trino.plugin.hive.FileFormatDataSourceStats; +import io.trino.plugin.base.metrics.FileFormatDataSourceStats; import io.trino.spi.Page; import io.trino.spi.TrinoException; import io.trino.spi.connector.ConnectorPageSource; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/orc/OrcDeleteDeltaPageSourceFactory.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/orc/OrcDeleteDeltaPageSourceFactory.java index 5d746a58608..26dfb58b845 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/orc/OrcDeleteDeltaPageSourceFactory.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/orc/OrcDeleteDeltaPageSourceFactory.java @@ -15,7 +15,7 @@ import io.trino.filesystem.TrinoInputFile; import io.trino.orc.OrcReaderOptions; -import io.trino.plugin.hive.FileFormatDataSourceStats; +import io.trino.plugin.base.metrics.FileFormatDataSourceStats; import io.trino.spi.connector.ConnectorPageSource; import java.util.Optional; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/orc/OrcFileWriterFactory.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/orc/OrcFileWriterFactory.java index 6d39dea9e25..148335703b5 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/orc/OrcFileWriterFactory.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/orc/OrcFileWriterFactory.java @@ -27,7 +27,7 @@ import io.trino.orc.OrcWriterOptions; import io.trino.orc.OrcWriterStats; import io.trino.orc.OutputStreamOrcDataSink; -import io.trino.plugin.hive.FileFormatDataSourceStats; +import io.trino.plugin.base.metrics.FileFormatDataSourceStats; import io.trino.plugin.hive.FileWriter; import io.trino.plugin.hive.HiveCompressionCodec; import io.trino.plugin.hive.HiveFileWriterFactory; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/orc/OrcPageSource.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/orc/OrcPageSource.java index e2261dc3725..19f6332d433 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/orc/OrcPageSource.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/orc/OrcPageSource.java @@ -23,8 +23,8 @@ import io.trino.orc.OrcDataSourceId; import io.trino.orc.OrcRecordReader; import io.trino.orc.metadata.CompressionKind; +import io.trino.plugin.base.metrics.FileFormatDataSourceStats; import io.trino.plugin.base.metrics.LongCount; -import io.trino.plugin.hive.FileFormatDataSourceStats; import io.trino.plugin.hive.coercions.TypeCoercer; import io.trino.plugin.hive.orc.OrcDeletedRows.MaskDeletedRowsFunction; import io.trino.spi.Page; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/orc/OrcPageSourceFactory.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/orc/OrcPageSourceFactory.java index ab39cccf5ca..5c23a767fda 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/orc/OrcPageSourceFactory.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/orc/OrcPageSourceFactory.java @@ -33,8 +33,8 @@ import io.trino.orc.TupleDomainOrcPredicate; import io.trino.orc.TupleDomainOrcPredicate.TupleDomainOrcPredicateBuilder; import io.trino.orc.metadata.OrcType.OrcTypeKind; +import io.trino.plugin.base.metrics.FileFormatDataSourceStats; import io.trino.plugin.hive.AcidInfo; -import io.trino.plugin.hive.FileFormatDataSourceStats; import io.trino.plugin.hive.HiveColumnHandle; import io.trino.plugin.hive.HiveColumnProjectionInfo; import io.trino.plugin.hive.HiveConfig; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/orc/OriginalFilesUtils.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/orc/OriginalFilesUtils.java index 8ae8660c385..e03139dc9ec 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/orc/OriginalFilesUtils.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/orc/OriginalFilesUtils.java @@ -20,7 +20,7 @@ import io.trino.orc.OrcDataSourceId; import io.trino.orc.OrcReader; import io.trino.orc.OrcReaderOptions; -import io.trino.plugin.hive.FileFormatDataSourceStats; +import io.trino.plugin.base.metrics.FileFormatDataSourceStats; import io.trino.spi.TrinoException; import io.trino.spi.security.ConnectorIdentity; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/parquet/MemoryParquetDataSource.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/parquet/MemoryParquetDataSource.java index b5b848cb24b..15d374c81ab 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/parquet/MemoryParquetDataSource.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/parquet/MemoryParquetDataSource.java @@ -25,7 +25,7 @@ import io.trino.parquet.ParquetDataSource; import io.trino.parquet.ParquetDataSourceId; import io.trino.parquet.reader.ChunkedInputStream; -import io.trino.plugin.hive.FileFormatDataSourceStats; +import io.trino.plugin.base.metrics.FileFormatDataSourceStats; import jakarta.annotation.Nullable; import java.io.IOException; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/parquet/ParquetFileWriterFactory.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/parquet/ParquetFileWriterFactory.java index 46fe2e3df2e..48aab86122f 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/parquet/ParquetFileWriterFactory.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/parquet/ParquetFileWriterFactory.java @@ -23,7 +23,7 @@ import io.trino.parquet.ParquetReaderOptions; import io.trino.parquet.writer.ParquetSchemaConverter; import io.trino.parquet.writer.ParquetWriterOptions; -import io.trino.plugin.hive.FileFormatDataSourceStats; +import io.trino.plugin.base.metrics.FileFormatDataSourceStats; import io.trino.plugin.hive.FileWriter; import io.trino.plugin.hive.HiveCompressionCodec; import io.trino.plugin.hive.HiveConfig; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/parquet/ParquetPageSourceFactory.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/parquet/ParquetPageSourceFactory.java index f3481ac4e25..dc072f0967a 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/parquet/ParquetPageSourceFactory.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/parquet/ParquetPageSourceFactory.java @@ -36,8 +36,8 @@ import io.trino.parquet.reader.MetadataReader; import io.trino.parquet.reader.ParquetReader; import io.trino.parquet.reader.RowGroupInfo; +import io.trino.plugin.base.metrics.FileFormatDataSourceStats; import io.trino.plugin.hive.AcidInfo; -import io.trino.plugin.hive.FileFormatDataSourceStats; import io.trino.plugin.hive.HiveColumnHandle; import io.trino.plugin.hive.HiveColumnProjectionInfo; import io.trino.plugin.hive.HiveConfig; diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/parquet/TrinoParquetDataSource.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/parquet/TrinoParquetDataSource.java index 99ab9f48d63..4814dde021b 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/parquet/TrinoParquetDataSource.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/parquet/TrinoParquetDataSource.java @@ -19,7 +19,7 @@ import io.trino.parquet.AbstractParquetDataSource; import io.trino.parquet.ParquetDataSourceId; import io.trino.parquet.ParquetReaderOptions; -import io.trino.plugin.hive.FileFormatDataSourceStats; +import io.trino.plugin.base.metrics.FileFormatDataSourceStats; import java.io.IOException; diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/HiveTestUtils.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/HiveTestUtils.java index 38abf499425..1d74a78334e 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/HiveTestUtils.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/HiveTestUtils.java @@ -33,6 +33,7 @@ import io.trino.hdfs.s3.TrinoS3ConfigurationInitializer; import io.trino.operator.PagesIndex; import io.trino.operator.PagesIndexPageSorter; +import io.trino.plugin.base.metrics.FileFormatDataSourceStats; import io.trino.plugin.hive.avro.AvroFileWriterFactory; import io.trino.plugin.hive.avro.AvroPageSourceFactory; import io.trino.plugin.hive.line.CsvFileWriterFactory; diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveFileFormats.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveFileFormats.java index d9f1fa85737..332f2a3ae9b 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveFileFormats.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveFileFormats.java @@ -28,6 +28,7 @@ import io.trino.metastore.HiveType; import io.trino.orc.OrcReaderOptions; import io.trino.orc.OrcWriterOptions; +import io.trino.plugin.base.metrics.FileFormatDataSourceStats; import io.trino.plugin.base.type.DecodedTimestamp; import io.trino.plugin.hive.avro.AvroFileWriterFactory; import io.trino.plugin.hive.avro.AvroPageSourceFactory; diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestOrcPageSourceMemoryTracking.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestOrcPageSourceMemoryTracking.java index 5dd75539983..14fd7c5c503 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestOrcPageSourceMemoryTracking.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestOrcPageSourceMemoryTracking.java @@ -33,6 +33,7 @@ import io.trino.operator.project.CursorProcessor; import io.trino.operator.project.PageProcessor; import io.trino.orc.OrcReaderOptions; +import io.trino.plugin.base.metrics.FileFormatDataSourceStats; import io.trino.plugin.hive.orc.OrcPageSourceFactory; import io.trino.plugin.hive.orc.OrcReaderConfig; import io.trino.plugin.hive.orc.OrcWriterConfig; diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestOriginalFilesUtils.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestOriginalFilesUtils.java index 5d5f1eaa079..971dfc005f4 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestOriginalFilesUtils.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestOriginalFilesUtils.java @@ -15,6 +15,7 @@ import io.trino.filesystem.Location; import io.trino.orc.OrcReaderOptions; +import io.trino.plugin.base.metrics.FileFormatDataSourceStats; import io.trino.plugin.hive.orc.OriginalFilesUtils; import org.junit.jupiter.api.Test; diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/orc/TestOrcDeleteDeltaPageSource.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/orc/TestOrcDeleteDeltaPageSource.java index 7fb1169ff5b..3b847e4db9b 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/orc/TestOrcDeleteDeltaPageSource.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/orc/TestOrcDeleteDeltaPageSource.java @@ -18,7 +18,7 @@ import io.trino.filesystem.TrinoInputFile; import io.trino.filesystem.local.LocalInputFile; import io.trino.orc.OrcReaderOptions; -import io.trino.plugin.hive.FileFormatDataSourceStats; +import io.trino.plugin.base.metrics.FileFormatDataSourceStats; import io.trino.spi.connector.ConnectorPageSource; import io.trino.testing.MaterializedResult; import io.trino.testing.MaterializedRow; diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/orc/TestOrcDeletedRows.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/orc/TestOrcDeletedRows.java index 3bdde62bc1f..803bd209eb8 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/orc/TestOrcDeletedRows.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/orc/TestOrcDeletedRows.java @@ -16,8 +16,8 @@ import com.google.common.collect.ImmutableSet; import io.trino.filesystem.Location; import io.trino.orc.OrcReaderOptions; +import io.trino.plugin.base.metrics.FileFormatDataSourceStats; import io.trino.plugin.hive.AcidInfo; -import io.trino.plugin.hive.FileFormatDataSourceStats; import io.trino.spi.Page; import io.trino.spi.block.Block; import io.trino.spi.block.BlockBuilder; diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/orc/TestOrcPageSourceFactory.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/orc/TestOrcPageSourceFactory.java index 1bab6a5a82b..3aa3a4d3317 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/orc/TestOrcPageSourceFactory.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/orc/TestOrcPageSourceFactory.java @@ -20,8 +20,8 @@ import io.trino.filesystem.TrinoFileSystem; import io.trino.filesystem.TrinoFileSystemFactory; import io.trino.filesystem.memory.MemoryFileSystemFactory; +import io.trino.plugin.base.metrics.FileFormatDataSourceStats; import io.trino.plugin.hive.AcidInfo; -import io.trino.plugin.hive.FileFormatDataSourceStats; import io.trino.plugin.hive.HiveColumnHandle; import io.trino.plugin.hive.HiveConfig; import io.trino.plugin.hive.HivePageSourceFactory; diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/orc/TestOrcPredicates.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/orc/TestOrcPredicates.java index 788e76db6cb..bbca43a8720 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/orc/TestOrcPredicates.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/orc/TestOrcPredicates.java @@ -23,7 +23,7 @@ import io.trino.metastore.HiveType; import io.trino.orc.OrcReaderOptions; import io.trino.orc.OrcWriterOptions; -import io.trino.plugin.hive.FileFormatDataSourceStats; +import io.trino.plugin.base.metrics.FileFormatDataSourceStats; import io.trino.plugin.hive.FileWriter; import io.trino.plugin.hive.HiveColumnHandle; import io.trino.plugin.hive.HiveColumnProjectionInfo; diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/parquet/ParquetTester.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/parquet/ParquetTester.java index 84aa0caa864..38d209b5ee4 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/parquet/ParquetTester.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/parquet/ParquetTester.java @@ -26,7 +26,7 @@ import io.trino.parquet.writer.ParquetSchemaConverter; import io.trino.parquet.writer.ParquetWriter; import io.trino.parquet.writer.ParquetWriterOptions; -import io.trino.plugin.hive.FileFormatDataSourceStats; +import io.trino.plugin.base.metrics.FileFormatDataSourceStats; import io.trino.plugin.hive.HiveConfig; import io.trino.plugin.hive.HiveSessionProperties; import io.trino.plugin.hive.HiveStorageFormat; diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/parquet/ParquetUtil.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/parquet/ParquetUtil.java index c2bb087ec90..adbcb32c321 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/parquet/ParquetUtil.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/parquet/ParquetUtil.java @@ -16,7 +16,7 @@ import com.google.common.collect.ImmutableMap; import io.trino.filesystem.Location; import io.trino.filesystem.memory.MemoryFileSystemFactory; -import io.trino.plugin.hive.FileFormatDataSourceStats; +import io.trino.plugin.base.metrics.FileFormatDataSourceStats; import io.trino.plugin.hive.HiveColumnHandle; import io.trino.plugin.hive.HiveConfig; import io.trino.plugin.hive.HivePageSourceFactory; diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/parquet/TestBloomFilterStore.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/parquet/TestBloomFilterStore.java index 9e92b87782d..6b43072da91 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/parquet/TestBloomFilterStore.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/parquet/TestBloomFilterStore.java @@ -22,7 +22,7 @@ import io.trino.parquet.metadata.ParquetMetadata; import io.trino.parquet.predicate.TupleDomainParquetPredicate; import io.trino.parquet.reader.MetadataReader; -import io.trino.plugin.hive.FileFormatDataSourceStats; +import io.trino.plugin.base.metrics.FileFormatDataSourceStats; import io.trino.spi.predicate.Domain; import io.trino.spi.predicate.Range; import io.trino.spi.predicate.SortedRangeSet; diff --git a/plugin/trino-hudi/src/main/java/io/trino/plugin/hudi/HudiModule.java b/plugin/trino-hudi/src/main/java/io/trino/plugin/hudi/HudiModule.java index 94117cb2d6f..f5bc704a8c7 100644 --- a/plugin/trino-hudi/src/main/java/io/trino/plugin/hudi/HudiModule.java +++ b/plugin/trino-hudi/src/main/java/io/trino/plugin/hudi/HudiModule.java @@ -20,8 +20,8 @@ import com.google.inject.Scopes; import com.google.inject.Singleton; import io.trino.metastore.HiveMetastore; +import io.trino.plugin.base.metrics.FileFormatDataSourceStats; import io.trino.plugin.base.session.SessionPropertiesProvider; -import io.trino.plugin.hive.FileFormatDataSourceStats; import io.trino.plugin.hive.HiveNodePartitioningProvider; import io.trino.plugin.hive.HiveTransactionHandle; import io.trino.plugin.hive.metastore.HiveMetastoreConfig; diff --git a/plugin/trino-hudi/src/main/java/io/trino/plugin/hudi/HudiPageSourceProvider.java b/plugin/trino-hudi/src/main/java/io/trino/plugin/hudi/HudiPageSourceProvider.java index 15129f4ee17..bee386c7155 100644 --- a/plugin/trino-hudi/src/main/java/io/trino/plugin/hudi/HudiPageSourceProvider.java +++ b/plugin/trino-hudi/src/main/java/io/trino/plugin/hudi/HudiPageSourceProvider.java @@ -30,7 +30,7 @@ import io.trino.parquet.reader.MetadataReader; import io.trino.parquet.reader.ParquetReader; import io.trino.parquet.reader.RowGroupInfo; -import io.trino.plugin.hive.FileFormatDataSourceStats; +import io.trino.plugin.base.metrics.FileFormatDataSourceStats; import io.trino.plugin.hive.HiveColumnHandle; import io.trino.plugin.hive.HivePartitionKey; import io.trino.plugin.hive.ReaderColumns; diff --git a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergFileWriterFactory.java b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergFileWriterFactory.java index 9d023aea06a..801f7659915 100644 --- a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergFileWriterFactory.java +++ b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergFileWriterFactory.java @@ -29,7 +29,7 @@ import io.trino.orc.OrcWriterStats; import io.trino.orc.OutputStreamOrcDataSink; import io.trino.parquet.writer.ParquetWriterOptions; -import io.trino.plugin.hive.FileFormatDataSourceStats; +import io.trino.plugin.base.metrics.FileFormatDataSourceStats; import io.trino.plugin.hive.HiveCompressionCodec; import io.trino.plugin.hive.NodeVersion; import io.trino.plugin.hive.orc.OrcWriterConfig; diff --git a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergModule.java b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergModule.java index 27dc36c3ca3..0992e51d237 100644 --- a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergModule.java +++ b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergModule.java @@ -27,8 +27,8 @@ import io.trino.plugin.base.classloader.ClassLoaderSafeConnectorSplitManager; import io.trino.plugin.base.classloader.ClassLoaderSafeNodePartitioningProvider; import io.trino.plugin.base.classloader.ForClassLoaderSafe; +import io.trino.plugin.base.metrics.FileFormatDataSourceStats; import io.trino.plugin.base.session.SessionPropertiesProvider; -import io.trino.plugin.hive.FileFormatDataSourceStats; import io.trino.plugin.hive.SortingFileWriterConfig; import io.trino.plugin.hive.metastore.HiveMetastoreFactory; import io.trino.plugin.hive.metastore.RawHiveMetastoreFactory; diff --git a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergPageSourceProvider.java b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergPageSourceProvider.java index 9f57a66719d..4b5abd936d9 100644 --- a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergPageSourceProvider.java +++ b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergPageSourceProvider.java @@ -46,7 +46,7 @@ import io.trino.parquet.reader.MetadataReader; import io.trino.parquet.reader.ParquetReader; import io.trino.parquet.reader.RowGroupInfo; -import io.trino.plugin.hive.FileFormatDataSourceStats; +import io.trino.plugin.base.metrics.FileFormatDataSourceStats; import io.trino.plugin.hive.ReaderColumns; import io.trino.plugin.hive.ReaderPageSource; import io.trino.plugin.hive.ReaderProjectionsAdapter; diff --git a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergPageSourceProviderFactory.java b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergPageSourceProviderFactory.java index 6803b8f82ef..d5153e19ba9 100644 --- a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergPageSourceProviderFactory.java +++ b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergPageSourceProviderFactory.java @@ -16,7 +16,7 @@ import com.google.inject.Inject; import io.trino.orc.OrcReaderOptions; import io.trino.parquet.ParquetReaderOptions; -import io.trino.plugin.hive.FileFormatDataSourceStats; +import io.trino.plugin.base.metrics.FileFormatDataSourceStats; import io.trino.plugin.hive.orc.OrcReaderConfig; import io.trino.plugin.hive.parquet.ParquetReaderConfig; import io.trino.spi.connector.ConnectorPageSourceProvider; diff --git a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/TrinoOrcDataSource.java b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/TrinoOrcDataSource.java index 0dca29a6561..719f0e1b2bb 100644 --- a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/TrinoOrcDataSource.java +++ b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/TrinoOrcDataSource.java @@ -19,7 +19,7 @@ import io.trino.orc.AbstractOrcDataSource; import io.trino.orc.OrcDataSourceId; import io.trino.orc.OrcReaderOptions; -import io.trino.plugin.hive.FileFormatDataSourceStats; +import io.trino.plugin.base.metrics.FileFormatDataSourceStats; import java.io.IOException; diff --git a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/procedure/MigrationUtils.java b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/procedure/MigrationUtils.java index 4f325fab54e..f869928de41 100644 --- a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/procedure/MigrationUtils.java +++ b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/procedure/MigrationUtils.java @@ -29,7 +29,7 @@ import io.trino.parquet.ParquetReaderOptions; import io.trino.parquet.metadata.ParquetMetadata; import io.trino.parquet.reader.MetadataReader; -import io.trino.plugin.hive.FileFormatDataSourceStats; +import io.trino.plugin.base.metrics.FileFormatDataSourceStats; import io.trino.plugin.hive.HiveStorageFormat; import io.trino.plugin.hive.metastore.HiveMetastoreFactory; import io.trino.plugin.hive.parquet.TrinoParquetDataSource; diff --git a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/util/OrcMetrics.java b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/util/OrcMetrics.java index 6020977cbbf..35debe802af 100644 --- a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/util/OrcMetrics.java +++ b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/util/OrcMetrics.java @@ -33,7 +33,7 @@ import io.trino.orc.metadata.statistics.IntegerStatistics; import io.trino.orc.metadata.statistics.StringStatistics; import io.trino.orc.metadata.statistics.TimestampStatistics; -import io.trino.plugin.hive.FileFormatDataSourceStats; +import io.trino.plugin.base.metrics.FileFormatDataSourceStats; import io.trino.plugin.iceberg.TrinoOrcDataSource; import org.apache.iceberg.Metrics; import org.apache.iceberg.MetricsConfig; diff --git a/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/IcebergTestUtils.java b/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/IcebergTestUtils.java index 2987039fe67..0314fd6c095 100644 --- a/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/IcebergTestUtils.java +++ b/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/IcebergTestUtils.java @@ -31,7 +31,7 @@ import io.trino.parquet.metadata.ColumnChunkMetadata; import io.trino.parquet.metadata.ParquetMetadata; import io.trino.parquet.reader.MetadataReader; -import io.trino.plugin.hive.FileFormatDataSourceStats; +import io.trino.plugin.base.metrics.FileFormatDataSourceStats; import io.trino.plugin.hive.TrinoViewHiveMetastore; import io.trino.plugin.hive.metastore.cache.CachingHiveMetastore; import io.trino.plugin.hive.parquet.TrinoParquetDataSource; diff --git a/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/TestIcebergNodeLocalDynamicSplitPruning.java b/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/TestIcebergNodeLocalDynamicSplitPruning.java index eed9d1057a7..bdc21117030 100644 --- a/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/TestIcebergNodeLocalDynamicSplitPruning.java +++ b/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/TestIcebergNodeLocalDynamicSplitPruning.java @@ -28,7 +28,7 @@ import io.trino.orc.OrcWriterOptions; import io.trino.orc.OrcWriterStats; import io.trino.orc.OutputStreamOrcDataSink; -import io.trino.plugin.hive.FileFormatDataSourceStats; +import io.trino.plugin.base.metrics.FileFormatDataSourceStats; import io.trino.plugin.hive.HiveTransactionHandle; import io.trino.plugin.hive.orc.OrcReaderConfig; import io.trino.plugin.hive.orc.OrcWriterConfig; diff --git a/testing/trino-product-tests/src/main/java/io/trino/tests/product/deltalake/TestDeltaLakeJmx.java b/testing/trino-product-tests/src/main/java/io/trino/tests/product/deltalake/TestDeltaLakeJmx.java index d971586fc8f..fa7f14eaba8 100644 --- a/testing/trino-product-tests/src/main/java/io/trino/tests/product/deltalake/TestDeltaLakeJmx.java +++ b/testing/trino-product-tests/src/main/java/io/trino/tests/product/deltalake/TestDeltaLakeJmx.java @@ -38,7 +38,7 @@ public void testJmxTablesExposedByDeltaLakeConnectorBackedByGlueMetastore() row("io.trino.plugin.hive.metastore.cache:name=delta,type=cachinghivemetastore"), row("io.trino.plugin.hive.metastore.glue:name=delta,type=gluehivemetastore"), row("io.trino.plugin.hive.metastore.glue:name=delta,type=gluemetastorestats"), - row("io.trino.plugin.hive:catalog=delta,name=delta,type=fileformatdatasourcestats"), + row("io.trino.plugin.base.metrics:catalog=delta,name=delta,type=fileformatdatasourcestats"), row("trino.plugin.deltalake.metastore:catalog=delta,name=delta,type=deltalaketablemetadatascheduler"), row("trino.plugin.deltalake.transactionlog:catalog=delta,name=delta,type=transactionlogaccess")); } @@ -51,7 +51,7 @@ public void testJmxTablesExposedByDeltaLakeConnectorBackedByThriftMetastore() row("io.trino.plugin.hive.metastore.cache:name=delta,type=cachinghivemetastore"), row("io.trino.plugin.hive.metastore.thrift:name=delta,type=thrifthivemetastore"), row("io.trino.plugin.hive.metastore.thrift:name=delta,type=thriftmetastorestats"), - row("io.trino.plugin.hive:catalog=delta,name=delta,type=fileformatdatasourcestats"), + row("io.trino.plugin.base.metrics:catalog=delta,name=delta,type=fileformatdatasourcestats"), row("trino.plugin.deltalake.metastore:catalog=delta,name=delta,type=deltalaketablemetadatascheduler"), row("trino.plugin.deltalake.transactionlog:catalog=delta,name=delta,type=transactionlogaccess")); }