@@ -281,33 +281,37 @@ public CustomTaskMetric[] reportDriverMetrics() {
281281 List <CustomTaskMetric > customTaskMetrics = Lists .newArrayList ();
282282 Optional <ScanReport > scanReportOptional = sparkReadMetricReporter .getScanReport ();
283283
284- scanReportOptional .ifPresent (scanReport -> {
285- Optional .ofNullable (scanReport .scanMetrics ().totalFileSizeInBytes ())
286- .ifPresent (
287- counterResult -> customTaskMetrics .add (new TaskTotalFileSize (counterResult .value ())));
288- Optional .ofNullable (scanReport .scanMetrics ().totalPlanningDuration ())
289- .ifPresent (
290- timerResult ->
291- customTaskMetrics .add (new TaskTotalPlanningDuration (timerResult .count ())));
292-
293- Optional .ofNullable (scanReport .scanMetrics ().skippedDataFiles ())
294- .ifPresent (
295- skippedDataFilesResult ->
296- customTaskMetrics .add (new TaskSkippedDataFiles (skippedDataFilesResult .value ())));
297- Optional .ofNullable (scanReport .scanMetrics ().resultDataFiles ())
298- .ifPresent (resultDataFilesResult -> new TaskResultDataFiles (resultDataFilesResult .value ()));
299-
300- Optional .ofNullable (scanReport .scanMetrics ().skippedDataManifests ())
301- .ifPresent (
302- skippedDataManifestsResult ->
303- customTaskMetrics .add (
304- new TaskSkippedDataManifests (skippedDataManifestsResult .value ())));
305- Optional .ofNullable (scanReport .scanMetrics ().scannedDataManifests ())
306- .ifPresent (
307- scannedDataManifestResult ->
308- customTaskMetrics .add (
309- new TaskScannedDataManifests (scannedDataManifestResult .value ())));
310- });
284+ scanReportOptional .ifPresent (
285+ scanReport -> {
286+ Optional .ofNullable (scanReport .scanMetrics ().totalFileSizeInBytes ())
287+ .ifPresent (
288+ counterResult ->
289+ customTaskMetrics .add (new TaskTotalFileSize (counterResult .value ())));
290+ Optional .ofNullable (scanReport .scanMetrics ().totalPlanningDuration ())
291+ .ifPresent (
292+ timerResult ->
293+ customTaskMetrics .add (new TaskTotalPlanningDuration (timerResult .count ())));
294+
295+ Optional .ofNullable (scanReport .scanMetrics ().skippedDataFiles ())
296+ .ifPresent (
297+ skippedDataFilesResult ->
298+ customTaskMetrics .add (
299+ new TaskSkippedDataFiles (skippedDataFilesResult .value ())));
300+ Optional .ofNullable (scanReport .scanMetrics ().resultDataFiles ())
301+ .ifPresent (
302+ resultDataFilesResult -> new TaskResultDataFiles (resultDataFilesResult .value ()));
303+
304+ Optional .ofNullable (scanReport .scanMetrics ().skippedDataManifests ())
305+ .ifPresent (
306+ skippedDataManifestsResult ->
307+ customTaskMetrics .add (
308+ new TaskSkippedDataManifests (skippedDataManifestsResult .value ())));
309+ Optional .ofNullable (scanReport .scanMetrics ().scannedDataManifests ())
310+ .ifPresent (
311+ scannedDataManifestResult ->
312+ customTaskMetrics .add (
313+ new TaskScannedDataManifests (scannedDataManifestResult .value ())));
314+ });
311315
312316 return customTaskMetrics .toArray (new CustomTaskMetric [0 ]);
313317 }
0 commit comments