public void fromProto(VertexParallelismUpdatedProto proto) { this.vertexID = TezVertexID.fromString(proto.getVertexId()); this.numTasks = proto.getNumTasks(); if (proto.hasVertexLocationHint()) { this.vertexLocationHint = DagTypeConverters.convertVertexLocationHintFromProto(proto.getVertexLocationHint()); } if (proto.getEdgeManagerDescriptorsCount() > 0) { this.sourceEdgeManagers = new HashMap<String, EdgeManagerPluginDescriptor>(proto.getEdgeManagerDescriptorsCount()); for (EdgeManagerDescriptorProto edgeManagerProto : proto.getEdgeManagerDescriptorsList()) { EdgeManagerPluginDescriptor edgeManagerDescriptor = DagTypeConverters.convertEdgeManagerPluginDescriptorFromDAGPlan( edgeManagerProto.getEntityDescriptor()); sourceEdgeManagers.put(edgeManagerProto.getEdgeName(), edgeManagerDescriptor); } } 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.createPerTaskInputSpecUpdate( rootInputSpecUpdateProto.getNumPhysicalInputsList()); } this.rootInputSpecUpdates.put(rootInputSpecUpdateProto.getInputName(), specUpdate); } } }