From: Jennifer <jen...@re...> - 2014-10-31 12:27:39
|
I think she is missing as to where tmp.xml should be kept within her bigdata/Ant folder as I think bigdata is not able to find tmp.xml. Alice I think you should keep tmp.xml within the bigdata folder which you downloaded. From: Alice Everett <ali...@ya...> Sent: Fri, 31 Oct 2014 17:47:26 To: Bryan Thompson <br...@sy...> Cc: "big...@li..." <big...@li...> Subject: Re: [Bigdata-developers] How to use RDR with Curl Ok. Thanks a ton. But still I am a little lost. I used two methods of inserting as explained below. My namespace's name is reificationRDR.I'll be very grateful if you can help me with this a bit.Insert Method1:root:~/bigdataAnt$ curl -v -X POST --data-binary 'uri=file:///home/bigdataAnt/SmallYagoFacts.ttl' @tmp.xml http://192.168.145.1:9999/bigdata/sparqloutput:* getaddrinfo(3) failed for tmp.xml:80* Couldn't resolve host 'tmp.xml'* Closing connection #0curl: (6) Couldn't resolve host 'tmp.xml'* About to connect() to 192.168.145.1 port 9999 (#0)* Trying 192.168.145.1... connected> POST /bigdata/sparql HTTP/1.1> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3> Host: 192.168.145.1:9999> Accept: */*> Content-Length: 52> Content-Type: application/x-www-form-urlencoded> * upload completely sent off: 52out of 52 bytes< HTTP/1.1 200 OK< Content-Type: application/xml; charset=ISO-8859-1< Transfer-Encoding: chunked< Server: Jetty(9.1.4.v20140401)< * Connection #0 to host 192.168.145.1 left intact* Closing connection #0Insert Method 2:root:~/bigdataAnt/bigdata$ curl -v -X POST --data-binary 'uri=file:///home/bigdataAnt/SmallYagoFacts.ttl' @/home/bigdataAnt/tmp.xml http://192.168.145.1:9999/bigdata/namespace/reificationRDR/sparql* getaddrinfo(3) failed for :80output* Couldn't resolve host ''* Closing connection #0curl: (6) Couldn't resolve host ''* About to connect() to 192.168.145.1 port 9999 (#0)* Trying 192.168.145.1... connected> POST /bigdata/namespace/reificationRDR/sparql HTTP/1.1> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3> Host: 192.168.145.1:9999> Accept: */*> Content-Length: 52> Content-Type: application/x-www-form-urlencoded> * upload completely sent off: 52out of 52 bytes< HTTP/1.1 500 Server Error< Content-Type: text/plain< Transfer-Encoding: chunked< Server: Jetty(9.1.4.v20140401)< uri=[file:/home/bigdataAnt/SmallYagoFacts.ttl], context-uri=[]java.util.concurrent.ExecutionException: java.lang.RuntimeException: Not found: namespace=reificationRDR at java.util.concurrent.FutureTask.report(FutureTask.java:122) at java.util.concurrent.FutureTask.get(FutureTask.java:188) at com.bigdata.rdf.sail.webapp.InsertServlet.doPostWithURIs(InsertServlet.java:401) at com.bigdata.rdf.sail.webapp.InsertServlet.doPost(InsertServlet.java:117) at com.bigdata.rdf.sail.webapp.RESTServlet.doPost(RESTServlet.java:267) at com.bigdata.rdf.sail.webapp.MultiTenancyServlet.doPost(MultiTenancyServlet.java:144) at javax.servlet.http.HttpServlet.service(HttpServlet.java:707) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:738) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:551) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:568) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:221) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1111) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:478) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:183) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1045) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:199) at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:109) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) at org.eclipse.jetty.server.Server.handle(Server.java:462) at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:279) at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:232) at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:534) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:607) at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:536) at java.lang.Thread.run(Thread.java:745)Caused by: java.lang.RuntimeException: Not found: namespace=reificationRDR at com.bigdata.rdf.task.AbstractApiTask.getUnisolatedConnection(AbstractApiTask.java:217) at com.bigdata.rdf.sail.webapp.InsertServlet$InsertWithURLsTask.call(InsertServlet.java:457) at com.bigdata.rdf.sail.webapp.InsertServlet$InsertWithURLsTask.call(InsertServlet.java:414) at com.bigdata.rdf.task.ApiTaskForIndexManager.call(ApiTaskForIndexManager.java:67) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at com.bigdata.rdf.task.AbstractApiTask.submitApiTask(AbstractApiTask.java:293) at com.bigdata.rdf.sail.webapp.BigdataServlet.submitApiTask(BigdataServlet.java:220) ... 26 more* Connection #0 to host 192.168.145.1 left intact* Closing connection #0Query:curl -X POST http://192.168.145.1:9999/bigdata/namespace/reificationRDR/sparql --data-urlencode 'query=SELECT * {<<?s ?p ?o>> ?p1 ?o1 }' -H 'Accept:application/rdf+xml'tmp.xml:<?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"><properties><!-- --><!-- NEW KB NAMESPACE (required). --><!-- --><entry key="com.bigdata.rdf.sail.namespace">reificationRDR</entry><!-- --><!-- Specify any KB specific properties here to override defaults for the BigdataSail --><!-- AbstractTripleStore, or indices in the namespace of the new KB instance. --><!-- --><entry key="com.bigdata.rdf.store.AbstractTripleStore.statementIdentifiers">true</entry></properties> On Friday, 31 October 2014 5:30 PM, Bryan Thompson <br...@sy...> wrote: What is the namespace for the RDR graph?The URL you need to be using is http://192.168.145.1:9999/bigdata/namespace/MY-GRAPH-NAMESPACE/sparqlHow to address a specific namespace is explicitly covered if you read the wiki section on the multitenant interface that I linked in my previous response.Thanks,BryanOn Friday, October 31, 2014, Alice Everett <ali...@ya...');" class="" style="" target=>ali...@ya...> wrote:Thanks a lot for the help.But I dont know where I am still going wrong:I inserted data using: curl -v -X POST --data-binary 'uri=file:///home/reifiedTriples.ttl' @tmp.xml http://192.168.145.1:9999/bigdata/sparqlAnd then queried it using: curl -X POST http://192.168.145.1:9999/bigdata/sparql --data-urlencode @tmp.xml 'query=SELECT * { <<?s ?p ?o>> ?p ?o }' -H 'Accept:application/rdr'curl: (6) Couldn't resolve host 'query=SELECT * <<'Content-Type not recognized as RDF: application/x-www-form-urlencoded On Friday, 31 October 2014 3:55 PM, Bryan Thompson <br...@sy...> wrote: Alice,The workbench choice of the "in use" namespace is recorded in java script in your browser client. That choice does not effect other workbench clients and does not effect the behavior of the various endpoints when using command line tools to query or update data in the database. Thus your command line requests are being made against a namespace that is not configured for RDR support.If you want to address a non-default bigdata namespace using curl or wget, you must use the appropriate URL for that namespace. This is all described on wiki.bigdata.com on the page for the nanoSparqlServer in the section on multi-tenancy. See http://wiki.bigdata.com/wiki/index.php/NanoSparqlServer#Multi-Tenancy_APIThanks,BryanOn Thursday, October 30, 2014, Alice Everett <ali...@ya...> wrote:I found out an awesome feature in Bigdata called RDR and I am trying to explore that too. Can you please let me know as to where am I going wrong while querying RDR data (http://trac.bigdata.com/ticket/815). (My sample RDF data, contains reification in its standard form: http://www.w3.org/2001/sw/DataAccess/rq23/#queryReification)Loading:curl -X POST --data-binary 'uri=file:///home/SmallFacts.ttl' http://192.168.145.1:9999/bigdata/sparql(Additionally I changed my current namespace within the workbench opened in my browser to RDR mode).After this I fired the following query and got the following error (Can you please correct me as to where am I going wrong. I'll be very grateful to you for the same):@HP-ProBook-4430s:~/bigdataAnt$ curl -X POST http://192.168.145.1:9999/bigdata/sparql --header "X-BIGDATA-MAX-QUERY-MILLIS" --data-urlencode 'query=SELECT * {<<?s ?p ?o>> ?p1 ?o1 }' -H 'Accept:application/rdr' SELECT * {<<?s ?p ?o>> ?p1 ?o1 }java.util.concurrent.ExecutionException: org.openrdf.query.QueryEvaluationException: java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.Exception: task=ChunkTask{query=eeb24f0d-29b7-49d1-bddf-14869c463e76,bopId=4,partitionId=-1,sinkId=5,altSinkId=null}, cause=java.util.concurrent.ExecutionException: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.ArrayIndexOutOfBoundsException: 0 at java.util.concurrent.FutureTask.report(FutureTask.java:122) at java.util.concurrent.FutureTask.get(FutureTask.java:188) at com.bigdata.rdf.sail.webapp.BigdataRDFContext$AbstractQueryTask.call(BigdataRDFContext.java:1277) at com.bigdata.rdf.sail.webapp.BigdataRDFContext$AbstractQueryTask.call(BigdataRDFContext.java:503) at java.util.concurrent.FutureTask.run(FutureTask.java:262) 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)Caused by: org.openrdf.query.QueryEvaluationException: java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.Exception: task=ChunkTask{query=eeb24f0d-29b7-49d1-bddf-14869c463e76,bopId=4,partitionId=-1,sinkId=5,altSinkId=null}, cause=java.util.concurrent.ExecutionException: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.ArrayIndexOutOfBoundsException: 0 at com.bigdata.rdf.sail.Bigdata2Sesame2BindingSetIterator.hasNext(Bigdata2Sesame2BindingSetIterator.java:188) at org.openrdf.query.impl.TupleQueryResultImpl.hasNext(TupleQueryResultImpl.java:90) at org.openrdf.query.QueryResultUtil.report(QueryResultUtil.java:52) at org.openrdf.repository.sail.SailTupleQuery.evaluate(SailTupleQuery.java:63) at com.bigdata.rdf.sail.webapp.BigdataRDFContext$TupleQueryTask.doQuery(BigdataRDFContext.java:1386) at com.bigdata.rdf.sail.webapp.BigdataRDFContext$AbstractQueryTask$SparqlRestApiTask.call(BigdataRDFContext.java:1221) at com.bigdata.rdf.sail.webapp.BigdataRDFContext$AbstractQueryTask$SparqlRestApiTask.call(BigdataRDFContext.java:1171) at com.bigdata.rdf.task.ApiTaskForIndexManager.call(ApiTaskForIndexManager.java:67) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at com.bigdata.rdf.task.AbstractApiTask.submitApiTask(AbstractApiTask.java:293) ... 6 moreCaused by: java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.Exception: task=ChunkTask{query=eeb24f0d-29b7-49d1-bddf-14869c463e76,bopId=4,partitionId=-1,sinkId=5,altSinkId=null}, cause=java.util.concurrent.ExecutionException: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.ArrayIndexOutOfBoundsException: 0 at com.bigdata.relation.accesspath.BlockingBuffer$BlockingIterator.checkFuture(BlockingBuffer.java:1523) at com.bigdata.relation.accesspath.BlockingBuffer$BlockingIterator._hasNext(BlockingBuffer.java:1710) at com.bigdata.relation.accesspath.BlockingBuffer$BlockingIterator.hasNext(BlockingBuffer.java:1563) at com.bigdata.striterator.AbstractChunkedResolverator._hasNext(AbstractChunkedResolverator.java:365) at com.bigdata.striterator.AbstractChunkedResolverator.hasNext(AbstractChunkedResolverator.java:341) at com.bigdata.rdf.sail.Bigdata2Sesame2BindingSetIterator.hasNext(Bigdata2Sesame2BindingSetIterator.java:134) ... 15 moreCaused by: java.util.concurrent.ExecutionException: java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.Exception: task=ChunkTask{query=eeb24f0d-29b7-49d1-bddf-14869c463e76,bopId=4,partitionId=-1,sinkId=5,altSinkId=null}, cause=java.util.concurrent.ExecutionException: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.ArrayIndexOutOfBoundsException: 0 at java.util.concurrent.FutureTask.report(FutureTask.java:122) at java.util.concurrent.FutureTask.get(FutureTask.java:188) at com.bigdata.relation.accesspath.BlockingBuffer$BlockingIterator.checkFuture(BlockingBuffer.java:1454) ... 20 moreCaused by: java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.Exception: task=ChunkTask{query=eeb24f0d-29b7-49d1-bddf-14869c463e76,bopId=4,partitionId=-1,sinkId=5,altSinkId=null}, cause=java.util.concurrent.ExecutionException: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.ArrayIndexOutOfBoundsException: 0 at com.bigdata.rdf.sail.RunningQueryCloseableIterator.checkFuture(RunningQueryCloseableIterator.java:59) at com.bigdata.rdf.sail.RunningQueryCloseableIterator.close(RunningQueryCloseableIterator.java:73) at com.bigdata.rdf.sail.RunningQueryCloseableIterator.hasNext(RunningQueryCloseableIterator.java:82) at com.bigdata.striterator.ChunkedWrappedIterator.hasNext(ChunkedWrappedIterator.java:197) at com.bigdata.striterator.AbstractChunkedResolverator$ChunkConsumerTask.call(AbstractChunkedResolverator.java:222) at com.bigdata.striterator.AbstractChunkedResolverator$ChunkConsumerTask.call(AbstractChunkedResolverator.java:197) ... 4 moreCaused by: java.util.concurrent.ExecutionException: java.lang.Exception: task=ChunkTask{query=eeb24f0d-29b7-49d1-bddf-14869c463e76,bopId=4,partitionId=-1,sinkId=5,altSinkId=null}, cause=java.util.concurrent.ExecutionException: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.ArrayIndexOutOfBoundsException: 0 at com.bigdata.util.concurrent.Haltable.get(Haltable.java:273) at com.bigdata.bop.engine.AbstractRunningQuery.get(AbstractRunningQuery.java:1476) at com.bigdata.bop.engine.AbstractRunningQuery.get(AbstractRunningQuery.java:103) at com.bigdata.rdf.sail.RunningQueryCloseableIterator.checkFuture(RunningQueryCloseableIterator.java:46) ... 9 moreCaused by: java.lang.Exception: task=ChunkTask{query=eeb24f0d-29b7-49d1-bddf-14869c463e76,bopId=4,partitionId=-1,sinkId=5,altSinkId=null}, cause=java.util.concurrent.ExecutionException: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.ArrayIndexOutOfBoundsException: 0 at com.bigdata.bop.engine.ChunkedRunningQuery$ChunkTask.call(ChunkedRunningQuery.java:1335) at com.bigdata.bop.engine.ChunkedRunningQuery$ChunkTaskWrapper.run(ChunkedRunningQuery.java:894) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at com.bigdata.concurrent.FutureTaskMon.run(FutureTaskMon.java:63) at com.bigdata.bop.engine.ChunkedRunningQuery$ChunkFutureTask.run(ChunkedRunningQuery.java:789) ... 3 moreCaused by: java.util.concurrent.ExecutionException: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.ArrayIndexOutOfBoundsException: 0 at java.util.concurrent.FutureTask.report(FutureTask.java:122) at java.util.concurrent.FutureTask.get(FutureTask.java:188) at com.bigdata.bop.engine.ChunkedRunningQuery$ChunkTask.call(ChunkedRunningQuery.java:1315) ... 8 moreCaused by: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.ArrayIndexOutOfBoundsException: 0 at com.bigdata.bop.join.PipelineJoin$JoinTask.call(PipelineJoin.java:643) at com.bigdata.bop.join.PipelineJoin$JoinTask.call(PipelineJoin.java:343) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at com.bigdata.concurrent.FutureTaskMon.run(FutureTaskMon.java:63) at com.bigdata.bop.engine.ChunkedRunningQuery$ChunkTask.call(ChunkedRunningQuery.java:1314) ... 8 moreCaused by: java.lang.RuntimeException: java.lang.ArrayIndexOutOfBoundsException: 0 at com.bigdata.bop.join.PipelineJoin$JoinTask$BindingSetConsumerTask.call(PipelineJoin.java:988) at com.bigdata.bop.join.PipelineJoin$JoinTask.consumeSource(PipelineJoin.java:700) at com.bigdata.bop.join.PipelineJoin$JoinTask.call(PipelineJoin.java:584) ... 12 moreCaused by: java.lang.ArrayIndexOutOfBoundsException: 0 at com.bigdata.bop.join.PipelineJoin$JoinTask$BindingSetConsumerTask.reorderTasks(PipelineJoin.java:1317) at com.bigdata.bop.join.PipelineJoin$JoinTask$BindingSetConsumerTask.call(PipelineJoin.java:971) ... 14 more-- ----Bryan ThompsonChief Scientist & FounderSYSTAP, LLC4501 Tower RoadGreensboro, NC 274...@sy...http://bigdata.comhttp://mapgraph.io CONFIDENTIALITY NOTICE: This email and its contents and attachments are for the sole use of the intended recipient(s) and are confidential or proprietary to SYSTAP. Any unauthorized review, use, disclosure, dissemination or copying of this email or its contents or attachments is prohibited. If you have received this communication in error, please notify the sender by reply email and permanently delete all copies of the email and its contents and attachments. I dont know why am I getting an error when I am querying using RDR. Can you please help me with this one last time.My tmp.xml file is:<?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"><properties><!-- --><!-- NEW KB NAMESPACE (required). --><!-- --><entry key="com.bigdata.rdf.sail.namespace">RDRMode</entry><!-- --><!-- Specify any KB specific properties here to override defaults for the BigdataSail --><!-- AbstractTripleStore, or indices in the namespace of the new KB instance. --><!-- --><entry key="com.bigdata.rdf.store.AbstractTripleStore.statementIdentifiers">true</entry></properties>-- ----Bryan ThompsonChief Scientist & FounderSYSTAP, LLC4501 Tower RoadGreensboro, NC 274...@sy..." class="" style="" target='_blank' rel=external>br...@sy...http://bigdata.comhttp://mapgraph.io CONFIDENTIALITY NOTICE: This email and its contents and attachments are for the sole use of the intended recipient(s) and are confidential or proprietary to SYSTAP. Any unauthorized review, use, disclosure, dissemination or copying of this email or its contents or attachments is prohibited. If you have received this communication in error, please notify the sender by reply email and permanently delete all copies of the email and its contents and attachments. ------------------------------------------------------------------------------ _______________________________________________ Bigdata-developers mailing list Big...@li... https://lists.sourceforge.net/lists/listinfo/bigdata-developers |