public String getSchemaVersion() { return Schema.instance.getVersion().toString(); }
public String getSchemaVersion() { return Schema.instance.getVersion().toString(); }
public String getSchemaVersion() { return Schema.instance.getVersion().toString(); }
public String getSchemaVersion() { return Schema.instance.getVersion().toString(); }
public static void loadSchema() { try { Schema.instance.load(schemaDefinition(), Schema.instance.getVersion()); } catch (ConfigurationException e) { throw new RuntimeException(e); } }
/** * Read schema from system keyspace and calculate MD5 digest of every row, resulting digest * will be converted into UUID which would act as content-based version of the schema. * * 3.11 note: we calculate the "real" schema version and the 3.0 compatible schema * version here. */ public void updateVersion() { Pair<UUID, UUID> mixedVersions = SchemaKeyspace.calculateSchemaDigest(); version = mixedVersions.left; altVersion = mixedVersions.right; SystemKeyspace.updateSchemaVersion(getVersion()); }
/** * Read schema from system keyspace and calculate MD5 digest of every row, resulting digest * will be converted into UUID which would act as content-based version of the schema. * * 3.11 note: we calculate the "real" schema version and the 3.0 compatible schema * version here. */ public void updateVersion() { Pair<UUID, UUID> mixedVersions = SchemaKeyspace.calculateSchemaDigest(); version = mixedVersions.left; altVersion = mixedVersions.right; SystemKeyspace.updateSchemaVersion(getVersion()); }
/** * Read schema from system keyspace and calculate MD5 digest of every row, resulting digest * will be converted into UUID which would act as content-based version of the schema. * * 3.11 note: we calculate the "real" schema version and the 3.0 compatible schema * version here. */ public void updateVersion() { Pair<UUID, UUID> mixedVersions = SchemaKeyspace.calculateSchemaDigest(); version = mixedVersions.left; altVersion = mixedVersions.right; SystemKeyspace.updateSchemaVersion(getVersion()); }
public void doVerb(MessageIn message, int id) { logger.trace("Received schema check request."); /* 3.11 is special here: We return the 3.0 compatible version, if the requesting node is running 3.0. Otherwise the "real" schema version. */ MessageOut<UUID> response = new MessageOut<>(MessagingService.Verb.INTERNAL_RESPONSE, Schema.instance.getVersion(), UUIDSerializer.serializer); MessagingService.instance().sendReply(response, id, message.from); } }
public void doVerb(MessageIn message, int id) { logger.trace("Received schema check request."); /* 3.11 is special here: We return the 3.0 compatible version, if the requesting node is running 3.0. Otherwise the "real" schema version. */ MessageOut<UUID> response = new MessageOut<>(MessagingService.Verb.INTERNAL_RESPONSE, Schema.instance.getVersion(), UUIDSerializer.serializer); MessagingService.instance().sendReply(response, id, message.from); } }
public void doVerb(MessageIn message, int id) { logger.debug("Received schema check request."); MessageOut<UUID> response = new MessageOut<UUID>(MessagingService.Verb.INTERNAL_RESPONSE, Schema.instance.getVersion(), UUIDSerializer.serializer); MessagingService.instance().sendReply(response, id, message.from); } }
public void doVerb(MessageIn message, int id) { logger.trace("Received schema check request."); /* 3.11 is special here: We return the 3.0 compatible version, if the requesting node is running 3.0. Otherwise the "real" schema version. */ MessageOut<UUID> response = new MessageOut<>(MessagingService.Verb.INTERNAL_RESPONSE, Schema.instance.getVersion(), UUIDSerializer.serializer); MessagingService.instance().sendReply(response, id, message.from); } }
/** * Like updateVersion, but also announces via gossip * * 3.11 note: we announce the "current" schema version, which can be either the 3.0 * compatible one, if at least one node is still running 3.0, or the "real" schema version. */ public void updateVersionAndAnnounce() { updateVersion(); UUID current = getVersion(); MigrationManager.passiveAnnounce(current, current == getAltVersion()); }
/** * Like updateVersion, but also announces via gossip * * 3.11 note: we announce the "current" schema version, which can be either the 3.0 * compatible one, if at least one node is still running 3.0, or the "real" schema version. */ public void updateVersionAndAnnounce() { updateVersion(); UUID current = getVersion(); MigrationManager.passiveAnnounce(current, current == getAltVersion()); }
/** * Like updateVersion, but also announces via gossip * * 3.11 note: we announce the "current" schema version, which can be either the 3.0 * compatible one, if at least one node is still running 3.0, or the "real" schema version. */ public void updateVersionAndAnnounce() { updateVersion(); UUID current = getVersion(); MigrationManager.passiveAnnounce(current, current == getAltVersion()); }
public String system_drop_keyspace(String keyspace) throws InvalidRequestException, SchemaDisagreementException, TException { logger.debug("drop_keyspace"); try { ThriftValidation.validateKeyspaceNotSystem(keyspace); state().hasKeyspaceAccess(keyspace, Permission.DROP); MigrationManager.announceKeyspaceDrop(keyspace); return Schema.instance.getVersion().toString(); } catch (RequestValidationException e) { throw ThriftConversion.toThrift(e); } }
public String system_drop_keyspace(String keyspace) throws InvalidRequestException, SchemaDisagreementException, TException { logger.trace("drop_keyspace"); try { ThriftValidation.validateKeyspaceNotSystem(keyspace); state().hasKeyspaceAccess(keyspace, Permission.DROP); MigrationManager.announceKeyspaceDrop(keyspace); return Schema.instance.getVersion().toString(); } catch (RequestValidationException e) { throw ThriftConversion.toThrift(e); } }
public String system_drop_keyspace(String keyspace) throws InvalidRequestException, SchemaDisagreementException, TException { logger.trace("drop_keyspace"); try { ThriftValidation.validateKeyspaceNotSystem(keyspace); state().hasKeyspaceAccess(keyspace, Permission.DROP); MigrationManager.announceKeyspaceDrop(keyspace); return Schema.instance.getVersion().toString(); } catch (RequestValidationException e) { throw ThriftConversion.toThrift(e); } }
public String system_drop_column_family(String column_family) throws InvalidRequestException, SchemaDisagreementException, TException { logger.debug("drop_column_family"); ThriftClientState cState = state(); try { String keyspace = cState.getKeyspace(); cState.hasColumnFamilyAccess(keyspace, column_family, Permission.DROP); MigrationManager.announceColumnFamilyDrop(keyspace, column_family); return Schema.instance.getVersion().toString(); } catch (RequestValidationException e) { throw ThriftConversion.toThrift(e); } }
public String system_drop_column_family(String column_family) throws InvalidRequestException, SchemaDisagreementException, TException { logger.trace("drop_column_family"); ThriftClientState cState = state(); try { String keyspace = cState.getKeyspace(); cState.hasColumnFamilyAccess(keyspace, column_family, Permission.DROP); CFMetaData metadata = ThriftValidation.validateColumnFamily(keyspace, column_family); if (metadata.isView()) throw new org.apache.cassandra.exceptions.InvalidRequestException("Cannot drop Materialized Views from Thrift"); MigrationManager.announceColumnFamilyDrop(keyspace, column_family); return Schema.instance.getVersion().toString(); } catch (RequestValidationException e) { throw ThriftConversion.toThrift(e); } }