public class HadoopOutputFile extends java.lang.Object implements OutputFile
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 |
fromPath(org.apache.hadoop.fs.Path path,
org.apache.hadoop.conf.Configuration conf) |
org.apache.hadoop.conf.Configuration |
getConf() |
org.apache.hadoop.fs.Path |
getPath() |
java.lang.String |
location()
Return the location this output file will create.
|
InputFile |
toInputFile()
Return an
InputFile for the location of this output file. |
java.lang.String |
toString() |
public static OutputFile fromPath(org.apache.hadoop.fs.Path path, 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 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.Object