public class ResolvingFileIO extends java.lang.Object implements FileIO, HadoopConfigurable
| Constructor and Description |
|---|
ResolvingFileIO()
No-arg constructor to load the FileIO dynamically.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close File IO to release underlying resources.
|
void |
deleteFile(java.lang.String location)
Delete the file at the given path.
|
org.apache.hadoop.conf.Configuration |
getConf() |
void |
initialize(java.util.Map<java.lang.String,java.lang.String> newProperties)
Initialize File IO from catalog properties.
|
InputFile |
newInputFile(java.lang.String location)
Get a
InputFile instance to read bytes from the file at the given path. |
OutputFile |
newOutputFile(java.lang.String location)
Get a
OutputFile instance to write bytes to the file at the given path. |
void |
serializeConfWith(java.util.function.Function<org.apache.hadoop.conf.Configuration,SerializableSupplier<org.apache.hadoop.conf.Configuration>> confSerializer)
Take a function that serializes Hadoop configuration into a supplier.
|
void |
setConf(org.apache.hadoop.conf.Configuration conf) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdeleteFile, deleteFilepublic ResolvingFileIO()
All fields are initialized by calling initialize(Map) later.
public InputFile newInputFile(java.lang.String location)
FileIOInputFile instance to read bytes from the file at the given path.newInputFile in interface FileIOpublic OutputFile newOutputFile(java.lang.String location)
FileIOOutputFile instance to write bytes to the file at the given path.newOutputFile in interface FileIOpublic void deleteFile(java.lang.String location)
FileIOdeleteFile in interface FileIOpublic void initialize(java.util.Map<java.lang.String,java.lang.String> newProperties)
FileIOinitialize in interface FileIOnewProperties - catalog propertiespublic void close()
FileIOCalling this method is only required when this FileIO instance is no longer expected to be used, and the resources it holds need to be explicitly released to avoid resource leaks.
public void serializeConfWith(java.util.function.Function<org.apache.hadoop.conf.Configuration,SerializableSupplier<org.apache.hadoop.conf.Configuration>> confSerializer)
HadoopConfigurableserializeConfWith in interface HadoopConfigurableconfSerializer - A function that takes Hadoop configuration and returns a serializable supplier of it.public void setConf(org.apache.hadoop.conf.Configuration conf)
setConf in interface org.apache.hadoop.conf.Configurablepublic org.apache.hadoop.conf.Configuration getConf()
getConf in interface org.apache.hadoop.conf.Configurable