title: Grant Permission in Hive
body: <p>I'm trying to set Grant Permissions on Hive 14.0 using Hortonworks Sandbox HDP2.2 as one-node-system. This questions goes similar to unanswered question from march: <a href="https://stackoverflow.com/questions/29206980/grant-permissions-in-hive-does-not-work-on-hdp2-2">grant permissions in hive does not work on hdp2.2</a>.</p>
  
  <p>I followed the configuration steps of the <a href="https://cwiki.apache.org/confluence/display/Hive/SQL+Standard+Based+Hive+Authorization" rel="nofollow noreferrer">a Hive-Wiki</a>.</p>
  
  <p>After log into hive shell (ssh with root) I tried:</p>
  
  <pre><code>CREATE ROLE testing;
  </code></pre>
  
  <blockquote>
    <p>FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. Failed to retrieve roles for root: Metastore Authorization api invocation for remote metastore is disabled in this configuration.</p>
  </blockquote>
  
  <p>If I try the same with another user with hue / beeswax the query finished. If I do</p>
  
  <pre><code>SHOW ROLES;
  </code></pre>
  
  <p>I got this error, without any log details:</p>
  
  <blockquote>
    <p>Expected state FINISHED, but found ERROR</p>
  </blockquote>
  
  <p>My Settings are these (made tags with blanc to show them here)</p>
  
  <ul>
  <li><p><strong>hive-site.xml</strong> (those which are listed in the hive-wiki-link)</p>
  
  <pre><code>&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.users.in.admin.role&lt;/name&gt;
    &lt;value&gt;hue,hive&lt;/value&gt;
  &lt;/property&gt;
  &lt;property&gt;
    &lt;name&gt;hive.security.metastore.authorization.manager&lt;/name&gt;
    &lt;value&gt;org.apache.hadoop.hive.ql.security.authorization.StorageBasedAuthorizationProvider,org.apache.hadoop.hive.ql.security.authorization.MetaStoreAuthzAPIAuthorizerEmbedOnly&lt;/value&gt;
  &lt;/property&gt;
  &lt;property&gt;
    &lt;name&gt;hive.security.authorization.manager&lt;/name&gt;
    &lt;value&gt;org.apache.hadoop.hive.ql.security.authorization.plugin.sqlstd.SQLStdConfOnlyAuthorizerFactory&lt;/value&gt;
  &lt;/property&gt;
  </code></pre></li>
  <li><p><strong>hiveserver2-site.xml</strong> (all settings)</p>
  
  <pre><code>&lt;property&gt;
      &lt;name&gt;hive.security.authorization.enabled&lt;/name&gt;
      &lt;value&gt;true&lt;/value&gt;
  &lt;/property&gt;
  &lt;property&gt;
      &lt;name&gt;hive.security.authorization.manager&lt;/name&gt;
      &lt;value&gt;org.apache.hadoop.hive.ql.security.authorization.plugin.sqlstd.SQLStdHiveAuthorizerFactory&lt;/value&gt;
  &lt;/property&gt;
  &lt;property&gt;
      &lt;name&gt;hive.security.authenticator.manager&lt;/name&gt;
      &lt;value&gt;org.apache.hadoop.hive.ql.security.SessionStateUserAuthenticator&lt;/value&gt;
  &lt;/property&gt;
  &lt;property&gt;
      &lt;name&gt;hive.metastore.uris&lt;/name&gt;
      &lt;value&gt;''&lt;/value&gt;
  &lt;/property&gt;
  &lt;property&gt;
      &lt;name&gt;hive.conf.restricted.list&lt;/name&gt;
      &lt;value&gt;hive.security.authorization.enabled,hive.security.authorization.manager,hive.security.authenticator.manager&lt;/value&gt;
  &lt;/property&gt;
  </code></pre></li>
  </ul>
  
  <p>Hope anyone has an idea.</p>
  
  <p>[Edit]The settings in <em>hive-site.xml</em> were already set - I made there no changes.</p>
  
  <p>[Edit2]After change settings I did <em>hiveserver2 restart</em> and performed a reboot of the sandbox.</p>
  
  <p>[Edit3]Error message comes to every user, not only for root (u can see it at error message). If I try users with admin role (hive-site.xml) like "hive", I got the same error.</p>