[ 
https://issues.apache.org/jira/browse/OOZIE-3550?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Erik Bernhardson updated OOZIE-3550:
------------------------------------
    Description: 
When providing the spark-opts option to the spark action, a double dash within 
values is incorrectly interpreted as the start of a new cli flag.  To reproduce 
add a test case to 
sharelib/spark/src/test/java/org/apache/oozie/action/hadoop/TestSparkOptionsSplitter.java
 expecting:

```
input: "--option val--ue"
expect: Arrays.asList("--option", "val--ue")
```

Instead the result is:
```
java.lang.AssertionError:
Expecting:
 <["--option", "val", "--ue"]>
to contain exactly (and in same order):
 <["--option", "val--ue"]>
but some elements were not found:
 <["val--ue"]>
and others were not expected:
 <["val", "–ue"]>
```
 

  was:
When providing the spark-opts option to the spark action, a double dash within 
values is incorrectly interpreted as the start of a new cli flag.  To reproduce 
add a test case to 
sharelib/spark/src/test/java/org/apache/oozie/action/hadoop/TestSparkOptionsSplitter.java
 expecting:

{{input: "--option val--ue"}}
{{ expect: Arrays.asList("--option", "val–ue")}}

Instead the result is:

{{java.lang.AssertionError: }}
{{Expecting:}}
{{ <["--option", "val", "--ue"]>}}
{{to contain exactly (and in same order):}}
{{ <["--option", "val--ue"]>}}
{{but some elements were not found:}}
{{ <["val--ue"]>}}
{{and others were not expected:}}
{{ <["val", "–ue"]>}}

 


> Spark action incorrectly splits spark-opts with -- in value
> -----------------------------------------------------------
>
>                 Key: OOZIE-3550
>                 URL: https://issues.apache.org/jira/browse/OOZIE-3550
>             Project: Oozie
>          Issue Type: Bug
>          Components: action
>            Reporter: Erik Bernhardson
>            Priority: Minor
>
> When providing the spark-opts option to the spark action, a double dash 
> within values is incorrectly interpreted as the start of a new cli flag.  To 
> reproduce add a test case to 
> sharelib/spark/src/test/java/org/apache/oozie/action/hadoop/TestSparkOptionsSplitter.java
>  expecting:
> ```
> input: "--option val--ue"
> expect: Arrays.asList("--option", "val--ue")
> ```
> Instead the result is:
> ```
> java.lang.AssertionError:
> Expecting:
>  <["--option", "val", "--ue"]>
> to contain exactly (and in same order):
>  <["--option", "val--ue"]>
> but some elements were not found:
>  <["val--ue"]>
> and others were not expected:
>  <["val", "–ue"]>
> ```
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to