forked from apache/hadoop
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
HDFS-15410. Add separated config file hdfs-fedbalance-default.xml for…
… fedbalance tool. Contributed by Jinglun.
- Loading branch information
Showing
6 changed files
with
125 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
hadoop-tools/hadoop-federation-balance/src/main/resources/hdfs-fedbalance-default.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<?xml version="1.0"?> | ||
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?> | ||
<!-- | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
--> | ||
|
||
<!-- Do not modify this file directly. Anything that need to be overwritten, | ||
need to be done so, through -D switches or customized conf --> | ||
|
||
<configuration> | ||
|
||
<property> | ||
<name>hdfs.fedbalance.procedure.scheduler.journal.uri</name> | ||
<value>hdfs://localhost:8020/tmp/procedure</value> | ||
<description> | ||
The uri of the journal, the journal file is used for handling the | ||
job persistence and recover. | ||
</description> | ||
</property> | ||
|
||
<property> | ||
<name>hdfs.fedbalance.procedure.work.thread.num</name> | ||
<value>10</value> | ||
<description> | ||
The worker threads number of the BalanceProcedureScheduler. | ||
BalanceProcedureScheduler is responsible for scheduling a balance | ||
job, including submit, run, delay and recover. | ||
</description> | ||
</property> | ||
|
||
</configuration> |
34 changes: 34 additions & 0 deletions
34
...p-federation-balance/src/test/java/org/apache/hadoop/tools/fedbalance/TestFedBalance.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/** | ||
* Licensed to the Apache Software Foundation (ASF) under one | ||
* or more contributor license agreements. See the NOTICE file | ||
* distributed with this work for additional information | ||
* regarding copyright ownership. The ASF licenses this file | ||
* to you under the Apache License, Version 2.0 (the | ||
* "License"); you may not use this file except in compliance | ||
* with the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package org.apache.hadoop.tools.fedbalance; | ||
|
||
import org.apache.hadoop.conf.Configuration; | ||
import org.junit.Test; | ||
|
||
import static junit.framework.TestCase.assertNotNull; | ||
import static org.apache.hadoop.tools.fedbalance.FedBalanceConfigs.SCHEDULER_JOURNAL_URI; | ||
import static org.apache.hadoop.tools.fedbalance.FedBalanceConfigs.WORK_THREAD_NUM; | ||
|
||
public class TestFedBalance { | ||
@Test | ||
public void testLoadFedBalanceDefaultConf() { | ||
Configuration conf = FedBalance.getDefaultConf(); | ||
assertNotNull(conf.get(SCHEDULER_JOURNAL_URI)); | ||
assertNotNull(conf.get(WORK_THREAD_NUM)); | ||
} | ||
} |