JobGraph implements IOReadableWritable { public JobGraph() { this.jobID = new JobID(); } JobGraph();  JobGraph(final String jobName); String getName(); Configuration getJobConfiguration(); Configuration getTaskmanagerConfiguration(); void addVertex(final AbstractJobInputVertex inputVertex); void addVertex(final JobTaskVertex taskVertex); void addVertex(final AbstractJobOutputVertex outputVertex); int getNumberOfInputVertices(); int getNumberOfOutputVertices(); int getNumberOfTaskVertices(); Iterator<AbstractJobInputVertex> getInputVertices(); Iterator<AbstractJobOutputVertex> getOutputVertices(); Iterator<JobTaskVertex> getTaskVertices(); int getNumberOfVertices(); AbstractJobVertex[] getAllReachableJobVertices(); AbstractJobVertex[] getAllJobVertices(); JobID getJobID(); AbstractJobVertex findVertexByID(final JobVertexID id); boolean isWeaklyConnected(); boolean isAcyclic(); AbstractJobVertex areVertexDegreesCorrect(); @Override void read(final DataInput in); @Override void write(final DataOutput out); void addJar(final Path jar); Path[] getJars(); AbstractJobVertex findVertexWithNullEdges(); boolean isInstanceDependencyChainAcyclic();  }
@Test public void testJobGraph() { final JobGraph jg = new JobGraph(); final JobTaskVertex v1 = new JobTaskVertex(jg); final JobTaskVertex v2 = new JobTaskVertex(jg); try { v1.connectTo(v2); } catch (JobGraphDefinitionException ex) { Logger.getLogger(JobGraphTest.class.getName()).log(Level.SEVERE, null, ex); } assertEquals(v1, v2.getBackwardConnection(0).getConnectedVertex()); }