Package org.apache.flink.runtime.jobgraph

Examples of org.apache.flink.runtime.jobgraph.JobVertexID


  }
 
  @Test
  public void nonColocationFollowsCoLocation() {
    try {
      JobVertexID jid1 = new JobVertexID();
      JobVertexID jid2 = new JobVertexID();
     
      Scheduler scheduler = new Scheduler();
     
      Instance i1 = getRandomInstance(1);
      Instance i2 = getRandomInstance(1);
View Full Code Here


  @Test
  public void testAccumulatedStateFinished() {
    try {
      final JobID jid = new JobID();
      final JobVertexID vid = new JobVertexID();
     
      AbstractJobVertex ajv = new AbstractJobVertex("TestVertex", vid);
      ajv.setParallelism(3);
      ajv.setInvokableClass(mock(AbstractInvokable.class).getClass());
     
View Full Code Here

public class ExecutionVertexDeploymentTest {
 
  @Test
  public void testDeployCall() {
    try {
      final JobVertexID jid = new JobVertexID();
     
      // mock taskmanager to simply accept the call
      TaskOperationProtocol taskManager = mock(TaskOperationProtocol.class);
     
      final Instance instance = getInstance(taskManager);
View Full Code Here

  }
 
  @Test
  public void testDeployWithSynchronousAnswer() {
    try {
      final JobVertexID jid = new JobVertexID();
     
      // mock taskmanager to simply accept the call
      final TaskOperationProtocol taskManager = mock(TaskOperationProtocol.class);
      final Instance instance = getInstance(taskManager);
      final AllocatedSlot slot = instance.allocateSlot(new JobID());
View Full Code Here

  }
 
  @Test
  public void testDeployWithAsynchronousAnswer() {
    try {
      final JobVertexID jid = new JobVertexID();
     
      // mock taskmanager to simply accept the call
      TaskOperationProtocol taskManager = mock(TaskOperationProtocol.class);
     
     
View Full Code Here

  @Test
  public void testDeployFailedSynchronous() {
    final String ERROR_MESSAGE = "test_failure_error_message";
   
    try {
      final JobVertexID jid = new JobVertexID();
     
      // mock taskmanager to simply accept the call
      final TaskOperationProtocol taskManager = mock(TaskOperationProtocol.class);
      final Instance instance = getInstance(taskManager);
      final AllocatedSlot slot = instance.allocateSlot(new JobID());
View Full Code Here

  @Test
  public void testDeployFailedAsynchronously() {
    final String ERROR_MESSAGE = "test_failure_error_message";
   
    try {
      final JobVertexID jid = new JobVertexID();
     
      // mock taskmanager to simply accept the call
      final TaskOperationProtocol taskManager = mock(TaskOperationProtocol.class);
      final Instance instance = getInstance(taskManager);
      final AllocatedSlot slot = instance.allocateSlot(new JobID());
View Full Code Here

 
  @Test
  public void testFailExternallyDuringDeploy() {
   
    try {
      final JobVertexID jid = new JobVertexID();
     
      // mock taskmanager to simply accept the call
      TaskOperationProtocol taskManager = mock(TaskOperationProtocol.class);
     
      final Instance instance = getInstance(taskManager);
View Full Code Here

  @Test
  public void testFailCallOvertakesDeploymentAnswer() {
   
    try {
      final ActionQueue queue = new ActionQueue();
      final JobVertexID jid = new JobVertexID();
     
      // mock taskmanager to simply accept the call
      TaskOperationProtocol taskManager = mock(TaskOperationProtocol.class);
     
      final Instance instance = getInstance(taskManager);
View Full Code Here

  public void testEqualsHashCodeToString() {
    try {
     
      // ExecutionStateChangeEvent
      {
        JobVertexID jid = new JobVertexID();
        ExecutionAttemptID eid = new ExecutionAttemptID();
       
        ExecutionStateChangeEvent e1 = new ExecutionStateChangeEvent(429345231796596L, jid, 17, eid, ExecutionState.CANCELING);
        ExecutionStateChangeEvent e2 = new ExecutionStateChangeEvent(429345231796596L, jid, 17, eid, ExecutionState.CANCELING);
       
        assertTrue(e1.equals(e2));
        assertEquals(e1.hashCode(), e2.hashCode());
        e1.toString();
      }
     
      // JobEvent
      {
        JobEvent e1 = new JobEvent(429345231796596L, JobStatus.CANCELED, "testmessage");
        JobEvent e2 = new JobEvent(429345231796596L, JobStatus.CANCELED, "testmessage");
        JobEvent e3 = new JobEvent(237217579123412431L, JobStatus.RUNNING, null);
        JobEvent e4 = new JobEvent(237217579123412431L, JobStatus.RUNNING, null);
       
        assertTrue(e1.equals(e2));
        assertTrue(e3.equals(e4));
       
        assertEquals(e1.hashCode(), e2.hashCode());
        assertEquals(e3.hashCode(), e4.hashCode());
        e1.toString();
        e3.toString();
      }
     
      // RecentJobEvent
      {
        JobID jid = new JobID();
        RecentJobEvent e1 = new RecentJobEvent(jid, "some name", JobStatus.FAILED, false, 634563546, 546734734672572457L);
        RecentJobEvent e2 = new RecentJobEvent(jid, "some name", JobStatus.FAILED, false, 634563546, 546734734672572457L);
        RecentJobEvent e3 = new RecentJobEvent(jid, null, JobStatus.RUNNING, false, 42364716239476L, 127843618273607L);
        RecentJobEvent e4 = new RecentJobEvent(jid, null, JobStatus.RUNNING, false, 42364716239476L, 127843618273607L);
       
        assertTrue(e1.equals(e2));
        assertTrue(e3.equals(e4));
       
        assertEquals(e1.hashCode(), e2.hashCode());
        assertEquals(e3.hashCode(), e4.hashCode());
        e1.toString();
        e3.toString();
      }
     
      // VertexEvent
      {
        JobVertexID jid = new JobVertexID();
        ExecutionAttemptID eid = new ExecutionAttemptID();
       
        VertexEvent e1 = new VertexEvent(64619276017401234L, jid, "peter", 44, 13, eid, ExecutionState.DEPLOYING, "foo");
        VertexEvent e2 = new VertexEvent(64619276017401234L, jid, "peter", 44, 13, eid, ExecutionState.DEPLOYING, "foo");
       
View Full Code Here

TOP

Related Classes of org.apache.flink.runtime.jobgraph.JobVertexID

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.