void scan(Map<Bytes, Map<Column, Bytes>> ret, List<Entry<Key, Value>> locks) { BatchScanner bs = setupBatchScanner(unscannedRows, columns); try { for (Entry<Key, Value> entry : bs) { Bytes row = ByteUtil.toBytes(entry.getKey().getRowData()); Bytes cf = ByteUtil.toBytes(entry.getKey().getColumnFamilyData()); Bytes cq = ByteUtil.toBytes(entry.getKey().getColumnQualifierData()); Column col = new Column(cf, cq, ByteUtil.toBytes(entry.getKey().getColumnVisibilityData())); long colType = entry.getKey().getTimestamp() & ColumnConstants.PREFIX_MASK; if (colType == ColumnConstants.LOCK_PREFIX) { locks.add(entry); } else if (colType == ColumnConstants.DATA_PREFIX) { Map<Column, Bytes> cols = ret.get(row); if (cols == null) { cols = new HashMap<>(); ret.put(row, cols); } cols.put(col, Bytes.of(entry.getValue().get())); } else { throw new IllegalArgumentException("Unexpected column type " + colType); } } } finally { bs.close(); } }