public static ScanResultCache createScanResultCache(Scan scan) {
    if (scan.getAllowPartialResults()) {
      return new AllowPartialScanResultCache();
    } else if (scan.getBatch() > 0) {
      return new BatchScanResultCache(scan.getBatch());
    } else {
      return new CompleteScanResultCache();
    }
  }
Create a row before the specified row and very close to the specified row.
hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionUtils.java