rymurr commented on code in PR #14966:
URL: https://github.com/apache/iceberg/pull/14966#discussion_r2671486636
##########
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.
+ *
+ * <p>Unlike the no-arg constructor, this constructor initializes properties
and azureProperties
+ * immediately, allowing immediate use without calling {@link
ADLSFileIO#initialize(Map)}.
+ *
+ * <p>Note: The provided client will be used for all file system operations.
If your use case
+ * requires accessing multiple containers, ensure the client is configured
appropriately or use
+ * the default constructor with {@link ADLSFileIO#initialize(Map)}.
+ *
+ * @param clientSupplier client supplier
+ */
+ public ADLSFileIO(SerializableSupplier<DataLakeFileSystemClient>
clientSupplier) {
+ this.clientSupplier = clientSupplier;
+ this.properties = SerializableMap.copyOf(Maps.newHashMap());
Review Comment:
The API contract is to call `initialize` though right? Are we sayign this
constructor doesn't follow the contract?
--
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]