mrwulf / cumulusrdf

Automatically exported from code.google.com/p/cumulusrdf
0 stars 0 forks source link

SPARQL query filtering by predicate throws an exception #68

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Hi,
  I've imported aobut 25M triples through comman line in a single node cassandra testing cluster. I've tested some SPARQL queries but the following one

java -cp cumulusrdf-1.0.1.jar edu.kit.aifb.cumulus.cli.Main Query -q "select ?s 
?p ?o { ?s <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> ?o } limit 1" 

always throws this exception:

SPARQL query is a SELECT query
java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at edu.kit.aifb.cumulus.cli.Main.main(Main.java:38)
Caused by: me.prettyprint.hector.api.exceptions.HTimedOutException: 
TimedOutException()
        at me.prettyprint.cassandra.service.ExceptionsTranslatorImpl.translate(ExceptionsTranslatorImpl.java:42)
        at me.prettyprint.cassandra.service.KeyspaceServiceImpl$19.execute(KeyspaceServiceImpl.java:745)
        at me.prettyprint.cassandra.service.KeyspaceServiceImpl$19.execute(KeyspaceServiceImpl.java:727)
        at me.prettyprint.cassandra.service.Operation.executeAndSetResult(Operation.java:104)
        at me.prettyprint.cassandra.connection.HConnectionManager.operateWithFailover(HConnectionManager.java:253)
        at me.prettyprint.cassandra.service.KeyspaceServiceImpl.operateWithFailover(KeyspaceServiceImpl.java:132)
        at me.prettyprint.cassandra.service.KeyspaceServiceImpl.getIndexedSlices(KeyspaceServiceImpl.java:749)
        at me.prettyprint.cassandra.model.IndexedSlicesQuery$1.doInKeyspace(IndexedSlicesQuery.java:148)
        at me.prettyprint.cassandra.model.IndexedSlicesQuery$1.doInKeyspace(IndexedSlicesQuery.java:139)
        at me.prettyprint.cassandra.model.KeyspaceOperationCallback.doInKeyspaceAndMeasure(KeyspaceOperationCallback.java:20)
        at me.prettyprint.cassandra.model.ExecutingKeyspace.doExecute(ExecutingKeyspace.java:101)
        at me.prettyprint.cassandra.model.IndexedSlicesQuery.execute(IndexedSlicesQuery.java:138)
        at me.prettyprint.cassandra.service.IndexedSlicesIterator.hasNext(IndexedSlicesIterator.java:33)
        at edu.kit.aifb.cumulus.store.POSSlicesQueryIterator.computeNext(POSSlicesQueryIterator.java:58)
        at edu.kit.aifb.cumulus.store.POSSlicesQueryIterator.computeNext(POSSlicesQueryIterator.java:1)
        at com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:143)
        at com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:138)
        at edu.kit.aifb.cumulus.store.sesame.CumulusRDFIterator.getNextElement(CumulusRDFIterator.java:21)
        at edu.kit.aifb.cumulus.store.sesame.CumulusRDFIterator.getNextElement(CumulusRDFIterator.java:1)
        at info.aduna.iteration.LookAheadIteration.lookAhead(LookAheadIteration.java:91)
        at info.aduna.iteration.LookAheadIteration.hasNext(LookAheadIteration.java:60)
        at info.aduna.iteration.IterationWrapper.hasNext(IterationWrapper.java:68)
        at info.aduna.iteration.FilterIteration.findNextElement(FilterIteration.java:79)
        at info.aduna.iteration.FilterIteration.hasNext(FilterIteration.java:54)
        at info.aduna.iteration.ConvertingIteration.hasNext(ConvertingIteration.java:73)
        at info.aduna.iteration.ConvertingIteration.hasNext(ConvertingIteration.java:73)
        at info.aduna.iteration.ConvertingIteration.hasNext(ConvertingIteration.java:73)
        at info.aduna.iteration.IterationWrapper.hasNext(IterationWrapper.java:68)
        at info.aduna.iteration.LimitIteration.hasNext(LimitIteration.java:73)
        at info.aduna.iteration.IterationWrapper.hasNext(IterationWrapper.java:68)
        at org.openrdf.sail.helpers.SailBaseIteration.hasNext(SailBaseIteration.java:61)
        at info.aduna.iteration.IterationWrapper.hasNext(IterationWrapper.java:68)
        at edu.kit.aifb.cumulus.cli.Query.main(Query.java:142)
        ... 5 more
Caused by: TimedOutException()
        at org.apache.cassandra.thrift.Cassandra$get_indexed_slices_result.read(Cassandra.java:15427)
        at org.apache.thrift.TServiceClient.receiveBase(TServiceClient.java:78)
        at org.apache.cassandra.thrift.Cassandra$Client.recv_get_indexed_slices(Cassandra.java:804)
        at org.apache.cassandra.thrift.Cassandra$Client.get_indexed_slices(Cassandra.java:788)
        at me.prettyprint.cassandra.service.KeyspaceServiceImpl$19.execute(KeyspaceServiceImpl.java:733)
        ... 36 more

In general, any query that filters predicates shows this problem.
I've found this exception in cassandra system.log when I execute the query

ERROR [ReadStage:196] 2014-05-04 10:33:14,742 CassandraDaemon.java (line 198) 
Exception in thread Thread[ReadStage:196,5,main]
java.lang.AssertionError: Sequential scan with filters is not supported (if you 
just created an index, you need to wait for the creation to be propagated to 
all nodes before querying it)
        at org.apache.cassandra.db.filter.ExtendedFilter$WithClauses.getExtraFilter(ExtendedFilter.java:259)
        at org.apache.cassandra.db.index.keys.KeysSearcher$1.computeNext(KeysSearcher.java:173)
        at org.apache.cassandra.db.index.keys.KeysSearcher$1.computeNext(KeysSearcher.java:84)
        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.ColumnFamilyStore.filter(ColumnFamilyStore.java:1735)
        at org.apache.cassandra.db.index.keys.KeysSearcher.search(KeysSearcher.java:54)
        at org.apache.cassandra.db.index.SecondaryIndexManager.search(SecondaryIndexManager.java:556)
        at org.apache.cassandra.db.ColumnFamilyStore.search(ColumnFamilyStore.java:1723)
        at org.apache.cassandra.db.RangeSliceCommand.executeLocally(RangeSliceCommand.java:135)
        at org.apache.cassandra.service.StorageProxy$LocalRangeSliceRunnable.runMayThrow(StorageProxy.java:1374)
        at org.apache.cassandra.service.StorageProxy$DroppableRunnable.run(StorageProxy.java:1916)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:745)
ERROR [ReadStage:198] 2014-05-04 10:33:24,749 CassandraDaemon.java (line 198) 
Exception in thread Thread[ReadStage:198,5,main]
java.lang.AssertionError: Sequential scan with filters is not supported (if you 
just created an index, you need to wait for the creation to be propagated to 
all nodes before querying it)
        at org.apache.cassandra.db.filter.ExtendedFilter$WithClauses.getExtraFilter(ExtendedFilter.java:259)
        at org.apache.cassandra.db.index.keys.KeysSearcher$1.computeNext(KeysSearcher.java:173)
        at org.apache.cassandra.db.index.keys.KeysSearcher$1.computeNext(KeysSearcher.java:84)
        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.ColumnFamilyStore.filter(ColumnFamilyStore.java:1735)
        at org.apache.cassandra.db.index.keys.KeysSearcher.search(KeysSearcher.java:54)
        at org.apache.cassandra.db.index.SecondaryIndexManager.search(SecondaryIndexManager.java:556)
        at org.apache.cassandra.db.ColumnFamilyStore.search(ColumnFamilyStore.java:1723)
        at org.apache.cassandra.db.RangeSliceCommand.executeLocally(RangeSliceCommand.java:135)
        at org.apache.cassandra.service.StorageProxy$LocalRangeSliceRunnable.runMayThrow(StorageProxy.java:1374)
        at org.apache.cassandra.service.StorageProxy$DroppableRunnable.run(StorageProxy.java:1916)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:745)

Original issue reported on code.google.com by davide.b...@moviri.com on 4 May 2014 at 8:50

GoogleCodeExporter commented 8 years ago
Hi, thanks for reporting this problem. I will have a look some time today ...

Kind regards
Andreas

Original comment by andreas.josef.wagner on 4 May 2014 at 10:46

GoogleCodeExporter commented 8 years ago
I'm using cassandra version 2.0.7 and cumulusrdf 1.0.1

Original comment by davide.b...@moviri.com on 4 May 2014 at 10:58

GoogleCodeExporter commented 8 years ago
Hm ... yes, this would explain it. Unfortunately, with CumulusRDF 1.0.x we 
don't support Cassandra 2. The recommended Cassandra version is 1.2.x, see also 
[1].

We are currently working hard on the CumulusRDF v1.1.0 release, which will use 
a different Cassandra client and is going to support Cassandra 2. We estimate 
the release of v1.1.0 for mid-May. Note, v1.1.0 will provide many other 
improvements - in particular performance improvements [2].

If you have further questions or problems, feel free to write us via our 
CumulusRDF mailinglist [3].

Thanks
Andreas

[1] https://code.google.com/p/cumulusrdf/wiki/GettingStarted
[2] https://code.google.com/p/cumulusrdf/wiki/Roadmap
[3] http://groups.google.com/group/cumulusrdf-list

Original comment by andreas.josef.wagner on 4 May 2014 at 1:21