[ https://issues.apache.org/jira/browse/OOZIE-3375?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16667837#comment-16667837 ]
Hadoop QA commented on OOZIE-3375: ---------------------------------- Testing JIRA OOZIE-3375 Cleaning local git workspace ---------------------------- {color:green}+1 PATCH_APPLIES{color} {color:green}+1 CLEAN{color} {color:green}+1 RAW_PATCH_ANALYSIS{color} . {color:green}+1{color} the patch does not introduce any @author tags . {color:green}+1{color} the patch does not introduce any tabs . {color:green}+1{color} the patch does not introduce any trailing spaces . {color:green}+1{color} the patch does not introduce any star imports . {color:green}+1{color} the patch does not introduce any line longer than 132 . {color:green}+1{color} the patch adds/modifies 1 testcase(s) {color:green}+1 RAT{color} . {color:green}+1{color} the patch does not seem to introduce new RAT warnings {color:green}+1 JAVADOC{color} . {color:green}+1{color} Javadoc generation succeeded with the patch . {color:green}+1{color} the patch does not seem to introduce new Javadoc warning(s) . {color:orange}WARNING{color}: the current HEAD has 100 Javadoc warning(s) {color:green}+1 COMPILE{color} . {color:green}+1{color} HEAD compiles . {color:green}+1{color} patch compiles . {color:green}+1{color} the patch does not seem to introduce new javac warnings {color:green}+1{color} There are no new bugs found in total. . {color:green}+1{color} There are no new bugs found in [webapp]. . {color:green}+1{color} There are no new bugs found in [examples]. . {color:green}+1{color} There are no new bugs found in [server]. . {color:green}+1{color} There are no new bugs found in [client]. . {color:green}+1{color} There are no new bugs found in [docs]. . {color:green}+1{color} There are no new bugs found in [fluent-job/fluent-job-api]. . {color:green}+1{color} There are no new bugs found in [core]. . {color:green}+1{color} There are no new bugs found in [tools]. . {color:green}+1{color} There are no new bugs found in [sharelib/streaming]. . {color:green}+1{color} There are no new bugs found in [sharelib/hive2]. . {color:green}+1{color} There are no new bugs found in [sharelib/git]. . {color:green}+1{color} There are no new bugs found in [sharelib/hcatalog]. . {color:green}+1{color} There are no new bugs found in [sharelib/hive]. . {color:green}+1{color} There are no new bugs found in [sharelib/pig]. . {color:green}+1{color} There are no new bugs found in [sharelib/oozie]. . {color:green}+1{color} There are no new bugs found in [sharelib/sqoop]. . {color:green}+1{color} There are no new bugs found in [sharelib/distcp]. . {color:green}+1{color} There are no new bugs found in [sharelib/spark]. {color:green}+1 BACKWARDS_COMPATIBILITY{color} . {color:green}+1{color} the patch does not change any JPA Entity/Colum/Basic/Lob/Transient annotations . {color:green}+1{color} the patch does not modify JPA files {color:red}-1 TESTS{color} . Tests run : 3063 . Tests failed : 4 . Tests in error : 1 . Tests timed out : 0 {color:red}-1{color} [ERROR] There are [4] test failures in [core]. Listing only the first [5] ones testCoordSLAAlertCommands:org.apache.oozie.command.TestSLAAlertXCommand testBundleSLAAlertCommands:org.apache.oozie.command.TestSLAAlertXCommand {color:red}-1{color} [ERROR] There are [1] test errors in [core]. Listing only the first [5] ones Check console output for the full list of errors/failures {color:green}+1 DISTRO{color} . {color:green}+1{color} distro tarball builds with the patch ---------------------------- {color:red}*-1 Overall result, please check the reported -1(s)*{color} {color:red}. There is at least one warning, please check{color} The full output of the test-patch run is available at . https://builds.apache.org/job/PreCommit-OOZIE-Build/900/ > Can't use empty <parameters> in coordinator > ------------------------------------------- > > Key: OOZIE-3375 > URL: https://issues.apache.org/jira/browse/OOZIE-3375 > Project: Oozie > Issue Type: Bug > Reporter: Jacob Tolar > Priority: Major > Attachments: OOZIE-3375-001.patch > > > If I set a property to empty string in the {{<parameters>}} block of my > coordinator and later use it in the {{<action>}} block Oozie throws an error. > That is, this code fails: > {code:java} > <coordinator-app name="param-test" frequency="5" start="2018-10-01T00:00Z" > end="2018-10-01T00:04Z" timezone="UTC" xmlns="uri:oozie:coordinator:0.5"> > <parameters> > <property> > <name>test_param</name> > <value></value> > </property> > </parameters> > <controls> > <timeout>5</timeout> > <concurrency>1</concurrency> > </controls> > <action> > <workflow> > <app-path>/workflow.xml</app-path> > <configuration> > <property> > <name>renamed_param</name> > <value>${test_param}</value> > </property> > </configuration> > </workflow> > </action> > </coordinator-app> > {code} > The error is like this: > {code:java} > org.apache.oozie.command.CommandException: E1021: Coord Action Input Check > Error: E1004: Expression language evaluation error, Unable to evaluate > :${test_param}: > ... > Caused by: javax.servlet.jsp.el.ELException: variable [test_param] cannot be > resolved > {code} > What happens: The coordinator submits successfully. When the first action > materializes in > [CoordMaterializeTransitionXCommand|https://github.com/apache/oozie/blob/65936460e263f9076bb552190be85396c2cc6d33/core/src/main/java/org/apache/oozie/command/coord/CoordMaterializeTransitionXCommand.java#L373-L379], > the coordinator conf is parsed into an Oozie {{XConfiguration}} object. > In > [XConfiguration.processNodes|https://github.com/apache/oozie/blob/65936460e263f9076bb552190be85396c2cc6d33/core/src/main/java/org/apache/oozie/util/XConfiguration.java#L313-L354], > present-but-empty values are not added to the configuration. Specifically, > this condition: > {code:java} > if ("value".equals(field.getLocalName()) && > field.hasChildNodes()) { > value = ((Text) field.getFirstChild()).getData(); > } > {code} > fails – {{field.hasChildNodes()}} returns {{false}} if the input is > {{<value></value>}} or {{<value />}}. This prevents the configuration setting > from being added to the {{XConfiguration}}. > I suggest a fix like this: > {code:java} > if ("value".equals(field.getLocalName())) { > if (field.hasChildNodes()) { > value = ((Text) field.getFirstChild()).getData(); > } > if (value == null) { > value = ""; > } > } > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)