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

Hadoop QA commented on HDFS-8946:
---------------------------------

\\
\\
| (x) *{color:red}-1 overall{color}* |
\\
\\
|| Vote || Subsystem || Runtime || Comment ||
| {color:blue}0{color} | pre-patch |  18m  5s | Pre-patch trunk compilation is 
healthy. |
| {color:green}+1{color} | @author |   0m  0s | The patch does not contain any 
@author tags. |
| {color:green}+1{color} | tests included |   0m  0s | The patch appears to 
include 1 new or modified test files. |
| {color:green}+1{color} | javac |   8m  6s | There were no new javac warning 
messages. |
| {color:green}+1{color} | javadoc |  10m 20s | There were no new javadoc 
warning messages. |
| {color:green}+1{color} | release audit |   0m 24s | The applied patch does 
not increase the total number of release audit warnings. |
| {color:green}+1{color} | checkstyle |   1m 21s | There were no new checkstyle 
issues. |
| {color:green}+1{color} | whitespace |   0m  1s | The patch has no lines that 
end in whitespace. |
| {color:green}+1{color} | install |   1m 31s | mvn install still works. |
| {color:green}+1{color} | eclipse:eclipse |   0m 34s | The patch built with 
eclipse:eclipse. |
| {color:green}+1{color} | findbugs |   2m 36s | The patch does not introduce 
any new Findbugs (version 3.0.0) warnings. |
| {color:green}+1{color} | native |   3m 18s | Pre-build of native portion |
| {color:red}-1{color} | hdfs tests | 185m 32s | Tests failed in hadoop-hdfs. |
| | | 231m 51s | |
\\
\\
|| Reason || Tests ||
| Failed unit tests | hadoop.hdfs.server.blockmanagement.TestBlockManager |
|   | hadoop.hdfs.TestRollingUpgrade |
\\
\\
|| Subsystem || Report/Notes ||
| Patch URL | 
http://issues.apache.org/jira/secure/attachment/12752975/HDFS-8946.003.patch |
| Optional Tests | javadoc javac unit findbugs checkstyle |
| git revision | trunk / e166c03 |
| hadoop-hdfs test log | 
https://builds.apache.org/job/PreCommit-HDFS-Build/12194/artifact/patchprocess/testrun_hadoop-hdfs.txt
 |
| Test Results | 
https://builds.apache.org/job/PreCommit-HDFS-Build/12194/testReport/ |
| Java | 1.7.0_55 |
| uname | Linux asf909.gq1.ygridcore.net 3.13.0-36-lowlatency #63-Ubuntu SMP 
PREEMPT Wed Sep 3 21:56:12 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux |
| Console output | 
https://builds.apache.org/job/PreCommit-HDFS-Build/12194/console |


This message was automatically generated.

> Improve choosing datanode storage for block placement
> -----------------------------------------------------
>
>                 Key: HDFS-8946
>                 URL: https://issues.apache.org/jira/browse/HDFS-8946
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>          Components: namenode
>            Reporter: Yi Liu
>            Assignee: Yi Liu
>         Attachments: HDFS-8946.001.patch, HDFS-8946.002.patch, 
> HDFS-8946.003.patch
>
>
> This JIRA is to:
> Improve chooseing datanode storage for block placement:
> In {{BlockPlacementPolicyDefault}} ({{chooseLocalStorage}}, 
> {{chooseRandom}}), we have following logic to choose datanode storage to 
> place block.
> For given storage type, we iterate storages of the datanode. But for 
> datanode, it only cares about the storage type. In the loop, we check 
> according to Storage type and return the first storage if the storages of the 
> type on the datanode fit in requirement. So we can remove the iteration of 
> storages, and just need to do once to find a good storage of given type, it's 
> efficient if the storages of the type on the datanode don't fit in 
> requirement since we don't need to loop all storages and do the same check.
> Besides, no need to shuffle the storages, since we only need to check 
> according to the storage type on the datanode once.
> This also improves the logic and make it more clear.
> {code}
>       if (excludedNodes.add(localMachine) // was not in the excluded list
>           && isGoodDatanode(localDatanode, maxNodesPerRack, false,
>               results, avoidStaleNodes)) {
>         for (Iterator<Map.Entry<StorageType, Integer>> iter = storageTypes
>             .entrySet().iterator(); iter.hasNext(); ) {
>           Map.Entry<StorageType, Integer> entry = iter.next();
>           for (DatanodeStorageInfo localStorage : DFSUtil.shuffle(
>               localDatanode.getStorageInfos())) {
>             StorageType type = entry.getKey();
>             if (addIfIsGoodTarget(localStorage, excludedNodes, blocksize,
>                 results, type) >= 0) {
>               int num = entry.getValue();
>               ...
> {code}
> (current logic above)



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

Reply via email to