HBASE-2360 Make sure we have all the hadoop fixes in our our copy of its rpc

git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@931837 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael Stack 2010-04-08 08:56:07 +00:00
parent 0b788acf5e
commit 193476d4c2
2 changed files with 14 additions and 2 deletions

View File

@ -488,6 +488,8 @@ Release 0.21.0 - Unreleased
HBASE-2419 Remove from RS logs the fat NotServingRegionException stack
HBASE-2286 [Transactional Contrib] Correctly handle or avoid cases where
writes occur in same millisecond (Clint Morgan via J-D)
HBASE-2360 Make sure we have all the hadoop fixes in our our copy of its rpc
(Todd Lipcon via Stack)
NEW FEATURES
HBASE-1961 HBase EC2 scripts

View File

@ -509,7 +509,7 @@ public class HBaseClient {
if (LOG.isDebugEnabled())
LOG.debug(getName() + " got value #" + id);
Call call = calls.remove(id);
Call call = calls.get(id);
boolean isError = in.readBoolean(); // read if error
if (isError) {
@ -520,6 +520,7 @@ public class HBaseClient {
Writable value = ReflectionUtils.newInstance(valueClass, conf);
value.readFields(in); // read value
call.setValue(value);
calls.remove(id);
}
} catch (IOException e) {
markClosed(e);
@ -715,12 +716,21 @@ public class HBaseClient {
Call call = new Call(param);
Connection connection = getConnection(addr, ticket, call);
connection.sendParam(call); // send the parameter
boolean interrupted = false;
//noinspection SynchronizationOnLocalVariableOrMethodParameter
synchronized (call) {
while (!call.done) {
try {
call.wait(); // wait for the result
} catch (InterruptedException ignored) {}
} catch (InterruptedException ignored) {
// save the fact that we were interrupted
interrupted = true;
}
}
if (interrupted) {
// set the interrupt flag now that we are done waiting
Thread.currentThread().interrupt();
}
if (call.error != null) {