class MetastoreClientUtils {

  public static boolean isExternalTable(org.apache.hadoop.hive.metastore.api.Table table) {
    if (table == null) {
      return false;
    }

    Map<String, String> params = table.getParameters();
    String paramsExternalStr = params == null ? null : params.get("EXTERNAL");
    if (paramsExternalStr != null) {
      return "TRUE".equalsIgnoreCase(paramsExternalStr);
    }

    return table.getTableType() != null && EXTERNAL_TABLE.name().equalsIgnoreCase(table.getTableType());
  }

  private  MetastoreClientUtils();

}