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

Chao Sun commented on HDFS-13578:
---------------------------------

[~xkrogen]: good point. I think we should recommend people to disable the 
access time if they opt for observer reads (which is what we do internally), or 
still direct {{getBlockLocations}} to active if access time is turned on. I've 
seen RPC time suffered when access time is on and {{getBlockLocations}} goes to 
observer. This may need more discussion.

[~elgoiri]: we can use this annotation to check whether the current RPC method 
is readonly or not, by following:
{code:java}
  private boolean isRead(Method method) {
    return method.isAnnotationPresent(ReadOnly.class);
  }
{code}

> Add ReadOnly annotation to methods in ClientProtocol
> ----------------------------------------------------
>
>                 Key: HDFS-13578
>                 URL: https://issues.apache.org/jira/browse/HDFS-13578
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>            Reporter: Chao Sun
>            Assignee: Chao Sun
>            Priority: Major
>         Attachments: HDFS-13578-HDFS-12943.000.patch
>
>
> For those read-only methods in {{ClientProtocol}}, we may want to use a 
> {{@ReadOnly}} annotation to mark them, and then check in the proxy provider 
> for observer.



--
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