Class ImportTsv.TsvParser
java.lang.Object
org.apache.hadoop.hbase.mapreduce.ImportTsv.TsvParser
- Enclosing class:
- ImportTsv
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
(package private) class
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
private int
static final String
static final String
private int
private int
static final int
static final int
static final int
static final int
private final byte[][]
Column families and qualifiers mapped to the TSV columnsprivate int
private final byte[][]
static final String
private int
private final byte
static final String
private int
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
int
int
byte[]
getFamily
(int idx) byte[]
getQualifier
(int idx) int
int
boolean
boolean
boolean
boolean
parse
(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
-