Package eu.stratosphere.nephele.event.task

Examples of eu.stratosphere.nephele.event.task.AbstractEvent


        // sanity check: an event may only come after a complete record.
        if (this.deserializer.hasUnfinishedData()) {
          throw new IllegalStateException("Channel received an event before completing the current partial record.");
        }

        AbstractEvent evt = boe.getEvent();
        if (evt.getClass() == ChannelCloseEvent.class) {
          this.brokerAggreedToCloseChannel = true;
          return InputChannelResult.END_OF_STREAM;
        }
        else if (evt.getClass() == EndOfSuperstepEvent.class) {
          return InputChannelResult.END_OF_SUPERSTEP;
        }
        else if (evt instanceof AbstractTaskEvent) {
          this.currentEvent = (AbstractTaskEvent) evt;
          return InputChannelResult.TASK_EVENT;
View Full Code Here


          throw new RuntimeException("Could not load event class '" + className + "'.", e);
        } catch (ClassCastException e) {
          throw new RuntimeException("The class '" + className + "' is no valid subclass of '" + AbstractEvent.class.getName() + "'.", e);
        }

        AbstractEvent evt = InstantiationUtil.instantiate(clazz, AbstractEvent.class);
        evt.read(deserializer);

        events.add(evt);
      }

      return events;
View Full Code Here

      List<? extends AbstractEvent> actualEvents = actual.deserializeEvents();

      Assert.assertEquals(expectedEvents.size(), actualEvents.size());

      for (int i = 0; i < expectedEvents.size(); i++) {
        AbstractEvent expectedEvent = expectedEvents.get(i);
        AbstractEvent actualEvent = actualEvents.get(i);

        Assert.assertEquals(expectedEvent.getClass(), actualEvent.getClass());
        Assert.assertEquals(expectedEvent, actualEvent);
      }
    }
  }
View Full Code Here

TOP

Related Classes of eu.stratosphere.nephele.event.task.AbstractEvent

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.