Rakesh R commented on HDFS-10800:

Thanks [~umamaheswararao], latest patch looks good. Few more suggestions to 
improve the patch. sorry, I failed to identify this in my previous review, 
would you mind incorporating this.
# We could mark the new classes {{@InterfaceAudience.Private}}
# Can we find a better name for ‘StorageMovementNeeded’ class, this name looks 
like its moving the storage. How about BlockMovementNeeded or 
# It would be good if we could {{sps.stop();}} the thread at the beginning of 
the {{BlockManager#stop()}} function. This could avoid unwanted exceptions in 
future if someone add extra codes which depends on already stopped dependent 
# IMHO, {{#assignStorageMovementTasksToDN()}} can be moved inside 
{{#buildStorageMismatchedBlocks(long blockCollectionID)}}, that way we could 
avoid passing few args. Also, the below if condition is not required as 
duplicate checks inside the assign function, right?
if (blockInfoToMoveStorages.size() > 0) {
# Also, can you make the following variable as {{final}}. This will avoid NPE 
if someone mistakenly do any changes in future.
private StoragePolicySatisfier sps;
private StorageMovementNeededneedStorageMovement = newStorageMovementNeeded();

> [SPS]: Storage Policy Satisfier daemon thread in Namenode to find the blocks 
> which were placed in other storages than what NN is expecting.
> -------------------------------------------------------------------------------------------------------------------------------------------
>                 Key: HDFS-10800
>                 URL: https://issues.apache.org/jira/browse/HDFS-10800
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: namenode
>    Affects Versions: HDFS-10285
>            Reporter: Uma Maheswara Rao G
>            Assignee: Uma Maheswara Rao G
>         Attachments: HDFS-10800-HDFS-10285-00.patch, 
> HDFS-10800-HDFS-10285-01.patch, HDFS-10800-HDFS-10285-02.patch, 
> HDFS-10800-HDFS-10285-03.patch
> This JIRA is for implementing a daemon thread called StoragePolicySatisfier 
> in nematode, which should scan the asked files blocks which were placed in 
> wrong storages in DNs. 
>  The idea is:
>       # When user called on some files/dirs for satisfyStorage policy, They 
> should have tracked in NN and then StoragePolicyDaemon thread will pick one 
> by one file and then check the blocks which might have placed in wrong 
> storage in DN than what NN is expecting it to.
>       # After checking all, it should also construct the data structures for 
> the required information to move a block from one storage to another.

This message was sent by Atlassian JIRA

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