[
https://issues.apache.org/jira/browse/PARQUET-2374?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17787047#comment-17787047
]
ASF GitHub Bot commented on PARQUET-2374:
-----------------------------------------
ConeyLiu commented on code in PR #1187:
URL: https://github.com/apache/parquet-mr/pull/1187#discussion_r1396753652
##########
parquet-hadoop/src/main/java/org/apache/parquet/hadoop/ParquetFileReader.java:
##########
@@ -125,10 +125,20 @@ public class ParquetFileReader implements Closeable {
public static String PARQUET_READ_PARALLELISM =
"parquet.metadata.read.parallelism";
+ public ParquetMetricsCallback metricsCallback;
+
private final ParquetMetadataConverter converter;
private final CRC32 crc;
+
+ /**
+ * set a callback to send back metrics info
+ */
+ public synchronized void initMetrics(ParquetMetricsCallback callback) {
Review Comment:
why the `synchronized` is needed?
> Add metrics support for parquet file reader
> -------------------------------------------
>
> Key: PARQUET-2374
> URL: https://issues.apache.org/jira/browse/PARQUET-2374
> Project: Parquet
> Issue Type: Improvement
> Components: parquet-mr
> Affects Versions: 1.13.1
> Reporter: Parth Chandra
> Priority: Major
>
> ParquetFileReader is used by many engines - Hadoop, Spark among them. These
> engines report various metrics to measure performance in different
> environments and it is usually useful to be able to get low level metrics out
> of the file reader and writers.
> It would be very useful to allow a simple interface to report the metrics.
> Callers can then implement the interface to record the metrics in any
> subsystem they choose.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)