[CDH5->CDH4] Impala reserves resources from YARN via LLama.

Impala reserves resources from YARN via Llama and handles resources
preemptions by cancelling affected queries. Adds the Impala Resource
Broker for interacting with Llama. Refactors scheduler and coordinator
to move fragment-to-host assignment logic into scheduler. Local test
setup uses MiniLLama.

Change-Id: Ic7b0fe43de52d30f4207b4e65cce7e6a294e54e1
[CDH5->CDH4] Fixed reservation from MiniLlama by translating hosts of resource requests from impalad hostports to Hadoop DN hostports.

Change-Id: I7a9a26ec4309710f0ad62a1bd18fb076fe6dd120
[CDH5->CDH4] Add PlanFragmentExecutor thread and HdfsScanNode scanners to cgroups

This patch plumbs through the resource_id from Llama via the runtime
state.

Change-Id: Ia4c7a1b1f6a1b78c4a35e3fc751416bf9b2f20f8
[CDH5->CDH4] Enforcing reserved memory resources via mem limits.
Fixed codepath with rm disabled. Set enable_rm to false by default.

Change-Id: I3bf2d0525d91243ec3c0ea048b0c03680befcda2

Conflicts:
	be/src/runtime/runtime-state.cc
[CDH5->CDH4] Resource requests now use IPs for the MiniLlama and hostnames for the Llama.

Change-Id: Ifaedabc5ae7cf513c9c2131e071295f093c5bd12
[CDH5->CDH4] Added more diagnostics for debugging.

Change-Id: Ida5b61ca47e5e7e3a4192864066966eadb926037
[CDH5->CDH4] Translating hostports of impalads to network addresses suitable for identifying
resources across interactions with the Llama. The MiniLlama expectes IP:port of
Hadoop DNs, whereas the regular Llama only deals with the hostnames of Yarn NMs
(stripping away the port of resource locations in reservation responses).

Change-Id: I5ebd431336cda4f06df93cfa3fea4a37d1102b63
[CDH5->CDH4] Bugfix and more diagnostics.

Change-Id: I2a6b93b685b535ea5c270c29bd2ba6c909c4f12d
[CDH5->CDH4] Using MiniLlama's --write-hdfs-conf to dump the MiniDfs conf for our test setup.

Change-Id: I238f375bda4ef95fa3d5ae9a29bd1dfc2aa3e401
[CDH5->CDH4] Impala creates and manages its own CGroups instead of using the Yarn-NM provided ones.

Change-Id: Id09ba2641ad33fbc109eea2dd6fe80b1863b5cac
[CDH5->CDH4] Read default pool configuration from file

Change-Id: I1fa75670647dab2839648ae10cd85cbbe121bddf
Reviewed-on: http://gerrit.ent.cloudera.com:8080/593
Reviewed-by: Alex Behm <alex.behm@cloudera.com>
Tested-by: Henry Robinson <henry@cloudera.com>
[CDH5->CDH4] Setting proper cgroup CPU shares based on the reserved resource.

Change-Id: I58992b11e71ed7ad7ea7639050d74fd3eaa4d1d1
[CDH5->CDH4] Update file format for pool conf to include headers

Change-Id: If7f3cf79b51980e8b91bd27e532b6c44fa804296
Reviewed-on: http://gerrit.ent.cloudera.com:8080/597
Reviewed-by: Henry Robinson <henry@cloudera.com>
Tested-by: Henry Robinson <henry@cloudera.com>
[CDH5->CDH4] Included the Yarn Pool and the reservation wait time in the query runtime profile.

Change-Id: I6872674f0808de571c37eb5f03ba47f41e2ff67e
[CDH5->CDH4] Make resource broker metrics consistent with other metrics.

Change-Id: Ie2c6402761a2e53d3f931c318fce1418e3526e4b
[CDH5->CDH4] Properly handling lost resources by cancelling all affected queries.
Queries now contain an informative status if they were cancelled
due to preemption of lost resources.

Change-Id: If970fd857711658e9139ba371e2b6afc8fdaddf1
[CDH5->CDH4] Re-registering resource brokers with Llama if Llama restarts.
All in-flight queries will be blocked until re-registration succeeds
or until a timeout has been reached.

Change-Id: I9c22c9d3a2deff92b227065974109715a1b18595
[CDH5->CDH4] CDH-14863: Fixed a bug where Impala did not release reservations of timed out reservation requests.
Improved error reporting for queries whose reservation request timed out.

Change-Id: I1ff5d20b7072e5d7f38a1b9fe672d91c274e2025
[CDH5->CDH4] Temporarily disable flaky CatalogTests related to Hive table/column stats.

Change-Id: Iaef313db734de0f1c7bc11e3e6ea6b14bd7d87db
[CDH5->CDH4] Handle broken pipes in Llama registration.

Change-Id: If862df4274408959a0febd12f472bf13c2e23882