org.apache.hadoop.chukwa.util
Class RecordConstants
java.lang.Object
org.apache.hadoop.chukwa.util.RecordConstants
public class RecordConstants
- extends Object
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEFAULT_FIELD_SEPARATOR
public static final String DEFAULT_FIELD_SEPARATOR
- See Also:
- Constant Field Values
DEFAULT_RECORD_SEPARATOR
public static final String DEFAULT_RECORD_SEPARATOR
- See Also:
- Constant Field Values
RECORD_SEPARATOR_ESCAPE_SEQ
public static final String RECORD_SEPARATOR_ESCAPE_SEQ
RecordConstants
public RecordConstants()
escapeAllButLastRecordSeparator
public 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
- Parameters:
recordSeparator - The record separator that we are escaping. This is
chunk source application specificrecord - The string representing the entire record, including the
final record delimiter
- Returns:
- The string with appropriate
recordSeparators escaped
escapeAllRecordSeparators
public static String escapeAllRecordSeparators(String recordSeparator,
String record)
- Insert the default chukwa escape sequence in
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.
- Parameters:
recordSeparator - The record separator that we are escaping. This is
chunk source application specificrecord - The string representing the entire record, including the
final record delimiter
- Returns:
- The string with all
recordSeparators escaped
recoverRecordSeparators
public static String recoverRecordSeparators(String recordSeparator,
String record)
Copyright © ${year} The Apache Software Foundation