[
https://issues.apache.org/jira/browse/HDFS-12977?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16386960#comment-16386960
]
Plamen Jeliazkov commented on HDFS-12977:
-----------------------------------------
Hey Konst,
My logic around (1) had been that I followed the structure of Server/Client
closely. I viewed the problem as a matter of a getter and setter that lived
independently of each other and so felt 2 different interfaces were necessary.
In my latest patch, however, I attempted to merge txidProvider and txidObserver
into a new interface, CallStateHandler, with a generic. The generic is to
account for that Client is expecting an update in terms of a long value
parameter versus Server which does not expect anything. The generic also allows
us to be extensible in the future and add more complex type parameters.
I believe I have now addressed (2) and removed most of the code out of Server
minus the transactionId info needed from Call.
For (3) I removed all traces of txid from RPC and only made the changes to pass
the new CallStateHandler down. Definitions for CallStateHandler are the
FSNamesystem (Server) and the DFSClient (Client).
Do you see any issues with the way I deal with Client and DFSClient? Most
notably I had to make a static method call in DFSClient instantiation.
We have again shrunk down the size of the patch to just 30KB now.
> Add stateId to RPC headers.
> ---------------------------
>
> Key: HDFS-12977
> URL: https://issues.apache.org/jira/browse/HDFS-12977
> Project: Hadoop HDFS
> Issue Type: Sub-task
> Components: ipc, namenode
> Reporter: Konstantin Shvachko
> Assignee: Plamen Jeliazkov
> Priority: Major
> Attachments: HDFS_12977.trunk.001.patch, HDFS_12977.trunk.002.patch,
> HDFS_12977.trunk.003.patch
>
>
> stateId is a new field in the RPC headers of NameNode proto calls.
> stateId is the journal transaction Id, which represents LastSeenId for the
> clients and LastWrittenId for NameNodes. See more in [reads from Standby
> design
> doc|https://issues.apache.org/jira/secure/attachment/12902925/ConsistentReadsFromStandbyNode.pdf].
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]