Build against Java 1.7

The sample code uses generics and by default
mvn builds with 1.3, which doesn't support generics.
This patch sets mvn to use 1.7.

Signed-off-by: Joe Buck <jbbuck@gmail.com>
Update example to Hadoop 2.2.0

Use the artifacts from 2.2.0 now
that its GA.

Signed-off-by: Joe Buck <jbbuck@gmail.com>
Fix URI issue

Added a call to take the path to the JAR
in HDFS and make it qualified. Without this,
the example fails at runtime with this error:
"Expected scheme name at index 0".

Signed-off-by: Joe Buck <jbbuck@gmail.com>
Fix a race condition

When running more than one task, containers from earler tasks
can finished while the later tasks are still having their
containers allocated, which results in the Master not receiving
notification of those completions.

This patch fixes that race condition by watching for completions
while allocating containers.

Signed-off-by: Joe Buck <jbbuck@gmail.com>