public class BulkDataGeneratorTool extends Object
Modifier and Type | Field and Description |
---|---|
private boolean |
deleteTableIfExist
Flag to delete the table (before creating) if it already exists
|
private static org.slf4j.Logger |
logger |
private int |
mapperCount
Number of mapper container to be launched for generating of HFiles
|
private static String |
OUTPUT_DIRECTORY_PREFIX
Prefix for the generated HFiles directory
|
private long |
rowsPerMapper
Number of rows to be generated by each mapper
|
private int |
splitCount
Number of splits for the
table . |
private String |
table
Table for which random data needs to be generated
|
private Map<String,String> |
tableOptions
Additional HBase meta-data options to be set for the table
|
Constructor and Description |
---|
BulkDataGeneratorTool() |
Modifier and Type | Method and Description |
---|---|
protected org.apache.hadoop.mapreduce.Job |
createSubmittableJob(org.apache.hadoop.conf.Configuration conf) |
protected org.apache.hadoop.fs.Path |
generateOutputDirectory()
Returns Random output directory path where HFiles will be generated
|
protected org.apache.hbase.thirdparty.org.apache.commons.cli.Options |
getOptions()
Returns the command line option for
BulkDataGeneratorTool |
static void |
main(String[] args) |
private void |
parseTableOptions(org.apache.hbase.thirdparty.org.apache.commons.cli.CommandLine line) |
protected void |
printUsage() |
protected void |
readCommandLineParameters(org.apache.hadoop.conf.Configuration conf,
org.apache.hbase.thirdparty.org.apache.commons.cli.CommandLine line)
This method parses the command line parameters into instance variables
|
boolean |
run(org.apache.hadoop.conf.Configuration conf,
String[] args) |
private static final org.slf4j.Logger logger
private static final String OUTPUT_DIRECTORY_PREFIX
private int mapperCount
private long rowsPerMapper
private int splitCount
table
. Number of regions for the table will be
(splitCount
+ 1).private boolean deleteTableIfExist
private final Map<String,String> tableOptions
public BulkDataGeneratorTool()
public boolean run(org.apache.hadoop.conf.Configuration conf, String[] args) throws IOException
IOException
protected org.apache.hadoop.mapreduce.Job createSubmittableJob(org.apache.hadoop.conf.Configuration conf) throws IOException
IOException
protected org.apache.hadoop.fs.Path generateOutputDirectory()
protected void readCommandLineParameters(org.apache.hadoop.conf.Configuration conf, org.apache.hbase.thirdparty.org.apache.commons.cli.CommandLine line) throws org.apache.hbase.thirdparty.org.apache.commons.cli.ParseException, IOException
org.apache.hbase.thirdparty.org.apache.commons.cli.ParseException
IOException
private void parseTableOptions(org.apache.hbase.thirdparty.org.apache.commons.cli.CommandLine line)
protected org.apache.hbase.thirdparty.org.apache.commons.cli.Options getOptions()
BulkDataGeneratorTool
protected void printUsage()
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.