PHPCassa-Can';当使用uuid时间戳作为密钥时,不能插入

PHPCassa-Can';当使用uuid时间戳作为密钥时,不能插入,php,cassandra,uuid,phpcassa,Php,Cassandra,Uuid,Phpcassa,我试图将数据存储到cassandra中,并按时间排序。无法使用TimeUUIDType作为键 我在phpcassa中得到以下错误 Fatal error: Uncaught exception 'cassandra_InvalidRequestException' with message 'TimeUUID should be 16 or 0 bytes (6)' 调用insert方法时发生此情况 $pool = new ConnectionPool("Keyspace1", arra

我试图将数据存储到cassandra中,并按时间排序。无法使用TimeUUIDType作为键

我在phpcassa中得到以下错误

Fatal error: Uncaught exception 'cassandra_InvalidRequestException' 
with message 'TimeUUID   should be 16 or 0 bytes (6)'
调用insert方法时发生此情况

$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;

comparator
适用于列名,而不是行键。如果希望行键为timeuuid,则应改为设置
key\u validation\u class


出现此异常是因为Cassandra要求列名使用TimeUUID,但您传递的是普通字符串。

comparator
适用于列名,而不是行键。如果希望行键为timeuuid,则应改为设置
key\u validation\u class

出现此异常是因为Cassandra希望列名具有TimeUUID,但您传递的是普通字符串