Github user tillrohrmann commented on a diff in the pull request:
https://github.com/apache/incubator-flink/pull/126#discussion_r18436643
--- Diff:
flink-runtime/src/main/java/org/apache/flink/runtime/jobmanager/JobManager.java
---
@@ -309,41 +326,31 @@ public JobSubmissionResult submitJob(JobGraph job)
throws IOException {
LOG.info(String.format("Found existing
execution graph for id %s, attaching this job.", job.getJobID()));
}
}
+
+ // Register for updates on the job status
+ executionGraph.registerJobStatusListener(this);
// grab the class loader for user-defined code
- final ClassLoader userCodeLoader =
LibraryCacheManager.getClassLoader(job.getJobID());
+ final ClassLoader userCodeLoader =
libraryCacheManager.getClassLoader(job.getJobID());
if (userCodeLoader == null) {
throw new JobException("The user code class
loader could not be initialized.");
}
-
- String[] jarFilesForJob =
LibraryCacheManager.getRequiredJarFiles(job.getJobID());
- for (String fileId : jarFilesForJob) {
- executionGraph.addUserCodeJarFile(fileId);
- }
-
+
// first, perform the master initialization of the nodes
if (LOG.isDebugEnabled()) {
LOG.debug(String.format("Running master
initialization of job %s (%s)", job.getJobID(), job.getName()));
}
- try {
- for (AbstractJobVertex vertex :
job.getVertices()) {
- // check that the vertex has an
executable class
- String executableClass =
vertex.getInvokableClassName();
- if (executableClass == null ||
executableClass.length() == 0) {
- throw new
JobException(String.format("The vertex %s (%s) has no invokable class.",
vertex.getID(), vertex.getName()));
- }
-
- // master side initialization
-
vertex.initializeOnMaster(userCodeLoader);
+ for (AbstractJobVertex vertex : job.getVertices()) {
+ // check that the vertex has an executable class
+ String executableClass =
vertex.getInvokableClassName();
+ if (executableClass == null ||
executableClass.length() == 0) {
+ throw new
JobException(String.format("The vertex %s (%s) has no invokable class.",
vertex.getID(), vertex.getName()));
}
+
+ // master side initialization
+ vertex.initializeOnMaster(userCodeLoader);
}
- catch (FileNotFoundException e) {
--- End diff --
But if the error message is too misleading, shouldn't it be the
responsibility of the function throwing the exception to generate a meaningful
error message instead of the job manager's?
---
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.
---