Created
June 19, 2022 02:49
-
-
Save kumar-de/711927a9abb85ec9ddc36dce7b592eb1 to your computer and use it in GitHub Desktop.
New HBase table in Scala using TableDescriptorBuilder
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val tableDescriptorBuilder = TableDescriptorBuilder | |
.newBuilder(TableName.valueOf(HBASE_TABLE_NAME)) | |
.setColumnFamily(ColumnFamilyDescriptorBuilder.newBuilder(HBASE_COLUMN_FAMILY.getBytes).build()) | |
.build() | |
logger.info("Adding column family to the HBase Table") | |
hBaseAdmin.createTable(tableDescriptorBuilder) | |
logger.info("HBase Table Successfully Created") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment