MigrationManager.announceNewColumnFamily(cfm); log.info("Created CF {} in KS {}", columnfamilyName, keyspaceName); } catch (ConfigurationException e) {
public static void announceNewColumnFamily(CFMetaData cfm, boolean announceLocally) throws ConfigurationException { announceNewColumnFamily(cfm, announceLocally, true); }
public static void announceNewColumnFamily(CFMetaData cfm, boolean announceLocally) throws ConfigurationException { announceNewColumnFamily(cfm, announceLocally, true); }
public static void announceNewColumnFamily(CFMetaData cfm, boolean announceLocally) throws ConfigurationException { announceNewColumnFamily(cfm, announceLocally, true); }
public static void announceNewColumnFamily(CFMetaData cfm) throws ConfigurationException { announceNewColumnFamily(cfm, false); }
public static void announceNewColumnFamily(CFMetaData cfm) throws ConfigurationException { announceNewColumnFamily(cfm, false); }
public static void announceNewColumnFamily(CFMetaData cfm) throws ConfigurationException { announceNewColumnFamily(cfm, false); }
/** * Announces the table even if the definition is already know locally. * This should generally be avoided but is used internally when we want to force the most up to date version of * a system table schema (Note that we don't know if the schema we force _is_ the most recent version or not, we * just rely on idempotency to basically ignore that announce if it's not. That's why we can't use announceUpdateColumnFamily, * it would for instance delete new columns if this is not called with the most up-to-date version) * * Note that this is only safe for system tables where we know the cfId is fixed and will be the same whatever version * of the definition is used. */ public static void forceAnnounceNewColumnFamily(CFMetaData cfm) throws ConfigurationException { announceNewColumnFamily(cfm, false, false, 0); }
/** * Announces the table even if the definition is already know locally. * This should generally be avoided but is used internally when we want to force the most up to date version of * a system table schema (Note that we don't know if the schema we force _is_ the most recent version or not, we * just rely on idempotency to basically ignore that announce if it's not. That's why we can't use announceUpdateColumnFamily, * it would for instance delete new columns if this is not called with the most up-to-date version) * * Note that this is only safe for system tables where we know the cfId is fixed and will be the same whatever version * of the definition is used. */ public static void forceAnnounceNewColumnFamily(CFMetaData cfm) throws ConfigurationException { announceNewColumnFamily(cfm, false, false, 0); }
public static void announceNewColumnFamily(CFMetaData cfm) throws ConfigurationException { announceNewColumnFamily(cfm, false); }
/** * Announces the table even if the definition is already know locally. * This should generally be avoided but is used internally when we want to force the most up to date version of * a system table schema (Note that we don't know if the schema we force _is_ the most recent version or not, we * just rely on idempotency to basically ignore that announce if it's not. That's why we can't use announceUpdateColumnFamily, * it would for instance delete new columns if this is not called with the most up-to-date version) * * Note that this is only safe for system tables where we know the cfId is fixed and will be the same whatever version * of the definition is used. */ public static void forceAnnounceNewColumnFamily(CFMetaData cfm) throws ConfigurationException { announceNewColumnFamily(cfm, false, false, 0); }
private static void announceNewColumnFamily(CFMetaData cfm, boolean announceLocally, boolean throwOnDuplicate) throws ConfigurationException { announceNewColumnFamily(cfm, announceLocally, throwOnDuplicate, FBUtilities.timestampMicros()); }
private static void announceNewColumnFamily(CFMetaData cfm, boolean announceLocally, boolean throwOnDuplicate) throws ConfigurationException { announceNewColumnFamily(cfm, announceLocally, throwOnDuplicate, FBUtilities.timestampMicros()); }
private static void announceNewColumnFamily(CFMetaData cfm, boolean announceLocally, boolean throwOnDuplicate) throws ConfigurationException { announceNewColumnFamily(cfm, announceLocally, throwOnDuplicate, FBUtilities.timestampMicros()); }
public boolean announceMigration(boolean isLocalOnly) throws RequestValidationException { try { MigrationManager.announceNewColumnFamily(getCFMetaData(), isLocalOnly); return true; } catch (AlreadyExistsException e) { if (ifNotExists) return false; throw e; } }
public Event.SchemaChange announceMigration(QueryState queryState, boolean isLocalOnly) throws RequestValidationException { try { MigrationManager.announceNewColumnFamily(getCFMetaData(), isLocalOnly); return new Event.SchemaChange(Event.SchemaChange.Change.CREATED, Event.SchemaChange.Target.TABLE, keyspace(), columnFamily()); } catch (AlreadyExistsException e) { if (ifNotExists) return null; throw e; } }
public Event.SchemaChange announceMigration(QueryState queryState, boolean isLocalOnly) throws RequestValidationException { try { MigrationManager.announceNewColumnFamily(getCFMetaData(), isLocalOnly); return new Event.SchemaChange(Event.SchemaChange.Change.CREATED, Event.SchemaChange.Target.TABLE, keyspace(), columnFamily()); } catch (AlreadyExistsException e) { if (ifNotExists) return null; throw e; } }
public Event.SchemaChange announceMigration(QueryState queryState, boolean isLocalOnly) throws RequestValidationException { try { MigrationManager.announceNewColumnFamily(getCFMetaData(), isLocalOnly); return new Event.SchemaChange(Event.SchemaChange.Change.CREATED, Event.SchemaChange.Target.TABLE, keyspace(), columnFamily()); } catch (AlreadyExistsException e) { if (ifNotExists) return null; throw e; } }
public String system_add_column_family(CfDef cf_def) throws TException { logger.trace("add_column_family"); try { ClientState cState = state(); String keyspace = cState.getKeyspace(); cState.hasKeyspaceAccess(keyspace, Permission.CREATE); cf_def.unsetId(); // explicitly ignore any id set by client (Hector likes to set zero) CFMetaData cfm = ThriftConversion.fromThrift(cf_def); cfm.params.compaction.validate(); if (!cfm.getTriggers().isEmpty()) state().ensureIsSuper("Only superusers are allowed to add triggers."); MigrationManager.announceNewColumnFamily(cfm); return Schema.instance.getVersion().toString(); } catch (RequestValidationException e) { throw ThriftConversion.toThrift(e); } }
public String system_add_column_family(CfDef cf_def) throws TException { logger.trace("add_column_family"); try { ClientState cState = state(); String keyspace = cState.getKeyspace(); cState.hasKeyspaceAccess(keyspace, Permission.CREATE); cf_def.unsetId(); // explicitly ignore any id set by client (Hector likes to set zero) CFMetaData cfm = ThriftConversion.fromThrift(cf_def); cfm.params.compaction.validate(); if (!cfm.getTriggers().isEmpty()) state().ensureIsSuper("Only superusers are allowed to add triggers."); MigrationManager.announceNewColumnFamily(cfm); return Schema.instance.getVersion().toString(); } catch (RequestValidationException e) { throw ThriftConversion.toThrift(e); } }