cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Shuler (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (CASSANDRA-6525) Cannot select data which using "WHERE"
Date Sat, 15 Mar 2014 00:46:43 GMT

    [ https://issues.apache.org/jira/browse/CASSANDRA-6525?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13935623#comment-13935623
] 

Michael Shuler edited comment on CASSANDRA-6525 at 3/15/14 12:46 AM:
---------------------------------------------------------------------

I tested using cassandra-2.0 git branch on my laptop (16G), which ran fine. I tried on a 4G
box and 2G box - both ran fine looping through the script below, while running cassandra-stress
in another shell, also. I'm about 10 or so loops through, while looping stress read and write
on a 1G virtualbox vm, and it's slow, but I've had no errors, so far. I'll let it keep running
a while to see if I can get a timeout or error of some sort

*update* 2.5 hours of looping this while looping stress read/write on my vbox vm and all is
well.
*update2* tried the same after dropping my vbox vm to 512M - 45k row load takes about 60 sec.
to import and the read takes a little longer to output - vm starts swapping on the 45k read
and the load avg nears 40, but it's still working.

{code}
#!/bin/sh

# create some data:
for i in $(seq 1 50); do echo "N,text blah blah$i,text blah blah$i,text blah blah$i" >>
c6525_1-50.csv ; done
for i in $(seq 51 500); do echo "N,text blah blah$i,text blah blah$i,text blah blah$i" >>
c6525_51-500.csv ; done
for i in $(seq 501 5000); do echo "N,text blah blah$i,text blah blah$i,text blah blah$i" >>
c6525_501-5000.csv ; done
for i in $(seq 5001 50000); do echo "N,text blah blah$i,text blah blah$i,text blah blah$i"
>> c6525_5001-50000.csv ; done

# create our cql to drop/create/import
cat << 'EOF' > c6525_run.cql
DROP KEYSPACE c6525;

CREATE KEYSPACE c6525 WITH replication = {'class': 'SimpleStrategy', 'replication_factor':
'1'};

CREATE TABLE c6525.test (hidden text, field2 text, field3 text, field4 text, PRIMARY KEY (hidden,
field2, field3));

COPY c6525.test (hidden, field2, field3, field4) FROM 'c6525_1-50.csv';
SELECT * from c6525.test WHERE hidden = 'N';

COPY c6525.test (hidden, field2, field3, field4) FROM 'c6525_51-500.csv';
SELECT * from c6525.test WHERE hidden = 'N';

COPY c6525.test (hidden, field2, field3, field4) FROM 'c6525_501-5000.csv';
SELECT * from c6525.test WHERE hidden = 'N';

COPY c6525.test (hidden, field2, field3, field4) FROM 'c6525_5001-50000.csv';
SELECT * from c6525.test WHERE hidden = 'N' LIMIT 51000;
EOF

echo; echo "*** Hit CTL-C to stop looping..***"; echo
sleep 3

# loop it
while true; do echo "SOURCE 'c6525_run.cql';" | cqlsh ; sleep 1 ; done
{code}


was (Author: mshuler):
I tested using cassandra-2.0 git branch on my laptop (16G), which ran fine. I tried on a 4G
box and 2G box - both ran fine looping through the script below, while running cassandra-stress
in another shell, also. I'm about 10 or so loops through, while looping stress read and write
on a 1G virtualbox vm, and it's slow, but I've had no errors, so far. I'll let it keep running
a while to see if I can get a timeout or error of some sort

*update* 2.5 hours of looping this while looping stress read/write on my vbox vm and all is
well.

{code}
#!/bin/sh

# create some data:
for i in $(seq 1 50); do echo "N,text blah blah$i,text blah blah$i,text blah blah$i" >>
c6525_1-50.csv ; done
for i in $(seq 51 500); do echo "N,text blah blah$i,text blah blah$i,text blah blah$i" >>
c6525_51-500.csv ; done
for i in $(seq 501 5000); do echo "N,text blah blah$i,text blah blah$i,text blah blah$i" >>
c6525_501-5000.csv ; done
for i in $(seq 5001 50000); do echo "N,text blah blah$i,text blah blah$i,text blah blah$i"
>> c6525_5001-50000.csv ; done

# create our cql to drop/create/import
cat << 'EOF' > c6525_run.cql
DROP KEYSPACE c6525;

CREATE KEYSPACE c6525 WITH replication = {'class': 'SimpleStrategy', 'replication_factor':
'1'};

CREATE TABLE c6525.test (hidden text, field2 text, field3 text, field4 text, PRIMARY KEY (hidden,
field2, field3));

COPY c6525.test (hidden, field2, field3, field4) FROM 'c6525_1-50.csv';
SELECT * from c6525.test WHERE hidden = 'N';

COPY c6525.test (hidden, field2, field3, field4) FROM 'c6525_51-500.csv';
SELECT * from c6525.test WHERE hidden = 'N';

COPY c6525.test (hidden, field2, field3, field4) FROM 'c6525_501-5000.csv';
SELECT * from c6525.test WHERE hidden = 'N';

COPY c6525.test (hidden, field2, field3, field4) FROM 'c6525_5001-50000.csv';
SELECT * from c6525.test WHERE hidden = 'N' LIMIT 51000;
EOF

echo; echo "*** Hit CTL-C to stop looping..***"; echo
sleep 3

# loop it
while true; do echo "SOURCE 'c6525_run.cql';" | cqlsh ; sleep 1 ; done
{code}

> Cannot select data which using "WHERE"
> --------------------------------------
>
>                 Key: CASSANDRA-6525
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-6525
>             Project: Cassandra
>          Issue Type: Bug
>         Environment: Linux RHEL5
> RAM: 1GB
> Cassandra 2.0.3
> CQL spec 3.1.1
> Thrift protocol 19.38.0
>            Reporter: Silence Chow
>            Assignee: Michael Shuler
>
> I am developing a system on my single machine using VMware Player with 1GB Ram and 1Gb
HHD. When I select all data, I didn't have any problems. But when I using "WHERE" and it has
just below 10 records. I have got this error in system log:
> ERROR [ReadStage:41] 2013-12-25 18:52:11,913 CassandraDaemon.java (line 187) Exception
in thread Thread[ReadStage:41,5,main]
> java.io.IOError: java.io.EOFException
>         at org.apache.cassandra.db.Column$1.computeNext(Column.java:79)
>         at org.apache.cassandra.db.Column$1.computeNext(Column.java:64)
>         at com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:143)
>         at com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:138)
>         at org.apache.cassandra.db.columniterator.SimpleSliceReader.computeNext(SimpleSliceReader.java:88)
>         at org.apache.cassandra.db.columniterator.SimpleSliceReader.computeNext(SimpleSliceReader.java:37)
>         at com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:143)
>         at com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:138)
>         at org.apache.cassandra.db.columniterator.SSTableSliceIterator.hasNext(SSTableSliceIterator.java:82)
>         at org.apache.cassandra.db.filter.QueryFilter$2.getNext(QueryFilter.java:157)
>         at org.apache.cassandra.db.filter.QueryFilter$2.hasNext(QueryFilter.java:140)
>         at org.apache.cassandra.utils.MergeIterator$Candidate.advance(MergeIterator.java:144)
>         at org.apache.cassandra.utils.MergeIterator$ManyToOne.<init>(MergeIterator.java:87)
>         at org.apache.cassandra.utils.MergeIterator.get(MergeIterator.java:46)
>         at org.apache.cassandra.db.filter.QueryFilter.collateColumns(QueryFilter.java:120)
>         at org.apache.cassandra.db.filter.QueryFilter.collateOnDiskAtom(QueryFilter.java:80)
>         at org.apache.cassandra.db.filter.QueryFilter.collateOnDiskAtom(QueryFilter.java:72)
>         at org.apache.cassandra.db.CollationController.collectAllData(CollationController.java:297)
>         at org.apache.cassandra.db.CollationController.getTopLevelColumns(CollationController.java:53)
>         at org.apache.cassandra.db.ColumnFamilyStore.getTopLevelColumns(ColumnFamilyStore.java:1487)
>         at org.apache.cassandra.db.ColumnFamilyStore.getColumnFamily(ColumnFamilyStore.java:1306)
>         at org.apache.cassandra.db.Keyspace.getRow(Keyspace.java:332)
>         at org.apache.cassandra.db.SliceFromReadCommand.getRow(SliceFromReadCommand.java:65)
>         at org.apache.cassandra.service.StorageProxy$LocalReadRunnable.runMayThrow(StorageProxy.java:1401)
>         at org.apache.cassandra.service.StorageProxy$DroppableRunnable.run(StorageProxy.java:1936)
>         at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
>         at java.lang.Thread.run(Unknown Source)
> Caused by: java.io.EOFException
>         at java.io.RandomAccessFile.readFully(Unknown Source)
>         at java.io.RandomAccessFile.readFully(Unknown Source)
>         at org.apache.cassandra.io.util.RandomAccessReader.readBytes(RandomAccessReader.java:348)
>         at org.apache.cassandra.utils.ByteBufferUtil.read(ByteBufferUtil.java:392)
>         at org.apache.cassandra.utils.ByteBufferUtil.readWithShortLength(ByteBufferUtil.java:371)
>         at org.apache.cassandra.db.OnDiskAtom$Serializer.deserializeFromSSTable(OnDiskAtom.java:74)
>         at org.apache.cassandra.db.Column$1.computeNext(Column.java:75)
>         ... 27 more
> E.g.
> SELECT * FROM table;
> Its fine.
> SELECT * FROM table WHERE field = 'N';
> field is the partition key.
> Its said "Request did not complete within rpc_timeout." in cqlsh



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message