You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by ap...@apache.org on 2016/09/22 22:33:11 UTC
hbase git commit: HBASE-15315 Remove always set super user call as
high priority (Yong Zhang)
Repository: hbase
Updated Branches:
refs/heads/branch-1.2 e382b2c9f -> 32a7f2c4b
HBASE-15315 Remove always set super user call as high priority (Yong Zhang)
Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/32a7f2c4
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/32a7f2c4
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/32a7f2c4
Branch: refs/heads/branch-1.2
Commit: 32a7f2c4b80b4d5f05889f1669aa1538450b6d7a
Parents: e382b2c
Author: Elliott Clark <ec...@apache.org>
Authored: Tue Mar 1 15:34:02 2016 -0800
Committer: Andrew Purtell <ap...@apache.org>
Committed: Thu Sep 22 15:12:07 2016 -0700
----------------------------------------------------------------------
.../AnnotationReadingPriorityFunction.java | 14 -------------
.../hbase/regionserver/TestPriorityRpc.java | 22 --------------------
2 files changed, 36 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hbase/blob/32a7f2c4/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/AnnotationReadingPriorityFunction.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/AnnotationReadingPriorityFunction.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/AnnotationReadingPriorityFunction.java
index cfdbce0..7084f56 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/AnnotationReadingPriorityFunction.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/AnnotationReadingPriorityFunction.java
@@ -44,7 +44,6 @@ import org.apache.hadoop.hbase.protobuf.generated.RPCProtos.RequestHeader;
import com.google.common.annotations.VisibleForTesting;
import com.google.protobuf.Message;
import com.google.protobuf.TextFormat;
-import org.apache.hadoop.hbase.security.Superusers;
import org.apache.hadoop.hbase.security.User;
/**
@@ -177,19 +176,6 @@ public class AnnotationReadingPriorityFunction implements PriorityFunction {
if (priorityByAnnotation >= 0) {
return priorityByAnnotation;
}
-
- // all requests executed by super users have high QoS
- try {
- if (Superusers.isSuperUser(user)) {
- return HConstants.ADMIN_QOS;
- }
- } catch (IllegalStateException ex) {
- // Not good throwing an exception out of here, a runtime anyways. Let the query go into the
- // server and have it throw the exception if still an issue. Just mark it normal priority.
- if (LOG.isTraceEnabled()) LOG.trace("Marking normal priority after getting exception=" + ex);
- return HConstants.NORMAL_QOS;
- }
-
return getBasePriority(header, param);
}
http://git-wip-us.apache.org/repos/asf/hbase/blob/32a7f2c4/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestPriorityRpc.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestPriorityRpc.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestPriorityRpc.java
index a0fabcb..f201d57 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestPriorityRpc.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestPriorityRpc.java
@@ -115,28 +115,6 @@ public class TestPriorityRpc {
}
@Test
- public void testQosFunctionForRequestCalledBySuperUser() throws Exception {
- RequestHeader.Builder headerBuilder = RequestHeader.newBuilder();
- headerBuilder.setMethodName("foo");
- RequestHeader header = headerBuilder.build();
- PriorityFunction qosFunc = regionServer.rpcServices.getPriority();
-
- //test superusers
- regionServer.conf.set(Superusers.SUPERUSER_CONF_KEY, "samplesuperuser");
- Superusers.initialize(regionServer.conf);
- assertEquals(HConstants.ADMIN_QOS, qosFunc.getPriority(header, null,
- User.createUserForTesting(regionServer.conf, "samplesuperuser",
- new String[]{"somegroup"})));
-
- //test supergroups
- regionServer.conf.set(Superusers.SUPERUSER_CONF_KEY, "@samplesupergroup");
- Superusers.initialize(regionServer.conf);
- assertEquals(HConstants.ADMIN_QOS, qosFunc.getPriority(header, null,
- User.createUserForTesting(regionServer.conf, "regularuser",
- new String[]{"samplesupergroup"})));
- }
-
- @Test
public void testQosFunctionForScanMethod() throws IOException {
RequestHeader.Builder headerBuilder = RequestHeader.newBuilder();
headerBuilder.setMethodName("Scan");