You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@storm.apache.org by tedxia <gi...@git.apache.org> on 2014/11/20 09:09:00 UTC

[GitHub] storm pull request: STORM-564: Worker use dynamic port

GitHub user tedxia opened a pull request:

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

    STORM-564: Worker use dynamic port

    PR for STORM-564
    
    The main change are:
    1. Add worker.dynamic.port to  indicate whether worker bind dynamic port or not;
    2. Add node+port->bind-port in Assignment for tell worker's real bind port;
    
    The whole process are:
    1. Worker launch receiver, if worker.dynamic.port set as true, receiver will bind 0, or receiver will bind port specified by supervisor.slots.ports.
    2. After receiver launched, set it's real bind port to (:bind-port worker-data);
    3. Set up worker heartbeat thread, add (:bind-port worker-data) to executor heartbeat info, this will take (:bind-port) to nimbus;
    4. Nimbus generate schedule table periodically:
        1) worker.dynamic.port set true: when new schedule table and cur schedule table have common in executor->node+port, nimbus will select the same part and add the corresponding node+port into node+port->bind-port. Here we does't add newly scheduled node+port into node+port->bind-port, because until worker launched receiver and finished it's first heartbeat, nimbus can know the worker's bind port;
        2) worker.dynamic.port set false: we will add all node+port in ececutor->node+port (come form new schedule table) into node+port->bind-port, with bind-port is same as port. This make the new version act exactly the same as older version when set worker.synamic.port as false.
    5. Worker read nimbus assignment, and it will connect the worker that bind-port not null;


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

    $ git pull https://github.com/tedxia/incubator-storm worker-use-dynamic-port

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

    https://github.com/apache/storm/pull/322.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 #322
    
----
commit 4c0b956a48f2d73c49858568d3d60ec78e644b25
Author: xiajun <xi...@xiaomi.com>
Date:   2014-11-12T04:04:34Z

    change for worker user dynamic worker
    
    Conflicts:
    	conf/defaults.yaml
    	storm-core/src/clj/backtype/storm/cluster.clj
    	storm-core/src/clj/backtype/storm/daemon/worker.clj
    	storm-core/src/clj/backtype/storm/messaging/loader.clj
    	storm-core/src/jvm/backtype/storm/messaging/IConnection.java
    	storm-core/src/jvm/backtype/storm/messaging/netty/Server.java
    	storm-dist/binary/src/main/assembly/binary.xml

commit 2a92092ffc064cd7a26c51d572648e9c2ab7d8b3
Author: xiajun <xi...@xiaomi.com>
Date:   2014-11-19T04:57:26Z

    add some test code for worker.dynamic.port
    
    Conflicts:
    	storm-core/test/clj/backtype/storm/cluster_test.clj
    	storm-core/test/clj/backtype/storm/worker_test.clj

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] storm pull request: STORM-564: Worker use dynamic port

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

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


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] storm pull request: STORM-564: Worker use dynamic port

Posted by nathanmarz <gi...@git.apache.org>.
Github user nathanmarz commented on the pull request:

    https://github.com/apache/storm/pull/322#issuecomment-64515204
  
    Storm's ISupervisor / INimbus interfaces let you control port assignment external to Storm itself. I don't know about YARN, but that's how I got storm-mesos working. The problem with dynamic ports is they make topology management a lot more complex. Now it's not enough to know the worker assignments to be able to send and receive messages, you also need the workers to choose a port and broadcast it. This creates all sorts of additional failure modes that don't currently exist. If we're going to add complexity to Storm, there better be a very compelling reason for it. I don't see that with this feature.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] storm pull request: STORM-564: Worker use dynamic port

Posted by tedxia <gi...@git.apache.org>.
Github user tedxia commented on the pull request:

    https://github.com/apache/storm/pull/322#issuecomment-64305974
  
    @nathanmarz If I run storm on yarn or mesos, it is not easy to find a unique set of free ports, just as other service that scheduled by yarn or mesos use dynamic port. Worker user dynamic port also enable user use deploy it's own storm cluster as yarn's signal app, and we treat the cluster as a whole resource poll, use yarn to achieve resource management.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] storm pull request: STORM-564: Worker use dynamic port

Posted by tedxia <gi...@git.apache.org>.
Github user tedxia commented on the pull request:

    https://github.com/apache/storm/pull/322#issuecomment-64528627
  
    I read [storm-mesos](https://github.com/mesos/storm) just now and know how it works. It easy for storm on mesos because mesos support offer port while yarn don't. Thank to @nathanmarz , it's very useful suggestion and I will close this PR. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] storm pull request: STORM-564: Worker use dynamic port

Posted by nathanmarz <gi...@git.apache.org>.
Github user nathanmarz commented on the pull request:

    https://github.com/apache/storm/pull/322#issuecomment-64305199
  
    -1. Why don't you just set the port configuration on those nodes to a unique set of ports that won't conflict with other services?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] storm pull request: STORM-564: Worker use dynamic port

Posted by tedxia <gi...@git.apache.org>.
Github user tedxia commented on the pull request:

    https://github.com/apache/storm/pull/322#issuecomment-64302867
  
    This PR is similar to [STORM-253](https://issues.apache.org/jira/browse/STORM-253), but use different solution,  @clockfly can you have a look at this, thank you.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---