@Override
  public void createTable(CreateTableRequest request) throws
          MetaException, NoSuchObjectException, TException {
    Table tbl = request.getTable();
    if (!tbl.isSetCatName()) {
      tbl.setCatName(getDefaultCatalog(conf));
    }

    if (processorCapabilities != null) {
      request.setProcessorCapabilities(new ArrayList<String>(Arrays.asList(processorCapabilities)));
      request.setProcessorIdentifier(processorIdentifier);
    }

    HiveMetaHook hook = getHook(tbl);
    if (hook != null) {
      hook.preCreateTable(request);
    }
    boolean success = false;
    try {
      // Subclasses can override this step (for example, for temporary tables)
      if (hook == null || !hook.createHMSTableInHook()) {
        create_table(request);
      }
      if (hook != null) {
        hook.commitCreateTable(tbl);
      }
      success = true;
    } finally {
      if (!success && (hook != null)) {
        try {
          hook.rollbackCreateTable(tbl);
        } catch (Exception e) {
          LOG.error("Create rollback failed with", e);
        }
      }
    }
  }
@param request
@throws MetaException
@throws NoSuchObjectException
@throws TException
standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java