private void setupNextScanner() {
      // if lastResult is null null, it means it is not the fist scan
      if (lastResult != null) {
        byte[] lastRow = lastResult.getRow();
        if (scan.isReversed()) {
          // for reverse scan, we can't find the closet row before this row
          scan.setStartRow(lastRow);
        } else {
          scan.setStartRow(createClosestRowAfter(lastRow));
        }
      }
    }
A scanner to perform scan from thrift server getScannerResults is used in this scanner
hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/client/ThriftTable.java