I am trying to create a table with a single column family (targeting the Google Cloud Bigtable emulator using Java client library 0.9.1).
private void setupTable() throws IOException {
TableName name = TableName.valueOf("EndOfDayPriceUnadjusted");
try(Connection connection = BigtableConfiguration.connect(hbaseConf)){
HTableDescriptor descriptor = new HTableDescriptor(name);
descriptor.addFamily(new HColumnDescriptor("EOD"));
connection.getAdmin().createTable(descriptor);
// calling HTableDescriptor desc = connection.getAdmin().getTableDescriptor(name); yields the same result
Table t = connection.getTable(name);
if(t.getTableDescriptor().getColumnFamilies().length == 0)
log.error("no column families.");
else
log.info("table with column family created.");
}
}
My problem is that after creating the table, the retrieved descriptor never contains the EOD family; therefore, any calls to store data in that column family fails.
Am I missing something or is it a limitation of the emulator?