vikrambohra commented on a change in pull request #3405:
URL: https://github.com/apache/gobblin/pull/3405#discussion_r717093283
##########
File path:
gobblin-iceberg/src/main/java/org/apache/gobblin/iceberg/publisher/GobblinMCEPublisher.java
##########
@@ -198,7 +198,12 @@ public static Metrics getMetrics(State state, Path path,
Configuration conf, Nam
//This means the table is not compatible with iceberg, so return a
dummy metric
return new Metrics(100000000L, null, null, null);
}
- return OrcMetrics.fromInputFile(HadoopInputFile.fromPath(path, conf),
MetricsConfig.getDefault(), mapping);
+ try {
+ return OrcMetrics.fromInputFile(HadoopInputFile.fromPath(path,
conf), MetricsConfig.getDefault(), mapping);
+ } catch (Exception e) {
+ //This means the table is not compatible with iceberg, so return a
dummy metric
+ return new Metrics(100000000L, null, null, null);
Review comment:
Can we have a common static instance called DUMMY_METRIC = new
Metrics(100000000L, null, null, null); and return in both places
--
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]