@Override
  public SQLAllTableConstraints createTableWithConstraints(Table tbl, SQLAllTableConstraints constraints)
      throws InvalidObjectException, MetaException {
    boolean success = false;
    try {
      openTransaction();
      createTable(tbl);
      // Add constraints.
      // We need not do a deep retrieval of the Table Column Descriptor while persisting the
      // constraints since this transaction involving create table is not yet committed.
      if (CollectionUtils.isNotEmpty(constraints.getForeignKeys())) {
        constraints.setForeignKeys(addForeignKeys(constraints.getForeignKeys(), false, constraints.getPrimaryKeys(),
            constraints.getUniqueConstraints()));
      }
      if (CollectionUtils.isNotEmpty(constraints.getPrimaryKeys())) {
        constraints.setPrimaryKeys(addPrimaryKeys(constraints.getPrimaryKeys(), false));
      }
      if (CollectionUtils.isNotEmpty(constraints.getUniqueConstraints())) {
        constraints.setUniqueConstraints(addUniqueConstraints(constraints.getUniqueConstraints(), false));
      }
      if (CollectionUtils.isNotEmpty(constraints.getNotNullConstraints())) {
        constraints.setNotNullConstraints(addNotNullConstraints(constraints.getNotNullConstraints(), false));
      }
      if (CollectionUtils.isNotEmpty(constraints.getDefaultConstraints())) {
        constraints.setDefaultConstraints(addDefaultConstraints(constraints.getDefaultConstraints(), false));
      }
      if (CollectionUtils.isNotEmpty(constraints.getCheckConstraints())) {
        constraints.setCheckConstraints(addCheckConstraints(constraints.getCheckConstraints(), false));
      }
      success = commitTransaction();
      return constraints;
    } finally {
      rollbackAndCleanup(success, null);
    }
  }
Alter the dataconnector object in metastore. Currently only the parameters
of the dataconnector or the owner can be changed.
@param dcName the dataconnector name
@param connector the Hive DataConnector object
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/ObjectStore.java