org.apache.hadoop.hbase.mapreduce
Class ImportTsv

java.lang.Object
  extended by org.apache.hadoop.conf.Configured
      extended by org.apache.hadoop.hbase.mapreduce.ImportTsv
All Implemented Interfaces:
org.apache.hadoop.conf.Configurable, org.apache.hadoop.util.Tool

@InterfaceAudience.Public
@InterfaceStability.Stable
public class ImportTsv
extends org.apache.hadoop.conf.Configured
implements org.apache.hadoop.util.Tool

Tool to import data from a TSV file. This tool is rather simplistic - it doesn't do any quoting or escaping, but is useful for many data loads.

See Also:
usage(String)

Field Summary
static String ATTRIBUTE_SEPERATOR_CONF_KEY
           
static String BULK_OUTPUT_CONF_KEY
           
static String COLUMNS_CONF_KEY
           
static String CREATE_TABLE_CONF_KEY
           
static String CREDENTIALS_LOCATION
           
static String JOB_NAME_CONF_KEY
           
protected static org.apache.commons.logging.Log LOG
           
static String MAPPER_CONF_KEY
           
static String SEPARATOR_CONF_KEY
           
static String SKIP_LINES_CONF_KEY
           
static String TIMESTAMP_CONF_KEY
           
 
Constructor Summary
ImportTsv()
           
 
Method Summary
static org.apache.hadoop.mapreduce.Job createSubmittableJob(org.apache.hadoop.conf.Configuration conf, String[] args)
          Sets up the actual job.
static void main(String[] args)
           
 int run(String[] args)
           
 
Methods inherited from class org.apache.hadoop.conf.Configured
getConf, setConf
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.hadoop.conf.Configurable
getConf, setConf
 

Field Detail

LOG

protected static final org.apache.commons.logging.Log LOG

MAPPER_CONF_KEY

public static final String MAPPER_CONF_KEY
See Also:
Constant Field Values

BULK_OUTPUT_CONF_KEY

public static final String BULK_OUTPUT_CONF_KEY
See Also:
Constant Field Values

TIMESTAMP_CONF_KEY

public static final String TIMESTAMP_CONF_KEY
See Also:
Constant Field Values

JOB_NAME_CONF_KEY

public static final String JOB_NAME_CONF_KEY
See Also:
Constant Field Values

CREDENTIALS_LOCATION

public static final String CREDENTIALS_LOCATION
See Also:
Constant Field Values

SKIP_LINES_CONF_KEY

public static final String SKIP_LINES_CONF_KEY
See Also:
Constant Field Values

COLUMNS_CONF_KEY

public static final String COLUMNS_CONF_KEY
See Also:
Constant Field Values

SEPARATOR_CONF_KEY

public static final String SEPARATOR_CONF_KEY
See Also:
Constant Field Values

ATTRIBUTE_SEPERATOR_CONF_KEY

public static final String ATTRIBUTE_SEPERATOR_CONF_KEY
See Also:
Constant Field Values

CREATE_TABLE_CONF_KEY

public static final String CREATE_TABLE_CONF_KEY
See Also:
Constant Field Values
Constructor Detail

ImportTsv

public ImportTsv()
Method Detail

createSubmittableJob

public static org.apache.hadoop.mapreduce.Job createSubmittableJob(org.apache.hadoop.conf.Configuration conf,
                                                                   String[] args)
                                                            throws IOException,
                                                                   ClassNotFoundException
Sets up the actual job.

Parameters:
conf - The current configuration.
args - The command line parameters.
Returns:
The newly created job.
Throws:
IOException - When setting up the job fails.
ClassNotFoundException

run

public int run(String[] args)
        throws Exception
Specified by:
run in interface org.apache.hadoop.util.Tool
Throws:
Exception

main

public static void main(String[] args)
                 throws Exception
Throws:
Exception


Copyright © 2007–2016 The Apache Software Foundation. All rights reserved.