Help me

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Help me

Nithya
Sir,

I follow the web link http://miguel.leugim.com.mx/index.php/tag/pharo/.
I installed the Pharo smalltalk for Accessing Cassandra Database.

PharoCore images and thrift0.4.0,cassandra0.6.6 are downloaded.
And load the cassandra.st,thrift.st in the Pharo image cassandraclient.


I added the following coding in the Pharo workspace to access Cassandra Database.

"Insert 10000 values"
[| cp result client |
client := CassandraClient binaryOnHost: 'localhost' port: 9160.

cp := ColumnPath new
columnFamily: 'Standard1';
column: 'col1'.
1 to: 10000 do: [ :i |
result := client insertKeyspace: 'Keyspace1'
key: 'row', i asString
columnPath: cp

value: 'v', i asString
timestamp: 1
consistencyLevel: ((Cassandra enums at: 'ConsistencyLevel') at:
'QUORUM').]] timeToRun


When executing this program it showing "client := CassandraClient binaryOnHost: 'localhost' port: 9160." is undefined.



Regards,

Nithya.S
Reply | Threaded
Open this post in threaded view
|

Re: Help me

Geert Claes
Administrator
Hi Nithya, I have moved your post to the Nabble mailing list.

Nithya wrote
Sir,

  I follow the web link http://miguel.leugim.com.mx/index.php/tag/pharo/.
  I installed the Pharo smalltalk for Accessing Cassandra Database.

  PharoCore images and thrift0.4.0,cassandra0.6.6 are downloaded.
  And load the cassandra.st,thrift.st in the Pharo image cassandraclient.


  I added the following coding in the Pharo workspace to access
Cassandra Database.

    "Insert 10000 values"
  [| cp result client |
  client := CassandraClient binaryOnHost: 'localhost' port: 9160.

  cp := ColumnPath new
  columnFamily: 'Standard1';
  column: 'col1'.
  1 to: 10000 do: [ :i |
  result := client insertKeyspace: 'Keyspace1'
  key: 'row', i asString
  columnPath: cp

  value: 'v', i asString
  timestamp: 1
  consistencyLevel: ((Cassandra enums at: 'ConsistencyLevel') at:
'QUORUM').]] timeToRun


    When executing this program it showing  "client := CassandraClient
binaryOnHost: 'localhost' port: 9160." is undefined.



Regards,

Nithya.S
Reply | Threaded
Open this post in threaded view
|

Re: Help me

Miguel Cobá
El jue, 02-12-2010 a las 00:42 -0800, Geert Claes escribió:
> Hi Nithya, I have moved your post to the Nabble mailing list.
>
>
> Nithya wrote:

> >     When executing this program it showing  "client := CassandraClient
> > binaryOnHost: 'localhost' port: 9160." is undefined.
> >
> >
Did you file in the two files generated:

thrift/lib/st/thrift.st
gen-st/cassandra.st

This will create the CassandraClient class in your image. If they didn't
load, the class won't exist.

Also, make sure the Cassandra server is running in order to the client
to connect and write the data

Cheers

--
Miguel Cobá
http://twitter.com/MiguelCobaMtz
http://miguel.leugim.com.mx




Reply | Threaded
Open this post in threaded view
|

Re: Help me

Nithya.S
Hi,

           Can you please help me how to load the cassandra.st,thrift.st images to the pharo.