[ 
https://issues.apache.org/jira/browse/HADOOP-18803?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

ConfX updated HADOOP-18803:
---------------------------
    Description: 
h2. 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.
h2. Buggy code:

In TestRPC.java:
{code: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);
  ...
} {code}
h2. 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. 

  was:
h2. 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.
h2. Buggy code:

In TestRPC.java:

 
{code: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);
  ...
} {code}
 
h2. 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. 


> ClassCastException in test TestRPC#testWrappedStopProxy
> -------------------------------------------------------
>
>                 Key: HADOOP-18803
>                 URL: https://issues.apache.org/jira/browse/HADOOP-18803
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: common, ipc
>            Reporter: ConfX
>            Priority: Critical
>         Attachments: reproduce.sh
>
>
> h2. 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.
> h2. Buggy code:
> In TestRPC.java:
> {code: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);
>   ...
> } {code}
> h2. 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. 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to