You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@heron.apache.org by hu...@apache.org on 2018/08/21 20:46:02 UTC

[incubator-heron] branch huijunw/fix2980 updated: reorg

This is an automated email from the ASF dual-hosted git repository.

huijun pushed a commit to branch huijunw/fix2980
in repository https://gitbox.apache.org/repos/asf/incubator-heron.git


The following commit(s) were added to refs/heads/huijunw/fix2980 by this push:
     new f0f6340  reorg
f0f6340 is described below

commit f0f634090e62df69a9a4711025e9b4217689dcb3
Author: Huijun Wu <hu...@twitter.com>
AuthorDate: Tue Aug 21 13:45:39 2018 -0700

    reorg
---
 .../src/java/org/apache/heron/scheduler/RuntimeManagerRunner.java | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/heron/scheduler-core/src/java/org/apache/heron/scheduler/RuntimeManagerRunner.java b/heron/scheduler-core/src/java/org/apache/heron/scheduler/RuntimeManagerRunner.java
index 8b05985..2166bcd 100644
--- a/heron/scheduler-core/src/java/org/apache/heron/scheduler/RuntimeManagerRunner.java
+++ b/heron/scheduler-core/src/java/org/apache/heron/scheduler/RuntimeManagerRunner.java
@@ -264,9 +264,10 @@ public class RuntimeManagerRunner {
       throws TopologyRuntimeManagementException, PackingException, UpdateDryRunResponse {
     LOG.fine(String.format("updateTopologyHandler called for %s with %s",
         topologyName, newParallelism));
+    Map<String, Integer> changeRequests = parseNewParallelismParam(newParallelism);
+
     SchedulerStateManagerAdaptor manager = Runtime.schedulerStateManagerAdaptor(runtime);
     TopologyAPI.Topology topology = manager.getTopology(topologyName);
-    Map<String, Integer> changeRequests = parseNewParallelismParam(newParallelism);
     PackingPlans.PackingPlan currentPlan = manager.getPackingPlan(topologyName);
 
     if (!parallelismChangeDetected(currentPlan, changeRequests)) {
@@ -297,10 +298,9 @@ public class RuntimeManagerRunner {
     SchedulerStateManagerAdaptor manager = Runtime.schedulerStateManagerAdaptor(runtime);
     TopologyAPI.Topology topology = manager.getTopology(topologyName);
     PackingPlans.PackingPlan currentPlan = manager.getPackingPlan(topologyName);
-    boolean parallelismChange = parallelismChangeDetected(currentPlan, changeRequests);
-    boolean containerChange = containersNumChangeDetected(currentPlan, containerNum);
 
-    if (!parallelismChange && !containerChange) {
+    if (!containersNumChangeDetected(currentPlan, containerNum)
+        && !parallelismChangeDetected(currentPlan, changeRequests)) {
       throw new TopologyRuntimeManagementException(
           String.format("Both component parallelism request and container number are the "
               + "same as in the running topology."));