Skip to content

Instantly share code, notes, and snippets.

@singhgurjeet
Created August 21, 2012 20:33
Show Gist options
  • Save singhgurjeet/3419183 to your computer and use it in GitHub Desktop.
Save singhgurjeet/3419183 to your computer and use it in GitHub Desktop.
@Test
public void InstalledFilterTest() throws IOException, NoSuchUserException {
Filter filter = new CompactedRowSingleColumnValueFilter(
translator.getFamily(), translator.getQualifier(colSet.getColumn(1)),
CompareOp.EQUAL,
new LongWritableComparable(2), 1);
final List<Long> rowIndices = new ArrayList<Long>();
TableMapFn mapFn = new TableMapFn() {
@Override
public void onRowBegin(long row) {
rowIndices.add(row);
}
};
TablesUtil.doScan(tableId, null, null, null, mapFn, filter);
assertEquals("rows found", 1, rowIndices.size());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment