phpcassa

how to connect cassandra from local to EC2 instances

会有一股神秘感。 提交于 2019-12-04 19:20:50
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 doing wrong thanks in advance sounds like you didn't edit rpc_address in cassandra.yaml to listen on the

Cassandra timeseries datamodel

自作多情 提交于 2019-12-04 17:29:36
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 Standard columnfamily Name:signalname row key :dev01 columnname :timeseries(20120801124204)[YYMMDD HHMMSS]

Cassandra update column

天大地大妈咪最大 提交于 2019-12-02 01:25:25
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 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)); Have a look here cassandra-internals-writing (Look at comments 14 and 15). I guess that if you retrieve data from your database, modify your data in PHP and reinsert that that back it will get updated (if your