Package org.apache.iceberg.hadoop
Class HadoopOutputFile
java.lang.Object
org.apache.iceberg.hadoop.HadoopOutputFile
- All Implemented Interfaces:
NativelyEncryptedFile
,OutputFile
OutputFile
implementation using the Hadoop FileSystem
API.-
Method Summary
Modifier and TypeMethodDescriptioncreate()
Create a new file and return aPositionOutputStream
to it.Create a new file and return aPositionOutputStream
to it.static OutputFile
fromLocation
(CharSequence location, org.apache.hadoop.conf.Configuration conf) static OutputFile
fromLocation
(CharSequence location, org.apache.hadoop.fs.FileSystem fs) static OutputFile
fromPath
(org.apache.hadoop.fs.Path path, org.apache.hadoop.conf.Configuration conf) static OutputFile
fromPath
(org.apache.hadoop.fs.Path path, org.apache.hadoop.fs.FileSystem fs) static OutputFile
fromPath
(org.apache.hadoop.fs.Path path, org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.conf.Configuration conf) org.apache.hadoop.conf.Configuration
getConf()
org.apache.hadoop.fs.FileSystem
org.apache.hadoop.fs.Path
getPath()
location()
Return the location this output file will create.void
setNativeCryptoParameters
(NativeFileCryptoParameters nativeCryptoParameters) Return anInputFile
for the location of this output file.toString()
-
Method Details
-
fromLocation
public static OutputFile fromLocation(CharSequence location, org.apache.hadoop.conf.Configuration conf) -
fromLocation
-
fromPath
public static OutputFile fromPath(org.apache.hadoop.fs.Path path, org.apache.hadoop.conf.Configuration conf) -
fromPath
public static OutputFile fromPath(org.apache.hadoop.fs.Path path, org.apache.hadoop.fs.FileSystem fs) -
fromPath
public static OutputFile fromPath(org.apache.hadoop.fs.Path path, org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.conf.Configuration conf) -
create
Description copied from interface:OutputFile
Create a new file and return aPositionOutputStream
to it.If the file already exists, this will throw an exception.
- Specified by:
create
in interfaceOutputFile
- Returns:
- an output stream that can report its position
-
createOrOverwrite
Description copied from interface:OutputFile
Create a new file and return aPositionOutputStream
to it.If the file already exists, this will not throw an exception and will replace the file.
- Specified by:
createOrOverwrite
in interfaceOutputFile
- Returns:
- an output stream that can report its position
-
getPath
public org.apache.hadoop.fs.Path getPath() -
getConf
public org.apache.hadoop.conf.Configuration getConf() -
getFileSystem
public org.apache.hadoop.fs.FileSystem getFileSystem() -
location
Description copied from interface:OutputFile
Return the location this output file will create.- Specified by:
location
in interfaceOutputFile
- Returns:
- the location of this output file
-
toInputFile
Description copied from interface:OutputFile
Return anInputFile
for the location of this output file.- Specified by:
toInputFile
in interfaceOutputFile
- Returns:
- an input file for the location of this output file
-
toString
-
nativeCryptoParameters
- Specified by:
nativeCryptoParameters
in interfaceNativelyEncryptedFile
-
setNativeCryptoParameters
- Specified by:
setNativeCryptoParameters
in interfaceNativelyEncryptedFile
-