hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject svn commit: r1478637 [5/9] - in /hbase/trunk: hbase-client/src/main/java/org/apache/hadoop/hbase/ hbase-client/src/main/java/org/apache/hadoop/hbase/catalog/ hbase-client/src/main/java/org/apache/hadoop/hbase/client/ hbase-client/src/main/java/org/apac...
Date Fri, 03 May 2013 03:52:18 GMT
Modified: hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RequestContext.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RequestContext.java?rev=1478637&r1=1478636&r2=1478637&view=diff
==============================================================================
--- hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RequestContext.java
(original)
+++ hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RequestContext.java
Fri May  3 03:52:15 2013
@@ -21,9 +21,10 @@
 package org.apache.hadoop.hbase.ipc;
 
 import org.apache.hadoop.classification.InterfaceAudience;
-import org.apache.hadoop.hbase.IpcProtocol;
 import org.apache.hadoop.hbase.security.User;
 
+import com.google.protobuf.BlockingService;
+
 import java.net.InetAddress;
 
 /**
@@ -87,15 +88,14 @@ public class RequestContext {
    * Initializes the client credentials for the current request.
    * @param user
    * @param remoteAddress
-   * @param protocol
+   * @param service
    */
   public static void set(User user,
-      InetAddress remoteAddress,
-      Class<? extends IpcProtocol> protocol) {
+      InetAddress remoteAddress, BlockingService service) {
     RequestContext ctx = instance.get();
     ctx.user = user;
     ctx.remoteAddress = remoteAddress;
-    ctx.protocol = protocol;
+    ctx.service = service;
     ctx.inRequest = true;
   }
 
@@ -106,21 +106,20 @@ public class RequestContext {
     RequestContext ctx = instance.get();
     ctx.user = null;
     ctx.remoteAddress = null;
-    ctx.protocol = null;
+    ctx.service = null;
     ctx.inRequest = false;
   }
 
   private User user;
   private InetAddress remoteAddress;
-  private Class<? extends IpcProtocol> protocol;
+  private BlockingService service;
   // indicates we're within a RPC request invocation
   private boolean inRequest;
 
-  private RequestContext(User user, InetAddress remoteAddr,
-      Class<? extends IpcProtocol> protocol) {
+  private RequestContext(User user, InetAddress remoteAddr, BlockingService service) {
     this.user = user;
     this.remoteAddress = remoteAddr;
-    this.protocol = protocol;
+    this.service = service;
   }
 
   public User getUser() {
@@ -131,8 +130,8 @@ public class RequestContext {
     return remoteAddress;
   }
 
-  public Class<? extends IpcProtocol> getProtocol() {
-    return protocol;
+  public BlockingService getService() {
+    return this.service;
   }
 
   public boolean isInRequest() {

Modified: hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/ResponseFlag.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/ResponseFlag.java?rev=1478637&r1=1478636&r2=1478637&view=diff
==============================================================================
--- hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/ResponseFlag.java (original)
+++ hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/ResponseFlag.java Fri
May  3 03:52:15 2013
@@ -21,7 +21,7 @@ import org.apache.hadoop.classification.
 
 /**
  * Utility for managing the flag byte passed in response to a
- * {@link HBaseServer.Call}
+ * {@link RpcServer.Call}
  */
 @InterfaceAudience.Private
 class ResponseFlag {

Modified: hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcCallContext.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcCallContext.java?rev=1478637&r1=1478636&r2=1478637&view=diff
==============================================================================
--- hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcCallContext.java
(original)
+++ hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcCallContext.java
Fri May  3 03:52:15 2013
@@ -20,12 +20,10 @@ package org.apache.hadoop.hbase.ipc;
 import org.apache.hadoop.hbase.exceptions.CallerDisconnectedException;
 
 public interface RpcCallContext extends Delayable {
-
   /**
    * Throw an exception if the caller who made this IPC call has disconnected.
    * If called from outside the context of IPC, this does nothing.
    * @throws CallerDisconnectedException
    */
   void throwExceptionIfCallerDisconnected() throws CallerDisconnectedException;
-
 }



Mime
View raw message