@Test public void testConstructDataRowGet() throws IOException { ThemisGet get = new ThemisGet(ROW); get.addFamily(FAMILY); get.addColumn(ANOTHER_FAMILY, QUALIFIER); get.setFilter(new PrefixFilter(ROW)); get.setCacheBlocks(true); ThemisGet actual = IndexScanner.constructDataRowGet(ANOTHER_ROW, get); Assert.assertArrayEquals(ANOTHER_ROW, actual.getRow()); Assert .assertArrayEquals(QUALIFIER, actual.getFamilyMap().get(ANOTHER_FAMILY).iterator().next()); Assert.assertTrue(actual.getFamilyMap().containsKey(FAMILY)); Assert.assertNull(actual.getFamilyMap().get(FAMILY)); Assert.assertTrue(actual.getCacheBlocks()); }
protected static ThemisGet constructDataRowGet(byte[] row, ThemisGet dataGet) throws IOException { ThemisGet get = new ThemisGet(row); for (Entry<byte[], NavigableSet<byte[]>> columns : dataGet.getFamilyMap().entrySet()) { byte[] family = columns.getKey(); if (columns.getValue() != null && columns.getValue().size() > 0) { for (byte[] qualifier : columns.getValue()) { get.addColumn(family, qualifier); } } else { get.addFamily(family); } } get.setFilter(dataGet.getFilter()); get.setCacheBlocks(dataGet.getCacheBlocks()); return get; }
IndexScanner extends ThemisScanner { protected static ThemisGet constructDataRowGet(byte[] row, ThemisGet dataGet) throws IOException { ThemisGet get = new ThemisGet(row); for (Entry<byte[], NavigableSet<byte[]>> columns : dataGet.getFamilyMap().entrySet()) { byte[] family = columns.getKey(); if (columns.getValue() != null && columns.getValue().size() > 0) { for (byte[] qualifier : columns.getValue()) { get.addColumn(family, qualifier); } } else { get.addFamily(family); } } get.setFilter(dataGet.getFilter()); get.setCacheBlocks(dataGet.getCacheBlocks()); return get; } }
IndexScanner extends ThemisScanner { protected static ThemisGet constructDataRowGet(byte[] row, ThemisGet dataGet) throws IOException { ThemisGet get = new ThemisGet(row); for (Entry<byte[], NavigableSet<byte[]>> columns : dataGet.getFamilyMap().entrySet()) { byte[] family = columns.getKey(); if (columns.getValue() != null && columns.getValue().size() > 0) { for (byte[] qualifier : columns.getValue()) { get.addColumn(family, qualifier); } } else { get.addFamily(family); } } get.setFilter(dataGet.getFilter()); get.setCacheBlocks(dataGet.getCacheBlocks()); return get; } IndexScanner(String indexTableName, IndexRead indexRead, Transaction transaction); }
IndexScanner extends ThemisScanner { protected static ThemisGet constructDataRowGet(byte[] row, ThemisGet dataGet) throws IOException { ThemisGet get = new ThemisGet(row); for (Entry<byte[], NavigableSet<byte[]>> columns : dataGet.getFamilyMap().entrySet()) { byte[] family = columns.getKey(); if (columns.getValue() != null && columns.getValue().size() > 0) { for (byte[] qualifier : columns.getValue()) { get.addColumn(family, qualifier); } } else { get.addFamily(family); } } get.setFilter(dataGet.getFilter()); get.setCacheBlocks(dataGet.getCacheBlocks()); return get; } IndexScanner(String indexTableName, IndexRead indexRead, Transaction transaction); Result next(); long getUnMatchIndexCount(); }
IndexScanner extends ThemisScanner { protected static ThemisGet constructDataRowGet(byte[] row, ThemisGet dataGet) throws IOException { ThemisGet get = new ThemisGet(row); for (Entry<byte[], NavigableSet<byte[]>> columns : dataGet.getFamilyMap().entrySet()) { byte[] family = columns.getKey(); if (columns.getValue() != null && columns.getValue().size() > 0) { for (byte[] qualifier : columns.getValue()) { get.addColumn(family, qualifier); } } else { get.addFamily(family); } } get.setFilter(dataGet.getFilter()); get.setCacheBlocks(dataGet.getCacheBlocks()); return get; } IndexScanner(String indexTableName, IndexRead indexRead, Transaction transaction); Result next(); long getUnMatchIndexCount();  }