diff --git a/backends-clickhouse/src/main/scala/org/apache/gluten/backendsapi/clickhouse/CHIteratorApi.scala b/backends-clickhouse/src/main/scala/org/apache/gluten/backendsapi/clickhouse/CHIteratorApi.scala index c77d5726222c..1b66fbaed86d 100644 --- a/backends-clickhouse/src/main/scala/org/apache/gluten/backendsapi/clickhouse/CHIteratorApi.scala +++ b/backends-clickhouse/src/main/scala/org/apache/gluten/backendsapi/clickhouse/CHIteratorApi.scala @@ -37,7 +37,7 @@ import org.apache.spark.sql.connector.read.InputPartition import org.apache.spark.sql.execution.datasources.FilePartition import org.apache.spark.sql.execution.metric.SQLMetric import org.apache.spark.sql.types.{StructField, StructType} -import org.apache.spark.sql.utils.OASPackageBridge.InputMetricsWrapper +import org.apache.spark.sql.utils.SparkInputMetricsUtil.InputMetricsWrapper import org.apache.spark.sql.vectorized.ColumnarBatch import java.lang.{Long => JLong} diff --git a/backends-clickhouse/src/main/scala/org/apache/gluten/metrics/BatchScanMetricsUpdater.scala b/backends-clickhouse/src/main/scala/org/apache/gluten/metrics/BatchScanMetricsUpdater.scala index 2ee6e271df1d..1b9389351bf2 100644 --- a/backends-clickhouse/src/main/scala/org/apache/gluten/metrics/BatchScanMetricsUpdater.scala +++ b/backends-clickhouse/src/main/scala/org/apache/gluten/metrics/BatchScanMetricsUpdater.scala @@ -17,7 +17,7 @@ package org.apache.gluten.metrics import org.apache.spark.sql.execution.metric.SQLMetric -import org.apache.spark.sql.utils.OASPackageBridge.InputMetricsWrapper +import org.apache.spark.sql.utils.SparkInputMetricsUtil.InputMetricsWrapper class BatchScanMetricsUpdater(@transient val metrics: Map[String, SQLMetric]) extends MetricsUpdater { diff --git a/backends-clickhouse/src/main/scala/org/apache/gluten/metrics/FileSourceScanMetricsUpdater.scala b/backends-clickhouse/src/main/scala/org/apache/gluten/metrics/FileSourceScanMetricsUpdater.scala index 4dcae8feb92b..437194873bdc 100644 --- a/backends-clickhouse/src/main/scala/org/apache/gluten/metrics/FileSourceScanMetricsUpdater.scala +++ b/backends-clickhouse/src/main/scala/org/apache/gluten/metrics/FileSourceScanMetricsUpdater.scala @@ -17,7 +17,7 @@ package org.apache.gluten.metrics import org.apache.spark.sql.execution.metric.SQLMetric -import org.apache.spark.sql.utils.OASPackageBridge.InputMetricsWrapper +import org.apache.spark.sql.utils.SparkInputMetricsUtil.InputMetricsWrapper /** * Note: "val metrics" is made transient to avoid sending driver-side metrics to tasks, e.g. diff --git a/backends-clickhouse/src/main/scala/org/apache/gluten/metrics/HiveTableScanMetricsUpdater.scala b/backends-clickhouse/src/main/scala/org/apache/gluten/metrics/HiveTableScanMetricsUpdater.scala index 85e110987b9c..a2af0fcde7b0 100644 --- a/backends-clickhouse/src/main/scala/org/apache/gluten/metrics/HiveTableScanMetricsUpdater.scala +++ b/backends-clickhouse/src/main/scala/org/apache/gluten/metrics/HiveTableScanMetricsUpdater.scala @@ -17,7 +17,7 @@ package org.apache.gluten.metrics import org.apache.spark.sql.execution.metric.SQLMetric -import org.apache.spark.sql.utils.OASPackageBridge.InputMetricsWrapper +import org.apache.spark.sql.utils.SparkInputMetricsUtil.InputMetricsWrapper class HiveTableScanMetricsUpdater(@transient val metrics: Map[String, SQLMetric]) extends MetricsUpdater { diff --git a/backends-velox/src/main/scala/org/apache/gluten/backendsapi/velox/VeloxIteratorApi.scala b/backends-velox/src/main/scala/org/apache/gluten/backendsapi/velox/VeloxIteratorApi.scala index d8355e1c419f..7cf02f28d025 100644 --- a/backends-velox/src/main/scala/org/apache/gluten/backendsapi/velox/VeloxIteratorApi.scala +++ b/backends-velox/src/main/scala/org/apache/gluten/backendsapi/velox/VeloxIteratorApi.scala @@ -37,7 +37,7 @@ import org.apache.spark.sql.connector.read.InputPartition import org.apache.spark.sql.execution.datasources.{FilePartition, PartitionedFile} import org.apache.spark.sql.execution.metric.SQLMetric import org.apache.spark.sql.types._ -import org.apache.spark.sql.utils.OASPackageBridge.InputMetricsWrapper +import org.apache.spark.sql.utils.SparkInputMetricsUtil.InputMetricsWrapper import org.apache.spark.sql.vectorized.ColumnarBatch import org.apache.spark.util.ExecutorManager diff --git a/gluten-core/src/main/scala/org/apache/gluten/backendsapi/IteratorApi.scala b/gluten-core/src/main/scala/org/apache/gluten/backendsapi/IteratorApi.scala index b78064973123..11211bd0da91 100644 --- a/gluten-core/src/main/scala/org/apache/gluten/backendsapi/IteratorApi.scala +++ b/gluten-core/src/main/scala/org/apache/gluten/backendsapi/IteratorApi.scala @@ -27,7 +27,7 @@ import org.apache.spark._ import org.apache.spark.sql.connector.read.InputPartition import org.apache.spark.sql.execution.metric.SQLMetric import org.apache.spark.sql.types.StructType -import org.apache.spark.sql.utils.OASPackageBridge.InputMetricsWrapper +import org.apache.spark.sql.utils.SparkInputMetricsUtil.InputMetricsWrapper import org.apache.spark.sql.vectorized.ColumnarBatch trait IteratorApi { diff --git a/gluten-core/src/main/scala/org/apache/gluten/execution/GlutenWholeStageColumnarRDD.scala b/gluten-core/src/main/scala/org/apache/gluten/execution/GlutenWholeStageColumnarRDD.scala index 25293e918327..de5fc85f356d 100644 --- a/gluten-core/src/main/scala/org/apache/gluten/execution/GlutenWholeStageColumnarRDD.scala +++ b/gluten-core/src/main/scala/org/apache/gluten/execution/GlutenWholeStageColumnarRDD.scala @@ -25,7 +25,7 @@ import org.apache.spark.rdd.RDD import org.apache.spark.sql.connector.read.InputPartition import org.apache.spark.sql.execution.InputFileBlockHolderProxy import org.apache.spark.sql.execution.metric.SQLMetric -import org.apache.spark.sql.utils.OASPackageBridge.InputMetricsWrapper +import org.apache.spark.sql.utils.SparkInputMetricsUtil.InputMetricsWrapper import org.apache.spark.sql.vectorized.ColumnarBatch import org.apache.spark.util.ExecutorManager diff --git a/gluten-core/src/main/scala/org/apache/gluten/metrics/MetricsUpdater.scala b/gluten-core/src/main/scala/org/apache/gluten/metrics/MetricsUpdater.scala index 5201df3b3472..633bc404bce3 100644 --- a/gluten-core/src/main/scala/org/apache/gluten/metrics/MetricsUpdater.scala +++ b/gluten-core/src/main/scala/org/apache/gluten/metrics/MetricsUpdater.scala @@ -16,7 +16,7 @@ */ package org.apache.gluten.metrics -import org.apache.spark.sql.utils.OASPackageBridge.InputMetricsWrapper +import org.apache.spark.sql.utils.SparkInputMetricsUtil.InputMetricsWrapper /** * A minimized controller for updating operator's metrics, which means it never persists the diff --git a/gluten-core/src/main/scala/org/apache/spark/sql/utils/OASPackageBridge.scala b/gluten-core/src/main/scala/org/apache/spark/sql/utils/SparkInputMetricsUtil.scala similarity index 97% rename from gluten-core/src/main/scala/org/apache/spark/sql/utils/OASPackageBridge.scala rename to gluten-core/src/main/scala/org/apache/spark/sql/utils/SparkInputMetricsUtil.scala index a318f79cd82c..8a8366d3e807 100644 --- a/gluten-core/src/main/scala/org/apache/spark/sql/utils/OASPackageBridge.scala +++ b/gluten-core/src/main/scala/org/apache/spark/sql/utils/SparkInputMetricsUtil.scala @@ -19,7 +19,7 @@ package org.apache.spark.sql.utils import org.apache.spark.executor.InputMetrics /** Bridge to package org.apache.spark. */ -object OASPackageBridge { +object SparkInputMetricsUtil { implicit class InputMetricsWrapper(val m: InputMetrics) { def bridgeIncBytesRead(v: Long): Unit = { m.incBytesRead(v) diff --git a/gluten-data/src/main/java/org/apache/gluten/vectorized/JniByteInputStreams.java b/gluten-data/src/main/java/org/apache/gluten/vectorized/JniByteInputStreams.java index 5c404b0407b6..0749d0cff3fd 100644 --- a/gluten-data/src/main/java/org/apache/gluten/vectorized/JniByteInputStreams.java +++ b/gluten-data/src/main/java/org/apache/gluten/vectorized/JniByteInputStreams.java @@ -60,7 +60,8 @@ static InputStream unwrapSparkInputStream(InputStream in) { InputStream unwrapped = in; if (unwrapped instanceof BufferReleasingInputStream) { final BufferReleasingInputStream brin = (BufferReleasingInputStream) unwrapped; - unwrapped = org.apache.spark.storage.OASPackageBridge.unwrapBufferReleasingInputStream(brin); + unwrapped = + org.apache.spark.storage.SparkInputStreamUtil.unwrapBufferReleasingInputStream(brin); } if (unwrapped instanceof CheckedInputStream) { final CheckedInputStream cin = (CheckedInputStream) unwrapped; diff --git a/gluten-data/src/main/scala/org/apache/gluten/metrics/BatchScanMetricsUpdater.scala b/gluten-data/src/main/scala/org/apache/gluten/metrics/BatchScanMetricsUpdater.scala index 0d4dd7fb103d..16eabedfd60e 100644 --- a/gluten-data/src/main/scala/org/apache/gluten/metrics/BatchScanMetricsUpdater.scala +++ b/gluten-data/src/main/scala/org/apache/gluten/metrics/BatchScanMetricsUpdater.scala @@ -17,7 +17,7 @@ package org.apache.gluten.metrics import org.apache.spark.sql.execution.metric.SQLMetric -import org.apache.spark.sql.utils.OASPackageBridge.InputMetricsWrapper +import org.apache.spark.sql.utils.SparkInputMetricsUtil.InputMetricsWrapper class BatchScanMetricsUpdater(val metrics: Map[String, SQLMetric]) extends MetricsUpdater { diff --git a/gluten-data/src/main/scala/org/apache/gluten/metrics/FileSourceScanMetricsUpdater.scala b/gluten-data/src/main/scala/org/apache/gluten/metrics/FileSourceScanMetricsUpdater.scala index d961c28cf07f..f76d97d30e43 100644 --- a/gluten-data/src/main/scala/org/apache/gluten/metrics/FileSourceScanMetricsUpdater.scala +++ b/gluten-data/src/main/scala/org/apache/gluten/metrics/FileSourceScanMetricsUpdater.scala @@ -17,7 +17,7 @@ package org.apache.gluten.metrics import org.apache.spark.sql.execution.metric.SQLMetric -import org.apache.spark.sql.utils.OASPackageBridge.InputMetricsWrapper +import org.apache.spark.sql.utils.SparkInputMetricsUtil.InputMetricsWrapper /** * Note: "val metrics" is made transient to avoid sending driver-side metrics to tasks, e.g. diff --git a/gluten-data/src/main/scala/org/apache/gluten/metrics/HiveTableScanMetricsUpdater.scala b/gluten-data/src/main/scala/org/apache/gluten/metrics/HiveTableScanMetricsUpdater.scala index f4adcc5cfca4..00ef8d2b6c77 100644 --- a/gluten-data/src/main/scala/org/apache/gluten/metrics/HiveTableScanMetricsUpdater.scala +++ b/gluten-data/src/main/scala/org/apache/gluten/metrics/HiveTableScanMetricsUpdater.scala @@ -17,7 +17,7 @@ package org.apache.gluten.metrics import org.apache.spark.sql.execution.metric.SQLMetric -import org.apache.spark.sql.utils.OASPackageBridge.InputMetricsWrapper +import org.apache.spark.sql.utils.SparkInputMetricsUtil.InputMetricsWrapper class HiveTableScanMetricsUpdater(@transient val metrics: Map[String, SQLMetric]) extends MetricsUpdater { diff --git a/gluten-data/src/main/scala/org/apache/spark/storage/OASPackageBridge.scala b/gluten-data/src/main/scala/org/apache/spark/storage/SparkInputStreamUtil.scala similarity index 97% rename from gluten-data/src/main/scala/org/apache/spark/storage/OASPackageBridge.scala rename to gluten-data/src/main/scala/org/apache/spark/storage/SparkInputStreamUtil.scala index cf9ba1e6121b..a1df83400729 100644 --- a/gluten-data/src/main/scala/org/apache/spark/storage/OASPackageBridge.scala +++ b/gluten-data/src/main/scala/org/apache/spark/storage/SparkInputStreamUtil.scala @@ -18,7 +18,7 @@ package org.apache.spark.storage import java.io.InputStream -object OASPackageBridge { +object SparkInputStreamUtil { def unwrapBufferReleasingInputStream(in: BufferReleasingInputStream): InputStream = { in.delegate }