kevinjqliu commented on code in PR #14966:
URL: https://github.com/apache/iceberg/pull/14966#discussion_r2669783739
##########
azure/src/main/java/org/apache/iceberg/azure/adlsv2/ADLSFileIO.java:
##########
@@ -103,22 +127,30 @@ public Map<String, String> properties() {
}
public DataLakeFileSystemClient client(String path) {
- ADLSLocation location = new ADLSLocation(path);
- return client(location);
+ if (clientSupplier != null) {
+ return clientSupplier.get();
+ } else {
+ ADLSLocation location = new ADLSLocation(path);
+ return client(location);
+ }
}
@VisibleForTesting
DataLakeFileSystemClient client(ADLSLocation location) {
- DataLakeFileSystemClientBuilder clientBuilder =
- new DataLakeFileSystemClientBuilder().httpClient(HTTP);
+ if (clientSupplier != null) {
+ return clientSupplier.get();
+ } else {
Review Comment:
+1 to removing else, and from the constructor above.
lets keep one place where the clientSupplier is used since everything else
calls this method
##########
azure/src/main/java/org/apache/iceberg/azure/adlsv2/ADLSFileIO.java:
##########
@@ -70,6 +73,27 @@ public ADLSFileIO() {}
this.azureProperties = azureProperties;
}
+ /**
+ * Constructor with custom DataLakeFileSystemClient supplier.
+ *
+ * <p>Calling {@link ADLSFileIO#initialize(Map)} will overwrite the
properties and azureProperties
+ * set in this constructor, but the clientSupplier will continue to be used.
Review Comment:
nit: not sure if we need all this explanation since both `properties` and
`azureProperties` are just initialized with empty value
--
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]