eagle-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From h..@apache.org
Subject incubator-eagle git commit: EAGLE-138 Fix unicode conversion bug for Python 2.6
Date Fri, 22 Jan 2016 15:26:21 GMT
Repository: incubator-eagle
Updated Branches:
  refs/heads/master 52a89dc6d -> dcfeae759


EAGLE-138 Fix unicode conversion bug for Python 2.6

https://issues.apache.org/jira/browse/EAGLE-138

Fix for following exception on Python 2.6:
    main except:  argument for 's' must be a string
    Traceback (most recent call last):
      File "hadoop_jmx_kafka.py", line 180, in <module>
          main()
            File "hadoop_jmx_kafka.py", line 171, in main
                raise e
                struct.error: argument for 's' must be a string

Closes #75


Project: http://git-wip-us.apache.org/repos/asf/incubator-eagle/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-eagle/commit/dcfeae75
Tree: http://git-wip-us.apache.org/repos/asf/incubator-eagle/tree/dcfeae75
Diff: http://git-wip-us.apache.org/repos/asf/incubator-eagle/diff/dcfeae75

Branch: refs/heads/master
Commit: dcfeae75998af071dffe9a78ba3dfdd957285241
Parents: 52a89dc
Author: Hao Chen <hao@apache.org>
Authored: Fri Jan 22 23:24:51 2016 +0800
Committer: Hao Chen <hao@apache.org>
Committed: Fri Jan 22 23:24:51 2016 +0800

----------------------------------------------------------------------
 eagle-external/hadoop_jmx_collector/hadoop_jmx_kafka.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/dcfeae75/eagle-external/hadoop_jmx_collector/hadoop_jmx_kafka.py
----------------------------------------------------------------------
diff --git a/eagle-external/hadoop_jmx_collector/hadoop_jmx_kafka.py b/eagle-external/hadoop_jmx_collector/hadoop_jmx_kafka.py
index 8e51556..e0667af 100644
--- a/eagle-external/hadoop_jmx_collector/hadoop_jmx_kafka.py
+++ b/eagle-external/hadoop_jmx_collector/hadoop_jmx_kafka.py
@@ -147,7 +147,7 @@ def main():
         component = config[u'input'].get('component').encode('utf-8')
 
         if config[u'input'].has_key("host"):
-            host = config[u'input'].get("host")
+            host = config[u'input'].get("host").encode('utf-8')
         else:
             host = socket.getfqdn()
 
@@ -155,7 +155,7 @@ def main():
         https = config[u'input'].get('https')
         kafkaConfig = config[u'output'].get(u'kafka')
         brokerList = kafkaConfig.get('brokerList')
-        topic = kafkaConfig.get('topic')
+        topic = kafkaConfig.get('topic').encode('utf-8')
 
         beans = get_jmx_beans(host, port, https)
         #print brokerList


Mime
View raw message