You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by aa...@apache.org on 2017/04/18 08:15:21 UTC
hadoop git commit: HADOOP-14315. Python example in the rack awareness
document doesn't work due to bad indentation
Repository: hadoop
Updated Branches:
refs/heads/trunk 84a8848aa -> 654372db8
HADOOP-14315. Python example in the rack awareness document doesn't work due to bad indentation
This closes #214
Signed-off-by: Akira Ajisaka <aa...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/654372db
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/654372db
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/654372db
Branch: refs/heads/trunk
Commit: 654372db859656a2201ae9f9f7c374c6564ea34d
Parents: 84a8848
Author: Kengo Seki <se...@apache.org>
Authored: Mon Apr 17 23:29:58 2017 -0400
Committer: Akira Ajisaka <aa...@apache.org>
Committed: Tue Apr 18 17:14:22 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/654372db/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 6a52f51..89946d1 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: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org