Repository: hadoop
Updated Branches:
  refs/heads/branch-2.8 c8bcc9650 -> 525b25894


HADOOP-14315. Python example in the rack awareness document doesn't work due to 
bad indentation

This closes #214

Signed-off-by: Akira Ajisaka <[email protected]>
(cherry picked from commit 654372db859656a2201ae9f9f7c374c6564ea34d)
(cherry picked from commit 6cfceee86547211c71f8cb6f9c63798a229de03e)


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/525b2589
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/525b2589
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/525b2589

Branch: refs/heads/branch-2.8
Commit: 525b2589444b33ba65c618b6404e79e8e3e38bbb
Parents: c8bcc96
Author: Kengo Seki <[email protected]>
Authored: Mon Apr 17 23:29:58 2017 -0400
Committer: Akira Ajisaka <[email protected]>
Committed: Tue Apr 18 17:16:03 2017 +0900

----------------------------------------------------------------------
 .../hadoop-common/src/site/markdown/RackAwareness.md    | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/525b2589/hadoop-common-project/hadoop-common/src/site/markdown/RackAwareness.md
----------------------------------------------------------------------
diff --git 
a/hadoop-common-project/hadoop-common/src/site/markdown/RackAwareness.md 
b/hadoop-common-project/hadoop-common/src/site/markdown/RackAwareness.md
index ced6c84..0ae1de3 100644
--- a/hadoop-common-project/hadoop-common/src/site/markdown/RackAwareness.md
+++ b/hadoop-common-project/hadoop-common/src/site/markdown/RackAwareness.md
@@ -91,12 +91,12 @@ sys.argv.pop(0)                                             
     # discard name
 netmask = '255.255.255.0'                                        # set netmask 
to what's being used in your environment.  The example uses a /24
 
 for ip in sys.argv:                                              # loop over 
list of datanode IP's
-address = '{0}/{1}'.format(ip, netmask)                      # format address 
string so it looks like 'ip/netmask' to make netaddr work
-try:
-   network_address = netaddr.IPNetwork(address).network     # calculate and 
print network address
-   print "/{0}".format(network_address)
-except:
-   print "/rack-unknown"                                    # print catch-all 
value if unable to calculate network address
+    address = '{0}/{1}'.format(ip, netmask)                      # format 
address string so it looks like 'ip/netmask' to make netaddr work
+    try:
+        network_address = netaddr.IPNetwork(address).network     # calculate 
and print network address
+        print "/{0}".format(network_address)
+    except:
+        print "/rack-unknown"                                    # print 
catch-all value if unable to calculate network address
 ```
 
 bash Example


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

Reply via email to