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

Vinayakumar B commented on HDFS-8450:
-------------------------------------

{{fsd.getFSNamesystem().checkOperation(OperationCategory.READ);}}
This check is not mandatorily required in all places wherever 
{{FSDirErasureCodingOp}} methods are called.
{{checkOperation}} is applicable only for the RPC calls. And if its already 
done after acquiring the lock, then no need to do again. 
All other cases which can happen only on ActiveNamenode after aquiring lock, 
{{checkOperation}} call not required.

Following are the places where this check is not required in the patch.

1. {{FSDirStatAndListingOp.java}}
2. {{FSDirWriteFileOp.java}}
3. {{FSEditLogLoader}}
4. {{FSNamesystem#commitOrCompleteLastBlock(..)}} as this comes somewhere 
inside in the call heirarchy, before reaching here check already done.
5. {{NamenodeFsck.java}} as in StandbyNameNode call will not reach this point, 
if READ is disabled.

As though IMO, all these except #3, wont create any problem, but it would be 
unnecessary. #3 might create problem in SNN while loading edits.

+1 once these are addressed.

> Erasure Coding: Consolidate erasure coding zone related implementation into a 
> single class
> ------------------------------------------------------------------------------------------
>
>                 Key: HDFS-8450
>                 URL: https://issues.apache.org/jira/browse/HDFS-8450
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>            Reporter: Rakesh R
>            Assignee: Rakesh R
>         Attachments: HDFS-8450-FYI.patch, HDFS-8450-HDFS-7285-00.patch, 
> HDFS-8450-HDFS-7285-01.patch, HDFS-8450-HDFS-7285-02.patch, 
> HDFS-8450-HDFS-7285-03.patch, HDFS-8450-HDFS-7285-04.patch, 
> HDFS-8450-HDFS-7285-05.patch, HDFS-8450-HDFS-7285-07.patch, 
> HDFS-8450-HDFS-7285-08.patch, HDFS-8450-HDFS-7285-09.patch, 
> HDFS-8450-HDFS-7285-10.patch
>
>
> The idea is to follow the same pattern suggested by HDFS-7416. It is good  to 
> consolidate all the erasure coding zone related implementations of 
> {{FSNamesystem}}. Here, proposing {{FSDirErasureCodingZoneOp}} class to have 
> functions to perform related erasure coding zone operations.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to