@Test public void testScan() throws InitializationException, IOException { final String tableName = "nifi"; final TestRunner runner = TestRunners.newTestRunner(TestProcessor.class); final Table table = Mockito.mock(Table.class); when(table.getName()).thenReturn(TableName.valueOf(tableName)); final MockHBaseClientService service = configureHBaseClientService(runner, table); runner.assertValid(service); final long now = System.currentTimeMillis(); final Map<String, String> cells = new HashMap<>(); cells.put("greeting", "hello"); cells.put("name", "nifi"); service.addResult("row0", cells, now - 2); service.addResult("row1", cells, now - 1); service.addResult("row2", cells, now - 1); service.addResult("row3", cells, now); final CollectingResultHandler handler = new CollectingResultHandler(); final HBaseClientService hBaseClientService = runner.getProcessContext().getProperty(TestProcessor.HBASE_CLIENT_SERVICE) .asControllerService(HBaseClientService.class); hBaseClientService.scan(tableName, new ArrayList<Column>(), null, now, handler); assertEquals(4, handler.results.size()); final ResultCell[] results = handler.results.get("row0"); assertNotNull(results); assertEquals(2, results.length); verifyResultCell(results[0], COL_FAM, "greeting", "hello"); verifyResultCell(results[1], COL_FAM, "name", "nifi"); }
@Override public void scan(final String tableName, final Collection<Column> columns, final String filterExpression, final long minTime, final ResultHandler handler) throws IOException { scan(tableName, columns, filterExpression, minTime, null, handler); }
HBase_1_1_2_ClientService extends AbstractControllerService implements HBaseClientService { @Override public void scan(final String tableName, final Collection<Column> columns, final String filterExpression, final long minTime, final ResultHandler handler) throws IOException { scan(tableName, columns, filterExpression, minTime, null, handler); } }
HBase_1_1_2_ClientService extends AbstractControllerService implements HBaseClientService { @Override public void scan(final String tableName, final Collection<Column> columns, final String filterExpression, final long minTime, final ResultHandler handler) throws IOException { scan(tableName, columns, filterExpression, minTime, null, handler); }  }
HBase_1_1_2_ClientService extends AbstractControllerService implements HBaseClientService { @Override public void scan(final String tableName, final Collection<Column> columns, final String filterExpression, final long minTime, final ResultHandler handler) throws IOException { scan(tableName, columns, filterExpression, minTime, null, handler); }  @OnEnabled void onEnabled(final ConfigurationContext context); @OnDisabled void shutdown(); @Override void put(final String tableName, final Collection<PutFlowFile> puts); @Override void put(final String tableName, final byte[] rowId, final Collection<PutColumn> columns); @Override boolean checkAndPut(final String tableName, final byte[] rowId, final byte[] family, final byte[] qualifier, final byte[] value, final PutColumn column); @Override void delete(final String tableName, final byte[] rowId); @Override void delete(String tableName, byte[] rowId, String visibilityLabel); @Override void delete(String tableName, List<byte[]> rowIds); @Override void deleteCells(String tableName, List<DeleteRequest> deletes); @Override void delete(String tableName, List<byte[]> rowIds, String visibilityLabel); @Override void scan(final String tableName, final Collection<Column> columns, final String filterExpression, final long minTime, final ResultHandler handler); @Override void scan(String tableName, Collection<Column> columns, String filterExpression, long minTime, List<String> visibilityLabels, ResultHandler handler); @Override void scan(final String tableName, final byte[] startRow, final byte[] endRow, final Collection<Column> columns, List<String> authorizations, final ResultHandler handler); @Override void scan(final String tableName, final String startRow, final String endRow, String filterExpression,
            final Long timerangeMin, final Long timerangeMax, final Integer limitRows, final Boolean isReversed,
            final Collection<Column> columns, List<String> visibilityLabels, final ResultHandler handler); @Override byte[] toBytes(boolean b); @Override byte[] toBytes(float f); @Override byte[] toBytes(int i); @Override byte[] toBytes(long l); @Override byte[] toBytes(double d); @Override byte[] toBytes(String s); @Override byte[] toBytesBinary(String s); @Override String toTransitUri(String tableName, String rowKey); }
HBase_1_1_2_ClientService extends AbstractControllerService implements HBaseClientService { @Override public void scan(final String tableName, final Collection<Column> columns, final String filterExpression, final long minTime, final ResultHandler handler) throws IOException { scan(tableName, columns, filterExpression, minTime, null, handler); }  @OnEnabled void onEnabled(final ConfigurationContext context); @OnDisabled void shutdown(); @Override void put(final String tableName, final Collection<PutFlowFile> puts); @Override void put(final String tableName, final byte[] rowId, final Collection<PutColumn> columns); @Override boolean checkAndPut(final String tableName, final byte[] rowId, final byte[] family, final byte[] qualifier, final byte[] value, final PutColumn column); @Override void delete(final String tableName, final byte[] rowId); @Override void delete(String tableName, byte[] rowId, String visibilityLabel); @Override void delete(String tableName, List<byte[]> rowIds); @Override void deleteCells(String tableName, List<DeleteRequest> deletes); @Override void delete(String tableName, List<byte[]> rowIds, String visibilityLabel); @Override void scan(final String tableName, final Collection<Column> columns, final String filterExpression, final long minTime, final ResultHandler handler); @Override void scan(String tableName, Collection<Column> columns, String filterExpression, long minTime, List<String> visibilityLabels, ResultHandler handler); @Override void scan(final String tableName, final byte[] startRow, final byte[] endRow, final Collection<Column> columns, List<String> authorizations, final ResultHandler handler); @Override void scan(final String tableName, final String startRow, final String endRow, String filterExpression,
            final Long timerangeMin, final Long timerangeMax, final Integer limitRows, final Boolean isReversed,
            final Collection<Column> columns, List<String> visibilityLabels, final ResultHandler handler); @Override byte[] toBytes(boolean b); @Override byte[] toBytes(float f); @Override byte[] toBytes(int i); @Override byte[] toBytes(long l); @Override byte[] toBytes(double d); @Override byte[] toBytes(String s); @Override byte[] toBytesBinary(String s); @Override String toTransitUri(String tableName, String rowKey);  }