code: public List<AppKey> createNewAppKeysFromResults(Scan scan, long startTime,
        long endTime, int maxCount) throws IOException {
      ResultScanner scanner = null;
      List<AppKey> newAppsKeys = new ArrayList<AppKey>();
      Table versionsTable = null;
      try {
        Stopwatch timer = new Stopwatch().start();
        int rowCount = 0;
        long colCount = 0;
        long resultSize = 0;
        versionsTable = hbaseConnection
            .getTable(TableName.valueOf(Constants.HISTORY_APP_VERSION_TABLE));
        scanner = versionsTable.getScanner(scan);
        for (Result result : scanner) {
          if (result != null && !result.isEmpty()) {
            rowCount++;
            colCount += result.size();
            // TODO dogpiledays resultSize += result.getWritableSize();
            AppKey appKey = getNewAppKeyFromResult(result, startTime, endTime);
            if (appKey != null) {
              newAppsKeys.add(appKey);
            }
            if (newAppsKeys.size() >= maxCount) {
              break;
            }
          }
        }
        timer.stop();
        LOG.info(" Fetched from hbase " + rowCount + " rows, " + colCount
            + " columns, " + resultSize + " bytes ( " + resultSize / (1024 * 1024)
            + ") MB, in total time of " + timer);
      } finally {
        if (scanner != null) {
          scanner.close();
        }
        if (versionsTable != null) {
          versionsTable.close();
        }
      }
  
      return newAppsKeys;
    }
docs: creates a list of appkeys from the hbase scan
  @param scan
  @param startTime
  @param endTime
  @param maxCount
  @return list of flow keys
  @throws IOException