You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-issues@hadoop.apache.org by "Hudson (JIRA)" <ji...@apache.org> on 2014/03/01 12:15:27 UTC
[jira] [Commented] (HDFS-5956) A file size is multiplied by the
replication factor in 'hdfs oiv -p FileDistribution' option
[ https://issues.apache.org/jira/browse/HDFS-5956?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13917022#comment-13917022 ]
Hudson commented on HDFS-5956:
------------------------------
SUCCESS: Integrated in Hadoop-Yarn-trunk #496 (See [https://builds.apache.org/job/Hadoop-Yarn-trunk/496/])
HDFS-5956. A file size is multiplied by the replication factor in 'hdfs oiv -p FileDistribution' option. Contributed by Akira Ajisaka. (wheat9: http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1573078)
* /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
* /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/offlineImageViewer/FileDistributionCalculator.java
* /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/tools/offlineImageViewer/TestOfflineImageViewer.java
> A file size is multiplied by the replication factor in 'hdfs oiv -p FileDistribution' option
> --------------------------------------------------------------------------------------------
>
> Key: HDFS-5956
> URL: https://issues.apache.org/jira/browse/HDFS-5956
> Project: Hadoop HDFS
> Issue Type: Sub-task
> Components: tools
> Affects Versions: 3.0.0, 2.4.0
> Reporter: Akira AJISAKA
> Assignee: Akira AJISAKA
> Labels: newbie
> Fix For: 2.4.0
>
> Attachments: HDFS-5956.2.patch, HDFS-5956.3.patch, HDFS-5956.patch
>
>
> In FileDistributionCalculator.java,
> {code}
> long fileSize = 0;
> for (BlockProto b : f.getBlocksList()) {
> fileSize += b.getNumBytes() * f.getReplication();
> }
> maxFileSize = Math.max(fileSize, maxFileSize);
> totalSpace += fileSize;
> {code}
> should be
> {code}
> long fileSize = 0;
> for (BlockProto b : f.getBlocksList()) {
> fileSize += b.getNumBytes();
> }
> maxFileSize = Math.max(fileSize, maxFileSize);
> totalSpace += fileSize * f.getReplication();
> {code}
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)