nastra commented on PR #6919:
URL: https://github.com/apache/iceberg/pull/6919#issuecomment-1479659932

   > > I believe @karuppayya meant to report from here directly to Spark 
metrics. @karuppayya were you planning to add that functionality as part of 
this PR?
   > 
   > Yes, that was the idea.To access the metrics in SparkScanBuilder to use 
[here](https://github.com/apache/spark/commit/d4c58159925133771d305cc7ac4f1248f215812c)
   
   Ok I thought that the `SparkMetricsReporter` would have some custom code to 
report to Spark directly, but if that's not required, then I don't think we 
need that class. In that case you could just have a lambda similar to 
https://github.com/apache/iceberg/blob/e340ad5be04e902398c576f431810c3dfa4fe717/core/src/main/java/org/apache/iceberg/rest/RESTSessionCatalog.java#L361
   
   Something like 
   ```
   private void reportMetricsToSpark(MetricsReport report) {
       // report to spark
     }
   ```
   ```
   BatchScan scan =
           table
               .newBatchScan()
               .caseSensitive(caseSensitive)
               .filter(filterExpression())
               .project(expectedSchema)
               .withMetricsReporter(this::reportMetricsToSpark);
   ```


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to