【发布时间】:2013-07-23 16:03:59
【问题描述】:
如何从 ByteBuffer 中获取 A 复合列组件?
但没有得到回应。我现在正试图从字节缓冲区中获取列名作为
Composite start = new Composite();
start.addComponent(System.currentTimeMillis(), LS);
List<HColumn<Composite, String>> columns = cs.setRange(start, null, true, 10).execute().get().getColumns();
for (HColumn<Composite, String> column : columns) {
ByteBuffer bf = column.getNameBytes();
Serializer<Composite> ns = column.getNameSerializer();
Composite composite = ns.fromByteBuffer(bf);
// I get an exception from above line
String value = column.getValue();
}
我的问题是我有一个包含两个 LongType 的复合比较器的列族 然后我在其中一个行上进行列切片,并从列列表中获取列名称并从中获取各个组件。请有人帮助我,我被卡住了
【问题讨论】: