Class DelimitedRecordFormat
java.lang.Object
org.apache.storm.hdfs.trident.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.
- See Also:
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbyte[]
format
(TridentTuple tuple) 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
-