Questions tagged [phpcassa]

phpcassa is a PHP client library (port of pycassa) for Apache Cassandra

phpcassa is a PHP client library for Apache Cassandra.

  • Compatible with Cassandra 0.7, 0.8, 1.0, and 1.1
  • Optional C extension for improved performance

phpcassa is compatible with PHP 5.3+

phpcassa is open source under the MIT license.

95 questions
1
vote
1 answer

Cassandra get incremented value

I am counting posts and many other things on my website with counter column, I have a lot of traffic for example 10k+ comments per hour. So what i want to achieve is once post is made and counter has been increased I would like to retrieve the exact…
Linas
  • 4,380
  • 17
  • 69
  • 117
1
vote
3 answers

Cassandra multi row selection

Somewhere I have heard that using multi row selection in cassandra is bad because for each row selection it runs new query, so for example if i want to fetch 1000 rows at once it would be the same as running 1000 separate queries at once, is that…
Linas
  • 4,380
  • 17
  • 69
  • 117
1
vote
1 answer

Cassandra composite column partial querying

I can't find a way to get columns by second or any other part of the column name, for example if i have user_id:timestamp How can i select that column by timestamp and completely ignore user_id? This is the code i'm using now: $slice = new…
Linas
  • 4,380
  • 17
  • 69
  • 117
1
vote
1 answer

How do I generate UUID in PHPcassa

I have been searching google and stackoverflow for a tutorial on generating UUID using PHPcassa. I am a noob and I cant seem to figure this out. I am using the latest PHPcassa version, which is this URL http://thobbs.github.com/phpcassa/ can…
Chang Lin
  • 61
  • 8
1
vote
1 answer

Phpcassa - I'm struggling to understand this snippet of code

I'm still trying to wrap my head around the whole concept of composite keys in cassandra. I picked up this piece of code from https://github.com/thobbs/phpcassa/blob/master/examples/composites.php and I am struggling to understand what this means…
Sthe
  • 2,575
  • 2
  • 31
  • 48
1
vote
1 answer

phpcassa creating column family

I get a very strange error when creating column family with phpcassa, here is my code: $sys = new SystemManager("127.0.0.1:9160"); $attr = array("comparator" => "UTF8Type"); $data = $sys->create_column_family("my_key_space",…
Linas
  • 4,380
  • 17
  • 69
  • 117
1
vote
2 answers

Use phpcassa for cassandra with yiiframework

Does anyone know how to use phpcassa for cassandra with Yiiframework? I've tried Cassandra PDO. It works very well, but I happened to like the way phpcassa works. Especially the support for most cassandra features. I don't know but I found phpcassa…
Sthe
  • 2,575
  • 2
  • 31
  • 48
1
vote
1 answer

Issue with phpcassa when few of the cassandra servers in cluster are down

When some of the cassandra server in cluster are down phpcassa takes lot of time to respond. Logically phpcassa should connect to running nodes and get data in stead of trying to connect to down nodes. Do anybody have any idea how phpcassa…
MANISH ZOPE
  • 1,181
  • 1
  • 11
  • 28
1
vote
2 answers

Cassandra schema for comments

I'm looking for a good way to store comments in cassandra. Can someone provide me a good Cassandra data model to store comments? The data model should allow me to retrieve a certain number of these comments with phpcassa. This was my idea: Comments…
siannone
  • 6,617
  • 15
  • 59
  • 89
1
vote
3 answers

cassandra read performance for large number of keys

Here is situation I am trying to fetch around 10k keys from CF. Size of cluster : 10 nodes Data on node : 250 GB Heap allotted : 12 GB Snitch used : property snitch with 2 racks in same Data center. no. of sstables for cf per node : around 8 to 10 I…
MANISH ZOPE
  • 1,181
  • 1
  • 11
  • 28
0
votes
1 answer

phpcassa get_range is too slow

I have CF with 1280 rows. Each row has 6 columns. Im trying to $cf->get_range('pq_questions','','',1200) and it gets all rows but too slow(about 4-6 sec) Column Family: pq_questions SSTable count: 1 Space used…
Undrooleek
  • 223
  • 4
  • 12
0
votes
1 answer

phpcassa fail connect to server

I install cassandra on ubuntu, set in conf file listen_address: 200.166.107.170 rpc_address: 213.186.117.170 rpc_port: 9160 then i try run this php code from other machine CassandraConn::add_node('200.166.107.170', 9160); $users = new…
lebron2323
  • 990
  • 2
  • 14
  • 29
0
votes
1 answer

PHPcassa insert randomly

$column_family->insert('row_key1', array('col_name1' => 'col_val1')); $column_family->insert('row_key2', array('col_name2' => 'col_val2')); $column_family->insert('row_key3', array('col_name3' => 'col_val3')); $column_family->insert('row_key4',…
0
votes
1 answer

Appending data to a super column family in cassandra

I am trying to add a huge dataset into cassandra using phpcassa. The dataset comprises of our site events over the last few years. I have a super column family to which I want to append events. My current approach is to get the existing data from…
0
votes
1 answer

Cassandra doesn't update (after some time?)

Very weird problem, some RowKeys looks like they are getting 'locked' after some time. First they are created fine, i can update them for some time. Then after some time updates aren't working anymore but i can still update fresh created keys…
Writecoder
  • 613
  • 2
  • 8
  • 27