[
https://issues.apache.org/jira/browse/HDFS-13331?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16414405#comment-16414405
]
Plamen Jeliazkov commented on HDFS-13331:
-----------------------------------------
Thanks Konstantin.
I found I could do the following:
1) Remove getLastSeenStateId() and just make lastSeenStateId package-private.
Then I could just make 1 method "getAlignmentContext" in DFSClient and that
would satisfy everything I need. Now I can get lastSeenStateId from the
ClientGCIContext in tests and expose the AlignmentContext to those using
DFSClient directly.
2) I did add the basic server-side logic with simple checking. I had to add
another new interface method "receiveRequestState". I use the FSNamesystem LOG
to log a warning. I also added a unit test to demonstrate this but marked it as
ignored until we implement the full logic. You can run the test yourself to see
the warning message however.
I also simplified the test "testClientSendsState" -- previously it had some
logic that tested to ensure spied AlignmentContext had the same lastSeenStateId
as the original object. Obviously we don't really need to test Mockito so I
removed that portion. I also added a segment that checks that the
RpcRequestHeaders increase in stateId and that the first and last
RpcRequestHeaders are not equal. This should be enough to show that state must
have "increased".
> Add lastSeenStateId to RpcRequestHeader.
> ----------------------------------------
>
> Key: HDFS-13331
> URL: https://issues.apache.org/jira/browse/HDFS-13331
> Project: Hadoop HDFS
> Issue Type: Sub-task
> Reporter: Plamen Jeliazkov
> Assignee: Plamen Jeliazkov
> Priority: Major
> Attachments: HDFS-13331.trunk.001.patch, HDFS_13331.trunk.000.patch
>
>
> HDFS-12977 added a stateId into the RpcResponseHeader which is returned by
> NameNode and stored by DFSClient.
> This JIRA is to followup on that work and have the DFSClient send their
> stored "lastSeenStateId" in the RpcRequestHeader so that ObserverNodes can
> then compare with their own and act accordingly.
> This JIRA work focuses on just the part of making DFSClient send their state
> through RpcRequestHeader.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]