@Override
  public void createDataConnector(DataConnector connector) throws InvalidObjectException, MetaException {
    boolean commited = false;
    MDataConnector mDataConnector = new MDataConnector();
    mDataConnector.setName(connector.getName().toLowerCase());
    mDataConnector.setType(connector.getType());
    mDataConnector.setUrl(connector.getUrl());
    mDataConnector.setDescription(connector.getDescription());
    mDataConnector.setParameters(connector.getParameters());
    mDataConnector.setOwnerName(connector.getOwnerName());
    PrincipalType ownerType = connector.getOwnerType();
    mDataConnector.setOwnerType((null == ownerType ? PrincipalType.USER.name() : ownerType.name()));
    mDataConnector.setCreateTime(connector.getCreateTime());
    try {
      openTransaction();
      pm.makePersistent(mDataConnector);
      commited = commitTransaction();
    } finally {
      rollbackAndCleanup(commited, null);
    }
  }
Alter the database object in metastore. Currently only the parameters
of the database or the owner can be changed.
@param dbName the database name
@param db the Hive Database object
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/ObjectStore.java