Uploaded image for project: 'Hue (READ ONLY)'
  1. Hue (READ ONLY)
  2. HUE-1534

[zookeeper] host_ports conf parsing breaking

    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', ...]"

      1. So we get the string list: "['host_1:port1'", "'host_2:port_2'" ... And then error occurs...
      2. 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

        Attachments

          Activity

            People

            • Assignee:
              romain Romain Rigaux
              Reporter:
              atupal atupal
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: