Details
-
Type: Bug
-
Status: Resolved
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: backlog, 3.0.0
-
Fix Version/s: 3.0.0
-
Component/s: con.zookeeper
-
Labels:
-
Environment:
Linux 2.6.32-279.23.1.mi3.el6.x86_64 #1 SMP Thu Jun 6 10:55:45 CST 2013 x86_64 x86_64 x86_64 GNU/Linux
centos 6.3
-
Target Version:
-
Easy:Easy
Description
In the zookeeper/views.py line 49
def _get_overview(host_ports):
stats = {}
for s in host_ports.split(','): # But the the host_ports's type is 'str' and value is in the format: "['host_1:port1', 'host_2:port_2', ...]"
- So we get the string list: "['host_1:port1'", "'host_2:port_2'" ... And then error occurs...
- I just fix: for s in eval(host_ports): ,And it works!
host, port = map(str.strip, s.split(':'))
zks = ZooKeeperStats(host, port)
stats[s] = zks.get_stats() or {}
return stats