Class CreateRandomStoreFile
java.lang.Object
org.apache.hadoop.hbase.regionserver.CreateRandomStoreFile
Creates an HFile with random key/value pairs.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Stringprivate static final Stringprivate static final Stringprivate static final Stringprivate intprivate static final Stringprivate static final intThe exit code this command-line tool returns on failureprivate static final Stringprivate static final Stringprivate static final Stringprivate intprivate intprivate static final intAs much as this number of bytes can be added or subtracted from key/value lengths.private static final org.slf4j.Loggerprivate static final Stringprivate static final intThe number of valid key types in a store fileprivate org.apache.hbase.thirdparty.org.apache.commons.cli.Optionsprivate static final Stringprivate intprivate static final Stringprivate int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidconfigureKeyValue(long numKV, int keyLen, int valueLen) private byte[]generateKey(long i) static org.apache.hadoop.hbase.KeyValue.TypegenerateKeyType(Random rand) org.apache.hadoop.hbase.KeyValuegenerateKeyValue(long i) private Stringprivate byte[]static voidprivate intnextInRange(int range) booleanRuns 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
-