/** * Creates a table with the specified name. If the table already exists, no action is performed * (the table is left in its current state). Requires a quorum of Cassandra nodes to be reachable. * * @param tableRef the name of the table to create. * @param metadata the metadata of the table to create. * * @throws AtlasDbDependencyException if fewer than a quorum of Cassandra nodes are reachable, or the cluster * cannot come to an agreement on schema versions. Note that this method is not atomic: if quorum is lost during * its execution or Cassandra nodes fail to settle on a schema version after the Cassandra schema is mutated, we * may fail to persist the changes to the _metadata table. * @throws UncheckedExecutionException if there are multiple schema mutation lock tables. */ @Override public void createTable(final TableReference tableRef, final byte[] metadata) { createTables(ImmutableMap.of(tableRef, metadata)); }
/** * Creates a table with the specified name. If the table already exists, no action is performed * (the table is left in its current state). Requires a quorum of Cassandra nodes to be reachable. * * @param tableRef the name of the table to create. * @param metadata the metadata of the table to create. * * @throws AtlasDbDependencyException if fewer than a quorum of Cassandra nodes are reachable, or the cluster * cannot come to an agreement on schema versions. Note that this method is not atomic: if quorum is lost during * its execution or Cassandra nodes fail to settle on a schema version after the Cassandra schema is mutated, we * may fail to persist the changes to the _metadata table. * @throws UncheckedExecutionException if there are multiple schema mutation lock tables. */ @Override public void createTable(final TableReference tableRef, final byte[] metadata) { createTables(ImmutableMap.of(tableRef, metadata)); }