phpcassa

using UUID1 with phpcassa

被刻印的时光 ゝ 提交于 2019-12-22 14:58:20
问题 Have following CF: create column family gr_ip2 with column_type = 'Standard' and comparator = 'TimeUUIDType(reversed=true)' ...; then do following code: $uuid1 = phpcassa\UUID::uuid1(null, $time); $cf->insert("$key" , array($uuid1 => $url) ); it works without exceptions, but CF at the end is empty. 回答1: $uuid1 is not string, but an object. When we do $cf->insert("$key" , array($uuid1 => $url) ); the object is converted to string, and insert fails. phpcassa does not give exeption, but insert

Cassandra timeseries datamodel

守給你的承諾、 提交于 2019-12-21 21:00:38
问题 Let assume 10 devices(dev01,dev02,dev03..etc). It send data with some interval time,we collect those data,so our data schema is dev01 :int signalname :string signaltime :date/time[with YY-MM-DD HHMMSS.mm] Extradata :String I want to push data into cassandra ,which way is best to store those data? My Query is Like , 1 Need to retrive device based current day data,or with some date range? 2 5 Device current day data? I am not sure the following way to store data into cassadra is best model

Cassandra update column

帅比萌擦擦* 提交于 2019-12-20 03:17:04
问题 how can i update column in cassandra database?? columnfam{ username{ name:edds, surname:surname, email:mymail@rrr.com } } for example i need update surname?? im using php client PHPCASSA. thanx 回答1: As Octopus-Paul says, updates are the same as inserts. There's no need to read before writing, though. You can just do this: $column_family->insert('username', array('surname' => $new_surname)); 回答2: Have a look here cassandra-internals-writing (Look at comments 14 and 15). I guess that if you

Problem in bulk load from a file into Cassandra using phpcassa

£可爱£侵袭症+ 提交于 2019-12-13 08:51:14
问题 I am trying to load 1000000 records from a text file into Cassandra using phpcassa. But halfway through the loading process I got the following error. PHP Fatal error: Maximum execution time of 30 seconds exceeded in /usr/share/php/phpcassa/columnfamily.php on line 759** How do I increase the execution time? Do I have to change any parameter in columnfamily.php ? Please find my code below. <? require_once('phpcassa/connection.php'); require_once('phpcassa/columnfamily.php'); try { $servers =

how to connect cassandra from local to EC2 instances

流过昼夜 提交于 2019-12-12 09:20:20
问题 I installed cassandra cluster in ec2 its working correctly. but when i try to connect the cassandra from code using php_cassa lib. its throwing error like "no server available" the follow code its am working. 'ec2-public-ip address', 'port' => 9160); $conn = new Connection('CookieDB', $servers); $column_family = new ColumnFamily($conn, 'User'); $column_family->insert('row_key', array('username'=>'PHPCASSA')); $value = $column_family->get('row_key'); print_r($value); ?> is there anything am

Getting value from a key type TimeUUID in Cassandra-PHP

元气小坏坏 提交于 2019-12-10 15:42:00
问题 I'm new in cassandra and I wanna get the values from a column family, where the key is a TimeUUIDType. I'm using PHP with PHPCassa, and I can insert(set) correctly in the column family, generating uuid with the function: $key = CassandraUtil::uuid1(); The problem happen when I try to do a get in the column family, because i have and uuid in String format( something like that): $uuidString= "e2658820-69f2-11e1-af9a-95dd4f324d9"; I would like to know if is possible cast or transform an String

Cannot connect to Cassandra on a cloud server using phpcassa

大兔子大兔子 提交于 2019-12-08 05:44:36
问题 I have setup a test cloud server (Ubuntu 10.10 on Rackspace) to play with Cassandra database (0.6.8). I can connect no problem both from within the server and from a computer external to the cloud using the cassandra-cli basic client: I have created and retrieved sample data. I have then installed phpcassa on the cloud server and on an external computer. I have created a very simple php program to test the connection: <?php $GLOBALS['THRIFT_ROOT'] = dirname(__FILE__) . '/include/thrift/';

Cassandra is not retrieving the correct integer value

瘦欲@ 提交于 2019-12-07 13:24:53
问题 I am using cql 3.0.0 I have executed the query: INSERT INTO emp (empID, deptID, first_name, last_name) VALUES (104, 15, 'jane', 'smith') On retrieving this record, I get the following values: empid = h deptid = (blank value) first_name = 'jane' last_name = 'smith' On searching for it, I found that h is equivalent to utf-8 character 104. Also 15 in utf-8 is blank. (Reference Link: http://www.utf8-chartable.de/unicode-utf8-table.pl?utf8=dec&unicodeinhtml=dec ) I have set the column types to int

using UUID1 with phpcassa

心不动则不痛 提交于 2019-12-06 07:46:34
Have following CF: create column family gr_ip2 with column_type = 'Standard' and comparator = 'TimeUUIDType(reversed=true)' ...; then do following code: $uuid1 = phpcassa\UUID::uuid1(null, $time); $cf->insert("$key" , array($uuid1 => $url) ); it works without exceptions, but CF at the end is empty. $uuid1 is not string, but an object. When we do $cf->insert("$key" , array($uuid1 => $url) ); the object is converted to string, and insert fails. phpcassa does not give exeption, but insert fails anyway. Seems like we need to use ARRAY_FORMAT, so the object not to be "flatten" to string, $uuid1 =

Cassandra hangs on arbitrary commands

折月煮酒 提交于 2019-12-05 02:40:09
问题 We're hosting Cassandra 2.0.2 cluster on AWS. We've recently started upgrading from normal to SSD drives, by bootstrapping new and decommissioning old nodes. It went fairly well, aside from two nodes hanging forever on decommission. Now, after the new 6 nodes are operational, we noticed that some of our old tools, using phpcassa stopped working. Nothing has changed with security groups, all ports TCP/UDP are open, telnet can connect via 9160, cqlsh can 'use' a cluster, select data, however,