title: Hive impersonation not working with jdbc
body: <p>I'm trying to connect to a Hive Server implemented through Cloudera with the jdbc-connector and the connection fails at the impersonation point :</p>
  
  <pre><code>14/05/13 10:45:10 INFO hive.metastore: Connected to metastore.
  14/05/13 10:45:10 WARN conf.Configuration: org.apache.hadoop.hive.conf.LoopingByteArrayInputStream@2f490758:an attempt to override final parameter: mapreduce.job.end-notification.max.retry.interval;  Ignoring.
  14/05/13 10:45:10 WARN conf.Configuration: org.apache.hadoop.hive.conf.LoopingByteArrayInputStream@2f490758:an attempt to override final parameter: mapreduce.job.end-notification.max.attempts;  Ignoring.
  org.apache.hive.service.cli.HiveSQLException: No username provided for impersonation
      at org.apache.hive.service.cli.session.HiveSessionImplwithUGI.setSessionUGI(HiveSessionImplwithUGI.java:57)
      at org.apache.hive.service.cli.session.HiveSessionImplwithUGI.&lt;init&gt;(HiveSessionImplwithUGI.java:49)
      at org.apache.hive.service.cli.session.SessionManager.openSession(SessionManager.java:83)
      at org.apache.hive.service.cli.CLIService.openSessionWithImpersonation(CLIService.java:118)
      at org.apache.hive.service.cli.thrift.ThriftCLIService.OpenSession(ThriftCLIService.java:157)
      at org.apache.hive.jdbc.HiveConnection.openSession(HiveConnection.java:255)
      at org.apache.hive.jdbc.HiveConnection.&lt;init&gt;(HiveConnection.java:150)
      at org.apache.hive.jdbc.HiveDriver.connect(HiveDriver.java:106)
      at java.sql.DriverManager.getConnection(DriverManager.java:664)
      at java.sql.DriverManager.getConnection(DriverManager.java:270)
      [...]
  java.sql.SQLException: No username provided for impersonation
  </code></pre>
  
  <p>I've checked the cloudera web interface and impersonation in enabled on hive, and the proxy settings for hdfs and MapReduce are correctly set to "*". My hive-site.xml also contains</p>
  
  <pre><code>&lt;property&gt;
    &lt;name&gt;hive.server2.enable.impersonation&lt;/name&gt;
    &lt;value&gt;true&lt;/value&gt;
  &lt;/property&gt;
  </code></pre>
  
  <p>Does anyone know where that could come from?</p>