private void getColumnNames ( ) { TableMetadata table = _keyspace . getKeyspaceMetadata ( ) . getTable ( CF_NAME ) ; _rowkeyColumn = table . getPrimaryKey ( ) . get ( 0 ) . getName ( ) ; _subscriptionNameColumn = table . getPrimaryKey ( ) . get ( 1 ) . getName ( ) ; _subscriptionColumn = table . getColumns ( ) . get ( 2 ) . getName ( ) ; }
Because of the way databus tables were created historically using Astyanax and Cassandra 1 . 2 there may be inconsistency in the names of the CQL columns in the subscription table . To be safe read the table metadata to get the column names .