(TWILL-186) Guard against YARN returning mismatch container size case.

- Also make sure we don't remove container request without adding it first
- Code cleanup for ApplicationMasterService and related classes
  - Get rid of the inner loop in the doRun method
    - The inner loop can block the heartbeat thread for too long if there are a lot of runnable instances to stop
  - Remove unnecessary throwables.propagate
  - Remove unnecessary intermediate method
  - Better logging
  - Request multiple instances in the same request
  - Refactory/simiply placement policy related code
  - Expose container instanceId instead of parsing it from runId

This closes #34 on Github.

Signed-off-by: Terence Yim <chtyim@apache.org>
9 files changed
tree: d92369808689a9f12fc44fe385bc0430dd557ba8
  1. twill-api/
  2. twill-common/
  3. twill-core/
  4. twill-discovery-api/
  5. twill-discovery-core/
  6. twill-examples/
  7. twill-ext/
  8. twill-java8-test/
  9. twill-yarn/
  10. twill-zookeeper/
  11. .gitignore
  12. .reviewboardrc
  13. .travis.yml
  14. checkstyle.xml
  15. LICENSE
  16. NOTICE
  17. pom.xml
  18. README.md
README.md

What is Apache Twill?

Twill is an abstraction over Apache Hadoop® YARN that reduces the complexity of developing distributed applications, allowing developers to focus more on their business logic. Twill allows you to use YARN’s distributed capabilities with a programming model that is similar to running threads.

Getting Started

You can build and install the Apache Twill by:

    git clone https://git-wip-us.apache.org/repos/asf/twill.git
    cd twill
    mvn install

After the maven installation completes, you can include the artifact org.apache.twill:twill-yarn as a dependency on your other projects.

Export Control

This distribution includes cryptographic software. The country in which you currently reside may have restrictions on the import, possession, use, and/or re-export to another country, of encryption software. BEFORE using any encryption software, please check your country's laws, regulations and policies concerning the import, possession, or use, and re-export of encryption software, to see if this is permitted. See http://www.wassenaar.org/ for more information.

The U.S. Government Department of Commerce, Bureau of Industry and Security (BIS), has classified this software as Export Commodity Control Number (ECCN) 5D002.C.1, which includes information security software using or performing cryptographic functions with asymmetric algorithms. The form and manner of this Apache Software Foundation distribution makes it eligible for export under the License Exception ENC Technology Software Unrestricted (TSU) exception (see the BIS Export Administration Regulations, Section 740.13) for both object code and source code.

The following provides more details on the included cryptographic software:

Apache Twill uses the built-in java cryptography libraries for unique ID generation. See http://www.oracle.com/us/products/export/export-regulations-345813.html for more details on Java's cryptography features.