public abstract class AbstractBulkLoadTool
extends org.apache.hadoop.conf.Configured
implements org.apache.hadoop.util.Tool
Modifier and Type | Field and Description |
---|---|
protected static org.slf4j.Logger |
LOG |
Constructor and Description |
---|
AbstractBulkLoadTool() |
Modifier and Type | Method and Description |
---|---|
protected abstract void |
configureOptions(org.apache.commons.cli.CommandLine cmdLine,
List<ColumnInfo> importColumns,
org.apache.hadoop.conf.Configuration conf)
Set configuration values based on parsed command line options.
|
protected org.apache.commons.cli.Options |
getOptions() |
protected org.apache.commons.cli.CommandLine |
parseOptions(String[] args)
Parses the commandline arguments, throws IllegalStateException if mandatory arguments are
missing.
|
int |
run(String[] args) |
protected abstract void |
setupJob(org.apache.hadoop.mapreduce.Job job) |
int |
submitJob(org.apache.hadoop.conf.Configuration conf,
String qualifiedTableName,
String inputPaths,
org.apache.hadoop.fs.Path outputPath,
List<TargetTableRef> tablesToBeLoaded,
boolean hasLocalIndexes)
Submits the jobs to the cluster.
|
protected abstract void configureOptions(org.apache.commons.cli.CommandLine cmdLine, List<ColumnInfo> importColumns, org.apache.hadoop.conf.Configuration conf) throws SQLException
cmdLine
- supplied command line optionsimportColumns
- descriptors of columns to be importedconf
- job configurationSQLException
protected abstract void setupJob(org.apache.hadoop.mapreduce.Job job)
protected org.apache.commons.cli.Options getOptions()
protected org.apache.commons.cli.CommandLine parseOptions(String[] args)
args
- supplied command line argumentspublic int run(String[] args) throws Exception
run
in interface org.apache.hadoop.util.Tool
Exception
public int submitJob(org.apache.hadoop.conf.Configuration conf, String qualifiedTableName, String inputPaths, org.apache.hadoop.fs.Path outputPath, List<TargetTableRef> tablesToBeLoaded, boolean hasLocalIndexes) throws Exception
Exception
Copyright © 2018 Apache Software Foundation. All Rights Reserved.