@InterfaceAudience.LimitedPrivate(value="Tools") public class LoadTestTool extends AbstractHBaseTool
PerformanceEvaluation
, this tool validates the data written,
and supports simultaneously writing and reading the same set of keys.cmdLineArgs, conf, EXIT_FAILURE, EXIT_SUCCESS
Constructor and Description |
---|
LoadTestTool() |
Modifier and Type | Method and Description |
---|---|
protected void |
addOptions()
Override this to add command-line options using
AbstractHBaseTool.addOptWithArg(java.lang.String, java.lang.String)
and similar methods. |
protected void |
applyColumnFamilyOptions(TableName tableName,
byte[][] columnFamilies)
Apply column family options such as Bloom filters, compression, and data
block encoding.
|
protected int |
doWork()
The "main function" of the tool
|
static byte[] |
generateData(Random r,
int length) |
byte[][] |
getColumnFamilies() |
protected int |
getNumThreads(String numThreadsStr) |
void |
initTestTable() |
protected int |
loadTable() |
static UserGroupInformation |
loginAndReturnUGI(Configuration conf,
String username) |
static void |
main(String[] args) |
protected void |
processOptions(CommandLine cmd)
This method is called to process the options after they have been parsed.
|
protected String[] |
splitColonSeparated(String option,
int minNumCols,
int maxNumCols) |
addOptNoArg, addOptNoArg, addOptWithArg, addOptWithArg, addRequiredOptWithArg, addRequiredOptWithArg, doStaticMain, getConf, parseArgs, parseInt, parseLong, printUsage, printUsage, run, setConf
protected static final String DEFAULT_TABLE_NAME
public static byte[] DEFAULT_COLUMN_FAMILY
public static final byte[][] DEFAULT_COLUMN_FAMILIES
protected static final int DEFAULT_DATA_SIZE
protected static final int DEFAULT_NUM_THREADS
protected static final String OPT_USAGE_LOAD
protected static final String OPT_USAGE_READ
protected static final String OPT_USAGE_UPDATE
protected static final String OPT_USAGE_BLOOM
protected static final String OPT_USAGE_COMPRESSION
public static final String OPT_DATA_BLOCK_ENCODING_USAGE
public static final String OPT_BLOOM
public static final String OPT_COMPRESSION
public static final String OPT_DEFERRED_LOG_FLUSH
public static final String OPT_DEFERRED_LOG_FLUSH_USAGE
public static final String OPT_DATA_BLOCK_ENCODING
public static final String OPT_INMEMORY
public static final String OPT_USAGE_IN_MEMORY
public static final String OPT_GENERATOR
public static final String OPT_GENERATOR_USAGE
public static final String OPT_WRITER
public static final String OPT_WRITER_USAGE
public static final String OPT_UPDATER
public static final String OPT_UPDATER_USAGE
public static final String OPT_READER
public static final String OPT_READER_USAGE
protected static final String OPT_KEY_WINDOW
protected static final String OPT_WRITE
protected static final String OPT_MAX_READ_ERRORS
public static final String OPT_MULTIPUT
public static final String OPT_MULTIGET
protected static final String OPT_NUM_KEYS
protected static final String OPT_READ
protected static final String OPT_START_KEY
public static final String OPT_TABLE_NAME
public static final String OPT_COLUMN_FAMILIES
protected static final String OPT_ZK_QUORUM
protected static final String OPT_ZK_PARENT_NODE
protected static final String OPT_SKIP_INIT
protected static final String OPT_INIT_ONLY
protected static final String NUM_TABLES
protected static final String OPT_REGIONS_PER_SERVER
protected static final String OPT_BATCHUPDATE
protected static final String OPT_UPDATE
public static final String OPT_ENCRYPTION
protected static final String OPT_ENCRYPTION_USAGE
public static final String OPT_NUM_REGIONS_PER_SERVER
protected static final String OPT_NUM_REGIONS_PER_SERVER_USAGE
public static int DEFAULT_NUM_REGIONS_PER_SERVER
public static final String OPT_REGION_REPLICATION
protected static final String OPT_REGION_REPLICATION_USAGE
public static final String OPT_REGION_REPLICA_ID
protected static final String OPT_REGION_REPLICA_ID_USAGE
protected static final long DEFAULT_START_KEY
protected CommandLine cmd
protected MultiThreadedWriter writerThreads
protected MultiThreadedReader readerThreads
protected MultiThreadedUpdater updaterThreads
protected long startKey
protected long endKey
protected boolean isWrite
protected boolean isRead
protected boolean isUpdate
protected boolean deferredLogFlush
protected DataBlockEncoding dataBlockEncodingAlgo
protected Compression.Algorithm compressAlgo
protected BloomType bloomType
protected int numWriterThreads
protected int minColsPerKey
protected int maxColsPerKey
protected int minColDataSize
protected int maxColDataSize
protected boolean isMultiPut
protected int numUpdaterThreads
protected int updatePercent
protected boolean ignoreConflicts
protected boolean isBatchUpdate
protected boolean isSkipInit
protected boolean isInitOnly
protected Cipher cipher
protected AtomicReference<Throwable> thrown
protected String[] splitColonSeparated(String option, int minNumCols, int maxNumCols)
protected int getNumThreads(String numThreadsStr)
public byte[][] getColumnFamilies()
protected void applyColumnFamilyOptions(TableName tableName, byte[][] columnFamilies) throws IOException
IOException
protected void addOptions()
AbstractHBaseTool
AbstractHBaseTool.addOptWithArg(java.lang.String, java.lang.String)
and similar methods.addOptions
in class AbstractHBaseTool
protected void processOptions(CommandLine cmd)
AbstractHBaseTool
processOptions
in class AbstractHBaseTool
public void initTestTable() throws IOException
IOException
protected int doWork() throws IOException
AbstractHBaseTool
doWork
in class AbstractHBaseTool
IOException
protected int loadTable() throws IOException
IOException
public static byte[] generateData(Random r, int length)
public static void main(String[] args)
public static UserGroupInformation loginAndReturnUGI(Configuration conf, String username) throws IOException
IOException