Uploaded image for project: 'Blazegraph (by SYSTAP)'
  1. Blazegraph (by SYSTAP)
  2. BLZG-1374

BigdataGraphConfiguration should allow caller to specify SPARQL endpoint

    Details

      Description

      Rexster server is configured with a remote bigdata graph, e.g.:

              <graph>
                      <graph-name>bigdata</graph-name>
                      <graph-type>com.bigdata.blueprints.BigdataGraphConfiguration</graph-type>
                      <properties>
                              <type>remote</type>
                              <host>127.0.0.1</host>
                              <port>8085</port>
                      </properties>
                      <extensions>
                              <allows>
                                      <allow>tp:gremlin</allow>
                              </allows>
                      </extensions>
              </graph>
      

      Trying to use it results in:

      [INFO] BigdataGraph -
      [WARN] RemoteRepository - com.bigdata.rdf.sail.webapp.client.HttpException: Status Code=404, Status Line=Not Found, Response=<html>
      <head>
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
      <title>Error 404 Not Found</title>
      </head>
      <body><h2>HTTP ERROR 404</h2>
      <p>Problem accessing /bigdata/sparql/sparql. Reason:
      <pre>    Not Found</pre></p><hr><i><small>Powered by Jetty://</small></i><hr/>
      
      </body>
      </html>
      
      [ERROR] VertexResource - java.lang.RuntimeException: org.openrdf.repository.RepositoryException: com.bigdata.rdf.sail.webapp.client.HttpException: Status Code=404, Status Line=Not Found, Response=<html>
      <head>
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
      <title>Error 404 Not Found</title>
      </head>
      <body><h2>HTTP ERROR 404</h2>
      <p>Problem accessing /bigdata/sparql/sparql. Reason:
      <pre>    Not Found</pre></p><hr><i><small>Powered by Jetty://</small></i><hr/>
      
      </body>
      </html>
      

      From the code, it appears the endpoint is incorrect. It would be good if instead of host & port parameters we could just specify the endpoint url itself. We could then also point to a specific dataset/namespace.

      1. BigdataGraphConfiguration.java
        5 kB
        bryanthompson
      2. BigdataGraphConfiguration.java
        4 kB
        bryanthompson
      3. BigdataGraphFactory.java
        4 kB
        bryanthompson

        Issue Links

          Activity

          Hide
          bryanthompson bryanthompson added a comment -

          Unfortunately, you have encountered BLZG-1214. This is fixed in the upcoming 1.5.2 release (in QA now), but does exist in 1.5.1.

          As a work-around with 1.5.1, we recommend using rexster with embedded node. You can edit the rexster.xml to uncomment the "embedded" type element and comment out the remote type element per below. Let us know how it goes.

          Show
          bryanthompson bryanthompson added a comment - Unfortunately, you have encountered BLZG-1214 . This is fixed in the upcoming 1.5.2 release (in QA now), but does exist in 1.5.1. As a work-around with 1.5.1, we recommend using rexster with embedded node. You can edit the rexster.xml to uncomment the "embedded" type element and comment out the remote type element per below. Let us know how it goes.
          Hide
          pulquero Mark Hale added a comment -

          Will BLZG-1214 also support setting the namespace or passing in the complete url?

          Show
          pulquero Mark Hale added a comment - Will BLZG-1214 also support setting the namespace or passing in the complete url?
          Hide
          bryanthompson bryanthompson added a comment -

          Mark, I have attached the two relevant files from the pre-release. Based on a quick inspection, the answer is no. We would need to add a property to specify the namespace of the target graph.

          Would you like to propose a patch that would provide the flexibility you are looking for? I assume that this comes down to adding a SPARQL_URL property that would be an alternative property used when TYPE_REMOTE is specified. It would then connect directly to that URL.

          Does that sound right?

          Show
          bryanthompson bryanthompson added a comment - Mark, I have attached the two relevant files from the pre-release. Based on a quick inspection, the answer is no. We would need to add a property to specify the namespace of the target graph. Would you like to propose a patch that would provide the flexibility you are looking for? I assume that this comes down to adding a SPARQL_URL property that would be an alternative property used when TYPE_REMOTE is specified. It would then connect directly to that URL. Does that sound right?
          Hide
          pulquero Mark Hale added a comment -

          Yes, that would be great.

          Show
          pulquero Mark Hale added a comment - Yes, that would be great.
          Hide
          bryanthompson bryanthompson added a comment -

          I've attached a modified version of the BigdataGraphConfiguration that defines a new option and then uses it to connect to a specified URL. Please review. I think that this will do what you want.

          Show
          bryanthompson bryanthompson added a comment - I've attached a modified version of the BigdataGraphConfiguration that defines a new option and then uses it to connect to a specified URL. Please review. I think that this will do what you want.
          Hide
          bryanthompson bryanthompson added a comment -

          Commit a56b1bc14aef3766338e13e2c004f929bec70728 to github master.

          Defines SPARQL_ENDPOINT_URL option that may be used to connect to a specific blazegraph namespace by specifying its SPARQL endpoint URL.

          Show
          bryanthompson bryanthompson added a comment - Commit a56b1bc14aef3766338e13e2c004f929bec70728 to github master. Defines SPARQL_ENDPOINT_URL option that may be used to connect to a specific blazegraph namespace by specifying its SPARQL endpoint URL.
          Hide
          pulquero Mark Hale added a comment -

          Reviewed, yep, that is what I am after. Thanks.

          Show
          pulquero Mark Hale added a comment - Reviewed, yep, that is what I am after. Thanks.

            People

            • Assignee:
              bryanthompson bryanthompson
              Reporter:
              pulquero Mark Hale
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: