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
2
votes
1 answer

using UUID1 with phpcassa

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…
Nick
  • 9,962
  • 4
  • 42
  • 80
2
votes
0 answers

Cassandra does not show or apply index when adding secondary index

Cassandra seems to have automatically deleted an important secondary index so I have to restore it. I used both PHPcassa and the Cassandra CLI to restore the index. Both reported the index was applied, but when I went to try and retrieve the data…
Salocin.TEN
  • 474
  • 1
  • 6
  • 18
2
votes
2 answers

How to fetch columns in reverse order with PHPCassa

How to fetch the columns in a single row in reverse order with PHPCassa?
Nick
  • 9,962
  • 4
  • 42
  • 80
1
vote
1 answer

Ways to organize row-keys for range scans in Cassandra

I am trying to find a good way to organize my row-keys to perform range scans on them without creating my own index lists. I am having a MySQL Database with currently about 15.000 Databases, each ~50 Tables = 75.000 Tables. Because 99% of the data…
favo
  • 5,426
  • 9
  • 42
  • 61
1
vote
1 answer

Cassandra (phpcassa) reversed keys?

I know i can reverse the column order like: $rows = $test->get_range("", "", 10, NULL, "", "", true); But keys are in db like 1, 2, 3, 4 I want to get the latest 10 keys, and then do like reverse paging. So i basically want first in first…
Writecoder
  • 613
  • 2
  • 8
  • 27
1
vote
2 answers

phpcassa cassandra batch mutation

Can you provide an example of batch_mutate() function in phpcassa? Cant understand how to work with this function and didnt found any enough information. Also i want to know how to use it with counters Thanks in advance.
Undrooleek
  • 223
  • 4
  • 12
1
vote
1 answer

PHPCassa - Can't insert when using uuid timestamp as key

I'm trying to store data into cassandra with it being ordered by time. Having trouble using the TimeUUIDType as the key. I get the following error with phpcassa... Fatal error: Uncaught exception 'cassandra_InvalidRequestException' with message…
mesh
  • 923
  • 2
  • 10
  • 15
1
vote
1 answer

How can I fetch first n rows in phpcassa(Cassandra)?

I'd like to get first n rows then next n rows and it continues like that. How can I do that in phpcassa/Cassandra? //Edit I've seen ColumnFamily::create_slice_predicate method in phpcassa but it's private and get method always expects row key. I…
m3rg
  • 688
  • 2
  • 9
  • 25
1
vote
1 answer

Could not connect to localhost:9160 with phpcassa

im having such problem: phpcassa causes such exception when the load increases to 200 queries to script per second Error connecting to localhost:9160: TException: TSocket: Could not connect to localhost:9160 (Cannot assign requested address…
Undrooleek
  • 223
  • 4
  • 12
1
vote
2 answers

Cassandra migration

I have Cassandra 0.8.0 running with data on server 1, and a clean install of Cassandra 1.0.3 on server 2. Is it possible to just copy some files from server 1 to server 2? Or do i have to write my own import/export code? Both servers can be taken…
Writecoder
  • 613
  • 2
  • 8
  • 27
1
vote
1 answer

phpcassa usual query methods or cql queries?

Can you recommend what methods of queries to choose?Cql or usual classes? Phpcassa has both methods.cql is more comfortable than usual.but what will be efficiently?
Undrooleek
  • 223
  • 4
  • 12
1
vote
1 answer

some problems with IntegerType in cassandra

Why I am getting such symbols "N���" from the column with IntegerType? in cassandra-cli.bat it is showing normally, as integer. I'm using phpcassa...maybe I need to convert this value, like I'm doing with UUID UUID::import($uuid)->string but with…
Undrooleek
  • 223
  • 4
  • 12
1
vote
1 answer

How to remove the RowKey?

With PHPCassa I am removing a row. But when I use remove($uuid) the uuid stays in the DB. Is there a way to remove the row and the RowKey? Thanks in advance.
jnbdz
  • 4,863
  • 9
  • 51
  • 93
1
vote
1 answer

Cassandra_NotFound Exception when trying to instantiate a column_family object from phpcassa

I have setup a Cassandra instance 0.7 in my Windows 7 machine (64bit) . The cassandra server is up and running and it is successfully listening to thrift clients. I have tested the instance by successfully creating my own sample keyspace and column…
deGee
  • 781
  • 1
  • 16
  • 34
1
vote
2 answers

How does UUID work with PHPCassa

I am using: CassandraUtil::uuid1(); This is what I get: ämªðÏBà=0£Ï‰ I though it would output a int. What is going on? Is it normal? Also should I use uuid1 or 2 or 3 or 4 or ...? Thanks in advance!
jnbdz
  • 4,863
  • 9
  • 51
  • 93