public class HadoopOutputFile extends java.lang.Object implements OutputFile, NativelyEncryptedFile
OutputFile implementation using the Hadoop FileSystem API.| Modifier and Type | Method and Description |
|---|---|
PositionOutputStream |
create()
Create a new file and return a
PositionOutputStream to it. |
PositionOutputStream |
createOrOverwrite()
Create a new file and return a
PositionOutputStream to it. |
static OutputFile |
fromLocation(java.lang.CharSequence location,
org.apache.hadoop.conf.Configuration conf) |
static OutputFile |
fromLocation(java.lang.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 |
getFileSystem() |
org.apache.hadoop.fs.Path |
getPath() |
java.lang.String |
location()
Return the location this output file will create.
|
NativeFileCryptoParameters |
nativeCryptoParameters() |
void |
setNativeCryptoParameters(NativeFileCryptoParameters nativeCryptoParameters) |
InputFile |
toInputFile()
Return an
InputFile for the location of this output file. |
java.lang.String |
toString() |
public static OutputFile fromLocation(java.lang.CharSequence location, org.apache.hadoop.conf.Configuration conf)
public static OutputFile fromLocation(java.lang.CharSequence location, org.apache.hadoop.fs.FileSystem fs)
public static OutputFile fromPath(org.apache.hadoop.fs.Path path, org.apache.hadoop.conf.Configuration conf)
public static OutputFile fromPath(org.apache.hadoop.fs.Path path, org.apache.hadoop.fs.FileSystem fs)
public static OutputFile fromPath(org.apache.hadoop.fs.Path path, org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.conf.Configuration conf)
public PositionOutputStream create()
OutputFilePositionOutputStream to it.
If the file already exists, this will throw an exception.
create in interface OutputFilepublic PositionOutputStream createOrOverwrite()
OutputFilePositionOutputStream to it.
If the file already exists, this will not throw an exception and will replace the file.
createOrOverwrite in interface OutputFilepublic org.apache.hadoop.fs.Path getPath()
public org.apache.hadoop.conf.Configuration getConf()
public org.apache.hadoop.fs.FileSystem getFileSystem()
public java.lang.String location()
OutputFilelocation in interface OutputFilepublic InputFile toInputFile()
OutputFileInputFile for the location of this output file.toInputFile in interface OutputFilepublic java.lang.String toString()
toString in class java.lang.Objectpublic NativeFileCryptoParameters nativeCryptoParameters()
nativeCryptoParameters in interface NativelyEncryptedFilepublic void setNativeCryptoParameters(NativeFileCryptoParameters nativeCryptoParameters)
setNativeCryptoParameters in interface NativelyEncryptedFile