Package org.apache.iceberg.azure.adlsv2
Class ADLSFileIO
java.lang.Object
org.apache.iceberg.azure.adlsv2.ADLSFileIO
- All Implemented Interfaces:
Closeable,Serializable,AutoCloseable,org.apache.iceberg.io.DelegateFileIO,org.apache.iceberg.io.FileIO,org.apache.iceberg.io.SupportsBulkOperations,org.apache.iceberg.io.SupportsPrefixOperations
FileIO implementation backed by Azure Data Lake Storage Gen2.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionNo-arg constructor to load the FileIO dynamically.ADLSFileIO(org.apache.iceberg.util.SerializableFunction<org.apache.iceberg.azure.adlsv2.ADLSLocation, com.azure.storage.file.datalake.DataLakeFileSystemClient> clientSupplier) Constructor with custom DataLakeFileSystemClient function. -
Method Summary
Modifier and TypeMethodDescriptioncom.azure.storage.file.datalake.DataLakeFileSystemClientvoidclose()voiddeleteFile(String path) voiddeleteFiles(Iterable<String> pathsToDelete) voiddeletePrefix(String prefix) voidinitialize(Map<String, String> props) Iterable<org.apache.iceberg.io.FileInfo>listPrefix(String prefix) org.apache.iceberg.io.InputFilenewInputFile(String path) org.apache.iceberg.io.InputFilenewInputFile(String path, long length) org.apache.iceberg.io.OutputFilenewOutputFile(String path) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.iceberg.io.FileIO
deleteFile, deleteFile, newInputFile, newInputFile, newInputFile, newInputFile
-
Constructor Details
-
ADLSFileIO
public ADLSFileIO()No-arg constructor to load the FileIO dynamically.All fields are initialized by calling
initialize(Map)later. -
ADLSFileIO
public ADLSFileIO(org.apache.iceberg.util.SerializableFunction<org.apache.iceberg.azure.adlsv2.ADLSLocation, com.azure.storage.file.datalake.DataLakeFileSystemClient> clientSupplier) Constructor with custom DataLakeFileSystemClient function.Unlike the no-arg constructor, this constructor initializes properties and azureProperties immediately, allowing immediate use without calling
initialize(Map).The function receives an
ADLSLocationand should return an appropriateDataLakeFileSystemClientfor that location. Clients are cached per storage account and container combination.- Parameters:
clientSupplier- function that creates a client for a given location
-
-
Method Details
-
newInputFile
- Specified by:
newInputFilein interfaceorg.apache.iceberg.io.FileIO
-
newInputFile
- Specified by:
newInputFilein interfaceorg.apache.iceberg.io.FileIO
-
newOutputFile
- Specified by:
newOutputFilein interfaceorg.apache.iceberg.io.FileIO
-
deleteFile
- Specified by:
deleteFilein interfaceorg.apache.iceberg.io.FileIO
-
properties
- Specified by:
propertiesin interfaceorg.apache.iceberg.io.FileIO
-
client
-
initialize
- Specified by:
initializein interfaceorg.apache.iceberg.io.FileIO
-
deleteFiles
public void deleteFiles(Iterable<String> pathsToDelete) throws org.apache.iceberg.io.BulkDeletionFailureException - Specified by:
deleteFilesin interfaceorg.apache.iceberg.io.SupportsBulkOperations- Throws:
org.apache.iceberg.io.BulkDeletionFailureException
-
listPrefix
- Specified by:
listPrefixin interfaceorg.apache.iceberg.io.SupportsPrefixOperations
-
deletePrefix
- Specified by:
deletePrefixin interfaceorg.apache.iceberg.io.SupportsPrefixOperations
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceorg.apache.iceberg.io.FileIO
-