nastra commented on code in PR #18716:
URL: https://github.com/apache/iceberg/pull/18716#discussion_r4663637211


##########
gcp/src/main/java/org/apache/iceberg/gcp/GCPAuthUtils.java:
##########
@@ -32,7 +32,21 @@ private GCPAuthUtils() {}
 
   public static OAuth2Credentials oauth2CredentialsFromGcpProperties(
       GCPProperties gcpProperties, CloseableGroup closeableGroup) {
+    return oauth2Credentials(gcpProperties, null, closeableGroup);
+  }
+
+  /**
+   * Creates OAuth2 credentials for the storage client of the given prefix. A 
refresh uses the GCS
+   * credential with the longest prefix that the storage prefix starts with.
+   */
+  public static OAuth2Credentials oauth2CredentialsFromGcpProperties(
+      GCPProperties gcpProperties, String storagePrefix, CloseableGroup 
closeableGroup) {
+    Preconditions.checkArgument(null != storagePrefix, "Invalid storage 
prefix: null");

Review Comment:
   do we need this check here?



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to