Package eu.stratosphere.nephele.jobgraph

Examples of eu.stratosphere.nephele.jobgraph.JobID


  @Override
  public InputSplit getNextInputSplit(final ExecutionVertex vertex) {

    final Queue<InputSplit> queue = this.splitMap.get(vertex.getGroupVertex());
    if (queue == null) {
      final JobID jobID = vertex.getExecutionGraph().getJobID();
      LOG.error("Cannot find split queue for vertex " + vertex.getGroupVertex() + " (job " + jobID + ")");
      return null;
    }

    InputSplit nextSplit = queue.poll();
View Full Code Here


          throw new IOException("Network stream corrupted: invalid magic" +
              "number in current envelope header.");
        }

        int seqNum = this.headerBuffer.getInt();
        JobID jobId = JobID.fromByteBuffer(this.headerBuffer);
        ChannelID sourceId = ChannelID.fromByteBuffer(this.headerBuffer);

        this.currentEnvelope = new Envelope(seqNum, jobId, sourceId);

        int eventsSize = this.headerBuffer.getInt();
        int bufferSize = this.headerBuffer.getInt();

        this.currentEventsBuffer = eventsSize > 0 ? ByteBuffer.allocate(eventsSize) : null;
        this.currentBufferRequestSize = bufferSize > 0 ? bufferSize : 0;

        this.headerBuffer.clear();
      }
    }

    // --------------------------------------------------------------------
    // (2) events (var length)
    // --------------------------------------------------------------------
    if (this.currentEventsBuffer != null) {
      copy(in, this.currentEventsBuffer);

      if (this.currentEventsBuffer.hasRemaining()) {
        return DecoderState.PENDING;
      }
      else {
        this.currentEventsBuffer.flip();
        this.currentEnvelope.setEventsSerialized(this.currentEventsBuffer);
        this.currentEventsBuffer = null;
      }
    }

    // --------------------------------------------------------------------
    // (3) buffer (var length)
    // --------------------------------------------------------------------
    // (a) request a buffer from OUR pool
    if (this.currentBufferRequestSize > 0) {
      JobID jobId = this.currentEnvelope.getJobID();
      ChannelID sourceId = this.currentEnvelope.getSource();
      Buffer buffer = requestBufferForTarget(jobId, sourceId, this.currentBufferRequestSize);

      if (buffer == null) {
        return DecoderState.NO_BUFFER_AVAILABLE;
View Full Code Here

   * Tests serialization/deserialization for {@link RecentJobEvent}.
   */
  @Test
  public void testRecentJobEvent() {

    final RecentJobEvent orig = new RecentJobEvent(new JobID(), JOBNAME, JobStatus.SCHEDULED, true, TIMESTAMP,
      TIMESTAMP);

    final RecentJobEvent copy = (RecentJobEvent) ManagementTestUtils.createCopy(orig);

    assertEquals(orig.getJobID(), copy.getJobID());
View Full Code Here

   * Tests the constructor of the {@link TaskDeploymentDescriptor} class with valid arguments.
   */
  @Test
  public void testConstructorWithValidArguments() {

    final JobID jobID = new JobID();
    final ExecutionVertexID vertexID = new ExecutionVertexID();
    final String taskName = "task name";
    final int indexInSubtaskGroup = 0;
    final int currentNumberOfSubtasks = 1;
    final Configuration jobConfiguration = new Configuration();
View Full Code Here

     * \ / Network
     * 1
     */

    // Graph
    final ManagementGraph graph = new ManagementGraph(new JobID());

    // Stages
    final ManagementStage lowerStage = new ManagementStage(graph, 0);
    final ManagementStage upperStage = new ManagementStage(graph, 1);

View Full Code Here

   * Tests the constructor of the {@link GateDeploymentDescriptor} class with valid arguments.
   */
  @Test
  public void testConstructorWithInvalidArguments() {

    final JobID jobID = new JobID();
    final ExecutionVertexID vertexID = new ExecutionVertexID();
    final String taskName = "task name";
    final int indexInSubtaskGroup = 0;
    final int currentNumberOfSubtasks = 1;
    final Configuration jobConfiguration = new Configuration();
View Full Code Here

   * Tests the serialization/deserialization of the {@link TaskDeploymentDescriptor} class.
   */
  @Test
  public void testSerialization() {

    final JobID jobID = new JobID();
    final ExecutionVertexID vertexID = new ExecutionVertexID();
    final String taskName = "task name";
    final int indexInSubtaskGroup = 0;
    final int currentNumberOfSubtasks = 1;
    final Configuration jobConfiguration = new Configuration();
View Full Code Here

   */
  @Test
  public void testConvertJobGraphToExecutionGraph1() {

    File inputFile = null;
    JobID jobID = null;

    try {
      inputFile = ServerTestUtils.createInputFile(0);

      // create job graph
View Full Code Here

   */
  @Test
  public void testConvertJobGraphToExecutionGraph2() {

    File inputFile = null;
    JobID jobID = null;

    try {
      inputFile = ServerTestUtils.createInputFile(0);

      // create job graph
View Full Code Here

  public void testConvertJobGraphToExecutionGraph3() {

    File inputFile1 = null;
    File inputFile2 = null;
    File outputFile = null;
    JobID jobID = null;

    try {

      inputFile1 = ServerTestUtils.createInputFile(0);
      inputFile2 = ServerTestUtils.createInputFile(0);
View Full Code Here

TOP

Related Classes of eu.stratosphere.nephele.jobgraph.JobID

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.