ThemisScanner extends AbstractClientScanner { public static Get createGetFromScan(Scan scan, byte[] rowkey) { Get get = new Get(rowkey); for (Entry<byte[], NavigableSet<byte[]>> familyEntry : scan.getFamilyMap().entrySet()) { if (familyEntry.getValue() != null && familyEntry.getValue().size() > 0) { for (byte[] qualifier : familyEntry.getValue()) { get.addColumn(familyEntry.getKey(), qualifier); } } else { get.addFamily(familyEntry.getKey()); } } return get; } ThemisScanner(final byte[] tableName, final Scan scan, final Transaction transaction); static Get createGetFromScan(Scan scan, byte[] rowkey); Result next(); void close(); @Override Result[] next(int nbRows);  }
@Test public void testCreateGetFromScan() { Scan scan = new Scan(ANOTHER_ROW, ROW); scan.addColumn(FAMILY, QUALIFIER).addColumn(ANOTHER_FAMILY, ANOTHER_QUALIFIER); Get get = ThemisScanner.createGetFromScan(scan, ROW); Assert.assertArrayEquals(ROW, get.getRow()); Assert.assertEquals(2, get.getFamilyMap().size()); Assert.assertEquals(1, get.getFamilyMap().get(FAMILY).size()); Assert.assertArrayEquals(QUALIFIER, get.getFamilyMap().get(FAMILY).iterator().next()); Assert.assertEquals(1, get.getFamilyMap().get(ANOTHER_FAMILY).size()); Assert.assertArrayEquals(ANOTHER_QUALIFIER, get.getFamilyMap().get(ANOTHER_FAMILY).iterator().next()); }