Github user rmetzger commented on the pull request:
https://github.com/apache/flink/pull/593#issuecomment-142547078
-1
I was not able to get this feature working as expected, with the following
job:
```java
public class URLClassloader {
public static void main(String[] args) throws Exception {
URL about = URLClassloader.class.getResource("/about.md");
System.out.println("about = "+about);
final StreamExecutionEnvironment see =
StreamExecutionEnvironment.getExecutionEnvironment();
see.addSource(new SourceFunction<Object>() {
@Override
public void run(SourceContext<Object> ctx) throws
Exception {
URL about =
this.getClass().getResource("/about.md");
System.out.println("about = "+about);
}
@Override
public void cancel() {}
});
see.execute();
}
}
```
invoking it like this
`./bin/flink run -c com.dataartisans.URLClassloader -C
file:///home/robert/flink-workdir/flink-irc-logs.github.io/
/home/robert/flink-workdir/debug-project-0.10/target/debug-project-0.10-1.0-SNAPSHOT.jar`
lead to the following output
```
./bin/flink run -c com.dataartisans.URLClassloader -C
file:///home/robert/flink-workdir/flink-irc-logs.github.io/
/home/robert/flink-workdir/debug-project-0.10/target/debug-project-0.10-1.0-SNAPSHOT.jar
about = file:/home/robert/flink-workdir/flink-irc-logs.github.io/about.md
09/23/2015 11:38:33 Job execution switched to status RUNNING.
09/23/2015 11:38:33 Custom Source(1/1) switched to SCHEDULED
09/23/2015 11:38:33 Custom Source(1/1) switched to DEPLOYING
09/23/2015 11:38:33 Custom Source(1/1) switched to RUNNING
09/23/2015 11:38:33 Custom Source(1/1) switched to FINISHED
09/23/2015 11:38:33 Job execution switched to status FINISHED.
robert@robert-da ~/incubator-flink/build-target
(git)-[CustomUrlsToUserClassloader] % cat
log/flink-robert-jobmanager-0-robert-da.out
about = null
about = null
about = null
about = null
about = null
```
So it seems that the client is using the correct classpath, and its able to
load the file. The JobManager/TaskManager (I've started flink with
start-local.sh) doesn't seem to be able to load the file.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---