code: private Scan createFlowScan(byte[] rowPrefix, int limit, String version) {
      Scan scan = new Scan();
      scan.setStartRow(rowPrefix);
  
      // using a large scanner caching value with a small limit can mean we scan a
      // lot more data than necessary, so lower the caching for low limits
      scan.setCaching(Math.min(limit, defaultScannerCaching));
      // require that all rows match the prefix we're looking for
      Filter prefixFilter = new WhileMatchFilter(new PrefixFilter(rowPrefix));
      // if version is passed, restrict the rows returned to that version
      if (version != null && version.length() > 0) {
        FilterList filters = new FilterList(FilterList.Operator.MUST_PASS_ALL);
        filters.addFilter(prefixFilter);
        filters.addFilter(new SingleColumnValueFilter(Constants.INFO_FAM_BYTES,
            Constants.VERSION_COLUMN_BYTES, CompareFilter.CompareOp.EQUAL,
            Bytes.toBytes(version)));
        scan.setFilter(filters);
      } else {
        scan.setFilter(prefixFilter);
      }
      return scan;
    }
docs: creates a scan for flow data
  @param rowPrefix - start row prefix
  @param limit - limit on scanned results
  @param version - version to match
  @return Scan