Examples of InputSpecUpdate


Examples of org.apache.tez.runtime.api.InputSpecUpdate

      }
    }
    if (proto.getRootInputSpecUpdatesCount() > 0) {
      this.rootInputSpecUpdates = Maps.newHashMap();
      for (RootInputSpecUpdateProto rootInputSpecUpdateProto : proto.getRootInputSpecUpdatesList()) {
        InputSpecUpdate specUpdate;
        if (rootInputSpecUpdateProto.getForAllWorkUnits()) {
          specUpdate = InputSpecUpdate
              .createAllTaskInputSpecUpdate(rootInputSpecUpdateProto.getNumPhysicalInputs(0));
        } else {
          specUpdate = InputSpecUpdate
View Full Code Here

Examples of org.apache.tez.runtime.api.InputSpecUpdate

    logEvents(event, deserializedEvent);
  }

  private void testVertexParallelismUpdatedEvent() throws Exception {
    {
      InputSpecUpdate rootInputSpecUpdateBulk = InputSpecUpdate
          .createAllTaskInputSpecUpdate(2);
      InputSpecUpdate rootInputSpecUpdatePerTask = InputSpecUpdate
          .createPerTaskInputSpecUpdate(Lists.newArrayList(1, 2, 3));
      Map<String, InputSpecUpdate> rootInputSpecUpdates = new HashMap<String, InputSpecUpdate>();
      rootInputSpecUpdates.put("input1", rootInputSpecUpdateBulk);
      rootInputSpecUpdates.put("input2", rootInputSpecUpdatePerTask);
      VertexParallelismUpdatedEvent event =
          new VertexParallelismUpdatedEvent(
              TezVertexID.getInstance(
                  TezDAGID.getInstance(ApplicationId.newInstance(0, 1), 1), 111),
              100, null, null, rootInputSpecUpdates);
      VertexParallelismUpdatedEvent deserializedEvent = (VertexParallelismUpdatedEvent)
          testProtoConversion(event);
      Assert.assertEquals(event.getVertexID(), deserializedEvent.getVertexID());
      Assert.assertEquals(event.getNumTasks(), deserializedEvent.getNumTasks());
      Assert.assertEquals(event.getSourceEdgeManagers(),
          deserializedEvent.getSourceEdgeManagers());
      Assert.assertEquals(event.getVertexLocationHint(),
          deserializedEvent.getVertexLocationHint());
      Assert.assertEquals(event.getRootInputSpecUpdates().size(), deserializedEvent
          .getRootInputSpecUpdates().size());
      InputSpecUpdate deserializedBulk = deserializedEvent.getRootInputSpecUpdates().get("input1");
      InputSpecUpdate deserializedPerTask = deserializedEvent.getRootInputSpecUpdates().get("input2");
      Assert.assertEquals(rootInputSpecUpdateBulk.isForAllWorkUnits(),
          deserializedBulk.isForAllWorkUnits());
      Assert.assertEquals(rootInputSpecUpdateBulk.getAllNumPhysicalInputs(),
          deserializedBulk.getAllNumPhysicalInputs());
      Assert.assertEquals(rootInputSpecUpdatePerTask.isForAllWorkUnits(),
          deserializedPerTask.isForAllWorkUnits());
      Assert.assertEquals(rootInputSpecUpdatePerTask.getAllNumPhysicalInputs(),
          deserializedPerTask.getAllNumPhysicalInputs());
      logEvents(event, deserializedEvent);
    }
    {
      Map<String,EdgeManagerPluginDescriptor> sourceEdgeManagers
          = new LinkedHashMap<String, EdgeManagerPluginDescriptor>();
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.