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/22 06:25:27 UTC

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

aokolnychyi 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_r305686914
 
 

 ##########
 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:
   Will we fail jobs if the default mode is invalid?
   Will it make sense to fallback `DEFAULT_WRITE_METRICS_MODE_DEFAULT`?

----------------------------------------------------------------
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