Hi, Duncan:
Thanks for your reply, but it didn't help.
yzhang@yzhangmac1:~/dse/bin$ ./cqlsh hostname 9160 -u user -p passwordConnected 
to P2 QA Cluster at xxx:9160.[cqlsh 3.1.2 | Cassandra 1.2.18.1 | CQL spec 3.0.0 
| Thrift protocol 19.36.2]Use HELP for help.cqlsh> use 
myKeyspace;cqlsh:myKeyspace > consistency all;Consistency level set to 
ALL.cqlsh: myKeyspace> select * from "myTable" where "key"=59 and 
"key2"=336;cqlsh: myKeyspace > select * from "myTable" where key=59 and 
key2=336;cqlsh: myKeyspace >
This table in fact was created by old column family way in Cassandra 1.1, using 
composite key and composite column names.After we upgrade to Cassandra 1.2, you 
can see the column name in CQL comes from the Cassandra. So this table is NOT 
created in CQL.
I think it maybe due to the column name "key" is a reserved word. But even I 
quote it like "key" in the CQL query, it still didn't help.
> Date: Thu, 26 Feb 2015 03:55:04 +0100
> From: duncan.sa...@gmail.com
> To: user@cassandra.apache.org
> Subject: Re: Why and How I didn't get the result back in cqlsh
> 
> Hi,
> 
> On 26/02/15 01:24, java8964 wrote:
> ...
> > select * from "myTable";
> >    59 |  336 | 1100390163336 | A |
> > [{"updated_at":1424844362530,"ids":"668e5520-bb71-11e4-aecd-00163e56be7c"}]
> >    59 |  336 | 1100390163336 | D |
> > [{"updated_at":1424844365062,"ids":"668e5520-bb71-11e4-aecd-00163e56be7c"}]
> >
> > Obviously, the table has lots of data. Now the problem is I cannot get any 
> > data
> > back in my query using key of existing data. Why?
> >
> > cqlsh:mykeyspace> select * from "myTable" where key=59 and key2=336;
> > cqlsh:mykeyspace> select * from "myTable" where "key"=59 and "key2"=336;
> 
> try at a higher consistency level, eg first do this in cqlsh:
>    CONSISTENCY ALL;
> then try your queries.  If that works then the issue is that some replicas 
> are 
> missing data.  The default cqlsh consistency level is ONE.
> 
> Best wishes, Duncan.
                                          

Reply via email to