@Override
    public void onNext(Result[] results, ScanController controller) {
      boolean terminateScan = false;
      for (Result result : results) {
        try {
          if (!visitor.visit(result)) {
            terminateScan = true;
            break;
          }
        } catch (Exception e) {
          future.completeExceptionally(e);
          terminateScan = true;
          break;
        }
        if (++currentRowCount >= rowUpperLimit) {
          terminateScan = true;
          break;
        }
      }
      if (terminateScan) {
        controller.terminate();
      }
    }
Performs a scan of META table for given table.
@param metaTable scanner over meta table
@param startRow  Where to start the scan
@param stopRow   Where to stop the scan
@param type      scanned part of meta
@param maxRows   maximum rows to return
@param visitor   Visitor invoked against each row
hbase-client/src/main/java/org/apache/hadoop/hbase/ClientMetaTableAccessor.java