[
https://issues.apache.org/jira/browse/HDFS-13329?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16424760#comment-16424760
]
Hanisha Koneru commented on HDFS-13329:
---------------------------------------
Thanks for working on this, [~bharatviswa].
Looks good overall. I have a few comments:
# Can you add Javadoc and License to the
{color:#3b73af}{{{color}CachingGetSpaceUsedWithExclude}} and {{DUWithExclude}}.
# In {{DUWithExclude}}, we are calculating the {{du}} for both the path and
the excludedPath and then subtracting the later from the former. We end up
calculating the space used by replica trash twice this way.
{code:java}
setUsed((Long.parseLong(tokens[0]) * 1024) - (Long.parseLong(tokens1[0]) *
1024));{code}
we could instead utilized the {{--exclude}} option of {{du}} command.
Also, can we add the exclude option to {{DU.java}} itself instead of another
class? I am not sure how complicated that would get though. I am ok with this
approach too.
# Can we rename {{TestDU#testDUWithSubtract}}, to {{testDUWithExclude}} to be
consistent with the naming.
# In {{TestDU#testDUWithSubtract}}, the last assert statement has a typo.
{code:java}
assertTrue("invalid-disk-size", duSize >= writtenSize && writtenSize <= (duSize
+ slack));
{code}
Should have been
{code:java}
du <= (writtenSize + slack) {code}
# In {{DatanodeInfo#getDatanodeReport()}}, can we report the new disk counters
after the {{DFSRemaining%}} counter.
# In {{DFSConfigKeys}},
{code:java}
public static final String DFS_DATANODE_REPLICA_TRASH_PERCENT =
"dfs.datanode.replica.trash.keep.alive.interval";
{code}
The value for the config parameter is mistyped.
# In {{BlockPoolSlice}},
** {{In loadDfsUsed(), variable }}{{replicaTrashUsed}} is not used.
** In {{loadReplicaTrashUsed}}, if we are using separate
{{CachingGetSpaceUsed}} objects for {{dfsUsage}} and {{replicaTrashUsage}}, we
should have separate Cache files too.
# {{FsVolumeImpl#replicaTrashLimit}} variable can be final.
# In {{FsVolumeImpl#onMetaFileDeletion()}}, we should not decrement the number
of blocks count in the BP.
# {{DFSAdmin}}, can we let the DN figure out whether replicaTrash is enabled
or not and send the report accordingly?
> Add/ Update disk space counters for trash (trash used, disk remaining etc.)
> ----------------------------------------------------------------------------
>
> Key: HDFS-13329
> URL: https://issues.apache.org/jira/browse/HDFS-13329
> Project: Hadoop HDFS
> Issue Type: Sub-task
> Reporter: Bharat Viswanadham
> Assignee: Bharat Viswanadham
> Priority: Major
> Attachments: HDFS-13329-HDFS-12996.01.patch,
> HDFS-13329-HDFS-12996.02.patch
>
>
> Add 3 more counters required for datanode replica trash.
> # diskAvailable
> # replicaTrashUsed
> # replicaTrashRemaining
> For more info on these counters, refer design document uploaded in HDFS-12996
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]