org.apache.hadoop.hbase.mapreduce
Class ImportTsv.TsvParser
java.lang.Object
org.apache.hadoop.hbase.mapreduce.ImportTsv.TsvParser
- Enclosing class:
- ImportTsv
public static class ImportTsv.TsvParser
- extends Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEFAULT_TIMESTAMP_COLUMN_INDEX
public static final int DEFAULT_TIMESTAMP_COLUMN_INDEX
- See Also:
- Constant Field Values
ROWKEY_COLUMN_SPEC
public static final String ROWKEY_COLUMN_SPEC
- See Also:
- Constant Field Values
TIMESTAMPKEY_COLUMN_SPEC
public static final String TIMESTAMPKEY_COLUMN_SPEC
- See Also:
- Constant Field Values
ATTRIBUTES_COLUMN_SPEC
public static final String ATTRIBUTES_COLUMN_SPEC
- See Also:
- Constant Field Values
CELL_VISIBILITY_COLUMN_SPEC
@InterfaceStability.Unstable
public static final String CELL_VISIBILITY_COLUMN_SPEC
- See Also:
- Constant Field Values
CELL_TTL_COLUMN_SPEC
@InterfaceStability.Unstable
public static final String CELL_TTL_COLUMN_SPEC
- See Also:
- Constant Field Values
DEFAULT_ATTRIBUTES_COLUMN_INDEX
public static final int DEFAULT_ATTRIBUTES_COLUMN_INDEX
- See Also:
- Constant Field Values
DEFAULT_CELL_VISIBILITY_COLUMN_INDEX
@InterfaceStability.Unstable
public static final int DEFAULT_CELL_VISIBILITY_COLUMN_INDEX
- See Also:
- Constant Field Values
DEFAULT_CELL_TTL_COLUMN_INDEX
@InterfaceStability.Unstable
public static final int DEFAULT_CELL_TTL_COLUMN_INDEX
- See Also:
- Constant Field Values
ImportTsv.TsvParser
public ImportTsv.TsvParser(String columnsSpecification,
String separatorStr)
- Parameters:
columnsSpecification
- the list of columns to parser out, comma separated.
The row key should be the special token TsvParser.ROWKEY_COLUMN_SPECseparatorStr
-
hasTimestamp
public boolean hasTimestamp()
getTimestampKeyColumnIndex
public int getTimestampKeyColumnIndex()
hasAttributes
public boolean hasAttributes()
hasCellVisibility
@InterfaceStability.Unstable
public boolean hasCellVisibility()
hasCellTTL
@InterfaceStability.Unstable
public boolean hasCellTTL()
getAttributesKeyColumnIndex
public int getAttributesKeyColumnIndex()
getCellVisibilityColumnIndex
@InterfaceStability.Unstable
public int getCellVisibilityColumnIndex()
getCellTTLColumnIndex
@InterfaceStability.Unstable
public int getCellTTLColumnIndex()
getRowKeyColumnIndex
public int getRowKeyColumnIndex()
getFamily
public byte[] getFamily(int idx)
getQualifier
public byte[] getQualifier(int idx)
parse
public org.apache.hadoop.hbase.mapreduce.ImportTsv.TsvParser.ParsedLine parse(byte[] lineBytes,
int length)
throws ImportTsv.TsvParser.BadTsvLineException
- 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.
- Parameters:
lineBytes
- length
-
- Returns:
- Pair of row key offset and length.
- Throws:
ImportTsv.TsvParser.BadTsvLineException
Copyright © 2015 The Apache Software Foundation. All rights reserved.