public void createResourcePlan(WMResourcePlan resourcePlan, String copyFromName, boolean ifNotExists)
      throws HiveException {
    String ns = conf.getVar(ConfVars.HIVE_SERVER2_WM_NAMESPACE);
    if (resourcePlan.isSetNs() && !ns.equals(resourcePlan.getNs())) {
      throw new HiveException("Cannot create a plan in a different NS; was "
          + resourcePlan.getNs() + ", configured " + ns);
    }
    resourcePlan.setNs(ns);

    try {
      getMSC().createResourcePlan(resourcePlan, copyFromName);
    } catch (AlreadyExistsException e) {
      if (!ifNotExists) {
        throw new HiveException(e, ErrorMsg.RESOURCE_PLAN_ALREADY_EXISTS, resourcePlan.getName());
      }
    } catch (Exception e) {
      throw new HiveException(e);
    }
  }
Get Default constraints associated with the table that are enabled

@param dbName Database Name
@param tblName Table Name
@return Default constraints associated with the table.
@throws HiveException
ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java