You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2019/07/24 17:46:39 UTC

[GitHub] [incubator-iceberg] rdblue commented on a change in pull request #301: Avoid write failures if metrics mode is invalid

rdblue commented on a change in pull request #301: Avoid write failures if metrics mode is invalid
URL: https://github.com/apache/incubator-iceberg/pull/301#discussion_r306939089
 
 

 ##########
 File path: core/src/main/java/org/apache/iceberg/MetricsConfig.java
 ##########
 @@ -43,15 +46,24 @@ public static MetricsConfig getDefault() {
 
   public static MetricsConfig fromProperties(Map<String, String> props) {
     MetricsConfig spec = new MetricsConfig();
+    String defaultModeAsString = props.getOrDefault(DEFAULT_WRITE_METRICS_MODE, DEFAULT_WRITE_METRICS_MODE_DEFAULT);
+    spec.defaultMode = MetricsModes.fromString(defaultModeAsString);
 
 Review comment:
   Good idea, we should wrap that in a try/catch 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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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