[ https://issues.apache.org/jira/browse/HDFS-12982?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16313177#comment-16313177 ]
Surendra Singh Lilhore commented on HDFS-12982: ----------------------------------------------- Thanks [~rakeshr] for patch. I have some review comment. # I feel {{Context}} object should't know about the SPS running status. {{Context#isRunning()}} should return only the Namenode running status. {{StoragePolicySatisfier#isRunning()}} method should give overall status of service (inclusding namenode). So {{SPS#isRunning()}} implementation should be like this {code} public boolean isRunning() { return isRunning && ctxt.isRunning(); } {code} # Currently submit task action is little confusing. It’s getting task handler from context and finally task handle call {{context}} API to move the block. {noformat} SPS#getBlockMoveTaskHandler()==>Context.getBlockMoveTaskHandler()==>IntraSPSNameNodeBlockMoveTaskHandler#submitMoveTask()===>Context#assignBlockMoveTaskToTargetNode() {noformat} It’s better to remove BlockMoveTaskHandler from the context and pass it to the SPS constructor. When SPS is created from BlockManager then create {{IntraSPSNameNodeBlockMoveTaskHandler}} object and pass, otherwise create external task handler and pass. # In {{IntraSPSNameNodeContext#getFileInfo()}} no need to take the read lock. {{getFilePath()}} and {{getFileInfo()}} internally taking the read lock. > [SPS]: Reduce the locking and cleanup the Namesystem access > ----------------------------------------------------------- > > Key: HDFS-12982 > URL: https://issues.apache.org/jira/browse/HDFS-12982 > Project: Hadoop HDFS > Issue Type: Sub-task > Components: datanode, namenode > Reporter: Rakesh R > Assignee: Rakesh R > Attachments: HDFS-12982-HDFS-10285-00.patch, > HDFS-12982-HDFS-10285-01.patch, HDFS-12982-HDFS-10285-02.patch > > > This task is to optimize the NS lock usage in SPS and cleanup the Namesystem > access via {{Context}} interface. -- This message was sent by Atlassian JIRA (v6.4.14#64029) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org