public void modifyKeyspace(Map<String, String> options) {
        if (!options.containsKey("ReplicationFactor")) {
            return;
        }
        String cqlKeyspace = m_dbservice.getKeyspace();
        m_logger.info("Modifying keyspace: {}", cqlKeyspace);
        StringBuilder cql = new StringBuilder();
        cql.append("ALTER KEYSPACE ");
        cql.append(cqlKeyspace);
        cql.append(" WITH REPLICATION = {'class':'");
        String strategyClass = "SimpleStrategy";
        Map<String, Object> ksDefs = m_dbservice.getParamMap("ks_defaults");
        if (ksDefs != null && ksDefs.containsKey("strategy_class")) {
            strategyClass = ksDefs.get("strategy_class").toString();
        }
        cql.append(strategyClass);
        cql.append("','replication_factor':");
        cql.append(options.get("ReplicationFactor"));
        cql.append("};");
        executeCQL(cql.toString());
    }
public void modifyKeyspace ( Map < String , String > options ) { if ( ! options . containsKey ( "ReplicationFactor" ) ) { return ; } String cqlKeyspace = m_dbservice . getKeyspace ( ) ; m_logger . info ( "Modifying keyspace: {}" , cqlKeyspace ) ; StringBuilder cql = new StringBuilder ( ) ; cql . append ( "ALTER KEYSPACE " ) ; cql . append ( cqlKeyspace ) ; cql . append ( " WITH REPLICATION = {'class':'" ) ; String strategyClass = "SimpleStrategy" ; Map < String , Object > ksDefs = m_dbservice . getParamMap ( "ks_defaults" ) ; if ( ksDefs != null && ksDefs . containsKey ( "strategy_class" ) ) { strategyClass = ksDefs . get ( "strategy_class" ) . toString ( ) ; } cql . append ( strategyClass ) ; cql . append ( "','replication_factor':" ) ; cql . append ( options . get ( "ReplicationFactor" ) ) ; cql . append ( "};" ) ; executeCQL ( cql . toString ( ) ) ; }
Modify the keyspace with the given name with the given options. The only option
that can be modified is ReplicationFactor.  If it is present, the keyspace is
altered with the following CQL command:
<pre>
ALTER KEYSPACE "<i>keyspace</i>" WITH REPLICATION = {'class':'SimpleStrategy',
'replication_factor' : <i>replication_factor</i> };
</pre>

@param options   Modified options to use for keyspace. Only the option
"replication_factor" is examined.