You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "dpaani (via GitHub)" <gi...@apache.org> on 2023/03/27 15:59:18 UTC

[GitHub] [iceberg] dpaani commented on a diff in pull request #7188: Refactoring metadata location and adding API to get data and metadata location #7187

dpaani commented on code in PR #7188:
URL: https://github.com/apache/iceberg/pull/7188#discussion_r1149468683


##########
core/src/main/java/org/apache/iceberg/LocationProviders.java:
##########
@@ -167,5 +185,42 @@ private static String pathContext(String tableLocation) {
 
       return resolvedContext;
     }
+
+    @Override
+    public String dataLocation() {
+      return this.storageLocation;
+    }
+  }
+
+  static class DefaultMetadataLocationProvider implements MetadataLocationProvider {
+    private static final String METADATA_FOLDER_NAME = "metadata";
+    private String metadataLocation;
+
+    DefaultMetadataLocationProvider(String tableLocation, Map<String, String> properties) {
+      this.metadataLocation =
+          LocationUtil.stripTrailingSlash(
+              metadataLocation(
+                  Preconditions.checkNotNull(tableLocation, "table location cannot be null"),

Review Comment:
   Thanks @nastra I have replaced it with Preconditions.checkArgument method.



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