private void executeAddColumnFamily ( Tree statement ) { if ( ! CliMain . isConnected ( ) || ! hasKeySpace ( ) ) return ; // first value is the column family name, after that it is all key=value CfDef cfDef = new CfDef ( keySpace , CliUtils . unescapeSQLString ( statement . getChild ( 0 ) . getText ( ) ) ) ; try { String mySchemaVersion = thriftClient . system_add_column_family ( updateCfDefAttributes ( statement , cfDef ) ) ; sessionState . out . println ( mySchemaVersion ) ; keyspacesMap . put ( keySpace , thriftClient . describe_keyspace ( keySpace ) ) ; } catch ( InvalidRequestException e ) { throw new RuntimeException ( e ) ; } catch ( Exception e ) { throw new RuntimeException ( e ) ; } }
Add a column family