You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@heron.apache.org by xi...@apache.org on 2020/05/19 03:30:17 UTC
[incubator-heron] branch master updated: Fix Heron Shell PID
Extractor (#3528)
This is an automated email from the ASF dual-hosted git repository.
xiaoyao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-heron.git
The following commit(s) were added to refs/heads/master by this push:
new d05f6e9 Fix Heron Shell PID Extractor (#3528)
d05f6e9 is described below
commit d05f6e9fcd9646c931906e07de572c979a685720
Author: Xiaoyao Qian <xq...@twitter.com>
AuthorDate: Mon May 18 20:30:05 2020 -0700
Fix Heron Shell PID Extractor (#3528)
* Fix Heron Shell PID Extractor
* read pid file
---
heron/shell/src/python/handlers/pidhandler.py | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/heron/shell/src/python/handlers/pidhandler.py b/heron/shell/src/python/handlers/pidhandler.py
index da1c5c3..7d8b2a8 100644
--- a/heron/shell/src/python/handlers/pidhandler.py
+++ b/heron/shell/src/python/handlers/pidhandler.py
@@ -35,9 +35,5 @@ class PidHandler(tornado.web.RequestHandler):
def get(self, instance_id):
''' get method '''
self.content_type = 'application/json'
- self.write(json.dumps(utils.chain([
- ['ps', 'auxwwww'],
- ['grep', instance_id],
- ['grep', 'java'],
- ['awk', '\'{print $2}\'']])).strip())
+ self.write(json.dumps(utils.chain([['cat', "%s.pid" % instance_id]])).strip())
self.finish()