You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@oozie.apache.org by "Virag Kothari (Created) (JIRA)" <ji...@apache.org> on 2012/03/23 02:32:21 UTC
[jira] [Created] (OOZIE-780) XConfiguration parser can't parse XML
file with element
XConfiguration parser can't parse XML file with <include> element
-----------------------------------------------------------------
Key: OOZIE-780
URL: https://issues.apache.org/jira/browse/OOZIE-780
Project: Oozie
Issue Type: Bug
Reporter: Virag Kothari
E.g core-site.xml
<xi:include href="**/local-superuser-conf.xml"/>
<property>
</property>
If the hadoop configs like core-site.xml has an <include> element along with <property> elements, then Xconfiguration cannot parse it and HadoopAccessorService cannot load it.
This piece of code in Xconfiguration throws the error:
if (!"property".equals(prop.getTagName())) {
throw new IOException("bad conf file: element not <property>");
}
This jira proposes to provide functionality to combine xmls by supporting the <include> element
StackTrace:
Caused by: java.io.IOException: bad conf file: element not <property>
at
org.apache.oozie.util.XConfiguration.parseDocument(XConfiguration.java:287)
at org.apache.oozie.util.XConfiguration.parse(XConfiguration.java:244)
at org.apache.oozie.util.XConfiguration.<init>(XConfiguration.java:63)
at
org.apache.oozie.service.HadoopAccessorService.loadHadoopConf(HadoopAccessorService.java:152)
at
org.apache.oozie.service.HadoopAccessorService.loadHadoopConfigs(HadoopAccessorService.java:175)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (OOZIE-780) XConfiguration parser can't parse
XML file with element
Posted by "jiraposter@reviews.apache.org (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OOZIE-780?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13237301#comment-13237301 ]
jiraposter@reviews.apache.org commented on OOZIE-780:
-----------------------------------------------------
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/4472/
-----------------------------------------------------------
Review request for oozie.
Summary
-------
Adding support for Xinclude in xml which is similar to what Hadoop has
This addresses bug oozie-780.
https://issues.apache.org/jira/browse/oozie-780
Diffs
-----
trunk/core/src/main/java/org/apache/oozie/util/XConfiguration.java 1304647
trunk/core/src/test/java/org/apache/oozie/util/TestXConfiguration.java 1304647
trunk/core/src/test/resources/test-hadoop-config.xml 1304647
trunk/core/src/test/resources/test-oozie-default.xml 1304647
Diff: https://reviews.apache.org/r/4472/diff
Testing
-------
Thanks,
Virag
> XConfiguration parser can't parse XML file with <include> element
> -----------------------------------------------------------------
>
> Key: OOZIE-780
> URL: https://issues.apache.org/jira/browse/OOZIE-780
> Project: Oozie
> Issue Type: Bug
> Reporter: Virag Kothari
>
> E.g core-site.xml
> <xi:include href="**/local-superuser-conf.xml"/>
> <property>
> </property>
> If the hadoop configs like core-site.xml has an <include> element along with <property> elements, then Xconfiguration cannot parse it and HadoopAccessorService cannot load it.
> This piece of code in Xconfiguration throws the error:
> if (!"property".equals(prop.getTagName())) {
> throw new IOException("bad conf file: element not <property>");
> }
> This jira proposes to provide functionality to combine xmls by supporting the <include> element
> StackTrace:
> Caused by: java.io.IOException: bad conf file: element not <property>
> at
> org.apache.oozie.util.XConfiguration.parseDocument(XConfiguration.java:287)
> at org.apache.oozie.util.XConfiguration.parse(XConfiguration.java:244)
> at org.apache.oozie.util.XConfiguration.<init>(XConfiguration.java:63)
> at
> org.apache.oozie.service.HadoopAccessorService.loadHadoopConf(HadoopAccessorService.java:152)
> at
> org.apache.oozie.service.HadoopAccessorService.loadHadoopConfigs(HadoopAccessorService.java:175)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (OOZIE-780) XConfiguration parser can't parse XML
file with element
Posted by "Virag Kothari (Resolved) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OOZIE-780?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Virag Kothari resolved OOZIE-780.
---------------------------------
Resolution: Fixed
Assignee: Virag Kothari
> XConfiguration parser can't parse XML file with <include> element
> -----------------------------------------------------------------
>
> Key: OOZIE-780
> URL: https://issues.apache.org/jira/browse/OOZIE-780
> Project: Oozie
> Issue Type: Bug
> Reporter: Virag Kothari
> Assignee: Virag Kothari
>
> E.g core-site.xml
> <xi:include href="**/local-superuser-conf.xml"/>
> <property>
> </property>
> If the hadoop configs like core-site.xml has an <include> element along with <property> elements, then Xconfiguration cannot parse it and HadoopAccessorService cannot load it.
> This piece of code in Xconfiguration throws the error:
> if (!"property".equals(prop.getTagName())) {
> throw new IOException("bad conf file: element not <property>");
> }
> This jira proposes to provide functionality to combine xmls by supporting the <include> element
> StackTrace:
> Caused by: java.io.IOException: bad conf file: element not <property>
> at
> org.apache.oozie.util.XConfiguration.parseDocument(XConfiguration.java:287)
> at org.apache.oozie.util.XConfiguration.parse(XConfiguration.java:244)
> at org.apache.oozie.util.XConfiguration.<init>(XConfiguration.java:63)
> at
> org.apache.oozie.service.HadoopAccessorService.loadHadoopConf(HadoopAccessorService.java:152)
> at
> org.apache.oozie.service.HadoopAccessorService.loadHadoopConfigs(HadoopAccessorService.java:175)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (OOZIE-780) XConfiguration parser can't parse
XML file with element
Posted by "Virag Kothari (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OOZIE-780?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13239841#comment-13239841 ]
Virag Kothari commented on OOZIE-780:
-------------------------------------
An issue was identified in Hadoop 5254 where some updates of java6( till update 2) were not XincludeAware compliant as those updates used xerces2.6. This issue can be resolved by using xerces 2.10. This library has been done as part of oozie-781.
> XConfiguration parser can't parse XML file with <include> element
> -----------------------------------------------------------------
>
> Key: OOZIE-780
> URL: https://issues.apache.org/jira/browse/OOZIE-780
> Project: Oozie
> Issue Type: Bug
> Reporter: Virag Kothari
>
> E.g core-site.xml
> <xi:include href="**/local-superuser-conf.xml"/>
> <property>
> </property>
> If the hadoop configs like core-site.xml has an <include> element along with <property> elements, then Xconfiguration cannot parse it and HadoopAccessorService cannot load it.
> This piece of code in Xconfiguration throws the error:
> if (!"property".equals(prop.getTagName())) {
> throw new IOException("bad conf file: element not <property>");
> }
> This jira proposes to provide functionality to combine xmls by supporting the <include> element
> StackTrace:
> Caused by: java.io.IOException: bad conf file: element not <property>
> at
> org.apache.oozie.util.XConfiguration.parseDocument(XConfiguration.java:287)
> at org.apache.oozie.util.XConfiguration.parse(XConfiguration.java:244)
> at org.apache.oozie.util.XConfiguration.<init>(XConfiguration.java:63)
> at
> org.apache.oozie.service.HadoopAccessorService.loadHadoopConf(HadoopAccessorService.java:152)
> at
> org.apache.oozie.service.HadoopAccessorService.loadHadoopConfigs(HadoopAccessorService.java:175)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (OOZIE-780) XConfiguration parser can't parse
XML file with element
Posted by "jiraposter@reviews.apache.org (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OOZIE-780?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13240886#comment-13240886 ]
jiraposter@reviews.apache.org commented on OOZIE-780:
-----------------------------------------------------
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/4472/
-----------------------------------------------------------
(Updated 2012-03-29 01:32:03.496689)
Review request for oozie.
Changes
-------
Xinclude doesn't handle relative paths properly. Discussed with Alejandro and added absolute path for xinclude in testcases.
Summary
-------
Adding support for Xinclude in xml which is similar to what Hadoop has
This addresses bug oozie-780.
https://issues.apache.org/jira/browse/oozie-780
Diffs (updated)
-----
trunk/core/src/main/java/org/apache/oozie/util/XConfiguration.java 1305659
trunk/core/src/test/resources/test-hadoop-config.xml 1305659
trunk/core/src/test/resources/test-oozie-default.xml 1305659
trunk/core/src/test/java/org/apache/oozie/util/TestXConfiguration.java 1305659
Diff: https://reviews.apache.org/r/4472/diff
Testing
-------
Thanks,
Virag
> XConfiguration parser can't parse XML file with <include> element
> -----------------------------------------------------------------
>
> Key: OOZIE-780
> URL: https://issues.apache.org/jira/browse/OOZIE-780
> Project: Oozie
> Issue Type: Bug
> Reporter: Virag Kothari
>
> E.g core-site.xml
> <xi:include href="**/local-superuser-conf.xml"/>
> <property>
> </property>
> If the hadoop configs like core-site.xml has an <include> element along with <property> elements, then Xconfiguration cannot parse it and HadoopAccessorService cannot load it.
> This piece of code in Xconfiguration throws the error:
> if (!"property".equals(prop.getTagName())) {
> throw new IOException("bad conf file: element not <property>");
> }
> This jira proposes to provide functionality to combine xmls by supporting the <include> element
> StackTrace:
> Caused by: java.io.IOException: bad conf file: element not <property>
> at
> org.apache.oozie.util.XConfiguration.parseDocument(XConfiguration.java:287)
> at org.apache.oozie.util.XConfiguration.parse(XConfiguration.java:244)
> at org.apache.oozie.util.XConfiguration.<init>(XConfiguration.java:63)
> at
> org.apache.oozie.service.HadoopAccessorService.loadHadoopConf(HadoopAccessorService.java:152)
> at
> org.apache.oozie.service.HadoopAccessorService.loadHadoopConfigs(HadoopAccessorService.java:175)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (OOZIE-780) XConfiguration parser can't parse
XML file with element
Posted by "jiraposter@reviews.apache.org (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OOZIE-780?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13240663#comment-13240663 ]
jiraposter@reviews.apache.org commented on OOZIE-780:
-----------------------------------------------------
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/4472/#review6486
-----------------------------------------------------------
Ship it!
it looks good.
the only thing I'd ask to be done with the testcase is the following:
Instead loading the conf file as a resource from the classloader and having the included file as 'src/main/test/resources/...', both files should be copied to the testcase directory (obtained via XTestCase.getTestDir() ) and the include should be relative with no subdirs. then the stream of the main conf should be read from there.
the reason for this is that while maven runs the testcases from trunk/core/, IDEs run it from trunk/ (or the current dir) and the testcase will fail from within the IDE
- Alejandro
On 2012-03-23 23:41:10, Virag Kothari wrote:
bq.
bq. -----------------------------------------------------------
bq. This is an automatically generated e-mail. To reply, visit:
bq. https://reviews.apache.org/r/4472/
bq. -----------------------------------------------------------
bq.
bq. (Updated 2012-03-23 23:41:10)
bq.
bq.
bq. Review request for oozie.
bq.
bq.
bq. Summary
bq. -------
bq.
bq. Adding support for Xinclude in xml which is similar to what Hadoop has
bq.
bq.
bq. This addresses bug oozie-780.
bq. https://issues.apache.org/jira/browse/oozie-780
bq.
bq.
bq. Diffs
bq. -----
bq.
bq. trunk/core/src/main/java/org/apache/oozie/util/XConfiguration.java 1304647
bq. trunk/core/src/test/java/org/apache/oozie/util/TestXConfiguration.java 1304647
bq. trunk/core/src/test/resources/test-hadoop-config.xml 1304647
bq. trunk/core/src/test/resources/test-oozie-default.xml 1304647
bq.
bq. Diff: https://reviews.apache.org/r/4472/diff
bq.
bq.
bq. Testing
bq. -------
bq.
bq.
bq. Thanks,
bq.
bq. Virag
bq.
bq.
> XConfiguration parser can't parse XML file with <include> element
> -----------------------------------------------------------------
>
> Key: OOZIE-780
> URL: https://issues.apache.org/jira/browse/OOZIE-780
> Project: Oozie
> Issue Type: Bug
> Reporter: Virag Kothari
>
> E.g core-site.xml
> <xi:include href="**/local-superuser-conf.xml"/>
> <property>
> </property>
> If the hadoop configs like core-site.xml has an <include> element along with <property> elements, then Xconfiguration cannot parse it and HadoopAccessorService cannot load it.
> This piece of code in Xconfiguration throws the error:
> if (!"property".equals(prop.getTagName())) {
> throw new IOException("bad conf file: element not <property>");
> }
> This jira proposes to provide functionality to combine xmls by supporting the <include> element
> StackTrace:
> Caused by: java.io.IOException: bad conf file: element not <property>
> at
> org.apache.oozie.util.XConfiguration.parseDocument(XConfiguration.java:287)
> at org.apache.oozie.util.XConfiguration.parse(XConfiguration.java:244)
> at org.apache.oozie.util.XConfiguration.<init>(XConfiguration.java:63)
> at
> org.apache.oozie.service.HadoopAccessorService.loadHadoopConf(HadoopAccessorService.java:152)
> at
> org.apache.oozie.service.HadoopAccessorService.loadHadoopConfigs(HadoopAccessorService.java:175)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (OOZIE-780) XConfiguration parser can't parse XML
file with element
Posted by "Virag Kothari (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OOZIE-780?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Virag Kothari updated OOZIE-780:
--------------------------------
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)
> XConfiguration parser can't parse XML file with <include> element
> -----------------------------------------------------------------
>
> Key: OOZIE-780
> URL: https://issues.apache.org/jira/browse/OOZIE-780
> Project: Oozie
> Issue Type: Bug
> Reporter: Virag Kothari
> Assignee: Virag Kothari
>
> E.g core-site.xml
> <xi:include href="**/local-superuser-conf.xml"/>
> <property>
> </property>
> If the hadoop configs like core-site.xml has an <include> element along with <property> elements, then Xconfiguration cannot parse it and HadoopAccessorService cannot load it.
> This piece of code in Xconfiguration throws the error:
> if (!"property".equals(prop.getTagName())) {
> throw new IOException("bad conf file: element not <property>");
> }
> This jira proposes to provide functionality to combine xmls by supporting the <include> element
> StackTrace:
> Caused by: java.io.IOException: bad conf file: element not <property>
> at
> org.apache.oozie.util.XConfiguration.parseDocument(XConfiguration.java:287)
> at org.apache.oozie.util.XConfiguration.parse(XConfiguration.java:244)
> at org.apache.oozie.util.XConfiguration.<init>(XConfiguration.java:63)
> at
> org.apache.oozie.service.HadoopAccessorService.loadHadoopConf(HadoopAccessorService.java:152)
> at
> org.apache.oozie.service.HadoopAccessorService.loadHadoopConfigs(HadoopAccessorService.java:175)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira