[jira] [Updated] (HADOOP-17088) Failed to load Xinclude files with relative path in case of loading conf via URI

2020-09-16 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot updated HADOOP-17088:

Labels: pull-request-available  (was: )

> Failed to load Xinclude files with relative path in case of loading conf via 
> URI
> 
>
> Key: HADOOP-17088
> URL: https://issues.apache.org/jira/browse/HADOOP-17088
> Project: Hadoop Common
>  Issue Type: Bug
>Reporter: Yushi Hayasaka
>Priority: Major
>  Labels: pull-request-available
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> When we create a configuration file, which load a external XML file with 
> relative path, and try to load it via calling `Configuration.addResource` 
> with `Path(URI)`, we got an error, which failed to load a external XML, after 
> https://issues.apache.org/jira/browse/HADOOP-14216 is merged.
> {noformat}
> Exception in thread "main" java.lang.RuntimeException: java.io.IOException: 
> Fetch fail on include for 'mountTable.xml' with no fallback while loading 
> 'file:/opt/hadoop/etc/hadoop/core-site.xml'
>   at 
> org.apache.hadoop.conf.Configuration.loadResource(Configuration.java:3021)
>   at 
> org.apache.hadoop.conf.Configuration.loadResources(Configuration.java:2973)
>   at 
> org.apache.hadoop.conf.Configuration.getProps(Configuration.java:2848)
>   at 
> org.apache.hadoop.conf.Configuration.iterator(Configuration.java:2896)
>   at com.company.test.Main.main(Main.java:29)
> Caused by: java.io.IOException: Fetch fail on include for 'mountTable.xml' 
> with no fallback while loading 'file:/opt/hadoop/etc/hadoop/core-site.xml'
>   at 
> org.apache.hadoop.conf.Configuration$Parser.handleEndElement(Configuration.java:3271)
>   at 
> org.apache.hadoop.conf.Configuration$Parser.parseNext(Configuration.java:3331)
>   at 
> org.apache.hadoop.conf.Configuration$Parser.parse(Configuration.java:3114)
>   at 
> org.apache.hadoop.conf.Configuration.loadResource(Configuration.java:3007)
>   ... 4 more
> {noformat}
> The cause is that the URI is passed as string to java.io.File constructor and 
> File does not support the file URI, so my suggestion is trying to convert 
> from string to URI at first.



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

-
To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org



[jira] [Updated] (HADOOP-17088) Failed to load Xinclude files with relative path in case of loading conf via URI

2020-06-24 Thread Yushi Hayasaka (Jira)


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

Yushi Hayasaka updated HADOOP-17088:

Description: 
When we create a configuration file, which load a external XML file with 
relative path, and try to load it via calling `Configuration.addResource` with 
`Path(URI)`, we got an error, which failed to load a external XML, after 
https://issues.apache.org/jira/browse/HADOOP-14216 is merged.
{noformat}
Exception in thread "main" java.lang.RuntimeException: java.io.IOException: 
Fetch fail on include for 'mountTable.xml' with no fallback while loading 
'file:/opt/hadoop/etc/hadoop/core-site.xml'
at 
org.apache.hadoop.conf.Configuration.loadResource(Configuration.java:3021)
at 
org.apache.hadoop.conf.Configuration.loadResources(Configuration.java:2973)
at 
org.apache.hadoop.conf.Configuration.getProps(Configuration.java:2848)
at 
org.apache.hadoop.conf.Configuration.iterator(Configuration.java:2896)
at com.company.test.Main.main(Main.java:29)
Caused by: java.io.IOException: Fetch fail on include for 'mountTable.xml' with 
no fallback while loading 'file:/opt/hadoop/etc/hadoop/core-site.xml'
at 
org.apache.hadoop.conf.Configuration$Parser.handleEndElement(Configuration.java:3271)
at 
org.apache.hadoop.conf.Configuration$Parser.parseNext(Configuration.java:3331)
at 
org.apache.hadoop.conf.Configuration$Parser.parse(Configuration.java:3114)
at 
org.apache.hadoop.conf.Configuration.loadResource(Configuration.java:3007)
... 4 more
{noformat}
The cause is that the URI is passed as string to java.io.File constructor and 
File does not support the file URI, so my suggestion is trying to convert from 
string to URI at first.

  was:
When we create a configuration file, which load a external XML file with 
relative path, and try to load it with calling 
`Configuration.addResource(URI)`, we got an error, which failed to load a 
external XML, after [https://issues.apache.org/jira/browse/HADOOP-14216] is 
merged.
{noformat}
Exception in thread "main" java.lang.RuntimeException: java.io.IOException: 
Fetch fail on include for 'mountTable.xml' with no fallback while loading 
'file:/opt/hadoop/etc/hadoop/core-site.xml'
at 
org.apache.hadoop.conf.Configuration.loadResource(Configuration.java:3021)
at 
org.apache.hadoop.conf.Configuration.loadResources(Configuration.java:2973)
at 
org.apache.hadoop.conf.Configuration.getProps(Configuration.java:2848)
at 
org.apache.hadoop.conf.Configuration.iterator(Configuration.java:2896)
at com.company.test.Main.main(Main.java:29)
Caused by: java.io.IOException: Fetch fail on include for 'mountTable.xml' with 
no fallback while loading 'file:/opt/hadoop/etc/hadoop/core-site.xml'
at 
org.apache.hadoop.conf.Configuration$Parser.handleEndElement(Configuration.java:3271)
at 
org.apache.hadoop.conf.Configuration$Parser.parseNext(Configuration.java:3331)
at 
org.apache.hadoop.conf.Configuration$Parser.parse(Configuration.java:3114)
at 
org.apache.hadoop.conf.Configuration.loadResource(Configuration.java:3007)
... 4 more
{noformat}

The cause is that the URI is passed as string to java.io.File constructor and 
File does not support the file URI, so my suggestion is trying to convert from 
string to URI at first.


> Failed to load Xinclude files with relative path in case of loading conf via 
> URI
> 
>
> Key: HADOOP-17088
> URL: https://issues.apache.org/jira/browse/HADOOP-17088
> Project: Hadoop Common
>  Issue Type: Bug
>Reporter: Yushi Hayasaka
>Priority: Major
>
> When we create a configuration file, which load a external XML file with 
> relative path, and try to load it via calling `Configuration.addResource` 
> with `Path(URI)`, we got an error, which failed to load a external XML, after 
> https://issues.apache.org/jira/browse/HADOOP-14216 is merged.
> {noformat}
> Exception in thread "main" java.lang.RuntimeException: java.io.IOException: 
> Fetch fail on include for 'mountTable.xml' with no fallback while loading 
> 'file:/opt/hadoop/etc/hadoop/core-site.xml'
>   at 
> org.apache.hadoop.conf.Configuration.loadResource(Configuration.java:3021)
>   at 
> org.apache.hadoop.conf.Configuration.loadResources(Configuration.java:2973)
>   at 
> org.apache.hadoop.conf.Configuration.getProps(Configuration.java:2848)
>   at 
> org.apache.hadoop.conf.Configuration.iterator(Configuration.java:2896)
>   at com.company.test.Main.main(Main.java:29)
> Caused by: java.io.IOException: Fetch fail on include for 'mountTable.xml' 
> with no fallback while loading 'file:/opt/hadoop/etc/hadoop/core-site.xml'
>   at 
> 

[jira] [Updated] (HADOOP-17088) Failed to load Xinclude files with relative path in case of loading conf via URI

2020-06-24 Thread Yushi Hayasaka (Jira)


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

Yushi Hayasaka updated HADOOP-17088:

Status: Patch Available  (was: Open)

PR: [https://github.com/apache/hadoop/pull/2097]

> Failed to load Xinclude files with relative path in case of loading conf via 
> URI
> 
>
> Key: HADOOP-17088
> URL: https://issues.apache.org/jira/browse/HADOOP-17088
> Project: Hadoop Common
>  Issue Type: Bug
>Reporter: Yushi Hayasaka
>Priority: Major
>
> When we create a configuration file, which load a external XML file with 
> relative path, and try to load it with calling 
> `Configuration.addResource(URI)`, we got an error, which failed to load a 
> external XML, after [https://issues.apache.org/jira/browse/HADOOP-14216] is 
> merged.
> {noformat}
> Exception in thread "main" java.lang.RuntimeException: java.io.IOException: 
> Fetch fail on include for 'mountTable.xml' with no fallback while loading 
> 'file:/opt/hadoop/etc/hadoop/core-site.xml'
>   at 
> org.apache.hadoop.conf.Configuration.loadResource(Configuration.java:3021)
>   at 
> org.apache.hadoop.conf.Configuration.loadResources(Configuration.java:2973)
>   at 
> org.apache.hadoop.conf.Configuration.getProps(Configuration.java:2848)
>   at 
> org.apache.hadoop.conf.Configuration.iterator(Configuration.java:2896)
>   at com.company.test.Main.main(Main.java:29)
> Caused by: java.io.IOException: Fetch fail on include for 'mountTable.xml' 
> with no fallback while loading 'file:/opt/hadoop/etc/hadoop/core-site.xml'
>   at 
> org.apache.hadoop.conf.Configuration$Parser.handleEndElement(Configuration.java:3271)
>   at 
> org.apache.hadoop.conf.Configuration$Parser.parseNext(Configuration.java:3331)
>   at 
> org.apache.hadoop.conf.Configuration$Parser.parse(Configuration.java:3114)
>   at 
> org.apache.hadoop.conf.Configuration.loadResource(Configuration.java:3007)
>   ... 4 more
> {noformat}
> The cause is that the URI is passed as string to java.io.File constructor and 
> File does not support the file URI, so my suggestion is trying to convert 
> from string to URI at first.



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

-
To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org