(TWILL-75) Fix race condition in the InMemoryDiscoveryService that would raise concurrent modification exception.

Signed-off-by: Terence Yim <terence@continuuity.com>
(TWILL-76) Improve Location class be able to return LocationFactory that used to create the Location instance. It's convenient to create more Location by just passing a Location around.

Signed-off-by: Terence Yim <chtyim@apache.org>
(TWILL-79) Enhance KafkaPublisher implementation so that it aware of changes in broker listener. - Added method to attach listener for watching broker list changes in BrokerService - SimplePublisher implementation watch for changes in broker list using the BrokerServiceChangeListener - Create new producer and close the old one if the broker list changed .

Signed-off-by: Terence Yim <chtyim@apache.org>
TWILL-82 move to ASM5.0.2 for Java 8 support

Signed-off-by: Steve Loughran <stevel@apache.org>
Signed-off-by: Terence Yim <chtyim@apache.org>
(TWILL-81) Use user home directory as the base directory to construct default location factory in YarnTwillRunnerService. Also includes the following bug fixes

- Instead of using "/twill", which in many cases there would be no write permission, use user home directory.
- Fix a bug in ServiceMain that, when creating LocationFactory for container to use, it should be created with the application directory URI.
- Use MiniDFSCluster to run YarnTestSuite
- Fix a bug in YarnTestSuite that a directory given to create the location factory was getting deleted after each test run, which would break test when using MiniDFSCluster

Signed-off-by: Terence Yim <terence@continuuity.com>
(TWILL-86) Rename ServiceDiscoveryTest to ServiceDiscoveryTestRun to avoid the test being executed twice, one by itself and one by YarnTestSuite.

Signed-off-by: Terence Yim <terence@continuuity.com>
(TWILL-85) Make ZK-coordinated leader election available to twill applications
Bump version to 0.4.0-incubating-SNAPSHOT
Explicitly set java version when compiling twill-examples

Signed-off-by: Terence Yim <terence@continuuity.com>
(TWILL-93) Up the zookeeper timeouts

Zookeeper runs a tad slow on my Macbook Pro, and tests weren't finishing
within the time limits set in the unit tests. This patch ups those limits
so `mvn test` passes.

Signed-off-by: Terence Yim <terence@continuuity.com>
(TWILL-84) Documentation and example enhancements

Fix some maven-javadoc-plugin errors
HelloWorld example should exit if not passed the right arguments
Include twill-examples in the pom modules list
Fix some typos.
Add a .reviewboardrc to simplify submitting patches

Signed-off-by: Terence Yim <terence@continuuity.com>
Fix RAT check failure. Also enable RAT check by default.
Added .travis.yml for CI using Travis-CI.
Enable feature branch travis-ci
Update travis to run with different hadoop version
(TWILL-96) Make YARN unit-tests run on random port.

Signed-off-by: Terence Yim <terence@continuuity.com>
Update travis build command.
(TWILL-95) Example version number fix and zookeeper test timeout
- Update version number in the examples
  - This fixes `mvn package` on a machine that hasn't had twill installed
    on it.
- bump up another zookeeper timeout

Signed-off-by: Terence Yim <chtyim@apache.org>
Increase test timeout and alter Travis setting to show test output
Added more hadoop version to the travis test.