public static String validateStrictManagedTable(Configuration conf,
      Table table) {
    if (MetastoreConf.getBoolVar(conf, MetastoreConf.ConfVars.STRICT_MANAGED_TABLES)) {
      if (table.isTemporary()) {
        // temp tables exempted from checks.
        return null;
      }

      TableType tableType = TableType.valueOf(table.getTableType());
      if (tableType == TableType.MANAGED_TABLE) {
        if (!MetaStoreServerUtils.isTransactionalTable(table.getParameters())) {
          return createValidationError(table, "Table is marked as a managed table but is not transactional.");
        }
        if (MetaStoreUtils.isNonNativeTable(table)) {
          return createValidationError(table, "Table is marked as a managed table but is non-native.");
        }
        if (isAvroTableWithExternalSchema(table)) {
          return createValidationError(table, "Managed Avro table has externally defined schema.");
        }
      } else if (tableType == TableType.EXTERNAL_TABLE) {
        if (MetaStoreServerUtils.isTransactionalTable(table.getParameters())) {
          return createValidationError(table, "Table is marked as a external table but it is transactional.");
        }
      }
    }

    // Table is valid
    return null;
  }
Checks if the table is valid based on the rules for strict managed tables.
@param conf
@param table
@return  Null if the table is valid, otherwise a string message indicating why the table is invalid.
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/utils/HiveStrictManagedUtils.java