Oozie
  1. Oozie
  2. OOZIE-820

Shell action to support env-var value with = sign

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.2.0
    • Fix Version/s: 3.2.0
    • Component/s: action
    • Labels:

      Description

      For shell action, the env-var's value is truncated by =. for example, the shell action in
      workflow.xml:
      <shell xmlns="uri:oozie:shell-action:0.1">
      ... ...
      <exec>$

      {SCRIPT}</exec>
      <env-var>myVar="v=123;t=456;s=abc--"</env-var>
      <file>${SCRIPT}

      #$

      {SCRIPT}

      </file>
      <capture-output/>

      then the $

      {myVar} becomes:
      myVar="v

      expect it to be: ${myVar}

      equals v=123;t=456;s=abc--

        Activity

        Hide
        jiraposter@reviews.apache.org added a comment -

        -----------------------------------------------------------
        This is an automatically generated e-mail. To reply, visit:
        https://reviews.apache.org/r/4863/
        -----------------------------------------------------------

        Review request for oozie.

        Summary
        -------

        For shell action, the env-var's value is truncated by =. for example, the shell action in
        workflow.xml:
        <shell xmlns="uri:oozie:shell-action:0.1">
        ... ...
        <exec>$

        {SCRIPT}</exec>
        <env-var>myVar="v=123;t=456;s=abc--"</env-var>
        <file>${SCRIPT}

        #$

        {SCRIPT}

        </file>
        <capture-output/>

        then the $

        {myVar} becomes:
        myVar="v

        expect it to be: ${myVar}

        equals v=123;t=456;s=abc--

        Minor change required in ShellMain to limit string splitting to 1 occurrence of regex "="

        This addresses bug OOZIE-820.
        https://issues.apache.org/jira/browse/OOZIE-820

        Diffs


        trunk/core/src/main/java/org/apache/oozie/action/hadoop/ShellMain.java 1326832
        trunk/core/src/test/java/org/apache/oozie/action/hadoop/TestShellActionExecutor.java 1326832

        Diff: https://reviews.apache.org/r/4863/diff

        Testing
        -------

        unit tests pass

        Thanks,

        Mona

        Show
        jiraposter@reviews.apache.org added a comment - ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/4863/ ----------------------------------------------------------- Review request for oozie. Summary ------- For shell action, the env-var's value is truncated by =. for example, the shell action in workflow.xml: <shell xmlns="uri:oozie:shell-action:0.1"> ... ... <exec>$ {SCRIPT}</exec> <env-var>myVar="v=123;t=456;s=abc--"</env-var> <file>${SCRIPT} #$ {SCRIPT} </file> <capture-output/> then the $ {myVar} becomes: myVar="v expect it to be: ${myVar} equals v=123;t=456;s=abc-- Minor change required in ShellMain to limit string splitting to 1 occurrence of regex "=" This addresses bug OOZIE-820 . https://issues.apache.org/jira/browse/OOZIE-820 Diffs trunk/core/src/main/java/org/apache/oozie/action/hadoop/ShellMain.java 1326832 trunk/core/src/test/java/org/apache/oozie/action/hadoop/TestShellActionExecutor.java 1326832 Diff: https://reviews.apache.org/r/4863/diff Testing ------- unit tests pass Thanks, Mona
        Hide
        jiraposter@reviews.apache.org added a comment -

        -----------------------------------------------------------
        This is an automatically generated e-mail. To reply, visit:
        https://reviews.apache.org/r/4863/#review7233
        -----------------------------------------------------------

        Ship it!

        Looks good

        • Virag

        On 2012-04-24 22:22:06, Mona Chitnis wrote:

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

        This is an automatically generated e-mail. To reply, visit:

        https://reviews.apache.org/r/4863/

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

        (Updated 2012-04-24 22:22:06)

        Review request for oozie.

        Summary

        -------

        For shell action, the env-var's value is truncated by =. for example, the shell action in

        workflow.xml:

        <shell xmlns="uri:oozie:shell-action:0.1">

        ... ...

        <exec>${SCRIPT}</exec>
        bq. <env-var>myVar="v=123;t=456;s=abc--"</env-var>
        bq. <file>${SCRIPT}#${SCRIPT}</file>

        <capture-output/>

        then the ${myVar} becomes:
        bq. myVar="v
        bq.
        bq. expect it to be: ${myVar} equals v=123;t=456;s=abc--

        Minor change required in ShellMain to limit string splitting to 1 occurrence of regex "="

        This addresses bug OOZIE-820.

        https://issues.apache.org/jira/browse/OOZIE-820

        Diffs

        -----

        trunk/core/src/main/java/org/apache/oozie/action/hadoop/ShellMain.java 1326832

        trunk/core/src/test/java/org/apache/oozie/action/hadoop/TestShellActionExecutor.java 1326832

        Diff: https://reviews.apache.org/r/4863/diff

        Testing

        -------

        unit tests pass

        Thanks,

        Mona

        Show
        jiraposter@reviews.apache.org added a comment - ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/4863/#review7233 ----------------------------------------------------------- Ship it! Looks good Virag On 2012-04-24 22:22:06, Mona Chitnis wrote: ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/4863/ ----------------------------------------------------------- (Updated 2012-04-24 22:22:06) Review request for oozie. Summary ------- For shell action, the env-var's value is truncated by =. for example, the shell action in workflow.xml: <shell xmlns="uri:oozie:shell-action:0.1"> ... ... <exec>${SCRIPT}</exec> bq. <env-var>myVar="v=123;t=456;s=abc--"</env-var> bq. <file>${SCRIPT}#${SCRIPT}</file> <capture-output/> then the ${myVar} becomes: bq. myVar="v bq. bq. expect it to be: ${myVar} equals v=123;t=456;s=abc-- Minor change required in ShellMain to limit string splitting to 1 occurrence of regex "=" This addresses bug OOZIE-820 . https://issues.apache.org/jira/browse/OOZIE-820 Diffs ----- trunk/core/src/main/java/org/apache/oozie/action/hadoop/ShellMain.java 1326832 trunk/core/src/test/java/org/apache/oozie/action/hadoop/TestShellActionExecutor.java 1326832 Diff: https://reviews.apache.org/r/4863/diff Testing ------- unit tests pass Thanks, Mona
        Hide
        jiraposter@reviews.apache.org added a comment -

        -----------------------------------------------------------
        This is an automatically generated e-mail. To reply, visit:
        https://reviews.apache.org/r/4863/#review7244
        -----------------------------------------------------------

        Ship it!

        +1

        • Santhosh

        On 2012-04-24 22:22:06, Mona Chitnis wrote:

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

        This is an automatically generated e-mail. To reply, visit:

        https://reviews.apache.org/r/4863/

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

        (Updated 2012-04-24 22:22:06)

        Review request for oozie.

        Summary

        -------

        For shell action, the env-var's value is truncated by =. for example, the shell action in

        workflow.xml:

        <shell xmlns="uri:oozie:shell-action:0.1">

        ... ...

        <exec>${SCRIPT}</exec>
        bq. <env-var>myVar="v=123;t=456;s=abc--"</env-var>
        bq. <file>${SCRIPT}#${SCRIPT}</file>

        <capture-output/>

        then the ${myVar} becomes:
        bq. myVar="v
        bq.
        bq. expect it to be: ${myVar} equals v=123;t=456;s=abc--

        Minor change required in ShellMain to limit string splitting to 1 occurrence of regex "="

        This addresses bug OOZIE-820.

        https://issues.apache.org/jira/browse/OOZIE-820

        Diffs

        -----

        trunk/core/src/main/java/org/apache/oozie/action/hadoop/ShellMain.java 1326832

        trunk/core/src/test/java/org/apache/oozie/action/hadoop/TestShellActionExecutor.java 1326832

        Diff: https://reviews.apache.org/r/4863/diff

        Testing

        -------

        unit tests pass

        Thanks,

        Mona

        Show
        jiraposter@reviews.apache.org added a comment - ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/4863/#review7244 ----------------------------------------------------------- Ship it! +1 Santhosh On 2012-04-24 22:22:06, Mona Chitnis wrote: ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/4863/ ----------------------------------------------------------- (Updated 2012-04-24 22:22:06) Review request for oozie. Summary ------- For shell action, the env-var's value is truncated by =. for example, the shell action in workflow.xml: <shell xmlns="uri:oozie:shell-action:0.1"> ... ... <exec>${SCRIPT}</exec> bq. <env-var>myVar="v=123;t=456;s=abc--"</env-var> bq. <file>${SCRIPT}#${SCRIPT}</file> <capture-output/> then the ${myVar} becomes: bq. myVar="v bq. bq. expect it to be: ${myVar} equals v=123;t=456;s=abc-- Minor change required in ShellMain to limit string splitting to 1 occurrence of regex "=" This addresses bug OOZIE-820 . https://issues.apache.org/jira/browse/OOZIE-820 Diffs ----- trunk/core/src/main/java/org/apache/oozie/action/hadoop/ShellMain.java 1326832 trunk/core/src/test/java/org/apache/oozie/action/hadoop/TestShellActionExecutor.java 1326832 Diff: https://reviews.apache.org/r/4863/diff Testing ------- unit tests pass Thanks, Mona
        Hide
        jiraposter@reviews.apache.org added a comment -

        -----------------------------------------------------------
        This is an automatically generated e-mail. To reply, visit:
        https://reviews.apache.org/r/4863/#review7327
        -----------------------------------------------------------

        Ship it!

        • Alejandro

        On 2012-04-24 22:22:06, Mona Chitnis wrote:

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

        This is an automatically generated e-mail. To reply, visit:

        https://reviews.apache.org/r/4863/

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

        (Updated 2012-04-24 22:22:06)

        Review request for oozie.

        Summary

        -------

        For shell action, the env-var's value is truncated by =. for example, the shell action in

        workflow.xml:

        <shell xmlns="uri:oozie:shell-action:0.1">

        ... ...

        <exec>${SCRIPT}</exec>
        bq. <env-var>myVar="v=123;t=456;s=abc--"</env-var>
        bq. <file>${SCRIPT}#${SCRIPT}</file>

        <capture-output/>

        then the ${myVar} becomes:
        bq. myVar="v
        bq.
        bq. expect it to be: ${myVar} equals v=123;t=456;s=abc--

        Minor change required in ShellMain to limit string splitting to 1 occurrence of regex "="

        This addresses bug OOZIE-820.

        https://issues.apache.org/jira/browse/OOZIE-820

        Diffs

        -----

        trunk/core/src/main/java/org/apache/oozie/action/hadoop/ShellMain.java 1326832

        trunk/core/src/test/java/org/apache/oozie/action/hadoop/TestShellActionExecutor.java 1326832

        Diff: https://reviews.apache.org/r/4863/diff

        Testing

        -------

        unit tests pass

        Thanks,

        Mona

        Show
        jiraposter@reviews.apache.org added a comment - ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/4863/#review7327 ----------------------------------------------------------- Ship it! Alejandro On 2012-04-24 22:22:06, Mona Chitnis wrote: ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/4863/ ----------------------------------------------------------- (Updated 2012-04-24 22:22:06) Review request for oozie. Summary ------- For shell action, the env-var's value is truncated by =. for example, the shell action in workflow.xml: <shell xmlns="uri:oozie:shell-action:0.1"> ... ... <exec>${SCRIPT}</exec> bq. <env-var>myVar="v=123;t=456;s=abc--"</env-var> bq. <file>${SCRIPT}#${SCRIPT}</file> <capture-output/> then the ${myVar} becomes: bq. myVar="v bq. bq. expect it to be: ${myVar} equals v=123;t=456;s=abc-- Minor change required in ShellMain to limit string splitting to 1 occurrence of regex "=" This addresses bug OOZIE-820 . https://issues.apache.org/jira/browse/OOZIE-820 Diffs ----- trunk/core/src/main/java/org/apache/oozie/action/hadoop/ShellMain.java 1326832 trunk/core/src/test/java/org/apache/oozie/action/hadoop/TestShellActionExecutor.java 1326832 Diff: https://reviews.apache.org/r/4863/diff Testing ------- unit tests pass Thanks, Mona
        Hide
        Alejandro Abdelnur added a comment -

        thanks Mona. Committed to trunk

        Show
        Alejandro Abdelnur added a comment - thanks Mona. Committed to trunk
        Hide
        Mona Chitnis added a comment -

        For the patch committed in trunk with this JIRA ID (also available under the same JIRA ID in Apache ReviewBoard system), I grant license to ASF for inclusion in ASF works (as per the Apache License §5) 

        Show
        Mona Chitnis added a comment - For the patch committed in trunk with this JIRA ID (also available under the same JIRA ID in Apache ReviewBoard system), I grant license to ASF for inclusion in ASF works (as per the Apache License §5) 

          People

          • Assignee:
            Mona Chitnis
            Reporter:
            Mona Chitnis
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 2h
              2h
              Remaining:
              Remaining Estimate - 2h
              2h
              Logged:
              Time Spent - Not Specified
              Not Specified

                Development