【发布时间】:2011-12-18 12:03:26
【问题描述】:
我正在尝试将数据存储到 cassandra 中,并按时间排序。使用 TimeUUIDType 作为键时遇到问题。
phpcassa 出现以下错误...
Fatal error: Uncaught exception 'cassandra_InvalidRequestException'
with message 'TimeUUID should be 16 or 0 bytes (6)'
调用插入方法时会出现这种情况...
$pool = new ConnectionPool("Keyspace1", array("localhost:9160"));
$column_family = new ColumnFamily($pool, 'users');
$column_family->insert(CassandraUtil::uuid1(), array('name' => 'value'));
我通过以下命令使用 cassandra-cli 创建了一个测试表...
CREATE COLUMN FAMILY users WITH comparator = TimeUUIDType;
【问题讨论】:
标签: php cassandra uuid phpcassa