Examples of InputInitializerEvent


Examples of org.apache.tez.runtime.api.events.InputInitializerEvent

    }
    Assert.assertFalse(initializer.eventReceived.get());
    Assert.assertFalse(initializer.initComplete.get());

    // Signal the initializer by sending an event - via vertex1
    InputInitializerEvent event = InputInitializerEvent.create("vertex2", "input1", null);
    TezEvent tezEvent = new TezEvent(event,
        new EventMetaData(EventProducerConsumerType.OUTPUT, "vertex1", null, null));

    dispatcher.getEventHandler()
        .handle(new VertexEventRouteEvent(v1.getVertexId(), Collections.singletonList(tezEvent)));
View Full Code Here

Examples of org.apache.tez.runtime.api.events.InputInitializerEvent

    return builder.build();
  }

  public static InputInitializerEvent convertRootInputInitializerEventFromProto(
      EventProtos.RootInputInitializerEventProto proto) {
    InputInitializerEvent event =
        InputInitializerEvent.create(proto.getTargetVertexName(), proto.getTargetInputName(),
            (proto.hasUserPayload() ? proto.getUserPayload().asReadOnlyByteBuffer() : null));
    return event;
  }
View Full Code Here

Examples of org.apache.tez.runtime.api.events.InputInitializerEvent

          }
        }
          break;
        case ROOT_INPUT_INITIALIZER_EVENT:
        {
          InputInitializerEvent riEvent = (InputInitializerEvent) tezEvent.getEvent();
          Vertex target = vertex.getDAG().getVertex(riEvent.getTargetVertexName());
          Preconditions.checkArgument(target != null,
              "Event sent to unkown vertex: " + riEvent.getTargetVertexName());
          if (target == vertex) {
            vertex.rootInputInitializerManager.handleInitializerEvent(riEvent);
          } else {
            checkEventSourceMetadata(vertex, sourceMeta);
            vertex.eventHandler.handle(new VertexEventRouteEvent(target.getVertexId(),
View Full Code Here

Examples of org.apache.tez.runtime.api.events.InputInitializerEvent

      if (element == endOfEvents) {
        // we're done processing events
        break;
      }

      InputInitializerEvent event = (InputInitializerEvent) element;

      LOG.info("Input event: " + event.getTargetInputName() + ", " + event.getTargetVertexName()
          + ", " + (event.getUserPayload().limit() - event.getUserPayload().position()));
      processPayload(event.getUserPayload(), event.getSourceVertexName());
      eventCount += 1;
    }
    LOG.info("Received events: " + eventCount);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.