[
https://issues.apache.org/jira/browse/TEZ-3510?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15634126#comment-15634126
]
Dipaan Bhattacharjee commented on TEZ-3510:
-------------------------------------------
On further investigation, it seems the failure is at the line of code where we
try to instantiate a URI object from the filename:
{code}
uri = new URI(fileName);
{code}
This throws a URISyntaxException when the fileName contains white-spaces. But
white-spaces may be valid characters in the underlying filesystem, e.g. hadoop
doesn't prevent creating files/directories with spaces. To get around this
issue, and not to remove the URI syntax check altogether, I encoded the
fileName before instantiating the URI and decoded it afterwards. This fixes the
error and makes the job run successfully.
I am attaching a patch to the ticket which contains my fix as well as a unit
test.
> Tez job fails when location of Tez jars contain whitespace in the path
> ----------------------------------------------------------------------
>
> Key: TEZ-3510
> URL: https://issues.apache.org/jira/browse/TEZ-3510
> Project: Apache Tez
> Issue Type: Bug
> Affects Versions: 0.7.1
> Reporter: Dipaan Bhattacharjee
>
> h3. Problem Statement
> Tez job fails with the following exception when location of Tez jars contain
> whitespace in the path:
> {noformat}
> org.apache.tez.dag.api.TezUncheckedException: Invalid URI defined in
> configuration for location of TEZ jars.
> providedURI=target/org.apache.tez.client.TestTezClientUtils-tmpDir/path with
> whitespace/foo.tar.gz
> at java.net.URI$Parser.fail(URI.java:2829)
> at java.net.URI$Parser.checkChars(URI.java:3002)
> at java.net.URI$Parser.parseHierarchical(URI.java:3086)
> at java.net.URI$Parser.parse(URI.java:3044)
> at java.net.URI.<init>(URI.java:595)
> at
> org.apache.tez.client.TezClientUtils.getLRFileStatus(TezClientUtils.java:122)
> at
> org.apache.tez.client.TezClientUtils.setupTezJarsLocalResources(TezClientUtils.java:183)
> at
> org.apache.tez.client.TestTezClientUtils.testPathWithWhitespace(TestTezClientUtils.java:722)
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)