[CDH4] Bump version to 1.5.0-cdh4

Change-Id: I2342a7de4a9dc6642d26983dbded181ee8edf9e7
Reviewed-on: http://gerrit.ent.cloudera.com:8080/2982
Reviewed-by: Alex Behm <alex.behm@cloudera.com>
Reviewed-by: Lenni Kuff <lskuff@cloudera.com>
Tested-by: Lenni Kuff <lskuff@cloudera.com>
IMPALA-1035: Aggregation estimated row size is not correct

This commit fixes IMPALA-1035 where the row size estimate of an agg plan
node is not correct. To fix this issue, we make sure that the stats
associated with the materialized tuple of each Plan node are correctly
populated. This commit also fixes the row size estimation for the Sort
node. The second fix in this commit is wrt
the host memory size estimation of an agg node. Currently, if there is a
having clause, we consider the selectivity of that clause to
estimate the selectivity of the aggregation and its memory requirements.
The fix is to not consider the selectivity of the having clause while
computing the memory size estimate of an agg node. The change in the row
size estimate resulted in different plans for some of the TPC-DS
queries (e.g. use partitioned join instead of broadcast).

Change-Id: I826a6f68517754077cb42393b6b6b72cbd90e76a
Reviewed-on: http://gerrit.ent.cloudera.com:8080/2965
Reviewed-by: Dimitris Tsirogiannis <dtsirogiannis@cloudera.com>
Tested-by: jenkins
Add 'summary' to shell

Users can now type 'summary' in the Impala shell after a query executes
to get a breakdown of the work done by each part of the query plan.

Change-Id: Ia6a43429ffc7778f3c2c8fcbf45d83828263c2ab
Reviewed-on: http://gerrit.ent.cloudera.com:8080/2963
Tested-by: jenkins
Reviewed-by: Henry Robinson <henry@cloudera.com>
Do not print exec summary if it has not been initialized.

Change-Id: I9cade74541193e7874d21540ad989aa82cf00506
Reviewed-on: http://gerrit.ent.cloudera.com:8080/2986
Reviewed-by: Alex Behm <alex.behm@cloudera.com>
Tested-by: jenkins
IMPALA-1039: Handling a corner case in Parquet metadata expected rows validation.

IMPALA-1022 introduced a validation of the expected number of rows in Parquet metadata,
but it was not handling correctly the corner case where the expected number of rows is
a multiple of the row batch size. In that case, it was erroneously trying to write one
more row in the batch and was causing memory error (asan).
This batch handles this corner case, by not attempting to read one more additional row
when the scanner reaches both the end of expected number of rows and the end of the
row batch.

Change-Id: I45e8dc4f25bb4af6cd72c1e14e578a5e001957a1
Reviewed-on: http://gerrit.ent.cloudera.com:8080/2989
Reviewed-by: Nong Li <nong@cloudera.com>
Tested-by: jenkins
IMPALA-1036: Exit gracefully for misconfigured scratch directories.

Log an error if a scratch directory does not exist, is not a directory,
is not writable etc.
Log a warning if there is less than 1GB (arbitrarily chosen) of
available space on a particular configured disk.
Move TmpFileMgr initialization from common runtime to ImpalaServer.
Also fixes bug where an invalid disk id is assigned to a WriteRange.
Similar to HdfsScanNode::AllocateScanRange, a random disk id is assigned.

Change-Id: I869c005485b0e7066cbe90f9d5cb20b431fdd025
Reviewed-on: http://gerrit.ent.cloudera.com:8080/2961
Reviewed-by: Srinath Shankar <sshankar@cloudera.com>
Tested-by: jenkins