[
https://issues.apache.org/jira/browse/HADOOP-6904?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12979033#action_12979033
]
Doug Cutting commented on HADOOP-6904:
--------------------------------------
I just remembered that Class#getMethods() does not return methods in any
particular order, and I believe that Arrays#hashCode() is order-dependent. So
the methods need to be sorted by name before they are hashed.
Note that Java Serialization defines a good hashing method as the default
definition for serialVersionUID:
http://download.oracle.com/javase/6/docs/platform/serialization/spec/class.html#4100
This can be accessed with
ObjectStreamClass.lookup(iface).getSerialVersionUID(). Unfortunately the
protocol has to extend java.io.Serializeable, and we'd need to check that
explicitly, as this method returns 0 for non-Serializeable interfaces, but this
still might be a good way to get a well designed hash-function for interfaces.
> A baby step towards inter-version RPC communications
> ----------------------------------------------------
>
> Key: HADOOP-6904
> URL: https://issues.apache.org/jira/browse/HADOOP-6904
> Project: Hadoop Common
> Issue Type: New Feature
> Components: ipc
> Affects Versions: 0.22.0
> Reporter: Hairong Kuang
> Assignee: Hairong Kuang
> Fix For: 0.22.0
>
> Attachments: majorMinorVersion.patch, majorMinorVersion1.patch,
> rpcCompatible-trunk.patch, rpcCompatible-trunk1.patch,
> rpcCompatible-trunk2.patch, rpcVersion.patch, rpcVersion1.patch
>
>
> Currently RPC communications in Hadoop is very strict. If a client has a
> different version from that of the server, a VersionMismatched exception is
> thrown and the client can not connect to the server. This force us to update
> both client and server all at once if a RPC protocol is changed. But sometime
> different versions do not mean the client & server are not compatible. It
> would be nice if we could relax this restriction and allows us to support
> inter-version communications.
> My idea is that DfsClient catches VersionMismatched exception when it
> connects to NameNode. It then checks if the client & the server is
> compatible. If yes, it sets the NameNode version in the dfs client and allows
> the client to continue talking to NameNode. Otherwise, rethrow the
> VersionMismatch exception.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.