|
Spring for Apache Hadoop | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.data.hadoop.store.output.DelimitedTextFileWriter
public class DelimitedTextFileWriter
A DelimitedTextFileWriter
is a DataStoreWriter
implementation
able to write String
s into raw hdfs files as delimited fields.
Field Summary | |
---|---|
static byte[] |
CSV
CSV Mode |
static byte[] |
TAB
TAB Mode |
Constructor Summary | |
---|---|
DelimitedTextFileWriter(org.apache.hadoop.conf.Configuration configuration,
org.apache.hadoop.fs.Path basePath,
CodecInfo codec)
Instantiates a new delimited text file writer. |
|
DelimitedTextFileWriter(org.apache.hadoop.conf.Configuration configuration,
org.apache.hadoop.fs.Path basePath,
CodecInfo codec,
byte[] fieldDelimiter)
Instantiates a new delimited text file writer. |
|
DelimitedTextFileWriter(org.apache.hadoop.conf.Configuration configuration,
org.apache.hadoop.fs.Path basePath,
CodecInfo codec,
byte[] fieldDelimiter,
byte[] textDelimiter)
Instantiates a new delimited text file writer. |
Method Summary | |
---|---|
void |
close()
|
void |
flush()
|
void |
write(java.util.List<java.lang.String> entity)
Write an entity. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final byte[] CSV
public static final byte[] TAB
Constructor Detail |
---|
public DelimitedTextFileWriter(org.apache.hadoop.conf.Configuration configuration, org.apache.hadoop.fs.Path basePath, CodecInfo codec)
configuration
- the configurationbasePath
- the base pathcodec
- the codecpublic DelimitedTextFileWriter(org.apache.hadoop.conf.Configuration configuration, org.apache.hadoop.fs.Path basePath, CodecInfo codec, byte[] fieldDelimiter)
configuration
- the configurationbasePath
- the base pathcodec
- the codecfieldDelimiter
- the field delimiterpublic DelimitedTextFileWriter(org.apache.hadoop.conf.Configuration configuration, org.apache.hadoop.fs.Path basePath, CodecInfo codec, byte[] fieldDelimiter, byte[] textDelimiter)
configuration
- the configurationbasePath
- the base pathcodec
- the codecfieldDelimiter
- the field delimitertextDelimiter
- the text delimiterMethod Detail |
---|
public void write(java.util.List<java.lang.String> entity) throws java.io.IOException
DataWriter
write
in interface DataWriter<java.util.List<java.lang.String>>
java.io.IOException
- if an I/O error occurspublic void flush() throws java.io.IOException
flush
in interface java.io.Flushable
java.io.IOException
public void close() throws java.io.IOException
close
in interface java.io.Closeable
java.io.IOException
|
Spring for Apache Hadoop | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |