You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@storm.apache.org by ka...@apache.org on 2017/08/19 02:22:05 UTC

[1/2] storm git commit: STORM-2682: Fix issues with null owner on rolling upgrade

Repository: storm
Updated Branches:
  refs/heads/1.0.x-branch 51c84ba30 -> f7696c022


STORM-2682: Fix issues with null owner on rolling upgrade


Project: http://git-wip-us.apache.org/repos/asf/storm/repo
Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/457bdf44
Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/457bdf44
Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/457bdf44

Branch: refs/heads/1.0.x-branch
Commit: 457bdf4457df241ebf5bb5a0cdfdd0d3ba85491d
Parents: e3c9971
Author: Robert (Bobby) Evans <ev...@yahoo-inc.com>
Authored: Mon Aug 7 15:44:08 2017 -0500
Committer: Robert (Bobby) Evans <ev...@yahoo-inc.com>
Committed: Mon Aug 7 15:44:08 2017 -0500

----------------------------------------------------------------------
 .../src/jvm/org/apache/storm/daemon/supervisor/Slot.java | 11 +++++++++++
 .../storm/daemon/supervisor/timer/UpdateBlobs.java       | 11 ++++++++---
 2 files changed, 19 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/storm/blob/457bdf44/storm-core/src/jvm/org/apache/storm/daemon/supervisor/Slot.java
----------------------------------------------------------------------
diff --git a/storm-core/src/jvm/org/apache/storm/daemon/supervisor/Slot.java b/storm-core/src/jvm/org/apache/storm/daemon/supervisor/Slot.java
index c92db0c..11f800a 100644
--- a/storm-core/src/jvm/org/apache/storm/daemon/supervisor/Slot.java
+++ b/storm-core/src/jvm/org/apache/storm/daemon/supervisor/Slot.java
@@ -749,6 +749,17 @@ public class Slot extends Thread implements AutoCloseable {
                     LOG.info("SLOT {}: Changing current assignment from {} to {}", staticState.port, dynamicState.currentAssignment, nextState.currentAssignment);
                     saveNewAssignment(nextState.currentAssignment);
                 }
+
+                if (equivalent(nextState.newAssignment, nextState.currentAssignment) &&
+                    nextState.currentAssignment != null && nextState.currentAssignment.get_owner() == null &&
+                    nextState.newAssignment != null && nextState.newAssignment.get_owner() != null) {
+                    //This is an odd case for a rolling upgrade where the user on the old assignment may be null,
+                    // but not on the new one.  Although in all other ways they are the same.
+                    // If this happens we want to use the assignment with the owner.
+                    LOG.info("Updating assignment to save owner {}", nextState.newAssignment.get_owner());
+                    saveNewAssignment(nextState.newAssignment);
+                    nextState = nextState.withCurrentAssignment(nextState.container, nextState.newAssignment);
+                }
                 
                 // clean up the profiler actions that are not being processed
                 removed.removeAll(dynamicState.profileActions);

http://git-wip-us.apache.org/repos/asf/storm/blob/457bdf44/storm-core/src/jvm/org/apache/storm/daemon/supervisor/timer/UpdateBlobs.java
----------------------------------------------------------------------
diff --git a/storm-core/src/jvm/org/apache/storm/daemon/supervisor/timer/UpdateBlobs.java b/storm-core/src/jvm/org/apache/storm/daemon/supervisor/timer/UpdateBlobs.java
index 746578e..68c4e27 100644
--- a/storm-core/src/jvm/org/apache/storm/daemon/supervisor/timer/UpdateBlobs.java
+++ b/storm-core/src/jvm/org/apache/storm/daemon/supervisor/timer/UpdateBlobs.java
@@ -67,9 +67,14 @@ public class UpdateBlobs implements Runnable {
             for (String stormId : downloadedStormIds) {
                 LocalAssignment la = assignedStormIds.get(stormId);
                 if (la != null) {
-                    String stormRoot = ConfigUtils.supervisorStormDistRoot(conf, stormId);
-                    LOG.debug("Checking Blob updates for storm topology id {} With target_dir: {}", stormId, stormRoot);
-                    updateBlobsForTopology(conf, stormId, supervisor.getLocalizer(), la.get_owner());
+                    if (la.get_owner() == null) {
+                        //We got a case where the local assignment is not up to date, no point in going on...
+                        LOG.warn("The blobs will not be updated for {} until the local assignment is updated...", stormId);
+                    } else {
+                        String stormRoot = ConfigUtils.supervisorStormDistRoot(conf, stormId);
+                        LOG.debug("Checking Blob updates for storm topology id {} With target_dir: {}", stormId, stormRoot);
+                        updateBlobsForTopology(conf, stormId, supervisor.getLocalizer(), la.get_owner());
+                    }
                 }
             }
         } catch (Exception e) {


[2/2] storm git commit: Merge branch 'STORM-2682-1.0.x' of https://github.com/revans2/incubator-storm into STORM-2682-1.0.x-merge

Posted by ka...@apache.org.
Merge branch 'STORM-2682-1.0.x' of https://github.com/revans2/incubator-storm into STORM-2682-1.0.x-merge


Project: http://git-wip-us.apache.org/repos/asf/storm/repo
Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/f7696c02
Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/f7696c02
Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/f7696c02

Branch: refs/heads/1.0.x-branch
Commit: f7696c022425ba6d53d22ea3bd76c67525417eb7
Parents: 51c84ba 457bdf4
Author: Jungtaek Lim <ka...@gmail.com>
Authored: Sat Aug 19 10:57:48 2017 +0900
Committer: Jungtaek Lim <ka...@gmail.com>
Committed: Sat Aug 19 10:57:48 2017 +0900

----------------------------------------------------------------------
 .../src/jvm/org/apache/storm/daemon/supervisor/Slot.java | 11 +++++++++++
 .../storm/daemon/supervisor/timer/UpdateBlobs.java       | 11 ++++++++---
 2 files changed, 19 insertions(+), 3 deletions(-)
----------------------------------------------------------------------