phpcassa never returns(infinite loop?)

22 views
Skip to first unread message

Jo Juda

unread,
Jan 14, 2011, 1:34:10 PM1/14/11
to phpcassa
I am trying to use phpcasse

I use the following example

CassandraConn::add_node('localhost', 9160);
$users = new CassandraCF('rhg', 'Users'); // ColumnFamily
$users->insert('1', array('email' => 'te...@example.com', 'password' =>
'test'));


when I run it, it never returns,,, and apache process eats 100% CPU


I am using cassandra 0.7

Tyler Hobbs

unread,
Jan 14, 2011, 1:50:26 PM1/14/11
to phpc...@googlegroups.com
For Cassandra 0.7, you need to use the phpcassa version here:

https://github.com/thobbs/phpcassa

Hoan's version only works with Cassandra 0.6.

- Tyler

Jo Juda

unread,
Jan 14, 2011, 3:37:59 PM1/14/11
to phpcassa
thank you very much!
It works but I have another problem

now, the constructor of ColumnFamily is throwing an
"cassandra_NotFoundException" exception,

I noticed this happens because $ks->cf_defs is empty

but I don't understand what is this, or how to solve it...

again, thank you!

On Jan 14, 7:50 pm, Tyler Hobbs <ty...@riptano.com> wrote:
> For Cassandra 0.7, you need to use the phpcassa version here:
>
> https://github.com/thobbs/phpcassa
>
> Hoan's version only works with Cassandra 0.6.
>
> - Tyler
>
> On Fri, Jan 14, 2011 at 12:34 PM, Jo Juda <jo.eter...@googlemail.com> wrote:
> > I am trying to use phpcasse
>
> > I use the following example
>
> > CassandraConn::add_node('localhost', 9160);
> > $users = new CassandraCF('rhg', 'Users'); // ColumnFamily
> > $users->insert('1', array('email' => 't...@example.com', 'password' =>

Tyler Hobbs

unread,
Jan 14, 2011, 4:05:36 PM1/14/11
to phpc...@googlegroups.com
That means that the column family you are trying to use doesn't exist yet.  You need to create it either with bin/cassandra-cli (which comes with Cassandra) or by importing a schema from conf/cassandra.yaml.

Here is some info on the first method: http://www.riptano.com/blog/live-schema-updates-cassandra-07
And there is a quick bit here on the second: http://thobbs.github.com/phpcassa/tutorial.html#prerequisites

- Tyler

Jo Juda

unread,
Jan 15, 2011, 9:17:36 AM1/15/11
to phpcassa
thank you...
is there any complete documentation out there for cassandra api?

On Jan 14, 10:05 pm, Tyler Hobbs <ty...@riptano.com> wrote:
> That means that the column family you are trying to use doesn't exist yet.
> You need to create it either with bin/cassandra-cli (which comes with
> Cassandra) or by importing a schema from conf/cassandra.yaml.
>
> Here is some info on the first method:http://www.riptano.com/blog/live-schema-updates-cassandra-07
> And there is a quick bit here on the second:http://thobbs.github.com/phpcassa/tutorial.html#prerequisites
>
> - Tyler
>

Tyler Hobbs

unread,
Jan 15, 2011, 1:24:01 PM1/15/11
to phpc...@googlegroups.com
http://thobbs.github.com/phpcassa/tutorial.html
http://thobfbs.github.com/phpcassa/api/index.html

Those are all of the phpcassa documentation, and phpcassa uses the full cassandra data API.

- Tyler
Reply all
Reply to author
Forward
0 new messages