hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Plamen Jeliazkov (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-12977) Add stateId to RPC headers.
Date Tue, 13 Mar 2018 18:31:00 GMT

    [ https://issues.apache.org/jira/browse/HDFS-12977?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16397434#comment-16397434
] 

Plamen Jeliazkov commented on HDFS-12977:
-----------------------------------------

I spoke with Konstantin offline and concluded to use just StateContext for now until we can
come up with a better descriptive word to prepend to it.

Regarding (1), I changed the interface now to ServerContext and provided that method along
with the method:
{code:java}void receiveResponseState(RpcHeaderProtos.RpcResponseHeaderProto responseHeader);{code}
I also created an implementation, NNStateContext. I removed the "Id" from the name because
it is general enough to carry more than information (in the future, maybe) than just ID(s).
NNStateContext provides updateResponseState but leaves receiveResponseState as a no-op and
is never called. Likewise one thing that was not addressed was the need for DFSClient changes.
I created a DfsClientStateContext which implements StateContext and implements receiveResponseState
but leaves updateResponseState as a no-op.

Regarding (2), I was able to do as you asked but had to add stateContext back into ipc.Server
and out of Protobuf and Writable implementations.

(3) is fulfilled -- No more changes in ProtobufRPCEngine.call method nor additions to Server.Call.

Regarding (4) -- there is no more mention of transactionId anywhere. But in the implementations
of StateContext we refer to "lastWrittenId" and "lastSeenId". If you would like these changed
to "stateId", let me know. I feel like within the implementation they make sense, however.

> 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: hdfs-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org


Mime
View raw message