src/java/org/apache/cassandra/thrift/CassandraServer.java
/** update an existing keyspace, but do not allow column family modifications.
     * @throws SchemaDisagreementException
     */
update an existing keyspace, but do not allow column family modifications.
update an existing keyspace but do not allow column family modifications .
@Override
    public synchronized String system_update_keyspace(KsDef ks_def)
    throws InvalidRequestException, SchemaDisagreementException, TException
    {
        logger.debug("update_keyspace");
        state().hasKeyspaceSchemaAccess(Permission.WRITE);
        ThriftValidation.validateTable(ks_def.name);
        if (ks_def.getCf_defs() != null && ks_def.getCf_defs().size() > 0)
            throw new InvalidRequestException("Keyspace update must not contain any column family definitions.");
        validateSchemaAgreement();
        try
        {
            ThriftValidation.validateKsDef(ks_def);
            applyMigrationOnStage(new UpdateKeyspace(KSMetaData.fromThrift(ks_def)));
            return Schema.instance.getVersion().toString();
        }
        catch (ConfigurationException e)
        {
            InvalidRequestException ex = new InvalidRequestException(e.getMessage());
            ex.initCause(e);
            throw ex;
        }
        catch (IOException e)
        {
            InvalidRequestException ex = new InvalidRequestException(e.getMessage());
            ex.initCause(e);
            throw ex;
        }
    }
@ Override public synchronized String system_update_keyspace ( KsDef ks_def ) throws InvalidRequestException , SchemaDisagreementException , TException { logger . debug ( "update_keyspace" ) ; state ( ) . hasKeyspaceSchemaAccess ( Permission . WRITE ) ; ThriftValidation . validateTable ( ks_def . name ) ; if ( ks_def . getCf_defs ( ) != null && ks_def . getCf_defs ( ) . size ( ) > 0 ) throw new InvalidRequestException ( "Keyspace update must not contain any column family definitions." ) ; validateSchemaAgreement ( ) ; try { ThriftValidation . validateKsDef ( ks_def ) ; applyMigrationOnStage ( new UpdateKeyspace ( KSMetaData . fromThrift ( ks_def ) ) ) ; return Schema . instance . getVersion ( ) . toString ( ) ; } catch ( ConfigurationException e ) { InvalidRequestException ex = new InvalidRequestException ( e . getMessage ( ) ) ; ex . initCause ( e ) ; throw ex ; } catch ( IOException e ) { InvalidRequestException ex = new InvalidRequestException ( e . getMessage ( ) ) ; ex . initCause ( e ) ; throw ex ; } }
update an existing keyspace, but do not allow column family modifications.
update an existing keyspace but do not allow column family modifications .