public class DelimitedRecordFormat extends Object implements 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.
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_FIELD_DELIMITER |
static String |
DEFAULT_RECORD_DELIMITER |
Constructor and Description |
---|
DelimitedRecordFormat() |
Modifier and Type | Method and Description |
---|---|
byte[] |
format(TridentTuple tuple) |
DelimitedRecordFormat |
withFieldDelimiter(String delimiter)
Overrides the default field delimiter.
|
DelimitedRecordFormat |
withFields(Fields fields)
Only output the specified fields.
|
DelimitedRecordFormat |
withRecordDelimiter(String delimiter)
Overrides the default record delimiter.
|
public static final String DEFAULT_FIELD_DELIMITER
public static final String DEFAULT_RECORD_DELIMITER
public DelimitedRecordFormat withFields(Fields fields)
Only output the specified fields.
public DelimitedRecordFormat withFieldDelimiter(String delimiter)
Overrides the default field delimiter.
public DelimitedRecordFormat withRecordDelimiter(String delimiter)
Overrides the default record delimiter.
public byte[] format(TridentTuple tuple)
format
in interface RecordFormat
Copyright © 2022 The Apache Software Foundation. All rights reserved.