@Override
  public URI getURIForAuth(Table table) throws URISyntaxException {
    Map<String, String> tableProperties = HiveCustomStorageHandlerUtils.getTableProperties(table);
    hbaseConf = getConf();
    String hbase_host = IPStackUtils.adaptLoopbackAddress(tableProperties.getOrDefault(HBASE_HOST_NAME,
        hbaseConf.get(HBASE_HOST_NAME)));
    String hbase_port = tableProperties.getOrDefault(HBASE_CLIENT_PORT,
        hbaseConf.get(HBASE_CLIENT_PORT));
    String table_name = encodeString(tableProperties.getOrDefault(HBaseSerDe.HBASE_TABLE_NAME,
        null));
    String column_family = encodeString(tableProperties.getOrDefault(
        HBaseSerDe.HBASE_COLUMNS_MAPPING, null));
    String URIString = HBASE_PREFIX + "//" + IPStackUtils.concatHostPort(hbase_host, Integer.parseInt(hbase_port)) +
            "/" + table_name;
    if (column_family != null) {
      URIString += "/" + column_family;
    }
    return new URI(URIString);
  }
HBase config for determining the client port based on hbase-site.xml
hbase-handler/src/java/org/apache/hadoop/hive/hbase/HBaseStorageHandler.java