私は Cassandra を初めて使用し、Hector API をいじっています。以下のスクリーンショットでわかるように、列ファミリーが定義されており、CQL を使用して行を返すと、キーと値が 16 進数値として返されます。可能であれば、UTF8 値として返したいと思います。また、私の列名が取られていないようです。代わりに「Column1」を使用しています。以下に私のcol家族宣言を掲載します。
//Define ColumnFamily Def in Hector
ColumnFamilyDefinition cfDef = HFactory.createColumnFamilyDefinition(keyspaceName,"DP_ColumnFamily1",ComparatorType.UTF8TYPE);
//Add the column family to actual Cassandra Instance
cluster.addColumnFamily(cfDef,false);
stringSerializer = StringSerializer.get();
//The following example inserts a Column with the column name "Datapower_Device_Name" and the column value of "DPIPE0101" under the key "key1".
Mutator mutator = HFactory.createMutator(ksp, stringSerializer);
mutator.insert("key1", "DP_ColumnFamily1", HFactory.createStringColumn("Datapower_Device_Name", "DPIPE0101"));
cqlsh:test3> select * from "DP_ColumnFamily1";
key | column1 | value
------------+-----------------------+----------------------
0x6b657931 | Datapower_Device_Name | 0x445049504530313031
(1 rows)