Author: omalley
Date: Fri Mar 20 07:13:25 2009
New Revision: 756352
URL: http://svn.apache.org/viewvc?rev=756352&view=rev
Log:
HADOOP-5417. Don't ignore InterruptedExceptions that happen when calling
into rpc. (omalley)
Modified:
hadoop/core/trunk/CHANGES.txt
hadoop/core/trunk/src/core/org/apache/hadoop/ipc/Client.java
Modified: hadoop/core/trunk/CHANGES.txt
URL:
http://svn.apache.org/viewvc/hadoop/core/trunk/CHANGES.txt?rev=756352&r1=756351&r2=756352&view=diff
==============================================================================
--- hadoop/core/trunk/CHANGES.txt (original)
+++ hadoop/core/trunk/CHANGES.txt Fri Mar 20 07:13:25 2009
@@ -1065,8 +1065,11 @@
HADOOP-5534. Fixed a deadlock in Fair scheduler's servlet.
(Rahul Kumar Singh via yhemanth)
- HADOOP-5328. Fixes a problem in the renaming of job history files during
job
- recovery. Amar Kamat via ddas)
+ HADOOP-5328. Fixes a problem in the renaming of job history files during
+ job recovery. Amar Kamat via ddas)
+
+ HADOOP-5417. Don't ignore InterruptedExceptions that happen when calling
+ into rpc. (omalley)
Release 0.19.2 - Unreleased
Modified: hadoop/core/trunk/src/core/org/apache/hadoop/ipc/Client.java
URL:
http://svn.apache.org/viewvc/hadoop/core/trunk/src/core/org/apache/hadoop/ipc/Client.java?rev=756352&r1=756351&r2=756352&view=diff
==============================================================================
--- hadoop/core/trunk/src/core/org/apache/hadoop/ipc/Client.java (original)
+++ hadoop/core/trunk/src/core/org/apache/hadoop/ipc/Client.java Fri Mar 20
07:13:25 2009
@@ -718,11 +718,20 @@
Call call = new Call(param);
Connection connection = getConnection(addr, protocol, ticket, call);
connection.sendParam(call); // send the parameter
+ boolean interrupted = false;
synchronized (call) {
while (!call.done) {
try {
call.wait(); // wait for the result
- } catch (InterruptedException ignored) {}
+ } catch (InterruptedException ie) {
+ // 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) {