flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tillrohrmann <...@git.apache.org>
Subject [GitHub] incubator-flink pull request: Integration of Daniel's BLOB manager
Date Fri, 03 Oct 2014 21:23:07 GMT
Github user tillrohrmann commented on a diff in the pull request:

    https://github.com/apache/incubator-flink/pull/126#discussion_r18420291
  
    --- 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 --
    
    I reinsert the more detailed exception. Initially, I just removed it because of the return
statement which disrupts the control flow.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message