[
https://issues.apache.org/jira/browse/HDFS-9735?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15207491#comment-15207491
]
Lei (Eddy) Xu commented on HDFS-9735:
-------------------------------------
[~anu] Thanks for working on this. This patch looks good overall.
{code}
synchronized (this) {
volumeRef = destination.obtainReference();
}
{code}
We don't need {{synchronized}} here, so that it can also be put into the
following JDK7 style {{try with resource}} statement.
{code}
public File getBlockFile(String bpid, ExtendedBlock blk);
{code}
Can we make it a {{project / private static }} method? There are several
efforts to not explicitly expose {{File}} based APIs through {{FsVolumeSpi}}
and {{FsDatasetSpi}}.
Also {{DataBalacerTestUtils#getBlockCount()}} and {{moveAllDataToDestVolume()}}
can be static as well.
> DiskBalancer : Refactor moveBlockAcrossStorage to be used by disk balancer
> --------------------------------------------------------------------------
>
> Key: HDFS-9735
> URL: https://issues.apache.org/jira/browse/HDFS-9735
> Project: Hadoop HDFS
> Issue Type: Sub-task
> Components: balancer & mover
> Affects Versions: HDFS-1312
> Reporter: Anu Engineer
> Assignee: Anu Engineer
> Fix For: HDFS-1312
>
> Attachments: HDFS-9735-HDFS-1312.001.patch
>
>
> Refactor moveBlockAcrossStorage so that code can be shared by both mover and
> diskbalancer.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)