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()
OutputFile
PositionOutputStream
to it.
If the file already exists, this will throw an exception.
create
in interface OutputFile
public PositionOutputStream createOrOverwrite()
OutputFile
PositionOutputStream
to it.
If the file already exists, this will not throw an exception and will replace the file.
createOrOverwrite
in interface OutputFile
public org.apache.hadoop.fs.Path getPath()
public org.apache.hadoop.conf.Configuration getConf()
public java.lang.String location()
OutputFile
location
in interface OutputFile
public InputFile toInputFile()
OutputFile
InputFile
for the location of this output file.toInputFile
in interface OutputFile
public java.lang.String toString()
toString
in class java.lang.Object