Class CreateRandomStoreFile
java.lang.Object
org.apache.hadoop.hbase.regionserver.CreateRandomStoreFile
Creates an HFile with random key/value pairs.
-
Field Summary
Modifier and TypeFieldDescriptionprivate static final String
private static final String
private static final String
private static final String
private int
private static final String
private static final int
The exit code this command-line tool returns on failureprivate static final String
private static final String
private static final String
private int
private int
private static final int
As much as this number of bytes can be added or subtracted from key/value lengths.private static final org.slf4j.Logger
private static final String
private static final int
The number of valid key types in a store fileprivate org.apache.hbase.thirdparty.org.apache.commons.cli.Options
private static final String
private int
private static final String
private int
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate void
configureKeyValue
(long numKV, int keyLen, int valueLen) private byte[]
generateKey
(long i) static org.apache.hadoop.hbase.KeyValue.Type
generateKeyType
(Random rand) org.apache.hadoop.hbase.KeyValue
generateKeyValue
(long i) private String
private byte[]
static void
private int
nextInRange
(int range) boolean
Runs the tools.
-
Field Details
-
LEN_VARIATION
As much as this number of bytes can be added or subtracted from key/value lengths.- See Also:
-
LOG
-
OUTPUT_DIR_OPTION
- See Also:
-
NUM_KV_OPTION
- See Also:
-
HFILE_VERSION_OPTION
- See Also:
-
KEY_SIZE_OPTION
- See Also:
-
VALUE_SIZE_OPTION
- See Also:
-
COMPRESSION_OPTION
- See Also:
-
BLOOM_FILTER_OPTION
- See Also:
-
BLOOM_FILTER_PARAM_OPTION
- See Also:
-
BLOCK_SIZE_OPTION
- See Also:
-
BLOOM_BLOCK_SIZE_OPTION
- See Also:
-
INDEX_BLOCK_SIZE_OPTION
- See Also:
-
EXIT_FAILURE
The exit code this command-line tool returns on failure- See Also:
-
NUM_VALID_KEY_TYPES
The number of valid key types in a store file -
options
-
keyPrefixLen
-
keyLen
-
rowLen
-
cfLen
-
valueLen
-
-
Constructor Details
-
CreateRandomStoreFile
public CreateRandomStoreFile()
-
-
Method Details
-
run
Runs the tools.- Parameters:
args
- command-line arguments- Returns:
- true in case of success
- Throws:
IOException
-
configureKeyValue
-
nextInRange
-
generateKeyValue
-
generateKeyType
-
generateString
-
generateKey
-
generateValue
-
main
-