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 01:57:25 UTC

[1/2] storm git commit: STORM-2682: Fixed issues with null owner

Repository: storm
Updated Branches:
  refs/heads/master f5a3942b4 -> 3cb416a31


STORM-2682: Fixed issues with null owner


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

Branch: refs/heads/master
Commit: 0d59f7cd326a3913a43aed45af5f73fd4f1994a4
Parents: 1c2ac2e
Author: Robert (Bobby) Evans <ev...@yahoo-inc.com>
Authored: Mon Aug 7 15:47:00 2017 -0500
Committer: Robert (Bobby) Evans <ev...@yahoo-inc.com>
Committed: Mon Aug 7 16:44:39 2017 -0500

----------------------------------------------------------------------
 .../java/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/0d59f7cd/storm-server/src/main/java/org/apache/storm/daemon/supervisor/Slot.java
----------------------------------------------------------------------
diff --git a/storm-server/src/main/java/org/apache/storm/daemon/supervisor/Slot.java b/storm-server/src/main/java/org/apache/storm/daemon/supervisor/Slot.java
index 1378dbb..d14c7c8 100644
--- a/storm-server/src/main/java/org/apache/storm/daemon/supervisor/Slot.java
+++ b/storm-server/src/main/java/org/apache/storm/daemon/supervisor/Slot.java
@@ -798,6 +798,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/0d59f7cd/storm-server/src/main/java/org/apache/storm/daemon/supervisor/timer/UpdateBlobs.java
----------------------------------------------------------------------
diff --git a/storm-server/src/main/java/org/apache/storm/daemon/supervisor/timer/UpdateBlobs.java b/storm-server/src/main/java/org/apache/storm/daemon/supervisor/timer/UpdateBlobs.java
index d0baf90..b5dbf57 100644
--- a/storm-server/src/main/java/org/apache/storm/daemon/supervisor/timer/UpdateBlobs.java
+++ b/storm-server/src/main/java/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' of https://github.com/revans2/incubator-storm into STORM-2682-merge

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


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

Branch: refs/heads/master
Commit: 3cb416a31d54eb29d6acb74c506ae7fb47a87965
Parents: f5a3942 0d59f7c
Author: Jungtaek Lim <ka...@gmail.com>
Authored: Sat Aug 19 10:57:07 2017 +0900
Committer: Jungtaek Lim <ka...@gmail.com>
Committed: Sat Aug 19 10:57:07 2017 +0900

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