[jira] [Commented] (FLINK-4297) Yarn client can't determine fat jar location if path contains spaces

2016-08-05 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/FLINK-4297?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15409807#comment-15409807
 ] 

ASF GitHub Bot commented on FLINK-4297:
---

Github user asfgit closed the pull request at:

https://github.com/apache/flink/pull/2320


> Yarn client can't determine fat jar location if path contains spaces
> 
>
> Key: FLINK-4297
> URL: https://issues.apache.org/jira/browse/FLINK-4297
> Project: Flink
>  Issue Type: Bug
>  Components: YARN Client
>Reporter: Maximilian Michels
>Assignee: Maximilian Michels
> Fix For: 1.2.0, 1.1.1
>
>
> The code that automatically determines the fat jar path through the 
> ProtectionDomain of the Yarn class, receives a possibly URL encoded path 
> string. We need to decode using the system locale encoding, otherwise we can 
> receive errors of the following when spaces are in the file path: 
> {noformat}
> Caused by: java.io.FileNotFoundException: File 
> file:/Users/max/Downloads/release-testing/flink-1.1.0-rc1/flink-1.1.0/build%20target/lib/flink-dist_2.11-1.1.0.jar
>  does not exist
> at 
> org.apache.hadoop.fs.RawLocalFileSystem.deprecatedGetFileStatus(RawLocalFileSystem.java:511)
> at 
> org.apache.hadoop.fs.RawLocalFileSystem.getFileLinkStatusInternal(RawLocalFileSystem.java:724)
> at 
> org.apache.hadoop.fs.RawLocalFileSystem.getFileStatus(RawLocalFileSystem.java:501)
> at 
> org.apache.hadoop.fs.FilterFileSystem.getFileStatus(FilterFileSystem.java:397)
> at org.apache.hadoop.fs.FileUtil.copy(FileUtil.java:337)
> at org.apache.hadoop.fs.FileUtil.copy(FileUtil.java:289)
> at 
> org.apache.hadoop.fs.LocalFileSystem.copyFromLocalFile(LocalFileSystem.java:82)
> at 
> org.apache.hadoop.fs.FileSystem.copyFromLocalFile(FileSystem.java:1836)
> at org.apache.flink.yarn.Utils.setupLocalResource(Utils.java:129)
> at 
> org.apache.flink.yarn.AbstractYarnClusterDescriptor.deployInternal(AbstractYarnClusterDescriptor.java:616)
> at 
> org.apache.flink.yarn.AbstractYarnClusterDescriptor.deploy(AbstractYarnClusterDescriptor.java:365)
> ... 6 more
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (FLINK-4297) Yarn client can't determine fat jar location if path contains spaces

2016-08-05 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/FLINK-4297?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15409466#comment-15409466
 ] 

ASF GitHub Bot commented on FLINK-4297:
---

Github user StephanEwen commented on the issue:

https://github.com/apache/flink/pull/2320
  
Will address the comment and merge this...


> Yarn client can't determine fat jar location if path contains spaces
> 
>
> Key: FLINK-4297
> URL: https://issues.apache.org/jira/browse/FLINK-4297
> Project: Flink
>  Issue Type: Bug
>  Components: YARN Client
>Reporter: Maximilian Michels
>Assignee: Maximilian Michels
> Fix For: 1.2.0, 1.1.1
>
>
> The code that automatically determines the fat jar path through the 
> ProtectionDomain of the Yarn class, receives a possibly URL encoded path 
> string. We need to decode using the system locale encoding, otherwise we can 
> receive errors of the following when spaces are in the file path: 
> {noformat}
> Caused by: java.io.FileNotFoundException: File 
> file:/Users/max/Downloads/release-testing/flink-1.1.0-rc1/flink-1.1.0/build%20target/lib/flink-dist_2.11-1.1.0.jar
>  does not exist
> at 
> org.apache.hadoop.fs.RawLocalFileSystem.deprecatedGetFileStatus(RawLocalFileSystem.java:511)
> at 
> org.apache.hadoop.fs.RawLocalFileSystem.getFileLinkStatusInternal(RawLocalFileSystem.java:724)
> at 
> org.apache.hadoop.fs.RawLocalFileSystem.getFileStatus(RawLocalFileSystem.java:501)
> at 
> org.apache.hadoop.fs.FilterFileSystem.getFileStatus(FilterFileSystem.java:397)
> at org.apache.hadoop.fs.FileUtil.copy(FileUtil.java:337)
> at org.apache.hadoop.fs.FileUtil.copy(FileUtil.java:289)
> at 
> org.apache.hadoop.fs.LocalFileSystem.copyFromLocalFile(LocalFileSystem.java:82)
> at 
> org.apache.hadoop.fs.FileSystem.copyFromLocalFile(FileSystem.java:1836)
> at org.apache.flink.yarn.Utils.setupLocalResource(Utils.java:129)
> at 
> org.apache.flink.yarn.AbstractYarnClusterDescriptor.deployInternal(AbstractYarnClusterDescriptor.java:616)
> at 
> org.apache.flink.yarn.AbstractYarnClusterDescriptor.deploy(AbstractYarnClusterDescriptor.java:365)
> ... 6 more
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (FLINK-4297) Yarn client can't determine fat jar location if path contains spaces

2016-08-03 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/FLINK-4297?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15405888#comment-15405888
 ] 

ASF GitHub Bot commented on FLINK-4297:
---

Github user StephanEwen commented on the issue:

https://github.com/apache/flink/pull/2320
  
One comment inline, otherwise looks good.


> Yarn client can't determine fat jar location if path contains spaces
> 
>
> Key: FLINK-4297
> URL: https://issues.apache.org/jira/browse/FLINK-4297
> Project: Flink
>  Issue Type: Bug
>  Components: YARN Client
>Reporter: Maximilian Michels
>Assignee: Maximilian Michels
> Fix For: 1.1.0, 1.2.0
>
>
> The code that automatically determines the fat jar path through the 
> ProtectionDomain of the Yarn class, receives a possibly URL encoded path 
> string. We need to decode using the system locale encoding, otherwise we can 
> receive errors of the following when spaces are in the file path: 
> {noformat}
> Caused by: java.io.FileNotFoundException: File 
> file:/Users/max/Downloads/release-testing/flink-1.1.0-rc1/flink-1.1.0/build%20target/lib/flink-dist_2.11-1.1.0.jar
>  does not exist
> at 
> org.apache.hadoop.fs.RawLocalFileSystem.deprecatedGetFileStatus(RawLocalFileSystem.java:511)
> at 
> org.apache.hadoop.fs.RawLocalFileSystem.getFileLinkStatusInternal(RawLocalFileSystem.java:724)
> at 
> org.apache.hadoop.fs.RawLocalFileSystem.getFileStatus(RawLocalFileSystem.java:501)
> at 
> org.apache.hadoop.fs.FilterFileSystem.getFileStatus(FilterFileSystem.java:397)
> at org.apache.hadoop.fs.FileUtil.copy(FileUtil.java:337)
> at org.apache.hadoop.fs.FileUtil.copy(FileUtil.java:289)
> at 
> org.apache.hadoop.fs.LocalFileSystem.copyFromLocalFile(LocalFileSystem.java:82)
> at 
> org.apache.hadoop.fs.FileSystem.copyFromLocalFile(FileSystem.java:1836)
> at org.apache.flink.yarn.Utils.setupLocalResource(Utils.java:129)
> at 
> org.apache.flink.yarn.AbstractYarnClusterDescriptor.deployInternal(AbstractYarnClusterDescriptor.java:616)
> at 
> org.apache.flink.yarn.AbstractYarnClusterDescriptor.deploy(AbstractYarnClusterDescriptor.java:365)
> ... 6 more
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (FLINK-4297) Yarn client can't determine fat jar location if path contains spaces

2016-08-03 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/FLINK-4297?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15405886#comment-15405886
 ] 

ASF GitHub Bot commented on FLINK-4297:
---

Github user StephanEwen commented on a diff in the pull request:

https://github.com/apache/flink/pull/2320#discussion_r7859
  
--- Diff: 
flink-yarn/src/main/java/org/apache/flink/yarn/cli/FlinkYarnSessionCli.java ---
@@ -260,8 +263,15 @@ public AbstractYarnClusterDescriptor 
createDescriptor(String defaultApplicationN
} else {
LOG.info("No path for the flink jar passed. Using the 
location of "
+ yarnClusterDescriptor.getClass() + " to 
locate the jar");
-   localJarPath = new Path("file://" +
-   
yarnClusterDescriptor.getClass().getProtectionDomain().getCodeSource().getLocation().getPath());
+   String encodedJarPath =
+   
yarnClusterDescriptor.getClass().getProtectionDomain().getCodeSource().getLocation().getPath();
+   try {
+   // we have to decode the url encoded parts of 
the path
+   localJarPath = new Path("file://" + 
URLDecoder.decode(encodedJarPath, Charset.defaultCharset().name()));
--- End diff --

I think manually coding the `file:// + path` URIs have cross-platform 
issues.

For File URIs, I found it to be best to go with 
```java
new File(string).toURI()
```
or in that specific case:
```java
localJarPath = new Path(new File(URLDecoder.decode(encodedJarPath, 
Charset.defaultCharset().name())).toURI());
or
localJarPath = new Path(new URI("file", null, 
URLDecoder.decode(encodedJarPath, Charset.defaultCharset().name()), null));
```


> Yarn client can't determine fat jar location if path contains spaces
> 
>
> Key: FLINK-4297
> URL: https://issues.apache.org/jira/browse/FLINK-4297
> Project: Flink
>  Issue Type: Bug
>  Components: YARN Client
>Reporter: Maximilian Michels
>Assignee: Maximilian Michels
> Fix For: 1.1.0, 1.2.0
>
>
> The code that automatically determines the fat jar path through the 
> ProtectionDomain of the Yarn class, receives a possibly URL encoded path 
> string. We need to decode using the system locale encoding, otherwise we can 
> receive errors of the following when spaces are in the file path: 
> {noformat}
> Caused by: java.io.FileNotFoundException: File 
> file:/Users/max/Downloads/release-testing/flink-1.1.0-rc1/flink-1.1.0/build%20target/lib/flink-dist_2.11-1.1.0.jar
>  does not exist
> at 
> org.apache.hadoop.fs.RawLocalFileSystem.deprecatedGetFileStatus(RawLocalFileSystem.java:511)
> at 
> org.apache.hadoop.fs.RawLocalFileSystem.getFileLinkStatusInternal(RawLocalFileSystem.java:724)
> at 
> org.apache.hadoop.fs.RawLocalFileSystem.getFileStatus(RawLocalFileSystem.java:501)
> at 
> org.apache.hadoop.fs.FilterFileSystem.getFileStatus(FilterFileSystem.java:397)
> at org.apache.hadoop.fs.FileUtil.copy(FileUtil.java:337)
> at org.apache.hadoop.fs.FileUtil.copy(FileUtil.java:289)
> at 
> org.apache.hadoop.fs.LocalFileSystem.copyFromLocalFile(LocalFileSystem.java:82)
> at 
> org.apache.hadoop.fs.FileSystem.copyFromLocalFile(FileSystem.java:1836)
> at org.apache.flink.yarn.Utils.setupLocalResource(Utils.java:129)
> at 
> org.apache.flink.yarn.AbstractYarnClusterDescriptor.deployInternal(AbstractYarnClusterDescriptor.java:616)
> at 
> org.apache.flink.yarn.AbstractYarnClusterDescriptor.deploy(AbstractYarnClusterDescriptor.java:365)
> ... 6 more
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (FLINK-4297) Yarn client can't determine fat jar location if path contains spaces

2016-08-02 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/FLINK-4297?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15403590#comment-15403590
 ] 

ASF GitHub Bot commented on FLINK-4297:
---

Github user mxm commented on the issue:

https://github.com/apache/flink/pull/2320
  
Should be good to go now.


> Yarn client can't determine fat jar location if path contains spaces
> 
>
> Key: FLINK-4297
> URL: https://issues.apache.org/jira/browse/FLINK-4297
> Project: Flink
>  Issue Type: Bug
>  Components: YARN Client
>Reporter: Maximilian Michels
>Assignee: Maximilian Michels
> Fix For: 1.1.0, 1.2.0
>
>
> The code that automatically determines the fat jar path through the 
> ProtectionDomain of the Yarn class, receives a possibly URL encoded path 
> string. We need to decode using the system locale encoding, otherwise we can 
> receive errors of the following when spaces are in the file path: 
> {noformat}
> Caused by: java.io.FileNotFoundException: File 
> file:/Users/max/Downloads/release-testing/flink-1.1.0-rc1/flink-1.1.0/build%20target/lib/flink-dist_2.11-1.1.0.jar
>  does not exist
> at 
> org.apache.hadoop.fs.RawLocalFileSystem.deprecatedGetFileStatus(RawLocalFileSystem.java:511)
> at 
> org.apache.hadoop.fs.RawLocalFileSystem.getFileLinkStatusInternal(RawLocalFileSystem.java:724)
> at 
> org.apache.hadoop.fs.RawLocalFileSystem.getFileStatus(RawLocalFileSystem.java:501)
> at 
> org.apache.hadoop.fs.FilterFileSystem.getFileStatus(FilterFileSystem.java:397)
> at org.apache.hadoop.fs.FileUtil.copy(FileUtil.java:337)
> at org.apache.hadoop.fs.FileUtil.copy(FileUtil.java:289)
> at 
> org.apache.hadoop.fs.LocalFileSystem.copyFromLocalFile(LocalFileSystem.java:82)
> at 
> org.apache.hadoop.fs.FileSystem.copyFromLocalFile(FileSystem.java:1836)
> at org.apache.flink.yarn.Utils.setupLocalResource(Utils.java:129)
> at 
> org.apache.flink.yarn.AbstractYarnClusterDescriptor.deployInternal(AbstractYarnClusterDescriptor.java:616)
> at 
> org.apache.flink.yarn.AbstractYarnClusterDescriptor.deploy(AbstractYarnClusterDescriptor.java:365)
> ... 6 more
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (FLINK-4297) Yarn client can't determine fat jar location if path contains spaces

2016-08-01 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/FLINK-4297?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15402439#comment-15402439
 ] 

ASF GitHub Bot commented on FLINK-4297:
---

Github user uce commented on the issue:

https://github.com/apache/flink/pull/2320
  
It didn't fix it unfortunately.


> Yarn client can't determine fat jar location if path contains spaces
> 
>
> Key: FLINK-4297
> URL: https://issues.apache.org/jira/browse/FLINK-4297
> Project: Flink
>  Issue Type: Bug
>  Components: YARN Client
>Reporter: Maximilian Michels
>Assignee: Maximilian Michels
> Fix For: 1.1.0, 1.2.0
>
>
> The code that automatically determines the fat jar path through the 
> ProtectionDomain of the Yarn class, receives a possibly URL encoded path 
> string. We need to decode using the system locale encoding, otherwise we can 
> receive errors of the following when spaces are in the file path: 
> {noformat}
> Caused by: java.io.FileNotFoundException: File 
> file:/Users/max/Downloads/release-testing/flink-1.1.0-rc1/flink-1.1.0/build%20target/lib/flink-dist_2.11-1.1.0.jar
>  does not exist
> at 
> org.apache.hadoop.fs.RawLocalFileSystem.deprecatedGetFileStatus(RawLocalFileSystem.java:511)
> at 
> org.apache.hadoop.fs.RawLocalFileSystem.getFileLinkStatusInternal(RawLocalFileSystem.java:724)
> at 
> org.apache.hadoop.fs.RawLocalFileSystem.getFileStatus(RawLocalFileSystem.java:501)
> at 
> org.apache.hadoop.fs.FilterFileSystem.getFileStatus(FilterFileSystem.java:397)
> at org.apache.hadoop.fs.FileUtil.copy(FileUtil.java:337)
> at org.apache.hadoop.fs.FileUtil.copy(FileUtil.java:289)
> at 
> org.apache.hadoop.fs.LocalFileSystem.copyFromLocalFile(LocalFileSystem.java:82)
> at 
> org.apache.hadoop.fs.FileSystem.copyFromLocalFile(FileSystem.java:1836)
> at org.apache.flink.yarn.Utils.setupLocalResource(Utils.java:129)
> at 
> org.apache.flink.yarn.AbstractYarnClusterDescriptor.deployInternal(AbstractYarnClusterDescriptor.java:616)
> at 
> org.apache.flink.yarn.AbstractYarnClusterDescriptor.deploy(AbstractYarnClusterDescriptor.java:365)
> ... 6 more
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (FLINK-4297) Yarn client can't determine fat jar location if path contains spaces

2016-08-01 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/FLINK-4297?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15402402#comment-15402402
 ] 

ASF GitHub Bot commented on FLINK-4297:
---

Github user mxm commented on the issue:

https://github.com/apache/flink/pull/2320
  
Thanks for trying it out @uce! There was an unrelated quoting issue in 
`yarn-session.sh`. I pushed another fix.


> Yarn client can't determine fat jar location if path contains spaces
> 
>
> Key: FLINK-4297
> URL: https://issues.apache.org/jira/browse/FLINK-4297
> Project: Flink
>  Issue Type: Bug
>  Components: YARN Client
>Reporter: Maximilian Michels
>Assignee: Maximilian Michels
> Fix For: 1.1.0, 1.2.0
>
>
> The code that automatically determines the fat jar path through the 
> ProtectionDomain of the Yarn class, receives a possibly URL encoded path 
> string. We need to decode using the system locale encoding, otherwise we can 
> receive errors of the following when spaces are in the file path: 
> {noformat}
> Caused by: java.io.FileNotFoundException: File 
> file:/Users/max/Downloads/release-testing/flink-1.1.0-rc1/flink-1.1.0/build%20target/lib/flink-dist_2.11-1.1.0.jar
>  does not exist
> at 
> org.apache.hadoop.fs.RawLocalFileSystem.deprecatedGetFileStatus(RawLocalFileSystem.java:511)
> at 
> org.apache.hadoop.fs.RawLocalFileSystem.getFileLinkStatusInternal(RawLocalFileSystem.java:724)
> at 
> org.apache.hadoop.fs.RawLocalFileSystem.getFileStatus(RawLocalFileSystem.java:501)
> at 
> org.apache.hadoop.fs.FilterFileSystem.getFileStatus(FilterFileSystem.java:397)
> at org.apache.hadoop.fs.FileUtil.copy(FileUtil.java:337)
> at org.apache.hadoop.fs.FileUtil.copy(FileUtil.java:289)
> at 
> org.apache.hadoop.fs.LocalFileSystem.copyFromLocalFile(LocalFileSystem.java:82)
> at 
> org.apache.hadoop.fs.FileSystem.copyFromLocalFile(FileSystem.java:1836)
> at org.apache.flink.yarn.Utils.setupLocalResource(Utils.java:129)
> at 
> org.apache.flink.yarn.AbstractYarnClusterDescriptor.deployInternal(AbstractYarnClusterDescriptor.java:616)
> at 
> org.apache.flink.yarn.AbstractYarnClusterDescriptor.deploy(AbstractYarnClusterDescriptor.java:365)
> ... 6 more
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (FLINK-4297) Yarn client can't determine fat jar location if path contains spaces

2016-08-01 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/FLINK-4297?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15402373#comment-15402373
 ] 

ASF GitHub Bot commented on FLINK-4297:
---

Github user uce commented on the issue:

https://github.com/apache/flink/pull/2320
  
Tested this with Hadoop 2.4.1 and it works as expected with `bin/flink run 
-m yarn-cluster`:
```
2016-08-01 16:32:06,214 INFO  org.apache.flink.yarn.Utils - Copying from 
2016-08-01 16:32:06,214 INFO  org.apache.flink.yarn.Utils - Copying from 
file:/home/hadoop/mxm/flink/flink-dist/target/flink-1.1-SNAPSHOT-bin/flink with 
spaces/conf/log4j.properties to 
gs://.../user/hadoop/.flink/application_1470041666362_0007/log4j.properties
...
08/01/2016 16:33:24 Job execution switched to status FINISHED.
```

But YARN sessions don't work. I get:
```
$ bin/yarn-session.sh
Error: Could not find or load main class with
```



> Yarn client can't determine fat jar location if path contains spaces
> 
>
> Key: FLINK-4297
> URL: https://issues.apache.org/jira/browse/FLINK-4297
> Project: Flink
>  Issue Type: Bug
>  Components: YARN Client
>Reporter: Maximilian Michels
>Assignee: Maximilian Michels
> Fix For: 1.1.0, 1.2.0
>
>
> The code that automatically determines the fat jar path through the 
> ProtectionDomain of the Yarn class, receives a possibly URL encoded path 
> string. We need to decode using the system locale encoding, otherwise we can 
> receive errors of the following when spaces are in the file path: 
> {noformat}
> Caused by: java.io.FileNotFoundException: File 
> file:/Users/max/Downloads/release-testing/flink-1.1.0-rc1/flink-1.1.0/build%20target/lib/flink-dist_2.11-1.1.0.jar
>  does not exist
> at 
> org.apache.hadoop.fs.RawLocalFileSystem.deprecatedGetFileStatus(RawLocalFileSystem.java:511)
> at 
> org.apache.hadoop.fs.RawLocalFileSystem.getFileLinkStatusInternal(RawLocalFileSystem.java:724)
> at 
> org.apache.hadoop.fs.RawLocalFileSystem.getFileStatus(RawLocalFileSystem.java:501)
> at 
> org.apache.hadoop.fs.FilterFileSystem.getFileStatus(FilterFileSystem.java:397)
> at org.apache.hadoop.fs.FileUtil.copy(FileUtil.java:337)
> at org.apache.hadoop.fs.FileUtil.copy(FileUtil.java:289)
> at 
> org.apache.hadoop.fs.LocalFileSystem.copyFromLocalFile(LocalFileSystem.java:82)
> at 
> org.apache.hadoop.fs.FileSystem.copyFromLocalFile(FileSystem.java:1836)
> at org.apache.flink.yarn.Utils.setupLocalResource(Utils.java:129)
> at 
> org.apache.flink.yarn.AbstractYarnClusterDescriptor.deployInternal(AbstractYarnClusterDescriptor.java:616)
> at 
> org.apache.flink.yarn.AbstractYarnClusterDescriptor.deploy(AbstractYarnClusterDescriptor.java:365)
> ... 6 more
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (FLINK-4297) Yarn client can't determine fat jar location if path contains spaces

2016-08-01 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/FLINK-4297?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15402040#comment-15402040
 ] 

ASF GitHub Bot commented on FLINK-4297:
---

GitHub user mxm opened a pull request:

https://github.com/apache/flink/pull/2320

[FLINK-4297][yarn] decode URL encoded fat jar path

This solves problems with spaces and special characters in the
automatically determined fat jar path which is returned URL encoded.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/mxm/flink FLINK-4297

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/flink/pull/2320.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #2320


commit 76dc43ac69e374482894fa15d67f001fc5030be0
Author: Maximilian Michels 
Date:   2016-08-01T13:19:15Z

[FLINK-4297][yarn] decode URL encoded fat jar path

This solves problems with spaces and special characters in the
automatically determined fat jar path which is returned URL encoded.




> Yarn client can't determine fat jar location if path contains spaces
> 
>
> Key: FLINK-4297
> URL: https://issues.apache.org/jira/browse/FLINK-4297
> Project: Flink
>  Issue Type: Bug
>  Components: YARN Client
>Reporter: Maximilian Michels
>Assignee: Maximilian Michels
> Fix For: 1.1.0, 1.2.0
>
>
> The code that automatically determines the fat jar path through the 
> ProtectionDomain of the Yarn class, receives a possibly URL encoded path 
> string. We need to decode using the system locale encoding, otherwise we can 
> receive errors of the following when spaces are in the file path: 
> {noformat}
> Caused by: java.io.FileNotFoundException: File 
> file:/Users/max/Downloads/release-testing/flink-1.1.0-rc1/flink-1.1.0/build%20target/lib/flink-dist_2.11-1.1.0.jar
>  does not exist
> at 
> org.apache.hadoop.fs.RawLocalFileSystem.deprecatedGetFileStatus(RawLocalFileSystem.java:511)
> at 
> org.apache.hadoop.fs.RawLocalFileSystem.getFileLinkStatusInternal(RawLocalFileSystem.java:724)
> at 
> org.apache.hadoop.fs.RawLocalFileSystem.getFileStatus(RawLocalFileSystem.java:501)
> at 
> org.apache.hadoop.fs.FilterFileSystem.getFileStatus(FilterFileSystem.java:397)
> at org.apache.hadoop.fs.FileUtil.copy(FileUtil.java:337)
> at org.apache.hadoop.fs.FileUtil.copy(FileUtil.java:289)
> at 
> org.apache.hadoop.fs.LocalFileSystem.copyFromLocalFile(LocalFileSystem.java:82)
> at 
> org.apache.hadoop.fs.FileSystem.copyFromLocalFile(FileSystem.java:1836)
> at org.apache.flink.yarn.Utils.setupLocalResource(Utils.java:129)
> at 
> org.apache.flink.yarn.AbstractYarnClusterDescriptor.deployInternal(AbstractYarnClusterDescriptor.java:616)
> at 
> org.apache.flink.yarn.AbstractYarnClusterDescriptor.deploy(AbstractYarnClusterDescriptor.java:365)
> ... 6 more
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)