{"action":"created","comment":{"url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/pulls/comments/44688402","id":44688402,"diff_hunk":"@@ -60,10 +61,157 @@ class CJobManager : public CSimpleInterface, implements IJobManager, implements\n     StringAttr          currentWuid;\n     ILogMsgHandler *logHandler;\n \n+    CJobMaster *getCurrentJob() { CriticalBlock b(jobCrit); return jobs.ordinality() ? &OLINK(jobs.item(0)) : NULL; }\n     bool executeGraph(IConstWorkUnit &workunit, const char *graphName, const SocketEndpoint &agentEp);\n     void addJob(CJobMaster &job) { CriticalBlock b(jobCrit); jobs.append(job); }\n     void removeJob(CJobMaster &job) { CriticalBlock b(jobCrit); jobs.zap(job); }\n \n+    class CThorDebugListener : public CSimpleInterfaceOf<IInterface>, implements IThreaded\n+    {\n+    protected:\n+        CThreaded threaded;\n+        unsigned port;\n+        Owned<ISocket> sock;\n+        CJobManager &mgr;\n+    private:\n+        volatile bool running;\n+    public:\n+        CThorDebugListener(CJobManager &_mgr) : threaded(\"CThorDebugListener\", this), mgr(_mgr)\n+        {\n+            port = globals->getPropInt(\"DebugPort\", 9877);\n+            running = true;\n+            threaded.start();\n+        }\n+        ~CThorDebugListener()\n+        {\n+            running = false;\n+            if (sock)\n+                sock->cancel_accept();\n+            threaded.join();\n+        }\n+        virtual unsigned getPort() { return port; }\n+\n+        virtual void processDebugCommand(CSafeSocket &ssock, StringBuffer &rawText)\n+        {\n+            Owned<IPropertyTree> queryXml;\n+            try\n+            {\n+                queryXml.setown(createPTreeFromXMLString(rawText.str(), ipt_caseInsensitive, (PTreeReaderOptions)(ptr_ignoreWhiteSpace|ptr_ignoreNameSpaces)));\n+            }\n+            catch (IException *E)\n+            {\n+                StringBuffer s;\n+                DBGLOG(\"ERROR: Invalid XML received from %s:%s\", E->errorMessage(s).str(), rawText.str());\n+                throw;\n+            }\n+\n+            Linked<CJobMaster> job = mgr.getCurrentJob();\n+            if (!job)\n+                throw MakeStringException(5300, \"Command not available when no graph active\");//TODO:Update error code\n+\n+            const char *command = queryXml->queryName();\n+            const char *edgeId = queryXml->queryProp(\"@edgeId\");\n+            const char *graphId = job->queryGraphName()?job->queryGraphName():\"\";","path":"thorlcr/master/thgraphmanager.cpp","position":62,"original_position":62,"commit_id":"52c89045b5bdf1b5f718788c318ca2187d9f48af","original_commit_id":"52c89045b5bdf1b5f718788c318ca2187d9f48af","user":{"login":"jakesmith","id":902700,"avatar_url":"https://avatars.githubusercontent.com/u/902700?v=3","gravatar_id":"","url":"https://api.github.com/users/jakesmith","html_url":"https://github.com/jakesmith","followers_url":"https://api.github.com/users/jakesmith/followers","following_url":"https://api.github.com/users/jakesmith/following{/other_user}","gists_url":"https://api.github.com/users/jakesmith/gists{/gist_id}","starred_url":"https://api.github.com/users/jakesmith/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jakesmith/subscriptions","organizations_url":"https://api.github.com/users/jakesmith/orgs","repos_url":"https://api.github.com/users/jakesmith/repos","events_url":"https://api.github.com/users/jakesmith/events{/privacy}","received_events_url":"https://api.github.com/users/jakesmith/received_events","type":"User","site_admin":false},"body":"curious why the :\"\" ?","created_at":"2015-11-12T17:40:45Z","updated_at":"2015-11-12T17:40:45Z","html_url":"https://github.com/hpcc-systems/HPCC-Platform/pull/7862#discussion_r44688402","pull_request_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/pulls/7862","_links":{"self":{"href":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/pulls/comments/44688402"},"html":{"href":"https://github.com/hpcc-systems/HPCC-Platform/pull/7862#discussion_r44688402"},"pull_request":{"href":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/pulls/7862"}}},"pull_request":{"url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/pulls/7862","id":47804372,"html_url":"https://github.com/hpcc-systems/HPCC-Platform/pull/7862","diff_url":"https://github.com/hpcc-systems/HPCC-Platform/pull/7862.diff","patch_url":"https://github.com/hpcc-systems/HPCC-Platform/pull/7862.patch","issue_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/issues/7862","number":7862,"state":"open","locked":false,"title":"HPCC-13030 Add row tracing support to engines","user":{"login":"shamser","id":11410590,"avatar_url":"https://avatars.githubusercontent.com/u/11410590?v=3","gravatar_id":"","url":"https://api.github.com/users/shamser","html_url":"https://github.com/shamser","followers_url":"https://api.github.com/users/shamser/followers","following_url":"https://api.github.com/users/shamser/following{/other_user}","gists_url":"https://api.github.com/users/shamser/gists{/gist_id}","starred_url":"https://api.github.com/users/shamser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shamser/subscriptions","organizations_url":"https://api.github.com/users/shamser/orgs","repos_url":"https://api.github.com/users/shamser/repos","events_url":"https://api.github.com/users/shamser/events{/privacy}","received_events_url":"https://api.github.com/users/shamser/received_events","type":"User","site_admin":false},"body":"Return last 10 rows for a given activity & edge, when xml submitted to port 9877 (or as configured in global) in the form:\r\n\r\n  \\<debug source=\"ACTIVITY_ID\" edge=\"EDGE_ID\"\\>\\</debug\\>\r\n","created_at":"2015-10-15T15:44:54Z","updated_at":"2015-11-12T17:40:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6a728ec76c9d340c4b98db31aed7db6835f7605c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/pulls/7862/commits","review_comments_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/pulls/7862/comments","review_comment_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/pulls/comments{/number}","comments_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/issues/7862/comments","statuses_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/statuses/52c89045b5bdf1b5f718788c318ca2187d9f48af","head":{"label":"shamser:issue13030","ref":"issue13030","sha":"52c89045b5bdf1b5f718788c318ca2187d9f48af","user":{"login":"shamser","id":11410590,"avatar_url":"https://avatars.githubusercontent.com/u/11410590?v=3","gravatar_id":"","url":"https://api.github.com/users/shamser","html_url":"https://github.com/shamser","followers_url":"https://api.github.com/users/shamser/followers","following_url":"https://api.github.com/users/shamser/following{/other_user}","gists_url":"https://api.github.com/users/shamser/gists{/gist_id}","starred_url":"https://api.github.com/users/shamser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shamser/subscriptions","organizations_url":"https://api.github.com/users/shamser/orgs","repos_url":"https://api.github.com/users/shamser/repos","events_url":"https://api.github.com/users/shamser/events{/privacy}","received_events_url":"https://api.github.com/users/shamser/received_events","type":"User","site_admin":false},"repo":{"id":32939247,"name":"HPCC-Platform","full_name":"shamser/HPCC-Platform","owner":{"login":"shamser","id":11410590,"avatar_url":"https://avatars.githubusercontent.com/u/11410590?v=3","gravatar_id":"","url":"https://api.github.com/users/shamser","html_url":"https://github.com/shamser","followers_url":"https://api.github.com/users/shamser/followers","following_url":"https://api.github.com/users/shamser/following{/other_user}","gists_url":"https://api.github.com/users/shamser/gists{/gist_id}","starred_url":"https://api.github.com/users/shamser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shamser/subscriptions","organizations_url":"https://api.github.com/users/shamser/orgs","repos_url":"https://api.github.com/users/shamser/repos","events_url":"https://api.github.com/users/shamser/events{/privacy}","received_events_url":"https://api.github.com/users/shamser/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/shamser/HPCC-Platform","description":"IMPORTANT - Issue tracking has been migrated to JIRA - use your github ID and password reset mechanism to log in","fork":true,"url":"https://api.github.com/repos/shamser/HPCC-Platform","forks_url":"https://api.github.com/repos/shamser/HPCC-Platform/forks","keys_url":"https://api.github.com/repos/shamser/HPCC-Platform/keys{/key_id}","collaborators_url":"https://api.github.com/repos/shamser/HPCC-Platform/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/shamser/HPCC-Platform/teams","hooks_url":"https://api.github.com/repos/shamser/HPCC-Platform/hooks","issue_events_url":"https://api.github.com/repos/shamser/HPCC-Platform/issues/events{/number}","events_url":"https://api.github.com/repos/shamser/HPCC-Platform/events","assignees_url":"https://api.github.com/repos/shamser/HPCC-Platform/assignees{/user}","branches_url":"https://api.github.com/repos/shamser/HPCC-Platform/branches{/branch}","tags_url":"https://api.github.com/repos/shamser/HPCC-Platform/tags","blobs_url":"https://api.github.com/repos/shamser/HPCC-Platform/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/shamser/HPCC-Platform/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/shamser/HPCC-Platform/git/refs{/sha}","trees_url":"https://api.github.com/repos/shamser/HPCC-Platform/git/trees{/sha}","statuses_url":"https://api.github.com/repos/shamser/HPCC-Platform/statuses/{sha}","languages_url":"https://api.github.com/repos/shamser/HPCC-Platform/languages","stargazers_url":"https://api.github.com/repos/shamser/HPCC-Platform/stargazers","contributors_url":"https://api.github.com/repos/shamser/HPCC-Platform/contributors","subscribers_url":"https://api.github.com/repos/shamser/HPCC-Platform/subscribers","subscription_url":"https://api.github.com/repos/shamser/HPCC-Platform/subscription","commits_url":"https://api.github.com/repos/shamser/HPCC-Platform/commits{/sha}","git_commits_url":"https://api.github.com/repos/shamser/HPCC-Platform/git/commits{/sha}","comments_url":"https://api.github.com/repos/shamser/HPCC-Platform/comments{/number}","issue_comment_url":"https://api.github.com/repos/shamser/HPCC-Platform/issues/comments{/number}","contents_url":"https://api.github.com/repos/shamser/HPCC-Platform/contents/{+path}","compare_url":"https://api.github.com/repos/shamser/HPCC-Platform/compare/{base}...{head}","merges_url":"https://api.github.com/repos/shamser/HPCC-Platform/merges","archive_url":"https://api.github.com/repos/shamser/HPCC-Platform/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/shamser/HPCC-Platform/downloads","issues_url":"https://api.github.com/repos/shamser/HPCC-Platform/issues{/number}","pulls_url":"https://api.github.com/repos/shamser/HPCC-Platform/pulls{/number}","milestones_url":"https://api.github.com/repos/shamser/HPCC-Platform/milestones{/number}","notifications_url":"https://api.github.com/repos/shamser/HPCC-Platform/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/shamser/HPCC-Platform/labels{/name}","releases_url":"https://api.github.com/repos/shamser/HPCC-Platform/releases{/id}","created_at":"2015-03-26T16:34:05Z","updated_at":"2015-03-26T16:34:22Z","pushed_at":"2015-11-12T13:41:23Z","git_url":"git://github.com/shamser/HPCC-Platform.git","ssh_url":"git@github.com:shamser/HPCC-Platform.git","clone_url":"https://github.com/shamser/HPCC-Platform.git","svn_url":"https://github.com/shamser/HPCC-Platform","homepage":"track.hpccsystems.com","size":301797,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"hpcc-systems:master","ref":"master","sha":"413c6312733a4c31992f4c9af0f03493913f90e5","user":{"login":"hpcc-systems","id":900867,"avatar_url":"https://avatars.githubusercontent.com/u/900867?v=3","gravatar_id":"","url":"https://api.github.com/users/hpcc-systems","html_url":"https://github.com/hpcc-systems","followers_url":"https://api.github.com/users/hpcc-systems/followers","following_url":"https://api.github.com/users/hpcc-systems/following{/other_user}","gists_url":"https://api.github.com/users/hpcc-systems/gists{/gist_id}","starred_url":"https://api.github.com/users/hpcc-systems/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hpcc-systems/subscriptions","organizations_url":"https://api.github.com/users/hpcc-systems/orgs","repos_url":"https://api.github.com/users/hpcc-systems/repos","events_url":"https://api.github.com/users/hpcc-systems/events{/privacy}","received_events_url":"https://api.github.com/users/hpcc-systems/received_events","type":"Organization","site_admin":false},"repo":{"id":2030681,"name":"HPCC-Platform","full_name":"hpcc-systems/HPCC-Platform","owner":{"login":"hpcc-systems","id":900867,"avatar_url":"https://avatars.githubusercontent.com/u/900867?v=3","gravatar_id":"","url":"https://api.github.com/users/hpcc-systems","html_url":"https://github.com/hpcc-systems","followers_url":"https://api.github.com/users/hpcc-systems/followers","following_url":"https://api.github.com/users/hpcc-systems/following{/other_user}","gists_url":"https://api.github.com/users/hpcc-systems/gists{/gist_id}","starred_url":"https://api.github.com/users/hpcc-systems/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hpcc-systems/subscriptions","organizations_url":"https://api.github.com/users/hpcc-systems/orgs","repos_url":"https://api.github.com/users/hpcc-systems/repos","events_url":"https://api.github.com/users/hpcc-systems/events{/privacy}","received_events_url":"https://api.github.com/users/hpcc-systems/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/hpcc-systems/HPCC-Platform","description":"IMPORTANT - Issue tracking has been migrated to JIRA - use your github ID and password reset mechanism to log in","fork":false,"url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform","forks_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/forks","keys_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/teams","hooks_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/hooks","issue_events_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/issues/events{/number}","events_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/events","assignees_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/assignees{/user}","branches_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/branches{/branch}","tags_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/tags","blobs_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/git/refs{/sha}","trees_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/statuses/{sha}","languages_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/languages","stargazers_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/stargazers","contributors_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/contributors","subscribers_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/subscribers","subscription_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/subscription","commits_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/commits{/sha}","git_commits_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/git/commits{/sha}","comments_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/comments{/number}","issue_comment_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/issues/comments{/number}","contents_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/contents/{+path}","compare_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/merges","archive_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/downloads","issues_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/issues{/number}","pulls_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/pulls{/number}","milestones_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/milestones{/number}","notifications_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/labels{/name}","releases_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/releases{/id}","created_at":"2011-07-11T14:29:51Z","updated_at":"2015-11-05T06:05:19Z","pushed_at":"2015-11-12T16:40:48Z","git_url":"git://github.com/hpcc-systems/HPCC-Platform.git","ssh_url":"git@github.com:hpcc-systems/HPCC-Platform.git","clone_url":"https://github.com/hpcc-systems/HPCC-Platform.git","svn_url":"https://github.com/hpcc-systems/HPCC-Platform","homepage":"track.hpccsystems.com","size":361691,"stargazers_count":259,"watchers_count":259,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":127,"mirror_url":null,"open_issues_count":436,"forks":127,"open_issues":436,"watchers":259,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/pulls/7862"},"html":{"href":"https://github.com/hpcc-systems/HPCC-Platform/pull/7862"},"issue":{"href":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/issues/7862"},"comments":{"href":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/issues/7862/comments"},"review_comments":{"href":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/pulls/7862/comments"},"review_comment":{"href":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/pulls/7862/commits"},"statuses":{"href":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/statuses/52c89045b5bdf1b5f718788c318ca2187d9f48af"}}}}