Class ImportTsv.TsvParser
java.lang.Object
org.apache.hadoop.hbase.mapreduce.ImportTsv.TsvParser
- Enclosing class:
- ImportTsv
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class(package private) class -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringprivate intstatic final Stringstatic final Stringprivate intprivate intstatic final intstatic final intstatic final intstatic final intprivate final byte[][]Column families and qualifiers mapped to the TSV columnsprivate intprivate final byte[][]static final Stringprivate intprivate final bytestatic final Stringprivate int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintintintbyte[]getFamily(int idx) byte[]getQualifier(int idx) intintbooleanbooleanbooleanbooleanparse(byte[] lineBytes, int length) parseRowKey(byte[] lineBytes, int length) Return starting position and length of row key from the specified line bytes.
-
Field Details
-
families
Column families and qualifiers mapped to the TSV columns -
qualifiers
-
separatorByte
-
rowKeyColumnIndex
-
maxColumnCount
-
DEFAULT_TIMESTAMP_COLUMN_INDEX
- See Also:
-
timestampKeyColumnIndex
-
ROWKEY_COLUMN_SPEC
- See Also:
-
TIMESTAMPKEY_COLUMN_SPEC
- See Also:
-
ATTRIBUTES_COLUMN_SPEC
- See Also:
-
CELL_VISIBILITY_COLUMN_SPEC
- See Also:
-
CELL_TTL_COLUMN_SPEC
- See Also:
-
attrKeyColumnIndex
-
DEFAULT_ATTRIBUTES_COLUMN_INDEX
- See Also:
-
DEFAULT_CELL_VISIBILITY_COLUMN_INDEX
- See Also:
-
DEFAULT_CELL_TTL_COLUMN_INDEX
- See Also:
-
cellVisibilityColumnIndex
-
cellTTLColumnIndex
-
-
Constructor Details
-
TsvParser
- Parameters:
columnsSpecification- the list of columns to parser out, comma separated. The row key should be the special token TsvParser.ROWKEY_COLUMN_SPEC
-
-
Method Details
-
hasTimestamp
-
getTimestampKeyColumnIndex
-
hasAttributes
-
hasCellVisibility
-
hasCellTTL
-
getAttributesKeyColumnIndex
-
getCellVisibilityColumnIndex
-
getCellTTLColumnIndex
-
getRowKeyColumnIndex
-
getFamily
-
getQualifier
-
parse
public ImportTsv.TsvParser.ParsedLine parse(byte[] lineBytes, int length) throws ImportTsv.TsvParser.BadTsvLineException -
parseRowKey
public Pair<Integer,Integer> parseRowKey(byte[] lineBytes, int length) throws ImportTsv.TsvParser.BadTsvLineException Return starting position and length of row key from the specified line bytes.- Returns:
- Pair of row key offset and length.
- Throws:
ImportTsv.TsvParser.BadTsvLineException
-