Walter Dal Mut
unread,Dec 9, 2010, 7:04:20 AM12/9/10Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to simpletools
Hi everybody, I want to use Cassandra features but I can't work with
this server.
I have downloaded the server and I have started it, it goes well.
I download the SimpleCassie.php library and added it to my project.
Now I have added a Keyspace into the cassandra storage like this:
<Keyspace Name="Inventario">
<ColumnFamily CompareWith="UTF8Type" Name="Scaffale"/>
<ColumnFamily CompareWith="UTF8Type" Name="Oggetto"/>
<ColumnFamily CompareWith="UTF8Type" Name="Tipologie"/>
<!--
~ Strategy: The class that extends AbstractReplicationStrategy
~ determines how replicas are placed around the token ring.
~ Out of the box, Cassandra provides
~ org.apache.cassandra.locator.RackUnawareStrategy and
~ org.apache.cassandra.locator.RackAwareStrategy (place one
replica in
~ a different datacenter, and the others on different racks in
the same
~ one.)
-->
<ReplicaPlacementStrategy>org.apache.cassandra.locator.RackUnawareStrategy</
ReplicaPlacementStrategy>
<!-- Number of replicas of the data -->
<ReplicationFactor>1</ReplicationFactor>
<!--
~ EndPointSnitch: Setting this to the class that implements
~ AbstractEndpointSnitch, which lets Cassandra know enough
~ about your network topology to route requests efficiently.
~ Out of the box, Cassandra provides
org.apache.cassandra.locator.EndPointSnitch,
~ and PropertyFileEndPointSnitch is available in contrib/.
-->
<EndPointSnitch>org.apache.cassandra.locator.EndPointSnitch</
EndPointSnitch>
</Keyspace>
Now I have restarted the server and it create my keyspace.
I can't write anything into the database.
My test code is:
require_once('SimpleCassie.php');
$cassie = new SimpleCassie("127.0.0.1", "9160", 300);
if(!$cassie->isConnected())
throw new Exception('Couldn\'t connect to server');
$cassie->keyspace('Inventario')->cf('Oggetto')->key('fotocamera')-
>column('nome')->set('walter');
var_dump($cassie->keyspace('Inventario')->cf('Oggetto')-
>key('fotocamera')->get());
echo "FINE";
The VAR_DUMP directive is always null.
What I wrong?
Thanks for your help.