hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steve Loughran (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-14387) new Configuration().get() fails if core-site.xml isn't on the classpath
Date Mon, 08 May 2017 16:03:04 GMT

    [ https://issues.apache.org/jira/browse/HADOOP-14387?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16000983#comment-16000983
] 

Steve Loughran commented on HADOOP-14387:
-----------------------------------------

Followup: that last failure isn't a regression, it surfaces on branch-2.8 too, if you try
to xinclude across JARs
{code}
testSetTimesNonexistentFile(org.apache.hadoop.fs.contract.localfs.TestLocalFSContractSetTimes)
 Time elapsed: 0.128 sec  <<< ERROR!
java.lang.RuntimeException: org.xml.sax.SAXParseException; systemId: file:/Users/stevel/Projects/hadoop-trunk/hadoop-common-project/hadoop-common/target/test-classes/contract/localfs.xml;
lineNumber: 22; columnNumber: 13; An include with href 'unknown'failed, and no fallback element
was found.
	at org.apache.hadoop.conf.Configuration.loadResource(Configuration.java:2713)
	at org.apache.hadoop.conf.Configuration.loadResources(Configuration.java:2570)
	at org.apache.hadoop.conf.Configuration.getProps(Configuration.java:2443)
	at org.apache.hadoop.conf.Configuration.get(Configuration.java:1257)
	at org.apache.hadoop.fs.FileSystem.getDefaultUri(FileSystem.java:189)
	at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:377)
	at org.apache.hadoop.fs.FileSystem.getLocal(FileSystem.java:360)
	at org.apache.hadoop.fs.contract.localfs.LocalFSContract.getLocalFS(LocalFSContract.java:89)
	at org.apache.hadoop.fs.contract.localfs.LocalFSContract.init(LocalFSContract.java:63)
	at org.apache.hadoop.fs.contract.AbstractFSContractTestBase.setup(AbstractFSContractTestBase.java:177)
	at org.apache.hadoop.fs.contract.AbstractContractSetTimesTest.setup(AbstractContractSetTimesTest.java:41)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
	at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:55)
	at org.junit.internal.runners.statements.FailOnTimeout$StatementThread.run(FailOnTimeout.java:74)
Caused by: org.xml.sax.SAXParseException: An include with href 'unknown'failed, and no fallback
element was found.
	at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:257)
	at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:339)
	at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:150)
	at org.apache.hadoop.conf.Configuration.parse(Configuration.java:2548)
	at org.apache.hadoop.conf.Configuration.parse(Configuration.java:2536)
	at org.apache.hadoop.conf.Configuration.loadResource(Configuration.java:2607)
	at org.apache.hadoop.conf.Configuration.loadResources(Configuration.java:2570)
	at org.apache.hadoop.conf.Configuration.getProps(Configuration.java:2443)
	at org.apache.hadoop.conf.Configuration.get(Configuration.java:1257)
	at org.apache.hadoop.fs.FileSystem.getDefaultUri(FileSystem.java:189)
	at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:377)
	at org.apache.hadoop.fs.FileSystem.getLocal(FileSystem.java:360)
	at org.apache.hadoop.fs.contract.localfs.LocalFSContract.getLocalFS(LocalFSContract.java:89)
	at org.apache.hadoop.fs.contract.localfs.LocalFSContract.init(LocalFSContract.java:63)
	at org.apache.hadoop.fs.contract.AbstractFSContractTestBase.setup(AbstractFSContractTestBase.java:177)
	at org.apache.hadoop.fs.contract.AbstractContractSetTimesTest.setup(AbstractContractSetTimesTest.java:41)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
	at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:55)
	at org.junit.internal.runners.statements.FailOnTimeout$StatementThread.run(FailOnTimeout.java:74)
{code}

> new Configuration().get() fails if core-site.xml isn't on the classpath
> -----------------------------------------------------------------------
>
>                 Key: HADOOP-14387
>                 URL: https://issues.apache.org/jira/browse/HADOOP-14387
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: conf
>    Affects Versions: 3.0.0-alpha3
>         Environment: test run in downstream project with no core-site in test/resources
>            Reporter: Steve Loughran
>            Assignee: Jonathan Eagles
>            Priority: Blocker
>         Attachments: HADOOP-14387.1.patch
>
>
> If you try to create a config via {{new Configuration()}} and there isn't a {{core-site.xml}}
on the CP, you get a stack trace. Previously it'd just skip the failure to load.
> This is a regression which breaks downstream apps that don't need a core-site to run,
but do want to load core-default &c



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

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


Mime
View raw message