public class RecordConstants extends Object
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_FIELD_SEPARATOR |
static String |
DEFAULT_RECORD_SEPARATOR |
static String |
RECORD_SEPARATOR_ESCAPE_SEQ |
Constructor and Description |
---|
RecordConstants() |
Modifier and Type | Method and Description |
---|---|
static String |
escapeAllButLastRecordSeparator(String recordSeparator,
String record)
Insert the default chukwa escape sequence in
record before all
occurances of recordSeparator except the final one if
the final record separator occurs at the end of the record |
static String |
escapeAllRecordSeparators(String recordSeparator,
String record)
Insert the default chukwa escape sequence in
record before all
occurances of recordSeparator . |
static String |
recoverRecordSeparators(String recordSeparator,
String record) |
public static final String DEFAULT_FIELD_SEPARATOR
public static final String DEFAULT_RECORD_SEPARATOR
public static final String RECORD_SEPARATOR_ESCAPE_SEQ
public static String escapeAllButLastRecordSeparator(String recordSeparator, String record)
record
before all
occurances of recordSeparator
except the final one if
the final record separator occurs at the end of the record
recordSeparator
- The record separator that we are escaping. This is
chunk source application specificrecord
- The string representing the entire record, including the
final record delimiterrecordSeparator
s escapedpublic static String escapeAllRecordSeparators(String recordSeparator, String record)
record
before all
occurances of recordSeparator
. This is assuming that you are
not passing the final record separator in with the record
,
because it would be escaped too.recordSeparator
- The record separator that we are escaping. This is
chunk source application specificrecord
- The string representing the entire record, including the
final record delimiterrecordSeparator
s escapedCopyright © ${year} The Apache Software Foundation