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

Ability to impose timeout on query using REST API

    XMLWordPrintable

    Details

      Description

      The Bigdata and openrdf APIs allow you to set a timeout on a query. The query will be interrupted (cancelled) when the timeout is exceeded. However, it is not currently possible to impose this timeout through the REST API from languages other than Java.

      From com.bigdata.rdf.sail.remote.BigdataSailRemoteRepositoryConnection you can do the following. However, note that the internal resolution for bigdata is milliseconds while the openrdf API specifies the timeout in seconds.

        setMaxQueryTime(int seconds)
      

      There are at least two ways to accomplish this.

      1. HTTP request header specifying the timeout. The advantage of this technique is that an http proxy could automatically impose a timeout on an endpoint.

      2. Query hint embedded into the SPARQL QUERY specifying the timeout. This technique is most useful for applications that generate queries dynamically.

      It is possible to implement both approaches.

      If a new query hint is defined, then changes should include:


      - QueryHInts
      - QueryHintRegistry
      - QueryHints on wiki.bigdata.com

      Finally, note that a timeout for all queries can be specified already using web.xml:

        <context-param>
         <description>When non-zero, the timeout for queries (milliseconds).</description>
         <param-name>queryTimeout</param-name>
         <param-value>0</param-value>
        </context-param>
      

        Attachments

          Activity

            People

            Assignee:
            thompsonbry thompsonbry
            Reporter:
            bryanthompson bryanthompson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: