private static Scan getMetaScan(Configuration conf, int rowUpperLimit) {
    Scan scan = new Scan();
    int scannerCaching = conf.getInt(HConstants.HBASE_META_SCANNER_CACHING,
      HConstants.DEFAULT_HBASE_META_SCANNER_CACHING);
    if (conf.getBoolean(HConstants.USE_META_REPLICAS, HConstants.DEFAULT_USE_META_REPLICAS)) {
      scan.setConsistency(Consistency.TIMELINE);
    }
    if (rowUpperLimit > 0) {
      scan.setLimit(rowUpperLimit);
      scan.setReadType(Scan.ReadType.PREAD);
    }
    scan.setCaching(scannerCaching);
    return scan;
  }
This method creates a Scan object that will only scan catalog rows that belong to the specified
table. It doesn't specify any columns. This is a better alternative to just using a start row
and scan until it hits a new table since that requires parsing the HRI to get the table name.
@param tableName bytes of table's name
@return configured Scan object
hbase-server/src/main/java/org/apache/hadoop/hbase/MetaTableAccessor.java