ここにヌーブ。
多数のエントリを持つtimeuuidtypeでソートされたスーパー列ファミリーがあります。動作しないphpcassaを使用して単純なget関数を実行しようとしています。TimeUUIDでソートされたSC内のUTF8でソートされた列から特定の値を返そうとしています。正確なコードは、BytesTypeでソートされた同様のSCファミリで機能します。
これは、以前に-cliを介して入力したscfから取得しようとしている情報です。
ColumnFamily: testSCF (Super)
Columns sorted by: org.apache.cassandra.db.marshal.TimeUUIDType/org.apache.cassandra.db.marshal.UTF8Type
RowKey: TestKey
=> (super_column=48dd0330-5bd6-11e0-adc5-343960c1b6b8,
(column=test, value=74657374, timestamp=1301603831288000))
=> (super_column=141a69b0-5c6e-11e0-bcce-343960c1b6b8,
(column=new test, value=6e657774657374, timestamp=1301669004440000))
そして、これが私がデータを取得するために使用しているphpcassaスクリプトです。
<?php
require_once('.../connection.php');
require_once('.../columnfamily.php');
$conn = new Connection('siteRoot');
$scf = 'testSCF';
$key = 'testKey';
$super = '141a69b0-5c6e-11e0-bcce-343960c1b6b8';
$col = 'new test';
$entry = new ColumnFamily($conn, $scf);
$q = ($entry->get($key, $columns=array($super)));
echo $q[$super][$col];
?>
また、そのようにSCを指定しない場合。
$q = ($entry->get($key));
print_r($q);
それは戻ります:
Array ( [HÝ0[ÖàÅ49`Á¶¸] => Array ( [test] => test ) [i°\nà¼Î49`Á¶¸] => Array ( [new test] => newtest ) )
問題の一部がCassandraにTimeUUIDType列の行を挿入するにはどうすればよいですか?で発生した可能性があることを知っています。 しかし、私はおそらくtimeuuidtypesを受け入れたので、それは実際には役に立ちませんでした。
助けてくれてありがとう。