def METHOD_NAME(self, plan: ScalePlan):
    self._plan = plan
    logger.info("Scale the job by plan %s", plan.to_json())
    with self._lock:
        alive_actors = self._stats_alive_actors()
        for type, group_resource in plan.node_group_resources.items():
            cur_actors = alive_actors.get(type)
            if group_resource.count > len(alive_actors):
                self._scale_up_actors(type, plan, cur_actors)
            elif group_resource.count < len(alive_actors):
                logger.info(group_resource.count)
                self._scale_down_actors(type, plan, cur_actors)