【发布时间】:2016-07-29 00:09:36
【问题描述】:
我正在尝试创建一个具有单列族的表(针对使用 Java 客户端库 0.9.1 的 Google Cloud Bigtable 模拟器)。
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.");
}
}
我的问题是创建表后,检索到的描述符从不包含EOD 系列;因此,任何在该列族中存储数据的调用都会失败。
是我遗漏了什么还是模拟器的限制?
【问题讨论】:
-
这是模拟器的问题。我们正在努力修复它。
-
此错误已在模拟器的最新版本中得到修复:cloud.google.com/bigtable/docs/emulator
标签: java emulation google-cloud-bigtable