You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@twill.apache.org by Jiahua Wang <ji...@gmail.com> on 2014/03/07 21:38:38 UTC

Review Request 18921: Review for TWILL-50: Allow for EventHandler to accept or reject containers, for control over which containers the Twill runnable instances are deployed to.

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/18921/
-----------------------------------------------------------

Review request for Twill.


Repository: twill


Description
-------

Add EventHandler.handleAcquiredContainer(). This allows for EventHandler to accept or reject containers, for control over which containers the Twill runnable instances are deployed to. Default implementation of EventHandler.handleContainer() accepts all containers, which is same as the behavior of ApplicationMasterService before this patch.

Also added twill-examples module, which contains HelloWorld example and MultiHostExample. MultiHostExample demonstrates usage of EventHandler.handleAcquiredContainer() to scatter runnable instances to unique hosts.


Diffs
-----

  pom.xml 0e692f1 
  twill-api/src/main/java/org/apache/twill/api/EventHandler.java ede5b65 
  twill-api/src/main/java/org/apache/twill/api/HandleAcquiredContainerDecision.java PRE-CREATION 
  twill-examples/.gitignore PRE-CREATION 
  twill-examples/pom.xml PRE-CREATION 
  twill-examples/src/main/java/org/apache/twill/yarn/HelloWorld.java PRE-CREATION 
  twill-examples/src/main/java/org/apache/twill/yarn/MultihostExample.java PRE-CREATION 
  twill-yarn/src/main/hadoop20/org/apache/twill/internal/yarn/Hadoop20YarnAMClient.java 68d073d 
  twill-yarn/src/main/hadoop21/org/apache/twill/internal/yarn/Hadoop21YarnAMClient.java 0ebc0f5 
  twill-yarn/src/main/java/org/apache/twill/internal/appmaster/ApplicationMasterService.java 3a6ce20 
  twill-yarn/src/main/java/org/apache/twill/internal/appmaster/ProvisionRequest.java 002d2a5 
  twill-yarn/src/main/java/org/apache/twill/internal/yarn/YarnAMClient.java 370ca3c 

Diff: https://reviews.apache.org/r/18921/diff/


Testing
-------

Tested in a cluster with 2 slave nodes. Pending test with 9 slave nodes. Unit tests not created.


Thanks,

Jiahua Wang


Re: Review Request 18921: Review for TWILL-50: Allow for EventHandler to accept or reject containers, for control over which containers the Twill runnable instances are deployed to.

Posted by Jiahua Wang <ji...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/18921/
-----------------------------------------------------------

(Updated March 7, 2014, 11:19 p.m.)


Review request for Twill.


Repository: twill


Description
-------

Add EventHandler.handleAcquiredContainer(). This allows for EventHandler to accept or reject containers, for control over which containers the Twill runnable instances are deployed to. Default implementation of EventHandler.handleContainer() accepts all containers, which is same as the behavior of ApplicationMasterService before this patch.

Also added twill-examples module, which contains HelloWorld example and MultiHostExample. MultiHostExample demonstrates usage of EventHandler.handleAcquiredContainer() to scatter runnable instances to unique hosts.


Diffs
-----

  pom.xml 0e692f1 
  twill-api/src/main/java/org/apache/twill/api/EventHandler.java ede5b65 
  twill-api/src/main/java/org/apache/twill/api/HandleAcquiredContainerDecision.java PRE-CREATION 
  twill-examples/.gitignore PRE-CREATION 
  twill-examples/pom.xml PRE-CREATION 
  twill-examples/src/main/java/org/apache/twill/yarn/HelloWorld.java PRE-CREATION 
  twill-examples/src/main/java/org/apache/twill/yarn/MultihostExample.java PRE-CREATION 
  twill-yarn/src/main/hadoop20/org/apache/twill/internal/yarn/Hadoop20YarnAMClient.java 68d073d 
  twill-yarn/src/main/hadoop21/org/apache/twill/internal/yarn/Hadoop21YarnAMClient.java 0ebc0f5 
  twill-yarn/src/main/java/org/apache/twill/internal/appmaster/ApplicationMasterService.java 3a6ce20 
  twill-yarn/src/main/java/org/apache/twill/internal/appmaster/ProvisionRequest.java 002d2a5 
  twill-yarn/src/main/java/org/apache/twill/internal/yarn/YarnAMClient.java 370ca3c 

Diff: https://reviews.apache.org/r/18921/diff/


Testing (updated)
-------

Tested with 2 slave nodes and tested with 9 slave nodes. Unit tests not created.


Thanks,

Jiahua Wang


Re: Review Request 18921: Review for TWILL-50: Allow for EventHandler to accept or reject containers, for control over which containers the Twill runnable instances are deployed to.

Posted by Jiahua Wang <ji...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/18921/
-----------------------------------------------------------

(Updated March 7, 2014, 11:19 p.m.)


Review request for Twill.


Changes
-------

Changed MAX_RESCHEDULE_RETRIES to MAX_RESCHEDULE_RETRIES_PER_INSTANCE, allowing ApplicationMasterService enough retries to acquire all the containers necessary when EventHandler is trying to get a unique container host per runnable instance.

Works with 8 slave nodes, but a bit slow.


Repository: twill


Description
-------

Add EventHandler.handleAcquiredContainer(). This allows for EventHandler to accept or reject containers, for control over which containers the Twill runnable instances are deployed to. Default implementation of EventHandler.handleContainer() accepts all containers, which is same as the behavior of ApplicationMasterService before this patch.

Also added twill-examples module, which contains HelloWorld example and MultiHostExample. MultiHostExample demonstrates usage of EventHandler.handleAcquiredContainer() to scatter runnable instances to unique hosts.


Diffs (updated)
-----

  pom.xml 0e692f1 
  twill-api/src/main/java/org/apache/twill/api/EventHandler.java ede5b65 
  twill-api/src/main/java/org/apache/twill/api/HandleAcquiredContainerDecision.java PRE-CREATION 
  twill-examples/.gitignore PRE-CREATION 
  twill-examples/pom.xml PRE-CREATION 
  twill-examples/src/main/java/org/apache/twill/yarn/HelloWorld.java PRE-CREATION 
  twill-examples/src/main/java/org/apache/twill/yarn/MultihostExample.java PRE-CREATION 
  twill-yarn/src/main/hadoop20/org/apache/twill/internal/yarn/Hadoop20YarnAMClient.java 68d073d 
  twill-yarn/src/main/hadoop21/org/apache/twill/internal/yarn/Hadoop21YarnAMClient.java 0ebc0f5 
  twill-yarn/src/main/java/org/apache/twill/internal/appmaster/ApplicationMasterService.java 3a6ce20 
  twill-yarn/src/main/java/org/apache/twill/internal/appmaster/ProvisionRequest.java 002d2a5 
  twill-yarn/src/main/java/org/apache/twill/internal/yarn/YarnAMClient.java 370ca3c 

Diff: https://reviews.apache.org/r/18921/diff/


Testing
-------

Tested in a cluster with 2 slave nodes. Pending test with 9 slave nodes. Unit tests not created.


Thanks,

Jiahua Wang