wojiaodoubao commented on a change in pull request #2035:
URL: https://github.com/apache/hadoop/pull/2035#discussion_r432247578



##########
File path: 
hadoop-tools/hadoop-federation-balance/src/site/markdown/FederationBalance.md
##########
@@ -0,0 +1,156 @@
+<!---
+  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. See accompanying LICENSE file.
+-->
+
+Federation Balance Guide
+=====================
+
+---
+
+ - [Overview](#Overview)
+ - [Usage](#Usage)
+     - [Basic Usage](#Basic_Usage)
+ - [Command Options](#Command_Options)
+ - [Configuration Options](#Configuration_Options)
+ - [Architecture of Federation Balance](#Architecture_of_Federation_Balance)
+
+---
+
+Overview
+--------
+
+  Federation Balance is a tool balancing data across different federation
+  namespaces. It uses DistCp to copy data from the source path to the target
+  path. First it creates a snapshot at the source path and submit the initial
+  distcp. Then it uses distcp diff to do the incremental copy. Finally when the
+  source and the target are the same, it updates the mount table in Router and
+  move the source to trash.
+
+  This document aims to describe the design and usage of the Federation 
Balance.
+
+Usage
+-----
+
+### Basic Usage
+
+  The federation balance tool supports both normal federation cluster and
+  router-based federation cluster. Taking rbf for example. Supposing we have a
+  mount entry in Router:
+
+    /foo/src --> hdfs://nn0:8020/foo/src
+
+  Submit a federation balance job locally. The first parameter should be a 
mount
+  entry. The second parameter is the target path. The target path must includes
+  the target cluster.
+
+    bash$ /bin/hadoop fedbalance submit /foo/src hdfs://nn1:8020/foo/dst
+
+  This will copy data from hdfs://nn0:8020/foo/src to hdfs://nn1:8020/foo/dst
+  incrementally and finally update the mount entry to:
+
+    /foo/src --> hdfs://nn1:8020/foo/dst
+
+  If the hadoop shell process exits unexpectedly and we want to continue the
+  unfinished job, we can use command:
+
+    bash$ /bin/hadoop fedbalance continue

Review comment:
       Sorry I didn't understand. Do you mean the documentation actually 
doesn't need the code format ? I tried to control the line within 81 characters 
except the command line and the tables. I'm sure if it's the right way. Hope 
for your further advice.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to