public static Result scanByRegionEncodedName(Connection connection, String regionEncodedName)
    throws IOException {
    RowFilter rowFilter =
      new RowFilter(CompareOperator.EQUAL, new SubstringComparator(regionEncodedName));
    Scan scan = getMetaScan(connection.getConfiguration(), 1);
    scan.setFilter(rowFilter);
    try (Table table = getMetaHTable(connection);
      ResultScanner resultScanner = table.getScanner(scan)) {
      return resultScanner.next();
    }
  }
Scans META table for a row whose key contains the specified <B>regionEncodedName</B>, returning
a single related <code>Result</code> instance if any row is found, null otherwise.
@param connection        the connection to query META table.
@param regionEncodedName the region encoded name to look for at META.
@return <code>Result</code> instance with the row related info in META, null otherwise.
@throws IOException if any errors occur while querying META.
hbase-server/src/main/java/org/apache/hadoop/hbase/MetaTableAccessor.java