2 Replies Latest reply on Oct 12, 2010 10:44 PM by alwu-Oracle

    PREFIX ORACLE_SEM_FS_NS timeout via Jena Adapter

    801615
      Hi,
      I am executing SPARQL via Jena Adapter and would like to specify timeout.

      I use PREFIX ORACLE_SEM_FS_NS: <http://oracle.com/semtech#timeout=5> , according the the sem dev guide Jena examples, but the timeout value has no effect at all.

      For some heavy queries QueryExecution->execSelect() never returns

      I found this thread - Re: Query IDs in ORACLE_SEM_FS_NS : 32 or 64 bits? , which discuss the similar subject. I tried to add qid to the prefix, but that did not help. I don't use Joseki endpoint nor OracleQueryMgtServlet to manage(kill) long queries. Maybe I will provide the latter function in the future, but I would like to start with that users specify the timeout and query would interrupt itself if not ready.

      So, is there anything else I have to do in Java/Jena code or somewhere else?

      Thanks, best regards
      Jürgen

      _____________________________________________________________________________________________________________________________

      After some more testing it turns that the problem with timeout is related to certain type of queries only. Normally the timeout works.
      But when LET statement is used in some way, then timeout does not occur and it seems the query simply hangs:

      This query works and times out (if timeout value is set short enough):

      SELECT DISTINCT

      ?HR_Zone
      (count(?e) AS ?major_count)

      WHERE {

      ?e rdf:type r:ST_Episode .

      OPTIONAL
      {
      ?e r:isClassifiedAs rn:major_st_episode .
      }

      OPTIONAL{
      ?e r:mappedHRZone ?zone .
      ?zone r:index ?HR_Zone
      }
      }
      GROUP BY ?HR_Zone

      This query does not finsih (in boundaries of my patients) and does not time out:

      SELECT DISTINCT

      ?HR_Zone
      (count(?e) AS ?major_count)

      WHERE {

      ?e rdf:type r:ST_Episode .

      OPTIONAL
      {
      ?e r:isClassifiedAs rn:major_st_episode .
      LET( ?emajor := ?e )
      }

      OPTIONAL{
      ?e r:mappedHRZone ?zone .
      ?zone r:index ?HR_Zone
      }
      }
      GROUP BY ?HR_Zone

      However, one might think that LET is not supported - but without ARQ functions it works. This query works and times out (with short timeout value)

      SELECT DISTINCT

      ?emajor ?HR_Zone

      WHERE {

      ?e rdf:type r:ST_Episode .

      OPTIONAL
      {
      ?e r:isClassifiedAs rn:major_st_episode .
      LET( ?emajor := ?e )
      }

      OPTIONAL{
      ?e r:mappedHRZone ?zone .
      ?zone r:index ?HR_Zone
      }
      }

      Edited by: user8793616 on 2010-sep-29 04:51