public final T lookup(final String dbName, final String tableName) {
      int low = 0;
      int high = index.length - 1;
      while (low <= high) {
        int mid = (low + high) >>> 1;
        T item = index[mid];
        int cmp = compareNames(item, dbName, tableName);
        if (cmp < 0) {
          low = mid + 1;
        } else if (cmp > 0) {
          high = mid - 1;
        } else {
          return item; // key found
        }
      }
      return null;  // key not found.
    }
Lookup using dichotomy using order described by database name, table name.
@param dbName the database name
@param tableName the table name
@return the table if found in the index, null otherwise
ql/src/java/org/apache/hadoop/hive/ql/security/authorization/plugin/HivePrivilegeObjectUtils.java