Uploaded image for project: 'Falcon'
  1. Falcon
  2. FALCON-1244

listInstances : numResults query param is ignored when start and end params are not specified.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • None
    • 0.7
    • webapp
    • None

    Description

      Reported by pisaychuk.

      We should use numResults if want to get number of instances different from default (10). But we can't use it without start/end params. For example.
      If I have a process

      <?xml version="1.0" encoding="UTF-8"?><process xmlns="uri:falcon:process:0.1" name="ListProcessInstancesTest--agregator-coord16-29e9fec6">
          <clusters>
              <cluster name="ListProcessInstancesTest--corp-3c0b8ce1">
                  <validity start="2015-05-18T15:39Z" end="2015-05-18T16:39Z"/>
              </cluster>
          </clusters>
          <parallel>3</parallel>
          <order>FIFO</order>
          <frequency>minutes(5)</frequency>
          <timezone>UTC</timezone>
          <inputs>
              <input name="inputData" feed="ListProcessInstancesTest--raaw-logs16-31f6eaae" start="now(0,-20)" end="now(0,0)"/>
          </inputs>
          <outputs>
              <output name="outputData" feed="ListProcessInstancesTest--agregated-logs16-ffa31ad1" instance="now(0,0)"/>
          </outputs>
          <properties>
              <property name="queueName" value="default"/>
              <property name="fileTime" value="${formatTime(dateOffset(instanceTime(), 1, 'DAY'), 'yyyy-MMM-dd')}"/>
              <property name="user" value="${user()}"/>
          </properties>
          <workflow path="/tmp/falcon-regression/ListProcessInstancesTest/aggregator"/>
          <retry policy="periodic" delay="minutes(3)" attempts="3"/>
          <ACL owner="fertrist" group="users" permission="*"/>
      </process>
      

      with 12 instances

      15/05/18 19:35:30 INFO util.InstanceUtil: Coordinator Action 0001378-150420123757231-oozie-oozi-C@1 status is RUNNING on oozie http://colo-1.example.com:11000/oozie/
      15/05/18 19:35:30 INFO util.InstanceUtil: Coordinator Action 0001378-150420123757231-oozie-oozi-C@2 status is RUNNING on oozie http://colo-1.example.com:11000/oozie/
      15/05/18 19:35:30 INFO util.InstanceUtil: Coordinator Action 0001378-150420123757231-oozie-oozi-C@3 status is RUNNING on oozie http://colo-1.example.com:11000/oozie/
      15/05/18 19:35:30 INFO util.InstanceUtil: Coordinator Action 0001378-150420123757231-oozie-oozi-C@4 status is READY on oozie http://colo-1.example.com:11000/oozie/
      15/05/18 19:35:30 INFO util.InstanceUtil: Coordinator Action 0001378-150420123757231-oozie-oozi-C@5 status is WAITING on oozie http://colo-1.example.com:11000/oozie/
      15/05/18 19:35:30 INFO util.InstanceUtil: Coordinator Action 0001378-150420123757231-oozie-oozi-C@6 status is WAITING on oozie http://colo-1.example.com:11000/oozie/
      15/05/18 19:35:30 INFO util.InstanceUtil: Coordinator Action 0001378-150420123757231-oozie-oozi-C@7 status is WAITING on oozie http://colo-1.example.com:11000/oozie/
      15/05/18 19:35:30 INFO util.InstanceUtil: Coordinator Action 0001378-150420123757231-oozie-oozi-C@8 status is WAITING on oozie http://colo-1.example.com:11000/oozie/
      15/05/18 19:35:30 INFO util.InstanceUtil: Coordinator Action 0001378-150420123757231-oozie-oozi-C@9 status is WAITING on oozie http://colo-1.example.com:11000/oozie/
      15/05/18 19:35:30 INFO util.InstanceUtil: Coordinator Action 0001378-150420123757231-oozie-oozi-C@10 status is WAITING on oozie http://colo-1.example.com:11000/oozie/
      15/05/18 19:35:30 INFO util.InstanceUtil: Coordinator Action 0001378-150420123757231-oozie-oozi-C@11 status is WAITING on oozie http://colo-1.example.com:11000/oozie/
      15/05/18 19:35:30 INFO util.InstanceUtil: Coordinator Action 0001378-150420123757231-oozie-oozi-C@12 status is WAITING on oozie http://colo-1.example.com:11000/oozie/
      

      and I try to get all instances with request
      http://192.168.56.111:15000/api/instance/list/process/ListProcessInstancesTest--agregator-coord16-29e9fec6?numResults=12&user.name=fertrist. But it returns me only 10 most recent instances, as if it were default numResults.
      To get all instances I have to use
      http://192.168.56.111:15000/api/instance/list/process/ListProcessInstancesTest--agregator-coord16-29e9fec6?start=2015-05-18T15:39Z&end=2015-05-18T16:39Z&numResults=12&user.name=fertrist.

      Attachments

        1. FALCON-1244.patch
          5 kB
          Balu Vellanki

        Issue Links

          Activity

            People

              bvellanki Balu Vellanki
              bvellanki Balu Vellanki
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: