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

Konstantin Shvachko edited comment on HDFS-12977 at 3/15/18 2:36 AM:
---------------------------------------------------------------------

Great progress, Plamen. Few editorial comments
# {{AlignmentContext}} JavaDoc should say something like "Interface to align 
the state between client and server via RPC communication".
#* Check for long lines
#* Needs annotations: {{@InterfaceAudience, @InterfaceStability}}
#* Abstract methods could use Javadoc too.
# {{ProtobufRpcEngine.Server}} Javadoc should say:
{code}
     * @param alignmentContext provides server state info on client responses
{code}
#* The same in {{RpcEngine.getServer()}} and {{WritableRpcEngine.Server}}
# For {{RpcResponseHeaderProto}} we should probably just use {{stateId}} with 
the comment that it is the last written global state id. In the response header 
it is the last written GSI, but in request header it will become last seen id.
# {{GlobalStateIdContext}} needs Javadoc and annotations.
# {{TestClientTransactionId}} do we need to restart cluster for each test? 
Would be better if start in {{@BeforeClass}} and shut down in {{@AfterClass}}
#* Very much like to see comments for test cases! It would be better to make 
them Javadoc, and check for long lines.
# {{Client.setClientStateHandler()}} please update javadoc
#* {{DFSClient.lastSeenId}} -> {{lastSeenStateId}}
#* {{setClientStateHandler()}} should be updated to {{setAlignmentContext()}}
# How about {{ClientGCIContext}} instead of {{DfsClientAlignmentContext}}
#* needs Javadoc and annotations
# Also I recommend running checkstyle locally, I couldn't find artifacts on 
Jenkins, but there may be diversions in the patch.

I think this completes the server part. We should think about setting GCI in 
RequestHeader on the client side. In the next jira I assume.



was (Author: shv):
Great progress, Plamen. Few editorial comments
# {{AlignmentContext}} JavaDoc should say something like "Interface to align 
the state between client and server via RPC communication".
#* Check for long lines
#* Needs annotations: {{@InterfaceAudience, @InterfaceStability}}
#* Abstract methods could use Javadoc too.
# {{ProtobufRpcEngine.Server}} Javadoc should say:
{code}
     * @param alignmentContext provides server state info on client responses
{code}
#* The same in {{RpcEngine.getServer()}} and {{WritableRpcEngine.Server}}
# For {{RpcResponseHeaderProto}} we should probably just use {{stateId}} with 
the comment that it is the last written global state id. In the response header 
it is the last written GSI, but in request header it will become last seen id.
# {{GlobalStateIdContext}} needs Javadoc and annotations.
# {{TestClientTransactionId}} do we need to restart cluster for each test? 
Would be better if start in {{@BeforeClass}} and shut down in {{@AfterClass}}
#* Very much like to see comments for test cases! It would be better to make 
them Javadoc, and check for long lines.
# {{Client.setClientStateHandler()}} please update javadoc
#* {{DFSClient.lastSeenId}} -> {{lastSeenStateId}}
#* {{setClientStateHandler()}} should be updated to {{setAlignmentContext()}}
# How about {{ClientGCIContext}} instead of {{DfsClientAlignmentContext}}
#* needs Javadoc and annotations

I think this completes the server part. We should think about setting GCI in 
RequestHeader on the client side. In the next jira I assume.


> 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, HDFS_12977.trunk.004.patch, 
> HDFS_12977.trunk.005.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-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org

Reply via email to