You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@storm.apache.org by hummelm <gi...@git.apache.org> on 2018/04/07 16:17:17 UTC

[GitHub] storm pull request #2625: fix STORM-2979 (master branch)

GitHub user hummelm opened a pull request:

    https://github.com/apache/storm/pull/2625

    fix STORM-2979 (master branch)

    Add in WorkerState an internal list of deserialized workerHooks and use it to
    start/stop

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/hummelm/storm STORM-2979-master

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/storm/pull/2625.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #2625
    
----
commit ce7c716fc55c9af792998c2b3d512018cdbd8bec
Author: michelo <mi...@...>
Date:   2018-04-07T16:13:12Z

    fix STORM-2979
    
    Add in WorkerState an internal list of workerHooks and use it to
    start/stop

----


---

[GitHub] storm pull request #2625: fix STORM-2979 (master branch)

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/storm/pull/2625


---

[GitHub] storm pull request #2625: fix STORM-2979 (master branch)

Posted by HeartSaVioR <gi...@git.apache.org>.
Github user HeartSaVioR commented on a diff in the pull request:

    https://github.com/apache/storm/pull/2625#discussion_r179931931
  
    --- Diff: storm-client/src/jvm/org/apache/storm/daemon/worker/WorkerState.java ---
    @@ -599,20 +613,16 @@ public WorkerTopologyContext getWorkerTopologyContext() {
         public void runWorkerStartHooks() {
             WorkerTopologyContext workerContext = getWorkerTopologyContext();
             if (topology.is_set_worker_hooks()) {
    --- End diff --
    
    if statement unnecessary for now.


---

[GitHub] storm pull request #2625: fix STORM-2979 (master branch)

Posted by HeartSaVioR <gi...@git.apache.org>.
Github user HeartSaVioR commented on a diff in the pull request:

    https://github.com/apache/storm/pull/2625#discussion_r179931950
  
    --- Diff: storm-client/src/jvm/org/apache/storm/daemon/worker/WorkerState.java ---
    @@ -339,6 +344,15 @@ public WorkerState(Map<String, Object> conf, IContext mqContext, String topology
             int maxTaskId = getMaxTaskId(componentToSortedTasks);
             this.workerTransfer = new WorkerTransfer(this, topologyConf, maxTaskId);
             this.bpTracker = new BackPressureTracker(workerId, localTaskIds);
    +        // 
    --- End diff --
    
    ‘//‘ can be removed, and better to extract below to private method as we did above.


---

[GitHub] storm pull request #2625: fix STORM-2979 (master branch)

Posted by HeartSaVioR <gi...@git.apache.org>.
Github user HeartSaVioR commented on a diff in the pull request:

    https://github.com/apache/storm/pull/2625#discussion_r179931937
  
    --- Diff: storm-client/src/jvm/org/apache/storm/daemon/worker/WorkerState.java ---
    @@ -599,20 +613,16 @@ public WorkerTopologyContext getWorkerTopologyContext() {
         public void runWorkerStartHooks() {
             WorkerTopologyContext workerContext = getWorkerTopologyContext();
             if (topology.is_set_worker_hooks()) {
    -            for (ByteBuffer hook : topology.get_worker_hooks()) {
    -                byte[] hookBytes = Utils.toByteArray(hook);
    -                BaseWorkerHook hookObject = Utils.javaDeserialize(hookBytes, BaseWorkerHook.class);
    -                hookObject.start(topologyConf, workerContext);
    +            for (IWorkerHook hook : getDeserializedWorkerHooks()) {
    +                hook.start(topologyConf, workerContext);
                 }
             }
         }
     
         public void runWorkerShutdownHooks() {
             if (topology.is_set_worker_hooks()) {
    --- End diff --
    
    if statement unnecessary for now.


---