Uploaded image for project: 'CDAP'
  1. CDAP
  2. CDAP-5280

Query RESTful API doesn't find an existing query handle

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 3.4.0
    • Fix Version/s: 3.4.0
    • Component/s: API
    • Labels:
    • Release Notes:
      Corrected the documentation of the Query RESTful API for retrieving the status of query.
    • Rank:
      1|hzz8tr:

      Description

      In testing the Query RESTful API, I attempted to enable and disable some existing datasets and streams.

      They return query handles, yet when I asked for their status, I receive a 404.

      Also, if I create a query, using

      $ curl -w'\n' -X POST 'http://localhost:10000/v3/namespaces/default/data/explore/queries' -d '{ "query": "SELECT * FROM dataset_logEventStream_converted LIMIT 5" }'
      {"handle":"955795b8-a82f-408e-b6c8-23e894e4b3d4"}
      $ curl -w'\n' -X GET 'http://localhost:10000/v3/namespaces/default/data/explore/queries/955795b8-a82f-408e-b6c8-23e894e4b3d4/status'
      Problem accessing: /v3/namespaces/default/data/explore/queries/955795b8-a82f-408e-b6c8-23e894e4b3d4/status. Reason: Not Found
      

      For instance:

      $ curl -w'\n' -X GET 'http://localhost:10000/v3/namespaces/default/data/explore/queries'
      

      returns

      [{"timestamp":1458171543731,"statement":"SELECT * FROM dataset_logEventStream_converted LIMIT 5","status":"FINISHED","query_handle":"955795b8-a82f-408e-b6c8-23e894e4b3d4","has_results":true,"is_active":true},...
      

      yet this 404s:

      $ curl -w'\n' -X GET 'http://localhost:10000/v3/namespaces/default/data/explore/queries/955795b8-a82f-408e-b6c8-23e894e4b3d4/status' -v

      returns

      *   Trying ::1...
      * Connected to localhost (::1) port 10000 (#0)
      > GET /v3/namespaces/default/data/explore/queries/955795b8-a82f-408e-b6c8-23e894e4b3d4/status HTTP/1.1
      > Host: localhost:10000
      > User-Agent: curl/7.43.0
      > Accept: */*
      > 
      < HTTP/1.1 404 Not Found
      * no chunk, no close, no size. Assume close to signal end
      < 
      * Closing connection 0
      Problem accessing: /v3/namespaces/default/data/explore/queries/955795b8-a82f-408e-b6c8-23e894e4b3d4/status. Reason: Not Found
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                John John Jackson
                Reporter:
                John John Jackson
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: