Oozie
  1. Oozie
  2. OOZIE-1183

Update WebServices API documentation

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: trunk
    • Fix Version/s: 4.0.0
    • Component/s: docs
    • Labels:
      None

      Description

      We recently had some trouble trying to rerun a coordinator job using the WebServices API. According to the documentation, we were trying to POST a URL like this:

      PUT http://localhost:11000/oozie/v1/job/0000024-130108101138395-oozie-oozi-C?action=rerun&type=exact&end-action=1&start-action=1

      but this gave an error.

      After looking through the client and server code, I figured out that there's a huge discrepancy between it and the documentation. The parameters its using in the PUT request for a coordinator job are:

      • action=coord-rerun
      • type=[date|action]
      • scope=a comma-separated list of date ranges. Each date range element is specified with two dates separated by '::' (if type=date)
      • scope=a comma-separated list of action ranges. The action range is specified with two action numbers separated by '-' (if type=action)
      • refresh=[true|false] used to indicate if user wants to refresh an action's input and output events.
      • nocleanup=[true|false] used to indicate if user wants to cleanup output events for given rerun actions

      Based on that, the correct URL to PUT is:

      http://localhost:11000/oozie/v1/job/0000024-130108101138395-oozie-oozi-C?action=coord-rerun&type=action&scope=1-1&refresh=false&nocleanup=false

      We should update the documentation with the correct information above. We should also go through the rest of the WebServices API documentation and make sure its accurate (this isn't the first time I've had to go through the code when using the WebServices API).

      1. OOZIE-1183.patch
        20 kB
        Robert Kanter
      2. OOZIE-1183.patch
        21 kB
        Robert Kanter

        Activity

        Hide
        Robert Kanter added a comment -

        Also, the docs for bundle re-runs from the web api is completely missing. After looking at the code, I think it should be something like this:

        http://localhost:11000/oozie/v1/job/JOB_ID?action=bundle-rerun&coord-scope=CORD_SCOPE&date-scope=DATE_SCOPE&refresh=REFRESH&nocleanup=NOCLEANUP

        COORD_SCOPE the rerun scope for coordinator job names separated by "," (should be a list of names (not IDs) of coordinator jobs)
        DATE_SCOPE looks like the same as coordinator rerun; also, if this is empty or missing, I think it will figure it out for you from the coord job
        REFRESH same as coordinator rerun
        NOCLEANUP same as coordinator rerun

        Show
        Robert Kanter added a comment - Also, the docs for bundle re-runs from the web api is completely missing. After looking at the code, I think it should be something like this: http://localhost:11000/oozie/v1/job/JOB_ID?action=bundle-rerun&coord-scope=CORD_SCOPE&date-scope=DATE_SCOPE&refresh=REFRESH&nocleanup=NOCLEANUP COORD_SCOPE the rerun scope for coordinator job names separated by "," (should be a list of names (not IDs) of coordinator jobs) DATE_SCOPE looks like the same as coordinator rerun; also, if this is empty or missing, I think it will figure it out for you from the coord job REFRESH same as coordinator rerun NOCLEANUP same as coordinator rerun
        Hide
        Robert Kanter added a comment -

        The patch updates the REST API docs by clarifying some things, fixing incorrect things, and adding some missing things; no code changes.

        Show
        Robert Kanter added a comment - The patch updates the REST API docs by clarifying some things, fixing incorrect things, and adding some missing things; no code changes.
        Hide
        Alejandro Abdelnur added a comment -

        +1

        Show
        Alejandro Abdelnur added a comment - +1
        Hide
        Hadoop QA added a comment -

        Testing JIRA OOZIE-1183

        Cleaning local svn workspace

        ----------------------------

        +1 PATCH_APPLIES
        +1 CLEAN
        -1 RAW_PATCH_ANALYSIS
        . +1 the patch does not introduce any @author tags
        . +1 the patch does not introduce any tabs
        . +1 the patch does not introduce any trailing spaces
        . -1 the patch contains 2 line(s) longer than 132 characters
        . -1 the patch does not add/modify any testcase
        -1 RAT
        . -1 the patch seems to introduce 1 new RAT warning(s)
        +1 JAVADOC
        . +1 the patch does not seem to introduce new Javadoc warnings
        +1 COMPILE
        . +1 HEAD compiles
        . +1 patch compiles
        . +1 the patch does not seem to introduce new javac warnings
        +1 BACKWARDS_COMPATIBILITY
        . +1 the patch does not change any JPA Entity/Colum/Basic/Lob/Transient annotations
        . +1 the patch does not modify JPA files
        +1 TESTS
        . Tests run: 1149
        +1 DISTRO
        . +1 distro tarball builds with the patch

        ----------------------------
        -1 Overall result, please check the reported -1(s)

        The full output of the test-patch run is available at

        . https://builds.apache.org/job/oozie-trunk-precommit-build/507/

        Show
        Hadoop QA added a comment - Testing JIRA OOZIE-1183 Cleaning local svn workspace ---------------------------- +1 PATCH_APPLIES +1 CLEAN -1 RAW_PATCH_ANALYSIS . +1 the patch does not introduce any @author tags . +1 the patch does not introduce any tabs . +1 the patch does not introduce any trailing spaces . -1 the patch contains 2 line(s) longer than 132 characters . -1 the patch does not add/modify any testcase -1 RAT . -1 the patch seems to introduce 1 new RAT warning(s) +1 JAVADOC . +1 the patch does not seem to introduce new Javadoc warnings +1 COMPILE . +1 HEAD compiles . +1 patch compiles . +1 the patch does not seem to introduce new javac warnings +1 BACKWARDS_COMPATIBILITY . +1 the patch does not change any JPA Entity/Colum/Basic/Lob/Transient annotations . +1 the patch does not modify JPA files +1 TESTS . Tests run: 1149 +1 DISTRO . +1 distro tarball builds with the patch ---------------------------- -1 Overall result, please check the reported -1(s) The full output of the test-patch run is available at . https://builds.apache.org/job/oozie-trunk-precommit-build/507/
        Hide
        Robert Kanter added a comment -

        The 2 lines longer than 132 characters are because of twiki formatting restrictions.
        The RAT warning is from docs/src/site/twiki/DG_CommandLineTool.twiki.orig which is just because I accidentally had some of the changes from OOZIE-1352 in there and its already been committed.

        Reuploading fixed patch which only has changes to WebServicesAPI.twiki

        Show
        Robert Kanter added a comment - The 2 lines longer than 132 characters are because of twiki formatting restrictions. The RAT warning is from docs/src/site/twiki/DG_CommandLineTool.twiki.orig which is just because I accidentally had some of the changes from OOZIE-1352 in there and its already been committed. Reuploading fixed patch which only has changes to WebServicesAPI.twiki
        Hide
        Hadoop QA added a comment -

        Testing JIRA OOZIE-1183

        Cleaning local svn workspace

        ----------------------------

        +1 PATCH_APPLIES
        +1 CLEAN
        -1 RAW_PATCH_ANALYSIS
        . +1 the patch does not introduce any @author tags
        . +1 the patch does not introduce any tabs
        . +1 the patch does not introduce any trailing spaces
        . -1 the patch contains 2 line(s) longer than 132 characters
        . -1 the patch does not add/modify any testcase
        +1 RAT
        . +1 the patch does not seem to introduce new RAT warnings
        +1 JAVADOC
        . +1 the patch does not seem to introduce new Javadoc warnings
        -1 COMPILE
        . +1 HEAD compiles
        . +1 patch compiles
        . -1 the patch seems to introduce 1 new javac warning(s)
        +1 BACKWARDS_COMPATIBILITY
        . +1 the patch does not change any JPA Entity/Colum/Basic/Lob/Transient annotations
        . +1 the patch does not modify JPA files
        -1 TESTS
        . Tests run: 1149
        . Tests failed: 0
        . Tests errors: 1045

        . The patch failed the following testcases:

        .

        +1 DISTRO
        . +1 distro tarball builds with the patch

        ----------------------------
        -1 Overall result, please check the reported -1(s)

        The full output of the test-patch run is available at

        . https://builds.apache.org/job/oozie-trunk-precommit-build/510/

        Show
        Hadoop QA added a comment - Testing JIRA OOZIE-1183 Cleaning local svn workspace ---------------------------- +1 PATCH_APPLIES +1 CLEAN -1 RAW_PATCH_ANALYSIS . +1 the patch does not introduce any @author tags . +1 the patch does not introduce any tabs . +1 the patch does not introduce any trailing spaces . -1 the patch contains 2 line(s) longer than 132 characters . -1 the patch does not add/modify any testcase +1 RAT . +1 the patch does not seem to introduce new RAT warnings +1 JAVADOC . +1 the patch does not seem to introduce new Javadoc warnings -1 COMPILE . +1 HEAD compiles . +1 patch compiles . -1 the patch seems to introduce 1 new javac warning(s) +1 BACKWARDS_COMPATIBILITY . +1 the patch does not change any JPA Entity/Colum/Basic/Lob/Transient annotations . +1 the patch does not modify JPA files -1 TESTS . Tests run: 1149 . Tests failed: 0 . Tests errors: 1045 . The patch failed the following testcases: . +1 DISTRO . +1 distro tarball builds with the patch ---------------------------- -1 Overall result, please check the reported -1(s) The full output of the test-patch run is available at . https://builds.apache.org/job/oozie-trunk-precommit-build/510/
        Hide
        Robert Kanter added a comment -

        The RAT warning is now fixed; the test failures are not related.

        Committed to trunk!

        Show
        Robert Kanter added a comment - The RAT warning is now fixed; the test failures are not related. Committed to trunk!

          People

          • Assignee:
            Robert Kanter
            Reporter:
            Robert Kanter
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development