Uploaded image for project: 'Oozie'
  1. Oozie
  2. OOZIE-1881 Docs fixes
  3. OOZIE-2283

Documentation should not say that System.exit is not allowed in Java Action

    Details

    • Type: Sub-task
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.3.2
    • Fix Version/s: 4.3.0
    • Component/s: docs
    • Labels:
      None

      Description

      The Java Action docs say:

      The main Java class must not call System.exit(int n) as this will make the java action to do an error transition regardless of the used exit code.

      http://oozie.apache.org/docs/4.2.0/WorkflowFunctionalSpec.html#a3.2.7_Java_Action

      This has not been true for quite some time. Oozie counts System.exit(0) as OK and non-zero values as the ERROR transition.
      https://github.com/apache/oozie/blob/master/sharelib/oozie/src/main/java/org/apache/oozie/action/hadoop/LauncherMapper.java#L259

      1. OOZIE-2283.001.patch
        1 kB
        Eva Andreasson
      2. OOZIE-2283-002.patch
        1 kB
        Eva Andreasson

        Activity

        Hide
        rkanter Robert Kanter added a comment -

        Closing issue; Oozie 4.3.0 is released.

        Show
        rkanter Robert Kanter added a comment - Closing issue; Oozie 4.3.0 is released.
        Hide
        rkanter Robert Kanter added a comment -

        Thanks Eva. Committed to trunk!

        Show
        rkanter Robert Kanter added a comment - Thanks Eva. Committed to trunk!
        Hide
        rkanter Robert Kanter added a comment -

        +1

        Show
        rkanter Robert Kanter added a comment - +1
        Hide
        hadoopqa Hadoop QA added a comment -

        Testing JIRA OOZIE-2283

        Cleaning local git 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 contains 1 line(s) with trailing spaces
        . +1 the patch does not introduce any line longer than 132
        . -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 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: 1762
        . Tests failed: 5
        . Tests errors: 0

        . The patch failed the following testcases:

        . testSamplers(org.apache.oozie.util.TestMetricsInstrumentation)
        . testNone(org.apache.oozie.command.coord.TestCoordActionInputCheckXCommandNonUTC)
        . testForNoDuplicates(org.apache.oozie.event.TestEventGeneration)
        . testActionKillCommandActionNumbers(org.apache.oozie.command.coord.TestCoordActionsKillXCommand)
        . testCoordStatus_Killed(org.apache.oozie.command.coord.TestCoordChangeXCommand)

        +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/2751/

        Show
        hadoopqa Hadoop QA added a comment - Testing JIRA OOZIE-2283 Cleaning local git 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 contains 1 line(s) with trailing spaces . +1 the patch does not introduce any line longer than 132 . -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 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: 1762 . Tests failed: 5 . Tests errors: 0 . The patch failed the following testcases: . testSamplers(org.apache.oozie.util.TestMetricsInstrumentation) . testNone(org.apache.oozie.command.coord.TestCoordActionInputCheckXCommandNonUTC) . testForNoDuplicates(org.apache.oozie.event.TestEventGeneration) . testActionKillCommandActionNumbers(org.apache.oozie.command.coord.TestCoordActionsKillXCommand) . testCoordStatus_Killed(org.apache.oozie.command.coord.TestCoordChangeXCommand) +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/2751/
        Hide
        rkanter Robert Kanter added a comment -

        If you specify -DgenerateDocs, it should build the twiki files into the Oozie website with html files somewhere. e.g. mvn clean package assembly:single -DskipTests -DgenerateDocs.

        Show
        rkanter Robert Kanter added a comment - If you specify -DgenerateDocs , it should build the twiki files into the Oozie website with html files somewhere. e.g. mvn clean package assembly:single -DskipTests -DgenerateDocs .
        Hide
        eeeva Eva Andreasson added a comment -

        I think I fixed the line length issue. BTW - Any tips on what is the easiest way to look at .twiki files and validate the layout and formatting (locally)?

        Show
        eeeva Eva Andreasson added a comment - I think I fixed the line length issue. BTW - Any tips on what is the easiest way to look at .twiki files and validate the layout and formatting (locally)?
        Hide
        rkanter Robert Kanter added a comment -

        Can you split the line into two lines? It's currently more than 132 characters, which is what we use as the max line length (other than certain exceptions). The twiki formatting will still generate a page with one line as long as there's no empty lines between the two lines.

        Show
        rkanter Robert Kanter added a comment - Can you split the line into two lines? It's currently more than 132 characters, which is what we use as the max line length (other than certain exceptions). The twiki formatting will still generate a page with one line as long as there's no empty lines between the two lines.
        Hide
        hadoopqa Hadoop QA added a comment -

        Testing JIRA OOZIE-2283

        Cleaning local git 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 1 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 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: 1762
        . Tests failed: 3
        . Tests errors: 0

        . The patch failed the following testcases:

        . testForNoDuplicates(org.apache.oozie.event.TestEventGeneration)
        . testMaxMatThrottleNotPicked(org.apache.oozie.service.TestCoordMaterializeTriggerService)
        . testSamplers(org.apache.oozie.util.TestMetricsInstrumentation)

        +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/2749/

        Show
        hadoopqa Hadoop QA added a comment - Testing JIRA OOZIE-2283 Cleaning local git 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 1 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 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: 1762 . Tests failed: 3 . Tests errors: 0 . The patch failed the following testcases: . testForNoDuplicates(org.apache.oozie.event.TestEventGeneration) . testMaxMatThrottleNotPicked(org.apache.oozie.service.TestCoordMaterializeTriggerService) . testSamplers(org.apache.oozie.util.TestMetricsInstrumentation) +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/2749/
        Hide
        eeeva Eva Andreasson added a comment -

        Changed the wording to reflect the current behavior of managing System.exit in the Java action docs.

        Show
        eeeva Eva Andreasson added a comment - Changed the wording to reflect the current behavior of managing System.exit in the Java action docs.
        Hide
        rkanter Robert Kanter added a comment -

        +1 on the wording.

        Show
        rkanter Robert Kanter added a comment - +1 on the wording.
        Hide
        eeeva Eva Andreasson added a comment -

        Before I upload a patch, here is the proposed change of wording. Any input is welcome.

        OLD FORMULATION
        The main Java class must not call =System.exit(int n)= as this will make the =java= action to do an =error= transition
        regardless of the used exit code.

        NEW FORMULATION
        The main Java class can call =System.exit(int n)=. Exit code zero is regarded as OK, while non-zero exit codes will cause the =java= action to do an =error= transition and exit.

        Show
        eeeva Eva Andreasson added a comment - Before I upload a patch, here is the proposed change of wording. Any input is welcome. OLD FORMULATION The main Java class must not call =System.exit(int n)= as this will make the =java= action to do an =error= transition regardless of the used exit code. NEW FORMULATION The main Java class can call =System.exit(int n)=. Exit code zero is regarded as OK, while non-zero exit codes will cause the =java= action to do an =error= transition and exit.

          People

          • Assignee:
            eeeva Eva Andreasson
            Reporter:
            rkanter Robert Kanter
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development