mirror of https://github.com/apache/kafka.git
kafka-1567; Metric memory leaking after closing the clients; patched by Jiangjie Qin; reviewed by Guozhang Wang and Jun Rao
This commit is contained in:
parent
aa70a7d025
commit
a552d4b743
|
|
@ -9,14 +9,19 @@ import tempfile
|
||||||
import commands
|
import commands
|
||||||
from jira.client import JIRA
|
from jira.client import JIRA
|
||||||
|
|
||||||
def get_jira():
|
def get_jira_config():
|
||||||
options = {
|
|
||||||
'server': 'https://issues.apache.org/jira'
|
|
||||||
}
|
|
||||||
# read the config file
|
# read the config file
|
||||||
home=jira_home=os.getenv('HOME')
|
home=jira_home=os.getenv('HOME')
|
||||||
home=home.rstrip('/')
|
home=home.rstrip('/')
|
||||||
jira_config = dict(line.strip().split('=') for line in open(home + '/jira.ini'))
|
jira_config = dict(line.strip().split('=') for line in open(home + '/jira.ini'))
|
||||||
|
return jira_config
|
||||||
|
|
||||||
|
def get_jira():
|
||||||
|
options = {
|
||||||
|
'server': 'https://issues.apache.org/jira'
|
||||||
|
}
|
||||||
|
|
||||||
|
jira_config = get_jira_config()
|
||||||
jira = JIRA(options,basic_auth=(jira_config['user'], jira_config['password']))
|
jira = JIRA(options,basic_auth=(jira_config['user'], jira_config['password']))
|
||||||
return jira
|
return jira
|
||||||
|
|
||||||
|
|
@ -134,5 +139,18 @@ def main():
|
||||||
comment = comment + rb_url + ' against branch ' + opt.branch
|
comment = comment + rb_url + ' against branch ' + opt.branch
|
||||||
jira.add_comment(opt.jira, comment)
|
jira.add_comment(opt.jira, comment)
|
||||||
|
|
||||||
|
#update the JIRA status to PATCH AVAILABLE
|
||||||
|
transitions = jira.transitions(issue)
|
||||||
|
transitionsMap ={}
|
||||||
|
|
||||||
|
for t in transitions:
|
||||||
|
transitionsMap[t['name']] = t['id']
|
||||||
|
|
||||||
|
jira_config = get_jira_config()
|
||||||
|
|
||||||
|
if('Submit Patch' in transitionsMap):
|
||||||
|
jira.transition_issue(issue, transitionsMap['Submit Patch'] , assignee={'name': jira_config['user']} )
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
sys.exit(main())
|
sys.exit(main())
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue