[
https://issues.apache.org/jira/browse/HDFS-9545?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15257202#comment-15257202
]
Lei (Eddy) Xu commented on HDFS-9545:
-------------------------------------
Hi, [~anu] Thanks for posting this.
{code}
if (path == null || path.isEmpty()) {
if (getClusterURI().getScheme().startsWith("file")) {
....
{code}
Should we consider cluster URI “file://" as illegal for DiskBalancer? Since
there is no {{DN}}?
{code}
private Path diskBalancerLogs = new Path("/system/diskbalancer/");
{code}
It should put "new Path(...)" as a {{const static DEFAULT_LOG_DIR = new
Path("/system/diskbalancer")"}}.
{code}
} else {
diskBalancerLogs = new Path(path + format.format(now));
}
{code}
If we just let {{diskBalancerLogs = path}}, in this way, it might be easier for
admins to write scripts against {{DiskBalancer}} as they can fully control the
output dirs.
* A general question regarding generating logs dir, are the commands usually
issued against the cluster or just one specific DN? If it only works for one
specific DN, we might want to put DN hostname or IP into {{diskBalancerLogs}}
path.
* {{protected Path getoutputPath()}} to {{getOutputPath()}}
* {{private void printToScreen}} to {{static private void print...}}
* Should {{PlanCommand.getHelp()}} return empty string?
* In {{PlanCommand.execute()}}, please use {{try...resource}} to handle
{{FSDataOutputStreams}}.
* Remove empty line from {{PlanCommand.java:67}} and {{175}}.
* {{PlanCommand.threshold}}, should be more specific in name. What threshold
does it present? Is it a percentage or fraction? In anycase, you might want to
also check that this value is less than {{100%}} or {{1.0}}.
* {{public FSDataOutputStream create(String fileName)}} to {{private static
FSDataOutputStream createLogFIle(...)}}.
* Please capitalize comments for {{getNodeList}} and {{verifyCommandOptions}}.
* Could you consolidate the error messages in {{verifyCommandOptions}}. It'd be
better to just use one {{LOG.error()}} for all.
Thanks again.
> DiskBalancer : Add Plan Command
> -------------------------------
>
> Key: HDFS-9545
> URL: https://issues.apache.org/jira/browse/HDFS-9545
> Project: Hadoop HDFS
> Issue Type: Sub-task
> Components: datanode
> Reporter: Anu Engineer
> Assignee: Anu Engineer
> Attachments: HDFS-9545-HDFS-1312.001.patch
>
>
> Allows user to create a Plan and persist it. This is useful if the users want
> to evaluate the actions of disk balancer before running the balancing job
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)