Hbase Java API TableNotDisabledException Hbase Java API TableNotDisabledException hadoop hadoop

Hbase Java API TableNotDisabledException


You have to disable the table before you can add a family to it.

HBaseAdmin#disableTable()...

I think that is your only issue to get around the exception.


Since you are modifying the table, first you disable the table then modify the table.

The new code sample may be as below:

// Instantiating configuration class.Configuration conf = HBaseConfiguration.create();// Instantiating HBaseAdmin class.HBaseAdmin admin = new HBaseAdmin(conf);// Disabling the table admin.disableTable("local_webpage");// Instantiating columnDescriptor class with "contactDetails" as column family nameHColumnDescriptor columnDescriptor = new HColumnDescriptor("contactDetails");// Adding column familyadmin.addColumnFamily("local_webpage", columnDescriptor);System.out.println("column family added");

I hope this help you!!!