Fix bad query expiration if --idle_query_timeout=0

Query expiration should take the minimum of --idle_query_timeout and
QUERY_TIMEOUT_S as the timeout for each query, but if either is 0 it
should be ignored.

This patch fixes that behaviour - previously if --idle_query_timeout was
0 it was taken as the timeout (and queries with 0 timeout are considered
not to be eligible for expiration).

There's a new test which confirms the fix.

Change-Id: Ieb960866b818a630f3d3c427d9454ca2ffd3f87c
Reviewed-on: http://gerrit.sjc.cloudera.com:8080/3913
Reviewed-by: Henry Robinson <henry@cloudera.com>
Reviewed-by: Daniel Hecht <dhecht@cloudera.com>
Tested-by: jenkins
IMPALA-1162: Add GetExecSummary() and GetRuntimeProfile() to HS2

This patch adds RPCs for GetExecSummary() and GetRuntimeProfile() to the
Impala HS2 service, to get reporting parity with the Beeswax service
implementation.

Change-Id: I966a85854e5a657a26c226cc0e68e053fb2aa6c2
Reviewed-on: http://gerrit.sjc.cloudera.com:8080/3902
Reviewed-by: Alex Behm <alex.behm@cloudera.com>
Tested-by: jenkins
Buffered tuple stream fixes.

Change-Id: I62cbe304c9fd9b5909ccf4bc9e91db37d3ef09a1
Reviewed-on: http://gerrit.sjc.cloudera.com:8080/3900
Reviewed-by: Nong Li <nong@cloudera.com>
Tested-by: jenkins
Adding support for {right, full} outer joins to the partitioned hash join implementation

Unlike the old hash-join implementation, right and full outer use the same codepaths as
the other joins. That makes it much easier to codegen. Also, removed the code from InitGetNext() because it was a duplicate of the normal probe batch processing and it was bug-prone.

Also, fixing a bug on partitioned hash join that was calling EvalConjuncts only on
other_conjuncts_, but not conjuncts_; and renaming some functions and struct variables.

Change-Id: Ie97f62467efca62d64b7b5d3eac6efcfb03408d9
Reviewed-on: http://gerrit.sjc.cloudera.com:8080/3835
Reviewed-by: Ippokratis Pandis <ipandis@cloudera.com>
Tested-by: jenkins
Add thrift, jflex, yacc files to cscope file list.

I find it useful to have these indexed by cscope.  Also, gitignore
files generated with cscope -q (inverted index).

Change-Id: I8d5bcd34706c40357b94337db4b72dccecdecbd9
Reviewed-on: http://gerrit.sjc.cloudera.com:8080/3910
Reviewed-by: Nong Li <nong@cloudera.com>
Tested-by: Daniel Hecht <dhecht@cloudera.com>
CDH-20513: Crash during vcore acquisition callback

This patch fixes a bug where the RM vcore acquisition thread might call
into HdfsScanNode::ThreadTokenAvailableCb() after the scan node has been
destroyed. Now, during Close() the scan node removes the callback it had
previously registered. This ensures that the callback will never be
invoked after Close() completes.

Change-Id: Icb50c14a45c9c67a52ecb6e8a3324b0721a5a431
Reviewed-on: http://gerrit.sjc.cloudera.com:8080/3889
Reviewed-by: Henry Robinson <henry@cloudera.com>
Tested-by: jenkins
(cherry picked from commit b7d4207779d375b723ab624910cee3048b0ed895)
Reviewed-on: http://gerrit.sjc.cloudera.com:8080/3926
Partitioned aggregation.

Change-Id: Ie3acfa04e359194b5b40011107910293f1e5609e
Reviewed-on: http://gerrit.sjc.cloudera.com:8080/3788
Tested-by: jenkins
Reviewed-by: Nong Li <nong@cloudera.com>
Fixes to PHJ for case where we need to spill.

The current code has some bugs. The queries still fail but now with the
"too much skew" error which is expected since we don't change the hash
function.

This unblocks tests (making it far enough to that error exercises a lot
of the code).

Change-Id: I877d91d60761d019aec97f02a8967697736eb79c
Reviewed-on: http://gerrit.sjc.cloudera.com:8080/3914
Reviewed-by: Nong Li <nong@cloudera.com>
Tested-by: jenkins