test_class.file: flink-runtime/src/test/java/org/apache/flink/runtime/jobgraph/JobGraphTest.java
test_class.identifier: JobGraphTest
test_case.body: @Test
  	public void testTopologicalSort2() {
  		try {
  			JobVertex source1 = new JobVertex("source1");
  			JobVertex source2 = new JobVertex("source2");
  			JobVertex root = new JobVertex("root");
  			JobVertex l11 = new JobVertex("layer 1 - 1");
  			JobVertex l12 = new JobVertex("layer 1 - 2");
  			JobVertex l13 = new JobVertex("layer 1 - 3");
  			JobVertex l2 = new JobVertex("layer 2");
  			
  			root.connectNewDataSetAsInput(l13, DistributionPattern.POINTWISE);
  			root.connectNewDataSetAsInput(source2, DistributionPattern.POINTWISE);
  			root.connectNewDataSetAsInput(l2, DistributionPattern.POINTWISE);
  			
  			l2.connectNewDataSetAsInput(l11, DistributionPattern.POINTWISE);
  			l2.connectNewDataSetAsInput(l12, DistributionPattern.POINTWISE);
  			
  			l11.connectNewDataSetAsInput(source1, DistributionPattern.POINTWISE);
  			
  			l12.connectNewDataSetAsInput(source1, DistributionPattern.POINTWISE);
  			l12.connectNewDataSetAsInput(source2, DistributionPattern.POINTWISE);
  			
  			l13.connectNewDataSetAsInput(source2, DistributionPattern.POINTWISE);
  			
  			JobGraph graph = new JobGraph("TestGraph", source1, source2, root, l11, l13, l12, l2);
  			List<JobVertex> sorted = graph.getVerticesSortedTopologicallyFromSources();
  			
  			assertEquals(7,  sorted.size());
  			
  			assertBefore(source1, root, sorted);
  			assertBefore(source2, root, sorted);
  			assertBefore(l11, root, sorted);
  			assertBefore(l12, root, sorted);
  			assertBefore(l13, root, sorted);
  			assertBefore(l2, root, sorted);
  			
  			assertBefore(l11, l2, sorted);
  			assertBefore(l12, l2, sorted);
  			assertBefore(l2, root, sorted);
  			
  			assertBefore(source1, l2, sorted);
  			assertBefore(source2, l2, sorted);
  			
  			assertBefore(source2, l13, sorted);
  		}
  		catch (Exception e) {
  			e.printStackTrace();
  			fail(e.getMessage());
  		}
  	}
test_case.class_method_signature: JobGraphTest.testTopologicalSort2()
test_case.full_signature: @Test public void testTopologicalSort2()
test_case.identifier: testTopologicalSort2
test_case.invocations: connectNewDataSetAsInput connectNewDataSetAsInput connectNewDataSetAsInput connectNewDataSetAsInput connectNewDataSetAsInput connectNewDataSetAsInput connectNewDataSetAsInput connectNewDataSetAsInput connectNewDataSetAsInput getVerticesSortedTopologicallyFromSources assertEquals size assertBefore assertBefore assertBefore assertBefore assertBefore assertBefore assertBefore assertBefore assertBefore assertBefore assertBefore assertBefore printStackTrace fail getMessage
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testTopologicalSort2()
focal_class.declarator: serialVersionUID = 1L
focal_class.modifier: private static final
focal_class.original_string: private static final long serialVersionUID = 1L;
focal_class.type: long
focal_class.var_name: serialVersionUID
focal_class.declarator: taskVertices = new LinkedHashMap<JobVertexID, JobVertex>()
focal_class.modifier: private final
focal_class.original_string: private final Map<JobVertexID, JobVertex> taskVertices = new LinkedHashMap<JobVertexID, JobVertex>();
focal_class.type: Map<JobVertexID, JobVertex>
focal_class.var_name: taskVertices
focal_class.declarator: jobConfiguration = new Configuration()
focal_class.modifier: private final
focal_class.original_string: private final Configuration jobConfiguration = new Configuration();
focal_class.type: Configuration
focal_class.var_name: jobConfiguration
focal_class.declarator: userJars = new ArrayList<Path>()
focal_class.modifier: private final
focal_class.original_string: private final List<Path> userJars = new ArrayList<Path>();
focal_class.type: List<Path>
focal_class.var_name: userJars
focal_class.declarator: userJarBlobKeys = new ArrayList<BlobKey>()
focal_class.modifier: private final
focal_class.original_string: private final List<BlobKey> userJarBlobKeys = new ArrayList<BlobKey>();
focal_class.type: List<BlobKey>
focal_class.var_name: userJarBlobKeys
focal_class.declarator: jobID
focal_class.modifier: private final
focal_class.original_string: private final JobID jobID;
focal_class.type: JobID
focal_class.var_name: jobID
focal_class.declarator: jobName
focal_class.modifier: private final
focal_class.original_string: private final String jobName;
focal_class.type: String
focal_class.var_name: jobName
focal_class.declarator: restartStrategyConfiguration
focal_class.modifier: private
focal_class.original_string: private RestartStrategies.RestartStrategyConfiguration restartStrategyConfiguration;
focal_class.type: RestartStrategies.RestartStrategyConfiguration
focal_class.var_name: restartStrategyConfiguration
focal_class.declarator: sessionTimeout = 0
focal_class.modifier: private
focal_class.original_string: private long sessionTimeout = 0;
focal_class.type: long
focal_class.var_name: sessionTimeout
focal_class.declarator: allowQueuedScheduling
focal_class.modifier: private
focal_class.original_string: private boolean allowQueuedScheduling;
focal_class.type: boolean
focal_class.var_name: allowQueuedScheduling
focal_class.declarator: scheduleMode = ScheduleMode.FROM_SOURCES
focal_class.modifier: private
focal_class.original_string: private ScheduleMode scheduleMode = ScheduleMode.FROM_SOURCES;
focal_class.type: ScheduleMode
focal_class.var_name: scheduleMode
focal_class.declarator: snapshotSettings
focal_class.modifier: private
focal_class.original_string: private JobSnapshottingSettings snapshotSettings;
focal_class.type: JobSnapshottingSettings
focal_class.var_name: snapshotSettings
focal_class.declarator: classpaths = Collections.<URL>emptyList()
focal_class.modifier: private
focal_class.original_string: private List<URL> classpaths = Collections.<URL>emptyList();
focal_class.type: List<URL>
focal_class.var_name: classpaths
focal_class.file: flink-runtime/src/main/java/org/apache/flink/runtime/jobgraph/JobGraph.java
focal_class.identifier: JobGraph
focal_class.interfaces: implements Serializable
focal_class.class_method_signature: JobGraph.JobGraph()
focal_class.full_signature: public  JobGraph()
focal_class.identifier: JobGraph
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  JobGraph()
focal_class.class_method_signature: JobGraph.JobGraph(String jobName)
focal_class.full_signature: public  JobGraph(String jobName)
focal_class.identifier: JobGraph
focal_class.modifiers: public
focal_class.parameters: (String jobName)
focal_class.signature:  JobGraph(String jobName)
focal_class.class_method_signature: JobGraph.JobGraph(JobID jobId, String jobName)
focal_class.full_signature: public  JobGraph(JobID jobId, String jobName)
focal_class.identifier: JobGraph
focal_class.modifiers: public
focal_class.parameters: (JobID jobId, String jobName)
focal_class.signature:  JobGraph(JobID jobId, String jobName)
focal_class.class_method_signature: JobGraph.JobGraph(JobVertex... vertices)
focal_class.full_signature: public  JobGraph(JobVertex... vertices)
focal_class.identifier: JobGraph
focal_class.modifiers: public
focal_class.parameters: (JobVertex... vertices)
focal_class.signature:  JobGraph(JobVertex... vertices)
focal_class.class_method_signature: JobGraph.JobGraph(String jobName, JobVertex... vertices)
focal_class.full_signature: public  JobGraph(String jobName, JobVertex... vertices)
focal_class.identifier: JobGraph
focal_class.modifiers: public
focal_class.parameters: (String jobName, JobVertex... vertices)
focal_class.signature:  JobGraph(String jobName, JobVertex... vertices)
focal_class.class_method_signature: JobGraph.JobGraph(JobID jobId, String jobName, JobVertex... vertices)
focal_class.full_signature: public  JobGraph(JobID jobId, String jobName, JobVertex... vertices)
focal_class.identifier: JobGraph
focal_class.modifiers: public
focal_class.parameters: (JobID jobId, String jobName, JobVertex... vertices)
focal_class.signature:  JobGraph(JobID jobId, String jobName, JobVertex... vertices)
focal_class.class_method_signature: JobGraph.getJobID()
focal_class.full_signature: public JobID getJobID()
focal_class.identifier: getJobID
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: JobID
focal_class.signature: JobID getJobID()
focal_class.class_method_signature: JobGraph.getName()
focal_class.full_signature: public String getName()
focal_class.identifier: getName
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getName()
focal_class.class_method_signature: JobGraph.getJobConfiguration()
focal_class.full_signature: public Configuration getJobConfiguration()
focal_class.identifier: getJobConfiguration
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Configuration
focal_class.signature: Configuration getJobConfiguration()
focal_class.class_method_signature: JobGraph.setRestartStrategyConfiguration(RestartStrategies.RestartStrategyConfiguration restartStrategyConfiguration)
focal_class.full_signature: public void setRestartStrategyConfiguration(RestartStrategies.RestartStrategyConfiguration restartStrategyConfiguration)
focal_class.identifier: setRestartStrategyConfiguration
focal_class.modifiers: public
focal_class.parameters: (RestartStrategies.RestartStrategyConfiguration restartStrategyConfiguration)
focal_class.return: void
focal_class.signature: void setRestartStrategyConfiguration(RestartStrategies.RestartStrategyConfiguration restartStrategyConfiguration)
focal_class.class_method_signature: JobGraph.getRestartStrategyConfiguration()
focal_class.full_signature: public RestartStrategies.RestartStrategyConfiguration getRestartStrategyConfiguration()
focal_class.identifier: getRestartStrategyConfiguration
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: RestartStrategies.RestartStrategyConfiguration
focal_class.signature: RestartStrategies.RestartStrategyConfiguration getRestartStrategyConfiguration()
focal_class.class_method_signature: JobGraph.getSessionTimeout()
focal_class.full_signature: public long getSessionTimeout()
focal_class.identifier: getSessionTimeout
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: long
focal_class.signature: long getSessionTimeout()
focal_class.class_method_signature: JobGraph.setSessionTimeout(long sessionTimeout)
focal_class.full_signature: public void setSessionTimeout(long sessionTimeout)
focal_class.identifier: setSessionTimeout
focal_class.modifiers: public
focal_class.parameters: (long sessionTimeout)
focal_class.return: void
focal_class.signature: void setSessionTimeout(long sessionTimeout)
focal_class.class_method_signature: JobGraph.setAllowQueuedScheduling(boolean allowQueuedScheduling)
focal_class.full_signature: public void setAllowQueuedScheduling(boolean allowQueuedScheduling)
focal_class.identifier: setAllowQueuedScheduling
focal_class.modifiers: public
focal_class.parameters: (boolean allowQueuedScheduling)
focal_class.return: void
focal_class.signature: void setAllowQueuedScheduling(boolean allowQueuedScheduling)
focal_class.class_method_signature: JobGraph.getAllowQueuedScheduling()
focal_class.full_signature: public boolean getAllowQueuedScheduling()
focal_class.identifier: getAllowQueuedScheduling
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean getAllowQueuedScheduling()
focal_class.class_method_signature: JobGraph.setScheduleMode(ScheduleMode scheduleMode)
focal_class.full_signature: public void setScheduleMode(ScheduleMode scheduleMode)
focal_class.identifier: setScheduleMode
focal_class.modifiers: public
focal_class.parameters: (ScheduleMode scheduleMode)
focal_class.return: void
focal_class.signature: void setScheduleMode(ScheduleMode scheduleMode)
focal_class.class_method_signature: JobGraph.getScheduleMode()
focal_class.full_signature: public ScheduleMode getScheduleMode()
focal_class.identifier: getScheduleMode
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: ScheduleMode
focal_class.signature: ScheduleMode getScheduleMode()
focal_class.class_method_signature: JobGraph.addVertex(JobVertex vertex)
focal_class.full_signature: public void addVertex(JobVertex vertex)
focal_class.identifier: addVertex
focal_class.modifiers: public
focal_class.parameters: (JobVertex vertex)
focal_class.return: void
focal_class.signature: void addVertex(JobVertex vertex)
focal_class.class_method_signature: JobGraph.getVertices()
focal_class.full_signature: public Iterable<JobVertex> getVertices()
focal_class.identifier: getVertices
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Iterable<JobVertex>
focal_class.signature: Iterable<JobVertex> getVertices()
focal_class.class_method_signature: JobGraph.getVerticesAsArray()
focal_class.full_signature: public JobVertex[] getVerticesAsArray()
focal_class.identifier: getVerticesAsArray
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: JobVertex[]
focal_class.signature: JobVertex[] getVerticesAsArray()
focal_class.class_method_signature: JobGraph.getNumberOfVertices()
focal_class.full_signature: public int getNumberOfVertices()
focal_class.identifier: getNumberOfVertices
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int getNumberOfVertices()
focal_class.class_method_signature: JobGraph.setSnapshotSettings(JobSnapshottingSettings settings)
focal_class.full_signature: public void setSnapshotSettings(JobSnapshottingSettings settings)
focal_class.identifier: setSnapshotSettings
focal_class.modifiers: public
focal_class.parameters: (JobSnapshottingSettings settings)
focal_class.return: void
focal_class.signature: void setSnapshotSettings(JobSnapshottingSettings settings)
focal_class.class_method_signature: JobGraph.getSnapshotSettings()
focal_class.full_signature: public JobSnapshottingSettings getSnapshotSettings()
focal_class.identifier: getSnapshotSettings
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: JobSnapshottingSettings
focal_class.signature: JobSnapshottingSettings getSnapshotSettings()
focal_class.class_method_signature: JobGraph.findVertexByID(JobVertexID id)
focal_class.full_signature: public JobVertex findVertexByID(JobVertexID id)
focal_class.identifier: findVertexByID
focal_class.modifiers: public
focal_class.parameters: (JobVertexID id)
focal_class.return: JobVertex
focal_class.signature: JobVertex findVertexByID(JobVertexID id)
focal_class.class_method_signature: JobGraph.setClasspaths(List<URL> paths)
focal_class.full_signature: public void setClasspaths(List<URL> paths)
focal_class.identifier: setClasspaths
focal_class.modifiers: public
focal_class.parameters: (List<URL> paths)
focal_class.return: void
focal_class.signature: void setClasspaths(List<URL> paths)
focal_class.class_method_signature: JobGraph.getClasspaths()
focal_class.full_signature: public List<URL> getClasspaths()
focal_class.identifier: getClasspaths
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: List<URL>
focal_class.signature: List<URL> getClasspaths()
focal_class.class_method_signature: JobGraph.setSavepointPath(String savepointPath)
focal_class.full_signature: public void setSavepointPath(String savepointPath)
focal_class.identifier: setSavepointPath
focal_class.modifiers: public
focal_class.parameters: (String savepointPath)
focal_class.return: void
focal_class.signature: void setSavepointPath(String savepointPath)
focal_class.class_method_signature: JobGraph.getVerticesSortedTopologicallyFromSources()
focal_class.full_signature: public List<JobVertex> getVerticesSortedTopologicallyFromSources()
focal_class.identifier: getVerticesSortedTopologicallyFromSources
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: List<JobVertex>
focal_class.signature: List<JobVertex> getVerticesSortedTopologicallyFromSources()
focal_class.class_method_signature: JobGraph.addNodesThatHaveNoNewPredecessors(JobVertex start, List<JobVertex> target, Set<JobVertex> remaining)
focal_class.full_signature: private void addNodesThatHaveNoNewPredecessors(JobVertex start, List<JobVertex> target, Set<JobVertex> remaining)
focal_class.identifier: addNodesThatHaveNoNewPredecessors
focal_class.modifiers: private
focal_class.parameters: (JobVertex start, List<JobVertex> target, Set<JobVertex> remaining)
focal_class.return: void
focal_class.signature: void addNodesThatHaveNoNewPredecessors(JobVertex start, List<JobVertex> target, Set<JobVertex> remaining)
focal_class.class_method_signature: JobGraph.addJar(Path jar)
focal_class.full_signature: public void addJar(Path jar)
focal_class.identifier: addJar
focal_class.modifiers: public
focal_class.parameters: (Path jar)
focal_class.return: void
focal_class.signature: void addJar(Path jar)
focal_class.class_method_signature: JobGraph.addBlob(BlobKey key)
focal_class.full_signature: public void addBlob(BlobKey key)
focal_class.identifier: addBlob
focal_class.modifiers: public
focal_class.parameters: (BlobKey key)
focal_class.return: void
focal_class.signature: void addBlob(BlobKey key)
focal_class.class_method_signature: JobGraph.hasUsercodeJarFiles()
focal_class.full_signature: public boolean hasUsercodeJarFiles()
focal_class.identifier: hasUsercodeJarFiles
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean hasUsercodeJarFiles()
focal_class.class_method_signature: JobGraph.getUserJarBlobKeys()
focal_class.full_signature: public List<BlobKey> getUserJarBlobKeys()
focal_class.identifier: getUserJarBlobKeys
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: List<BlobKey>
focal_class.signature: List<BlobKey> getUserJarBlobKeys()
focal_class.class_method_signature: JobGraph.uploadRequiredJarFiles(InetSocketAddress serverAddress)
focal_class.full_signature: public void uploadRequiredJarFiles(InetSocketAddress serverAddress)
focal_class.identifier: uploadRequiredJarFiles
focal_class.modifiers: public
focal_class.parameters: (InetSocketAddress serverAddress)
focal_class.return: void
focal_class.signature: void uploadRequiredJarFiles(InetSocketAddress serverAddress)
focal_class.class_method_signature: JobGraph.getMaximumParallelism()
focal_class.full_signature: public int getMaximumParallelism()
focal_class.identifier: getMaximumParallelism
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int getMaximumParallelism()
focal_class.class_method_signature: JobGraph.toString()
focal_class.full_signature: @Override public String toString()
focal_class.identifier: toString
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String toString()
focal_method.body: public List<JobVertex> getVerticesSortedTopologicallyFromSources() throws InvalidProgramException {
  		// early out on empty lists
  		if (this.taskVertices.isEmpty()) {
  			return Collections.emptyList();
  		}
  
  		List<JobVertex> sorted = new ArrayList<JobVertex>(this.taskVertices.size());
  		Set<JobVertex> remaining = new LinkedHashSet<JobVertex>(this.taskVertices.values());
  
  		// start by finding the vertices with no input edges
  		// and the ones with disconnected inputs (that refer to some standalone data set)
  		{
  			Iterator<JobVertex> iter = remaining.iterator();
  			while (iter.hasNext()) {
  				JobVertex vertex = iter.next();
  
  				if (vertex.hasNoConnectedInputs()) {
  					sorted.add(vertex);
  					iter.remove();
  				}
  			}
  		}
  
  		int startNodePos = 0;
  
  		// traverse from the nodes that were added until we found all elements
  		while (!remaining.isEmpty()) {
  
  			// first check if we have more candidates to start traversing from. if not, then the
  			// graph is cyclic, which is not permitted
  			if (startNodePos >= sorted.size()) {
  				throw new InvalidProgramException("The job graph is cyclic.");
  			}
  
  			JobVertex current = sorted.get(startNodePos++);
  			addNodesThatHaveNoNewPredecessors(current, sorted, remaining);
  		}
  
  		return sorted;
  	}
focal_method.class_method_signature: JobGraph.getVerticesSortedTopologicallyFromSources()
focal_method.full_signature: public List<JobVertex> getVerticesSortedTopologicallyFromSources()
focal_method.identifier: getVerticesSortedTopologicallyFromSources
focal_method.invocations: isEmpty emptyList size values iterator hasNext next hasNoConnectedInputs add remove isEmpty size get addNodesThatHaveNoNewPredecessors
focal_method.modifiers: public
focal_method.parameters: ()
focal_method.return: List<JobVertex>
focal_method.signature: List<JobVertex> getVerticesSortedTopologicallyFromSources()