IMP-1106. Allow libevent location to be overridden in Thrift dependency build

Change-Id: Ia4d92bb4bdfcb7ba29a36904afdb9fd5e398307d
Reviewed-on: http://gerrit.ent.cloudera.com:8080/968
Reviewed-by: Henry Robinson <henry@cloudera.com>
Reviewed-by: Sean Mackrory <sean@cloudera.com>
Tested-by: Sean Mackrory <sean@cloudera.com>
Added COMPUTE STATS command for gathering table and column stats.

A compute stats command computes the table and column stats for a given
table and persists them in the metastore.
The table stats consist of the per-partition and per-table row count.
The column stats are computed on a per-table basis and consist of the
number of distinct values and the number of NULLs per column.

This patch introduces a new 'child query' concept that
compute stats utilizes. Child queries are cancelled
if the parent query is cancelled. A compute stats stmt is
executed by the following query hirarchy:
parent: compute stats query (DDL)
- child: compute table stats query (QUERY)
- child: compute column stats query (QUERY)

The new child query concept is necessary to decouple child query fetches
from parent query fetches, i.e., we could not execute a child query as
part of the original compute stats query, because then a client could
fetch the results we need for updating the Metastore statistics. The
reason why our existing CTAS works without this decoupling
is that its insert 'child query' is not fetchable.

Change-Id: I560533e3cb09bcbbdb3eea7fcf0b460bc6b36dcd
Reviewed-on: http://gerrit.ent.cloudera.com:8080/873
Reviewed-by: Alex Behm <alex.behm@cloudera.com>
Tested-by: jenkins
IMP-1147. Impala build fails: PIC_LIB_PATH: unbound variable

Change-Id: Ifb173b553b9a52392b5d7caf3630032b89e89c2d
Reviewed-on: http://gerrit.ent.cloudera.com:8080/992
Reviewed-by: Sean Mackrory <sean@cloudera.com>
Tested-by: Sean Mackrory <sean@cloudera.com>
Remove bad quotes from thrift configure script

Change-Id: Id671f5366813378ead9362f67b082b7af705b005
Reviewed-on: http://gerrit.ent.cloudera.com:8080/994
Reviewed-by: Matthew Jacobs <mj@cloudera.com>
Tested-by: Henry Robinson <henry@cloudera.com>
Fix possibility of deadlock in child query cancellation.

Child query's Cancel() held a lock while calling into impala server, resulting
in the possibility of a classic deadlock situation (the child query lock_ and
QueryExecState lock could be obtained in different orders in different code paths)

Change-Id: I02f042d410e3a372bf9fd5dd139ac982cb79df3a
Reviewed-on: http://gerrit.ent.cloudera.com:8080/997
Reviewed-by: Alex Behm <alex.behm@cloudera.com>
Tested-by: jenkins
Remove deadlock if GetResultSetMetadata() is called on closed session

This patch fixes a bug where, if withSession() returned an
error, GetResultSetMetadata() could return without releasing a query
exec state's lock.

The exact order of events required to trigger the bug is unlikely, but
not unimaginable:

* GetResultsMetadata() retrieves a query exec state and takes its lock.
* The associated session expires or closes for some
  reason (i.e. disconnection)
* GetResultsMetadata() calls withSession() on that session, realises
  the session is no longer valid and returns without releasing the exec
  state lock.

While possible, this sequence is unlikely if session-expiry is *not*
enabled, because the session would have to have been closed either
explicitly (via CloseSession()) or implicitly (via disconnect) on a
separate connection to the one that GetResultsMetadata() is sent on.

Change-Id: I4b7481b1c87a25a7801d8a5736bfc0c9980384cf
Reviewed-on: http://gerrit.ent.cloudera.com:8080/999
Reviewed-by: Alex Behm <alex.behm@cloudera.com>
Tested-by: jenkins
IMPALA-478: Create a Hash builtin function

Adds a builtin FNV hash function. Also renames HashUtil::FvnHash to HashUtil::FnvHash
since it was spelled incorrectly.

Change-Id: Ic6dbfbce58ceeded72442ff22d3cd04f1010ea78
Reviewed-on: http://gerrit.ent.cloudera.com:8080/995
Reviewed-by: Matthew Jacobs <mj@cloudera.com>
Tested-by: Matthew Jacobs <mj@cloudera.com>
Tested-by: jenkins
Combine util/logging.h and common/logging.h

We've had two separate logging headers for a while, with no obvious
benefit. This patch moves everything to common/logging.h.

Change-Id: I8e5eda6e8453b3d33c89315d0d03ea7642a01822
Reviewed-on: http://gerrit.ent.cloudera.com:8080/993
Reviewed-by: Henry Robinson <henry@cloudera.com>
Tested-by: jenkins
Update FE pom to use datanucleus 3.2 which is required by CDH4.5 Hive

Change-Id: I1c362eb68113e075eb72db71c2a94d74ceb7427f
Reviewed-on: http://gerrit.ent.cloudera.com:8080/987
Tested-by: jenkins
Reviewed-by: Lenni Kuff <lskuff@cloudera.com>
Do not append any JARs from thirdparty/ to the classpath

Change-Id: Id68c1bc118a1b8efebb6d035ca94a41cf1c4ded1
Reviewed-on: http://gerrit.ent.cloudera.com:8080/1005
Reviewed-by: Alex Behm <alex.behm@cloudera.com>
Tested-by: jenkins
Added [shuffle]/[noshuffle] plan hints for forcing/preventing repartitioning before an insert.

Change-Id: I0647366815f4488cabbcb1fc7bc3cf851960c44e
Reviewed-on: http://gerrit.ent.cloudera.com:8080/1007
Reviewed-by: Alex Behm <alex.behm@cloudera.com>
Tested-by: jenkins
Additional fe and testdata pom.xml cleanup

This change cleans up our FE pom.xml file by removing unneeded
dependencies and system dependencies (system dependencies are now pulled in
from the Maven release repository).

The upside is that our pom is cleaner and it will also help reduce the likelihood of
broken dependencies since Maven will pull in the right versions.  The downside
is that we now pull in quite a few more JARs.

Note: I was unable to find release artifacts for Sentry and Parquet so I leaving
those as "system" for now.

Change-Id: I0b917b09a02243d78d89747591ab6bccacf7cf38

Saving changes

Change-Id: I3697a7b44884c40e077b3e354fef76625e1b881d
Reviewed-on: http://gerrit.ent.cloudera.com:8080/1011
Reviewed-by: Lenni Kuff <lskuff@cloudera.com>
Tested-by: jenkins