if (searchRow != null) {
if (selectPrepared == null)
initSelectPrepared();
byte[] rowKey = HBaseUtils.toBytes(searchRow.getRowKey());
HBaseRegionInfo regionInfo = HBaseUtils.getHBaseRegionInfo(dataTableName, rowKey);
selectParameter.setValue(ValueString.get(Bytes.toString(rowKey)));
ResultInterface r = selectPrepared.query(1);
if (r.next()) {
Value[] data = r.currentRow();
List<Column> cols = columns;
if (cols == null)
cols = Arrays.asList(secondaryIndex.getTable().getColumns());
List<KeyValue> kvs = New.arrayList(cols.size());
for (Column c : columns) {
kvs.add(new KeyValue(rowKey, c.getColumnFamilyNameAsBytes(), c.getNameAsBytes()));
}
row = new HBaseRow(regionInfo.getRegionNameAsBytes(), searchRow.getRowKey(), data, Row.MEMORY_CALCULATE,
new Result(kvs));
} else {
throw new RuntimeException("row key " + searchRow.getRowKey() + " not found");
}
}