use of org.apache.heron.spi.packing.PackingPlanProtoDeserializer in project heron by twitter.
the class RuntimeManagerRunner method getCurrentContainerNumber.
private int getCurrentContainerNumber(String topologyName) {
SchedulerStateManagerAdaptor manager = Runtime.schedulerStateManagerAdaptor(runtime);
PackingPlans.PackingPlan currentPlan = manager.getPackingPlan(topologyName);
PackingPlanProtoDeserializer deserializer = new PackingPlanProtoDeserializer();
PackingPlan cPlan = deserializer.fromProto(currentPlan);
return cPlan.getContainers().size();
}
use of org.apache.heron.spi.packing.PackingPlanProtoDeserializer in project heron by twitter.
the class RuntimeManagerRunner method containersNumChangeDetected.
private static boolean containersNumChangeDetected(PackingPlans.PackingPlan currentProtoPlan, int numContainers) {
PackingPlanProtoDeserializer deserializer = new PackingPlanProtoDeserializer();
PackingPlan currentPlan = deserializer.fromProto(currentProtoPlan);
return currentPlan.getContainers().size() != numContainers;
}
Aggregations