org.apache.hadoop.hbase.mapreduce
Class ImportTsv.TsvParser

java.lang.Object
  extended by org.apache.hadoop.hbase.mapreduce.ImportTsv.TsvParser
Enclosing class:
ImportTsv

public static class ImportTsv.TsvParser
extends Object


Nested Class Summary
static class ImportTsv.TsvParser.BadTsvLineException
           
 
Field Summary
static int DEFAULT_TIMESTAMP_COLUMN_INDEX
           
static String ROWKEY_COLUMN_SPEC
           
static String TIMESTAMPKEY_COLUMN_SPEC
           
 
Constructor Summary
ImportTsv.TsvParser(String columnsSpecification, String separatorStr)
           
 
Method Summary
 byte[] getFamily(int idx)
           
 byte[] getQualifier(int idx)
           
 int getRowKeyColumnIndex()
           
 int getTimestampKeyColumnIndex()
           
 boolean hasTimestamp()
           
 org.apache.hadoop.hbase.mapreduce.ImportTsv.TsvParser.ParsedLine parse(byte[] lineBytes, int length)
           
 Pair<Integer,Integer> parseRowKey(byte[] lineBytes, int length)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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
Constructor Detail

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_SPEC
Method Detail

hasTimestamp

public boolean hasTimestamp()

getTimestampKeyColumnIndex

public int getTimestampKeyColumnIndex()

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
Throws:
ImportTsv.TsvParser.BadTsvLineException


Copyright © 2013 The Apache Software Foundation. All Rights Reserved.