You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-dev@hadoop.apache.org by "Doug Cutting (JIRA)" <ji...@apache.org> on 2006/04/26 05:55:03 UTC

[jira] Commented: (HADOOP-166) IPC is unable to invoke methods that use interfaces as parameter

    [ http://issues.apache.org/jira/browse/HADOOP-166?page=comments#action_12376385 ] 

Doug Cutting commented on HADOOP-166:
-------------------------------------

The problem isn't that the parameter is an interface, but rather that the declared class in the implementation is not exactly the same class as the instance passed.  One way to fix this would be to add the list of parameter types of the client method when writing the invocation, since those should match the server implementation, but that would make each RPC call bigger.  Alternately one could, as your patch suggests, search for an appropriate method.  However, your search code is not  quite correct.  The search should be ordered from the implementation class through its superclasses, to find the most specific implementing method.  And searching adds a cost to each RPC, so we'd probably want to cache the results of searches.

So I think I probably prefer adding the parameter types to the invocation.  This can be easily fixed in ObjectWritable by having it write two class names for Writable parameters: both the declared parameter type and the instance type.

> IPC is unable to invoke methods that use interfaces as parameter
> ----------------------------------------------------------------
>
>          Key: HADOOP-166
>          URL: http://issues.apache.org/jira/browse/HADOOP-166
>      Project: Hadoop
>         Type: Improvement

>   Components: ipc
>     Reporter: Stefan Groschupf
>     Priority: Minor
>  Attachments: RPC_interface_supportV1.patch
>
> Methods of the implementation class are searched via method name and call parameters that can be implementations of the interfaces defined in the method signature.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira