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

Ewan Higgs commented on HDFS-11190:
-----------------------------------

This is a good change that can probably go into the branch. Some things that 
should be discussed before merging with trunk:

BlockStoragePolicySuite.java

Why {{PROVIDED}}, {{DISK}} and not {{DISK}}, {{PROVIDED}}?
In ProvidedStorageMap.java we make a DatanodeStorage using {{NORMAL}}, 
{{PROVIDED}} (line 86), so it seems that this is a good ordering.

Changing this requires a change in TestBlockStoragePolicy (line 144) as well.

Also, especially since LocatedBlock moved {{PROVIDED}} to the end anyway, why 
not begin with storagePolicy with {{PROVIDED}} at the end so the 
{{moveProvidedToEnd}} becomes a no-op.

LocatedBlock.java
Shorten {{moveProvidedToEnd}} to use Arrays.sort(T[], Comparator) which is 
stable. Comparator can just return Provided > anything else.

https://docs.oracle.com/javase/7/docs/api/java/util/Arrays.html#sort(T[],%20java.util.Comparator)

If we don't do this, then we should add more checks to test that the algorithm 
is correct.

> [READ] Namenode support for data stored in external stores.
> -----------------------------------------------------------
>
>                 Key: HDFS-11190
>                 URL: https://issues.apache.org/jira/browse/HDFS-11190
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>            Reporter: Virajith Jalaparti
>         Attachments: HDFS-11190-HDFS-9806.001.patch, 
> HDFS-11190-HDFS-9806.002.patch, HDFS-11190-HDFS-9806.003.patch
>
>
> The goal of this JIRA is to enable the Namenode to know about blocks that are 
> in {{PROVIDED}} stores and are not necessarily stored on any Datanodes. 



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to