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 2021/07/27 20:59:30 UTC

[GitHub] [iceberg] jackye1995 commented on a change in pull request #2845: Core: allow default data location for ObjectStorageLocationProvider

jackye1995 commented on a change in pull request #2845:
URL: https://github.com/apache/iceberg/pull/2845#discussion_r677796039



##########
File path: core/src/main/java/org/apache/iceberg/LocationProviders.java
##########
@@ -68,13 +68,15 @@ public static LocationProvider locationsFor(String location, Map<String, String>
     }
   }
 
+  private static String defaultDataLocation(String tableLocation, Map<String, String> properties) {
+    return properties.getOrDefault(TableProperties.WRITE_NEW_DATA_LOCATION, String.format("%s/data", tableLocation));

Review comment:
       Yes I totally agree `TableProperties.WRITE_NEW_DATA_LOCATION` is probably not a good name, but it is what it is, we might want to deprecate and rename this if we have a major version update...
   
   The resolution strategy I am trying to create here is that:
   - if `write.object-storage.path` is set, use it
   - if not found, fallback to `write.folder-storage.path`
   - if not found, use `<tableLocation>/data`




-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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