Hello, I am using storm ui rest api to get some metrics. However when doing so, after some time the ui.log shows too man open files error. Using lsof -p <PID of UI> and see a lot of information like "can't identify protocol". The python code used to fetch the data is list below. Could anyone help me please? Thank you!!

*import urllib2**
**import json**
**
**top_summary_url='http://nz:8080/api/v1/topology/summary'**
**
**def getCapMetric(topname,components):**
** urlstr = 'http://nz:8080/api/v1/topology/' + getTopologyId(topname) + '/component/' + components**
**    f=urllib2.urlopen(urlstr)**
**    response =json.load(f)**
**    f.close()**
**    avg_cap=0**
**    for dic in response['executorStats']:**
**        avg_cap+=float(dic['capacity'])**
**    avg_cap/=len(response['executorStats'])**
**    return avg_cap**
**
**def getTopologyId(topname):**
**    response=json.load(urllib2.urlopen(top_summary_url))**
**    for dic in response["topologies"]:**
**        if dic['name']==topname:**
**            return dic['id']**
*

Reply via email to