astyanax icon indicating copy to clipboard operation
astyanax copied to clipboard

Java Driver: CassandraChunkedStorageProvider always throw NotFoundException

Open lukaszsoszynski opened this issue 10 years ago • 0 comments

In the method readMetadata the uppercase column names are used instead of lowercase, thus the field value is never read correctly (is always equal to null). That is why NotFoundException is always throw.

Fix:

     public CassandraChunkedStorageProvider(Keyspace keyspace, ColumnFamily cf) {
@@ -82,7 +88,7 @@ public class CassandraChunkedStorageProvider implements ChunkedStorageProvider {
     private String getColumnName(Columns column) {
         if (names.containsKey(column))
             return names.get(column);
-        return column.name();
+        return column.name().toLowerCase();
     }

lukaszsoszynski avatar Nov 18 '14 10:11 lukaszsoszynski