Class DelimitedRecordFormat
java.lang.Object
org.apache.storm.hdfs.bolt.format.DelimitedRecordFormat
- All Implemented Interfaces:
Serializable
,RecordFormat
RecordFormat implementation that uses field and record delimiters.
By default uses a comma (",") as the field delimiter and a
newline ("\n") as the record delimiter.
Also by default, this implementation will output all the
field values in the tuple in the order they were declared. To
override this behavior, call withFields()
to
specify which tuple fields to output.
- See Also:
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbyte[]
withFieldDelimiter
(String delimiter) Overrides the default field delimiter.withFields
(Fields fields) Only output the specified fields.withRecordDelimiter
(String delimiter) Overrides the default record delimiter.
-
Field Details
-
DEFAULT_FIELD_DELIMITER
- See Also:
-
DEFAULT_RECORD_DELIMITER
- See Also:
-
-
Constructor Details
-
DelimitedRecordFormat
public DelimitedRecordFormat()
-
-
Method Details
-
withFields
Only output the specified fields. -
withFieldDelimiter
Overrides the default field delimiter. -
withRecordDelimiter
Overrides the default record delimiter. -
format
- Specified by:
format
in interfaceRecordFormat
-