You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "majian1998 (via GitHub)" <gi...@apache.org> on 2024/09/23 09:50:43 UTC

[I] Spark SQL UI can't show scan metrics. [iceberg]

majian1998 opened a new issue, #11191:
URL: https://github.com/apache/iceberg/issues/11191

   ### Apache Iceberg version
   
   1.6.1 (latest release)
   
   ### Query engine
   
   Spark
   
   ### Please describe the bug 🐞
   
   I executed the following query using the Hadoop catalog:
   `select count(*) from local.iceberg.lineitem where l_orderkey!='1';`
   I can't see the scan metrics on Spark UI. And there are warnings in logs.
   
   How can I see these metrics?
   Warning such as 
   ```
   24/09/23 17:04:48 WARN SQLAppStatusListener: Unable to load custom metric object for class
   org.apache.iceberg.spark.source.metrics.TotalDataFileSize`. Please make sure that the custom metric class is in the classpath and it has 0-arg constructor.
   java.lang.ClassNotFoundException: org.apache.iceberg.spark.source.metrics.TotalDataFileSize
   at java.net.URLClassLoader.findClass(URLClassLoader.java:387)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
   at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:355)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
   at java.lang.Class.forName0(Native Method)
   at java.lang.Class.forName(Class.java:348)
   at org.apache.spark.util.SparkClassUtils.classForName(SparkClassUtils.scala:41)
   at org.apache.spark.util.SparkClassUtils.classForName$(SparkClassUtils.scala:36)
   at org.apache.spark.util.Utils$.classForName(Utils.scala:94)
   at org.apache.spark.util.Utils$.$anonfun$loadExtensions$1(Utils.scala:2774)
   at scala.collection.immutable.List.flatMap(List.scala:366)
   at org.apache.spark.util.Utils$.loadExtensions(Utils.scala:2772))
   ```
   
   ![image](https://github.com/user-attachments/assets/bbb941fe-53d3-4d54-83b9-0bd0689a9c27)
   
   
   ### Willingness to contribute
   
   - [ ] I can contribute a fix for this bug independently
   - [ ] I would be willing to contribute a fix for this bug with guidance from the Iceberg community
   - [X] I cannot contribute a fix for this bug at this time


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [I] Spark SQL UI can't show scan metrics. [iceberg]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed issue #11191: Spark SQL UI can't show scan metrics.
URL: https://github.com/apache/iceberg/issues/11191


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [I] Spark SQL UI can't show scan metrics. [iceberg]

Posted by "manuzhang (via GitHub)" <gi...@apache.org>.
manuzhang commented on issue #11191:
URL: https://github.com/apache/iceberg/issues/11191#issuecomment-2370039021

   which Spark version do you use?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [I] Spark SQL UI can't show scan metrics. [iceberg]

Posted by "manuzhang (via GitHub)" <gi...@apache.org>.
manuzhang commented on issue #11191:
URL: https://github.com/apache/iceberg/issues/11191#issuecomment-2370431639

   Have you checked whether `TotalDataFileSize` is included in your iceberg runtime jar?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [I] Spark SQL UI can't show scan metrics. [iceberg]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #11191:
URL: https://github.com/apache/iceberg/issues/11191#issuecomment-4203014913

   This issue has been closed because it has not received any activity in the last 14 days since being marked as 'stale'


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [I] Spark SQL UI can't show scan metrics. [iceberg]

Posted by "DavidHarroch (via GitHub)" <gi...@apache.org>.
DavidHarroch commented on issue #11191:
URL: https://github.com/apache/iceberg/issues/11191#issuecomment-2607210216

   Did you figure it out ?
   I'm getting ```: java.util.NoSuchElementException: key not found: totalDataFileSize``` error as well


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [I] Spark SQL UI can't show scan metrics. [iceberg]

Posted by "jizezhang (via GitHub)" <gi...@apache.org>.
jizezhang commented on issue #11191:
URL: https://github.com/apache/iceberg/issues/11191#issuecomment-3335904324

   I am facing an issue where I was able to see scan metrics in the live UI but not on history server. Looking at the event logs some scan metrics seems to be missing, e.g. no accumulated values found for `v2Custom_org.apache.iceberg.spark.source.metrics.NumDeletes`. Any suggestions?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [I] Spark SQL UI can't show scan metrics. [iceberg]

Posted by "manuzhang (via GitHub)" <gi...@apache.org>.
manuzhang commented on issue #11191:
URL: https://github.com/apache/iceberg/issues/11191#issuecomment-2370130217

   Is the Spark SQL UI from a running app or history server?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [I] Spark SQL UI can't show scan metrics. [iceberg]

Posted by "majian1998 (via GitHub)" <gi...@apache.org>.
majian1998 commented on issue #11191:
URL: https://github.com/apache/iceberg/issues/11191#issuecomment-2807971082

   @EdenKik I don't have it at the moment.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [I] Spark SQL UI can't show scan metrics. [iceberg]

Posted by "jotarada (via GitHub)" <gi...@apache.org>.
jotarada commented on issue #11191:
URL: https://github.com/apache/iceberg/issues/11191#issuecomment-2575005020

   I'm testing migrate some workloads from spark 3.3.1 and iceberg 1.4.3 to spark 3.5.1 and iceberg 1.4.3 and got a even worse problem.
   ```Caused by: java.util.concurrent.ExecutionException: java.util.NoSuchElementException: key not found: totalDataFileSize```
   
   Can this be related?
   
   **Full stack trace:** 
   ```Client: Application diagnostics message: User class threw exception: java.util.NoSuchElementException: key not found: totalDataFileSize
   	at scala.collection.MapLike.default(MapLike.scala:236)
   	at scala.collection.MapLike.default$(MapLike.scala:235)
   	at scala.collection.AbstractMap.default(Map.scala:65)
   	at scala.collection.MapLike.apply(MapLike.scala:144)
   	at scala.collection.MapLike.apply$(MapLike.scala:143)
   	at scala.collection.AbstractMap.apply(Map.scala:65)
   	at org.apache.spark.sql.execution.datasources.v2.DataSourceV2ScanExecBase.doExecuteColumnar(DataSourceV2ScanExecBase.scala:220)
   	at org.apache.spark.sql.execution.datasources.v2.DataSourceV2ScanExecBase.doExecuteColumnar$(DataSourceV2ScanExecBase.scala:214)
   	at org.apache.spark.sql.execution.datasources.v2.BatchScanExec.doExecuteColumnar(BatchScanExec.scala:36)
   	at org.apache.spark.sql.execution.SparkPlan.$anonfun$executeColumnar$1(SparkPlan.scala:222)
   	at org.apache.spark.sql.execution.SparkPlan.$anonfun$executeQuery$1(SparkPlan.scala:246)
   	at org.apache.spark.rdd.RDDOperationScope$.withScope(RDDOperationScope.scala:151)
   	at org.apache.spark.sql.execution.SparkPlan.executeQuery(SparkPlan.scala:243)
   	at org.apache.spark.sql.execution.SparkPlan.executeColumnar(SparkPlan.scala:218)
   	at org.apache.spark.sql.execution.InputAdapter.doExecuteColumnar(WholeStageCodegenExec.scala:521)
   	at org.apache.spark.sql.execution.SparkPlan.$anonfun$executeColumnar$1(SparkPlan.scala:222)
   	at org.apache.spark.sql.execution.SparkPlan.$anonfun$executeQuery$1(SparkPlan.scala:246)
   	at org.apache.spark.rdd.RDDOperationScope$.withScope(RDDOperationScope.scala:151)
   	at org.apache.spark.sql.execution.SparkPlan.executeQuery(SparkPlan.scala:243)
   	at org.apache.spark.sql.execution.SparkPlan.executeColumnar(SparkPlan.scala:218)
   	at org.apache.spark.sql.execution.ColumnarToRowExec.inputRDDs(Columnar.scala:204)
   	at org.apache.spark.sql.execution.aggregate.AggregateCodegenSupport.inputRDDs(AggregateCodegenSupport.scala:89)
   	at org.apache.spark.sql.execution.aggregate.AggregateCodegenSupport.inputRDDs$(AggregateCodegenSupport.scala:88)
   	at org.apache.spark.sql.execution.aggregate.HashAggregateExec.inputRDDs(HashAggregateExec.scala:49)
   	at org.apache.spark.sql.execution.WholeStageCodegenExec.doExecute(WholeStageCodegenExec.scala:751)
   	at org.apache.spark.sql.execution.SparkPlan.$anonfun$execute$1(SparkPlan.scala:195)
   	at org.apache.spark.sql.execution.SparkPlan.$anonfun$executeQuery$1(SparkPlan.scala:246)
   	at org.apache.spark.rdd.RDDOperationScope$.withScope(RDDOperationScope.scala:151)
   	at org.apache.spark.sql.execution.SparkPlan.executeQuery(SparkPlan.scala:243)
   	at org.apache.spark.sql.execution.SparkPlan.execute(SparkPlan.scala:191)
   	at org.apache.spark.sql.execution.exchange.ShuffleExchangeExec.inputRDD$lzycompute(ShuffleExchangeExec.scala:141)
   	at org.apache.spark.sql.execution.exchange.ShuffleExchangeExec.inputRDD(ShuffleExchangeExec.scala:141)
   	at org.apache.spark.sql.execution.exchange.ShuffleExchangeExec.mapOutputStatisticsFuture$lzycompute(ShuffleExchangeExec.scala:146)
   	at org.apache.spark.sql.execution.exchange.ShuffleExchangeExec.mapOutputStatisticsFuture(ShuffleExchangeExec.scala:145)
   	at org.apache.spark.sql.execution.exchange.ShuffleExchangeLike.$anonfun$submitShuffleJob$1(ShuffleExchangeExec.scala:73)
   	at org.apache.spark.sql.execution.SparkPlan.$anonfun$executeQuery$1(SparkPlan.scala:246)
   	at org.apache.spark.rdd.RDDOperationScope$.withScope(RDDOperationScope.scala:151)
   	at org.apache.spark.sql.execution.SparkPlan.executeQuery(SparkPlan.scala:243)
   	at org.apache.spark.sql.execution.exchange.ShuffleExchangeLike.submitShuffleJob(ShuffleExchangeExec.scala:73)
   	at org.apache.spark.sql.execution.exchange.ShuffleExchangeLike.submitShuffleJob$(ShuffleExchangeExec.scala:72)
   	at org.apache.spark.sql.execution.exchange.ShuffleExchangeExec.submitShuffleJob(ShuffleExchangeExec.scala:120)
   	at org.apache.spark.sql.execution.adaptive.ShuffleQueryStageExec.shuffleFuture$lzycompute(QueryStageExec.scala:188)
   	at org.apache.spark.sql.execution.adaptive.ShuffleQueryStageExec.shuffleFuture(QueryStageExec.scala:188)
   	at org.apache.spark.sql.execution.adaptive.ShuffleQueryStageExec.doMaterialize(QueryStageExec.scala:190)
   	at org.apache.spark.sql.execution.adaptive.QueryStageExec.materialize(QueryStageExec.scala:62)
   	at org.apache.spark.sql.execution.adaptive.AdaptiveSparkPlanExec.$anonfun$getFinalPhysicalPlan$5(AdaptiveSparkPlanExec.scala:303)
   	at org.apache.spark.sql.execution.adaptive.AdaptiveSparkPlanExec.$anonfun$getFinalPhysicalPlan$5$adapted(AdaptiveSparkPlanExec.scala:301)
   	at scala.collection.Iterator.foreach(Iterator.scala:943)
   	at scala.collection.Iterator.foreach$(Iterator.scala:943)
   	at scala.collection.AbstractIterator.foreach(Iterator.scala:1431)
   	at scala.collection.IterableLike.foreach(IterableLike.scala:74)
   	at scala.collection.IterableLike.foreach$(IterableLike.scala:73)
   	at scala.collection.AbstractIterable.foreach(Iterable.scala:56)
   	at org.apache.spark.sql.execution.adaptive.AdaptiveSparkPlanExec.$anonfun$getFinalPhysicalPlan$1(AdaptiveSparkPlanExec.scala:301)
   	at org.apache.spark.sql.SparkSession.withActive(SparkSession.scala:900)
   	at org.apache.spark.sql.execution.adaptive.AdaptiveSparkPlanExec.getFinalPhysicalPlan(AdaptiveSparkPlanExec.scala:273)
   	at org.apache.spark.sql.execution.adaptive.AdaptiveSparkPlanExec.withFinalPlanUpdate(AdaptiveSparkPlanExec.scala:418)
   	at org.apache.spark.sql.execution.adaptive.AdaptiveSparkPlanExec.executeTake(AdaptiveSparkPlanExec.scala:395)
   	at org.apache.spark.sql.Dataset.$anonfun$isEmpty$1(Dataset.scala:654)
   	at org.apache.spark.sql.Dataset.$anonfun$isEmpty$1$adapted(Dataset.scala:653)
   	at org.apache.spark.sql.Dataset.$anonfun$withAction$2(Dataset.scala:4322)
   	at org.apache.spark.sql.execution.QueryExecution$.withInternalError(QueryExecution.scala:547)
   	at org.apache.spark.sql.Dataset.$anonfun$withAction$1(Dataset.scala:4320)
   	at org.apache.spark.sql.execution.SQLExecution$.$anonfun$withNewExecutionId$6(SQLExecution.scala:125)
   	at org.apache.spark.sql.execution.SQLExecution$.withSQLConfPropagated(SQLExecution.scala:201)
   	at org.apache.spark.sql.execution.SQLExecution$.$anonfun$withNewExecutionId$1(SQLExecution.scala:108)
   	at org.apache.spark.sql.SparkSession.withActive(SparkSession.scala:900)
   	at org.apache.spark.sql.execution.SQLExecution$.withNewExecutionId(SQLExecution.scala:66)
   	at org.apache.spark.sql.Dataset.withAction(Dataset.scala:4320)
   	at org.apache.spark.sql.Dataset.isEmpty(Dataset.scala:653)
   at com.pipeline.data.IcebergPipeline$IcebergPipeline.handleDuplicates(IcebergPipeline.scala:253)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [I] Spark SQL UI can't show scan metrics. [iceberg]

Posted by "gmurro-armani (via GitHub)" <gi...@apache.org>.
gmurro-armani commented on issue #11191:
URL: https://github.com/apache/iceberg/issues/11191#issuecomment-2378946855

   Using the same version of Spark and Iceberg, I'm experiencing the same problem. 
   I've checked the jar I'm using (iceberg-spark-runtime-3.5_2.12-1.6.1). It has the TotalDataFileSize class:
   ![image](https://github.com/user-attachments/assets/069d12ec-b26e-4fb3-a2c5-b06347f032e2)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [I] Spark SQL UI can't show scan metrics. [iceberg]

Posted by "EdenKik (via GitHub)" <gi...@apache.org>.
EdenKik commented on issue #11191:
URL: https://github.com/apache/iceberg/issues/11191#issuecomment-2805020966

   Hey, is there any update regarding the issue?
   I'm experiencing this kind of WARN logs in all Iceberg operations run via Spark.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [I] Spark SQL UI can't show scan metrics. [iceberg]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #11191:
URL: https://github.com/apache/iceberg/issues/11191#issuecomment-4122306109

   This issue has been automatically marked as stale because it has been open for 180 days with no activity. It will be closed in next 14 days if no further activity occurs. To permanently prevent this issue from being considered stale, add the label 'not-stale', but commenting on the issue is preferred when possible.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [I] Spark SQL UI can't show scan metrics. [iceberg]

Posted by "majian1998 (via GitHub)" <gi...@apache.org>.
majian1998 commented on issue #11191:
URL: https://github.com/apache/iceberg/issues/11191#issuecomment-2370079309

   @manuzhang Spark3.5.1


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [I] Spark SQL UI can't show scan metrics. [iceberg]

Posted by "majian1998 (via GitHub)" <gi...@apache.org>.
majian1998 commented on issue #11191:
URL: https://github.com/apache/iceberg/issues/11191#issuecomment-2370231438

   @manuzhang Both of these are same.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org