Index: src/main/java/org/apache/hadoop/hbase/ipc/WritableRpcEngine.java =================================================================== --- src/main/java/org/apache/hadoop/hbase/ipc/WritableRpcEngine.java (revision 1383740) +++ src/main/java/org/apache/hadoop/hbase/ipc/WritableRpcEngine.java (working copy) @@ -148,7 +148,7 @@ } HbaseObjectWritable value = (HbaseObjectWritable) - client.call(new Invocation(method, args), address, + client.call(new Invocation(method, protocol, args), address, protocol, ticket, rpcTimeout); if (logDebug) { // FIGURE HOW TO TURN THIS OFF! @@ -210,7 +210,7 @@ Invocation[] invocations = new Invocation[params.length]; for (int i = 0; i < params.length; i++) - invocations[i] = new Invocation(method, params[i]); + invocations[i] = new Invocation(method, protocol, params[i]); HBaseClient client = CLIENTS.getClient(conf); try { Writable[] wrappedValues = Index: src/main/java/org/apache/hadoop/hbase/ipc/Invocation.java =================================================================== --- src/main/java/org/apache/hadoop/hbase/ipc/Invocation.java (revision 1383740) +++ src/main/java/org/apache/hadoop/hbase/ipc/Invocation.java (working copy) @@ -45,26 +45,27 @@ public Invocation() {} - public Invocation(Method method, Object[] parameters) { + public Invocation(Method method, + Class declaringClass, Object[] parameters) { this.methodName = method.getName(); this.parameterClasses = method.getParameterTypes(); this.parameters = parameters; - if (method.getDeclaringClass().equals(VersionedProtocol.class)) { + if (declaringClass.equals(VersionedProtocol.class)) { //VersionedProtocol is exempted from version check. clientVersion = 0; clientMethodsHash = 0; } else { try { - Field versionField = method.getDeclaringClass().getField("VERSION"); + Field versionField = declaringClass.getField("VERSION"); versionField.setAccessible(true); - this.clientVersion = versionField.getLong(method.getDeclaringClass()); + this.clientVersion = versionField.getLong(declaringClass); } catch (NoSuchFieldException ex) { - throw new RuntimeException("The " + method.getDeclaringClass(), ex); + throw new RuntimeException("The " + declaringClass, ex); } catch (IllegalAccessException ex) { throw new RuntimeException(ex); } - this.clientMethodsHash = ProtocolSignature.getFingerprint(method - .getDeclaringClass().getMethods()); + this.clientMethodsHash = ProtocolSignature.getFingerprint( + declaringClass.getMethods()); } } @@ -169,4 +170,4 @@ public byte getVersion() { return RPC_VERSION; } -} \ No newline at end of file +} Index: src/main/java/org/apache/hadoop/hbase/client/coprocessor/Exec.java =================================================================== --- src/main/java/org/apache/hadoop/hbase/client/coprocessor/Exec.java (revision 1383740) +++ src/main/java/org/apache/hadoop/hbase/client/coprocessor/Exec.java (working copy) @@ -64,7 +64,7 @@ byte[] row, Class protocol, Method method, Object[] parameters) { - super(method, parameters); + super(method, protocol, parameters); this.conf = configuration; this.referenceRow = row; this.protocol = protocol; Index: security/src/main/java/org/apache/hadoop/hbase/ipc/SecureRpcEngine.java =================================================================== --- security/src/main/java/org/apache/hadoop/hbase/ipc/SecureRpcEngine.java (revision 1383740) +++ security/src/main/java/org/apache/hadoop/hbase/ipc/SecureRpcEngine.java (working copy) @@ -162,7 +162,7 @@ startTime = System.currentTimeMillis(); } HbaseObjectWritable value = (HbaseObjectWritable) - client.call(new Invocation(method, args), address, + client.call(new Invocation(method, protocol, args), address, protocol, ticket, rpcTimeout); if (logDebug) { long callTime = System.currentTimeMillis() - startTime; @@ -234,7 +234,7 @@ Invocation[] invocations = new Invocation[params.length]; for (int i = 0; i < params.length; i++) - invocations[i] = new Invocation(method, params[i]); + invocations[i] = new Invocation(method, protocol, params[i]); SecureClient client = CLIENTS.getClient(conf); try { Writable[] wrappedValues =