title: AuthorizationException: User not allowed to impersonate User
body: <p>I wrote a spark job which registers a temp table
  and when I expose it via beeline (JDBC client)</p>
  
  <pre><code>$ ./bin/beeline
  beeline&gt; !connect jdbc:hive2://IP:10003 -n ram -p xxxx
  0: jdbc:hive2://IP&gt; show tables;
  +---------------------------------------------+--------------+---------------------+
  |                    tableName                          | isTemporary  |
  +---------------------------------------------+--------------+---------------------+
  | f238                                                        | true              |
  +---------------------------------------------+--------------+---------------------+
  2 rows selected (0.309 seconds)
  0: jdbc:hive2://IP&gt;
  </code></pre>
  
  <p>I can view the table. When querying I get this error message</p>
  
  <pre><code>0: jdbc:hive2://IP&gt; select * from f238;
  Error: org.apache.hadoop.ipc.RemoteException(org.apache.hadoop.security.authorize.AuthorizationException): User: ram is not allowed to impersonate ram (state=,code=0)
  0: jdbc:hive2://IP&gt;
  </code></pre>
  
  <p>I have this in hive-site.xml,</p>
  
  <pre><code>&lt;property&gt;
    &lt;name&gt;hive.metastore.sasl.enabled&lt;/name&gt;
    &lt;value&gt;false&lt;/value&gt;
    &lt;description&gt;If true, the metastore Thrift interface will be secured with SASL. Clients must authenticate with Kerberos.&lt;/description&gt;
  &lt;/property&gt;
  
  &lt;property&gt;
    &lt;name&gt;hive.server2.enable.doAs&lt;/name&gt;
    &lt;value&gt;false&lt;/value&gt;
  &lt;/property&gt;
  
  &lt;property&gt;
    &lt;name&gt;hive.server2.authentication&lt;/name&gt;
    &lt;value&gt;NONE&lt;/value&gt;
  &lt;/property&gt;
  </code></pre>
  
  <p>I have this in core-site.xml,</p>
  
  <pre><code>&lt;property&gt;
    &lt;name&gt;hadoop.proxyuser.hive.groups&lt;/name&gt;
    &lt;value&gt;*&lt;/value&gt;
  &lt;/property&gt;
  
  &lt;property&gt;
    &lt;name&gt;hadoop.proxyuser.hive.hosts&lt;/name&gt;
    &lt;value&gt;*&lt;/value&gt;
  &lt;/property&gt;
  </code></pre>
  
  <p>full log</p>
  
  <pre><code>ERROR [pool-19-thread-2] thriftserver.SparkExecuteStatementOperation: Error running hive query:
  org.apache.hive.service.cli.HiveSQLException: org.apache.hadoop.ipc.RemoteException(org.apache.hadoop.security.authorize.AuthorizationException): User: ram is not allowed to impersonate ram
          at org.apache.spark.sql.hive.thriftserver.SparkExecuteStatementOperation.runInternal(SparkExecuteStatementOperation.scala:259)
          at org.apache.spark.sql.hive.thriftserver.SparkExecuteStatementOperation$$anon$1$$anon$2.run(SparkExecuteStatementOperation.scala:171)
          at java.security.AccessController.doPrivileged(Native Method)
          at javax.security.auth.Subject.doAs(Subject.java:422)
          at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1657)
          at org.apache.spark.sql.hive.thriftserver.SparkExecuteStatementOperation$$anon$1.run(SparkExecuteStatementOperation.scala:182)
          at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
          at java.util.concurrent.FutureTask.run(FutureTask.java:266)
          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
          at java.lang.Thread.run(Thread.java:745)
  </code></pre>
  
  <p>Any idea what configuration I am missing?</p>