Netflix / astyanax

Cassandra Java Client
Apache License 2.0
1.04k stars 355 forks source link

Java Driver: CassandraChunkedStorageProvider always throw NPE #548

Open lukaszsoszynski opened 9 years ago

lukaszsoszynski commented 9 years ago

Missing invocation of cf.describe() in constructor:

     public CassandraChunkedStorageProvider(Keyspace keyspace, String cfName) {
         this.keyspace = keyspace;
         this.cf = ColumnFamily.newColumnFamily(cfName, StringSerializer.get(), StringSerializer.get());
+        try {
+            cf.describe(keyspace);
+        } catch (ConnectionException e) {
+            throw new RuntimeException("Cannot describe column family", e);
+        }
     }