On Tue, Jul 10, 2012 at 3:04 PM, Leonid Ilyevsky <lilyev...@mooncapital.com>wrote:
> I am trying to use the org.apache.cassandra.cql3 package. Having problem > connecting to the server using ClientState.**** > > I was not sure what to put in the credentials map (I did not set any > users/passwords on my server), so I tried setting empty strings for > “username” and “password”, setting them to bogus values, passing null to > the login method – there was no difference.**** > > It does not complain at the login(), but then it complains about > setKeyspace(<my keyspace>), saying that the specified keyspace does not > exist (it obviously does exist).**** > > The configuration was loaded from cassandra.yaml used by the server.**** > > ** ** > > I did not have any problem like this when I used > org.apache.cassandra.thrift.Cassandra.Client .**** > > ** ** > > What am I doing wrong?**** > > ** > I think that package just contains server classes. Everything you need should be in org.apache.cassandra.thrift. To use cql3 I just use the client methods 'execute_cql_query', 'prepare_cql_query' and 'execute_prepared_cql_query', after setting cql version to '3.0.0'. -- Derek Williams