hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmhs...@apache.org
Subject [23/50] [abbrv] hbase git commit: HBASE-12973 RegionCoprocessorEnvironment should provide HRegionInfo directly
Date Sun, 22 Feb 2015 20:55:56 GMT
HBASE-12973 RegionCoprocessorEnvironment should provide HRegionInfo directly


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/1e6afa2f
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/1e6afa2f
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/1e6afa2f

Branch: refs/heads/hbase-11339
Commit: 1e6afa2f3c7b8515146e7bf2bce032f8f65da7ff
Parents: 1f830be
Author: Andrew Purtell <apurtell@apache.org>
Authored: Mon Feb 9 17:57:40 2015 -0800
Committer: Andrew Purtell <apurtell@apache.org>
Committed: Mon Feb 9 17:57:40 2015 -0800

----------------------------------------------------------------------
 .../hbase/coprocessor/RegionCoprocessorEnvironment.java       | 7 +++++--
 .../hadoop/hbase/regionserver/RegionCoprocessorHost.java      | 5 +++++
 .../hadoop/hbase/security/token/TestTokenAuthentication.java  | 6 ++++++
 3 files changed, 16 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/1e6afa2f/hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/RegionCoprocessorEnvironment.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/RegionCoprocessorEnvironment.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/RegionCoprocessorEnvironment.java
index db6312f..ccb16bf 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/RegionCoprocessorEnvironment.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/RegionCoprocessorEnvironment.java
@@ -25,6 +25,7 @@ import org.apache.hadoop.hbase.classification.InterfaceAudience;
 import org.apache.hadoop.hbase.classification.InterfaceStability;
 import org.apache.hadoop.hbase.CoprocessorEnvironment;
 import org.apache.hadoop.hbase.HBaseInterfaceAudience;
+import org.apache.hadoop.hbase.HRegionInfo;
 import org.apache.hadoop.hbase.regionserver.HRegion;
 import org.apache.hadoop.hbase.regionserver.RegionServerServices;
 
@@ -34,10 +35,12 @@ public interface RegionCoprocessorEnvironment extends CoprocessorEnvironment
{
   /** @return the region associated with this coprocessor */
   HRegion getRegion();
 
+  /** @return region information for the region this coprocessor is running on */
+  HRegionInfo getRegionInfo();
+
   /** @return reference to the region server services */
   RegionServerServices getRegionServerServices();
 
   /** @return shared data between all instances of this coprocessor */
-  ConcurrentMap<String, Object> getSharedData();
-
+  ConcurrentMap<String, Object> getSharedData(); 
 }

http://git-wip-us.apache.org/repos/asf/hbase/blob/1e6afa2f/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RegionCoprocessorHost.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RegionCoprocessorHost.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RegionCoprocessorHost.java
index 87c8b9e..a32a478 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RegionCoprocessorHost.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RegionCoprocessorHost.java
@@ -168,6 +168,11 @@ public class RegionCoprocessorHost
       return latencies;
     }
 
+    @Override
+    public HRegionInfo getRegionInfo() {
+      return region.getRegionInfo();
+    }
+
   }
 
   static class TableCoprocessorAttribute {

http://git-wip-us.apache.org/repos/asf/hbase/blob/1e6afa2f/hbase-server/src/test/java/org/apache/hadoop/hbase/security/token/TestTokenAuthentication.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/security/token/TestTokenAuthentication.java
b/hbase-server/src/test/java/org/apache/hadoop/hbase/security/token/TestTokenAuthentication.java
index 22f1a24..3bd20b2 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/security/token/TestTokenAuthentication.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/security/token/TestTokenAuthentication.java
@@ -40,6 +40,7 @@ import org.apache.hadoop.hbase.CoordinatedStateManager;
 import org.apache.hadoop.hbase.Coprocessor;
 import org.apache.hadoop.hbase.HBaseTestingUtility;
 import org.apache.hadoop.hbase.HConstants;
+import org.apache.hadoop.hbase.HRegionInfo;
 import org.apache.hadoop.hbase.Server;
 import org.apache.hadoop.hbase.ServerName;
 import org.apache.hadoop.hbase.TableName;
@@ -244,6 +245,11 @@ public class TestTokenAuthentication {
         public ClassLoader getClassLoader() {
           return Thread.currentThread().getContextClassLoader();
         }
+
+        @Override
+        public HRegionInfo getRegionInfo() {
+          return null;
+        }
       });
 
       started = true;


Mime
View raw message