use of org.apache.hadoop.hbase.rest.model.CellSetModel in project hbase by apache.
the class ProtobufStreamingOutput method createModelFromResults.
private CellSetModel createModelFromResults(Result[] results) {
CellSetModel cellSetModel = new CellSetModel();
for (Result rs : results) {
byte[] rowKey = rs.getRow();
RowModel rModel = new RowModel(rowKey);
List<Cell> kvs = rs.listCells();
for (Cell kv : kvs) {
rModel.addCell(new CellModel(CellUtil.cloneFamily(kv), CellUtil.cloneQualifier(kv), kv.getTimestamp(), CellUtil.cloneValue(kv)));
}
cellSetModel.addRow(rModel);
}
return cellSetModel;
}
Aggregations