Class Utility
java.lang.Object
org.apache.hadoop.hbase.util.bulkdatagenerator.Utility
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
Schema for HBase table to be generated by generated and populated byBulkDataGeneratorTool
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
createTable
(org.apache.hadoop.hbase.client.Admin admin, String tableName, int splitCount, Map<String, String> tableOptions) Creates a pre-splitted HBase Table having single column family (COLUMN_FAMILY
) and sequential splits withSPLIT_PREFIX_LENGTH
length character prefix.static void
deleteTable
(org.apache.hadoop.hbase.client.Admin admin, String tableName)
-
Field Details
-
COLUMN_FAMILY
- See Also:
-
SPLIT_PREFIX_LENGTH
- See Also:
-
MAX_SPLIT_COUNT
-
-
Constructor Details
-
Utility
private Utility()Private Constructor
-
-
Method Details
-
deleteTable
public static void deleteTable(org.apache.hadoop.hbase.client.Admin admin, String tableName) throws IOException - Throws:
IOException
-
createTable
public static void createTable(org.apache.hadoop.hbase.client.Admin admin, String tableName, int splitCount, Map<String, String> tableOptions) throws IOExceptionCreates a pre-splitted HBase Table having single column family (COLUMN_FAMILY
) and sequential splits withSPLIT_PREFIX_LENGTH
length character prefix. Example: If a table (TEST_TABLE_1) need to be generated with splitCount as 10, table would be created with (10+1) regions with boundaries end-keys as (000000-000001, 000001-000002, 000002-000003, ...., 0000010-)- Parameters:
admin
- - Admin object associated with HBase connectiontableName
- - Name of table to be createdsplitCount
- - Number of splits for the table (Number of regions will be splitCount + 1)tableOptions
- - Additional HBase metadata properties to be set for the table- Throws:
IOException
-