Details
-
Bug
-
Status: Open
-
Critical
-
Resolution: Unresolved
-
None
-
None
Description
What happened:
In HCommon, test TestRPC#testWrappedStopProxy tries to cast org.apache.hadoop.ipc.WritableRpcEngine$Invoker to org.apache.hadoop.ipc.TestRPC$StoppedInvocationHandler and causes ClassCastException.
Buggy code:
In TestRPC.java:
@Test public void testWrappedStopProxy() throws IOException { StoppedProtocol wrappedProxy = RPC.getProxy(StoppedProtocol.class, StoppedProtocol.versionID, null, conf); StoppedInvocationHandler invocationHandler = (StoppedInvocationHandler) // <--- Here causes ClassCastException Proxy.getInvocationHandler(wrappedProxy); ... }
How to reproduce:
(1) Just directly run test TestRPC#testWrappedStopProxy.
You can use the reproduce.sh in the attachment to easily reproduce the bug.
We are happy to provide a patch if this issue is confirmed.
Attachments
Attachments
Issue Links
- links to