Hbase Java API TableNotDisabledException
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!!!