Skip to content

Commit 7e9b78e

Browse files
committed
HADOOP-9844 patch 004
Change-Id: I10a20380565fa89762f4aa564b2f1c83b9aeecdc
1 parent f4fb669 commit 7e9b78e

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/IpcException.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,8 @@
2626
*/
2727
public class IpcException extends IOException {
2828
private static final long serialVersionUID = 1L;
29-
30-
final String errMsg;
29+
3130
public IpcException(final String err) {
32-
errMsg = err;
31+
super(err);
3332
}
3433
}

hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/Server.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1982,7 +1982,7 @@ private void doSaslReply(Message message) throws IOException {
19821982
private void doSaslReply(Exception ioe) throws IOException {
19831983
setupResponse(authFailedCall,
19841984
RpcStatusProto.FATAL, RpcErrorCodeProto.FATAL_UNAUTHORIZED,
1985-
null, ioe.getClass().getName(), ioe.getLocalizedMessage());
1985+
null, ioe.getClass().getName(), ioe.toString());
19861986
sendResponse(authFailedCall);
19871987
}
19881988

@@ -2371,7 +2371,8 @@ private void processOneRpc(ByteBuffer bb)
23712371
final RpcCall call = new RpcCall(this, callId, retry);
23722372
setupResponse(call,
23732373
rse.getRpcStatusProto(), rse.getRpcErrorCodeProto(), null,
2374-
t.getClass().getName(), t.getMessage());
2374+
t.getClass().getName(),
2375+
t.getMessage() != null ? t.getMessage() : t.toString());
23752376
sendResponse(call);
23762377
}
23772378
}

0 commit comments

Comments
 (0)