public VertexParallelismUpdatedProto toProto() { VertexParallelismUpdatedProto.Builder builder = VertexParallelismUpdatedProto.newBuilder(); builder.setVertexId(vertexID.toString()).setNumTasks(numTasks); if (vertexLocationHint != null) { builder.setVertexLocationHint( DagTypeConverters.convertVertexLocationHintToProto(this.vertexLocationHint)); } if (sourceEdgeManagers != null) { for (Entry<String, EdgeManagerPluginDescriptor> entry : sourceEdgeManagers.entrySet()) { EdgeManagerDescriptorProto.Builder edgeMgrBuilder = EdgeManagerDescriptorProto.newBuilder(); edgeMgrBuilder.setEdgeName(entry.getKey()); edgeMgrBuilder.setEntityDescriptor(DagTypeConverters.convertToDAGPlan(entry.getValue())); builder.addEdgeManagerDescriptors(edgeMgrBuilder.build()); } } if (rootInputSpecUpdates != null) { for (Entry<String, InputSpecUpdate> entry : rootInputSpecUpdates.entrySet()) { RootInputSpecUpdateProto.Builder rootInputSpecUpdateBuilder = RootInputSpecUpdateProto.newBuilder(); rootInputSpecUpdateBuilder.setInputName(entry.getKey()); rootInputSpecUpdateBuilder.setForAllWorkUnits(entry.getValue().isForAllWorkUnits()); rootInputSpecUpdateBuilder.addAllNumPhysicalInputs( entry.getValue().getAllNumPhysicalInputs()); builder.addRootInputSpecUpdates(rootInputSpecUpdateBuilder.build()); } } return builder.build(); }