hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From the...@apache.org
Subject svn commit: r1584540 - in /hive/branches/branch-0.13/ql/src: java/org/apache/hadoop/hive/ql/processors/CommandProcessorFactory.java test/queries/clientnegative/authorization_addjar.q test/results/clientnegative/authorization_addjar.q.out
Date Fri, 04 Apr 2014 07:09:21 GMT
Author: thejas
Date: Fri Apr  4 07:09:20 2014
New Revision: 1584540

URL: http://svn.apache.org/r1584540
Log:
revert HIVE-6827 to fix unit test failure

Removed:
    hive/branches/branch-0.13/ql/src/test/queries/clientnegative/authorization_addjar.q
    hive/branches/branch-0.13/ql/src/test/results/clientnegative/authorization_addjar.q.out
Modified:
    hive/branches/branch-0.13/ql/src/java/org/apache/hadoop/hive/ql/processors/CommandProcessorFactory.java

Modified: hive/branches/branch-0.13/ql/src/java/org/apache/hadoop/hive/ql/processors/CommandProcessorFactory.java
URL: http://svn.apache.org/viewvc/hive/branches/branch-0.13/ql/src/java/org/apache/hadoop/hive/ql/processors/CommandProcessorFactory.java?rev=1584540&r1=1584539&r2=1584540&view=diff
==============================================================================
--- hive/branches/branch-0.13/ql/src/java/org/apache/hadoop/hive/ql/processors/CommandProcessorFactory.java
(original)
+++ hive/branches/branch-0.13/ql/src/java/org/apache/hadoop/hive/ql/processors/CommandProcessorFactory.java
Fri Apr  4 07:09:20 2014
@@ -28,12 +28,7 @@ import java.util.Map;
 import java.util.Set;
 
 import org.apache.hadoop.hive.conf.HiveConf;
-import org.apache.hadoop.hive.conf.HiveConf.ConfVars;
 import org.apache.hadoop.hive.ql.Driver;
-import org.apache.hadoop.hive.ql.metadata.HiveException;
-import org.apache.hadoop.hive.ql.metadata.HiveUtils;
-import org.apache.hadoop.hive.ql.security.authorization.DefaultHiveAuthorizationProvider;
-import org.apache.hadoop.hive.ql.security.authorization.plugin.HiveAuthorizerFactory;
 import org.apache.hadoop.hive.ql.session.SessionState;
 
 /**
@@ -63,18 +58,8 @@ public final class CommandProcessorFacto
       conf = new HiveConf();
     }
     Set<String> availableCommands = new HashSet<String>();
-    if (!HiveAuthorizerFactory.class.isAssignableFrom
-      (conf.getClass(ConfVars.HIVE_AUTHORIZATION_MANAGER.varname,DefaultHiveAuthorizationProvider.class)))
{
-      // we are not on authV2, add processors.
-      for (String availableCommand : conf.getVar(HiveConf.ConfVars.HIVE_SECURITY_COMMAND_WHITELIST).split(","))
{
-        availableCommands.add(availableCommand.toLowerCase().trim());
-      }
-    }
-
-    if (conf.getBoolVar(ConfVars.HIVE_IN_TEST)) {
-      // because test case uses these.
-      availableCommands.add("set");
-      availableCommands.add("dfs");
+    for (String availableCommand : conf.getVar(HiveConf.ConfVars.HIVE_SECURITY_COMMAND_WHITELIST).split(","))
{
+      availableCommands.add(availableCommand.toLowerCase().trim());
     }
     if (!availableCommands.contains(cmd[0].trim().toLowerCase())) {
       throw new SQLException("Insufficient privileges to execute " + cmd[0], "42000");



Mime
View raw message