@Override
  public void createTable(Table tbl) throws InvalidObjectException, MetaException {
    boolean commited = false;
    MTable mtbl = null;

    try {
      openTransaction();

      mtbl = convertToMTable(tbl);
      if (TxnUtils.isTransactionalTable(tbl)) {
        mtbl.setWriteId(tbl.getWriteId());
      }
      pm.makePersistent(mtbl);

      if (tbl.getCreationMetadata() != null) {
        MCreationMetadata mcm = convertToMCreationMetadata(tbl.getCreationMetadata());
        pm.makePersistent(mcm);
      }
      tbl.setId(mtbl.getId());

      PrincipalPrivilegeSet principalPrivs = tbl.getPrivileges();
      List<Object> toPersistPrivObjs = new ArrayList<>();
      if (principalPrivs != null) {
        int now = (int) (System.currentTimeMillis() / 1000);

        Map<String, List<PrivilegeGrantInfo>> userPrivs = principalPrivs.getUserPrivileges();
        putPersistentPrivObjects(mtbl, toPersistPrivObjs, now, userPrivs, PrincipalType.USER, "SQL");

        Map<String, List<PrivilegeGrantInfo>> groupPrivs = principalPrivs.getGroupPrivileges();
        putPersistentPrivObjects(mtbl, toPersistPrivObjs, now, groupPrivs, PrincipalType.GROUP, "SQL");

        Map<String, List<PrivilegeGrantInfo>> rolePrivs = principalPrivs.getRolePrivileges();
        putPersistentPrivObjects(mtbl, toPersistPrivObjs, now, rolePrivs, PrincipalType.ROLE, "SQL");
      }
      pm.makePersistentAll(toPersistPrivObjs);
      commited = commitTransaction();
    } finally {
      rollbackAndCleanup(commited, 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