[
https://issues.apache.org/jira/browse/HDFS-11038?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15593134#comment-15593134
]
Xiaobing Zhou commented on HDFS-11038:
--------------------------------------
This can be fixed by closing FileSystem instance maintaine by
org.apache.hadoop.hdfs.server.diskbalancer.command. See also
[HDFS-9462.002.patch|https://issues.apache.org/jira/secure/attachment/12834552/HDFS-9462.002.patch].
{code}
110 /**
111 * Cleans any resources held by this command.
112 * <p>
113 * The main goal is to delete id file created in
114 * {@link org.apache.hadoop.hdfs.server.balancer.checkAndMarkRunning},
115 * otherwise, it's not allowed to run multiple commands in a row.
116 * </p>
117 */
118 @Override
119 public void close() throws IOException {
120 if (fs != null) {
121 fs.close();
122 }
123 }
124
{code}
> DiskBalancer: support running multiple commands under one setup of disk
> balancer
> --------------------------------------------------------------------------------
>
> Key: HDFS-11038
> URL: https://issues.apache.org/jira/browse/HDFS-11038
> Project: Hadoop HDFS
> Issue Type: Sub-task
> Components: balancer & mover
> Reporter: Xiaobing Zhou
> Assignee: Xiaobing Zhou
>
> Disk balancer follows/reuses one rule designed by HDFS balancer, that is,
> only one instance is allowed to run at the same time. This is correct in
> production system to avoid any inconsistencies, but it's not ideal to write
> and run unit tests. For example, it should be allowed run plan, execute, scan
> commands under one setup of disk balancer. One instance rule will throw
> exception by complaining 'Another instance is running'. In such a case,
> there's no way to do a full life cycle tests which involves a sequence of
> commands.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]