GitHub PullRequestReviewCommentEvent at 2014-11-19 14:50:43
Repository: HPCC-Platform
Actor: wangkx
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/pulls/comments/20578654","id":20578654,"diff_hunk":"@@ -572,113 +748,256 @@ void CWsSMCEx::readDFUWUs(IEspContext &context, const char* queueName, const cha\n     }\n }\n \n-void CWsSMCEx::getDFUServersAndWUs(IEspContext &context, IPropertyTree* envRoot, IArrayOf<IEspServerJobQueue>& serverJobQueues, IArrayOf<IEspActiveWorkunit>& aws)\n+void CActivityInfo::getDFURecoveryJobs()\n {\n-    if (!envRoot)\n+    Owned<IRemoteConnection> connDFURecovery = querySDS().connect(\"DFU/RECOVERY\",myProcessSession(), RTM_LOCK_READ, 30000);\n+    if (!connDFURecovery)\n         return;\n \n-    VStringBuffer path(\"Software/%s\", eqDfu);\n-    Owned<IPropertyTreeIterator> services = envRoot->getElements(path);\n-    ForEach(*services)\n+    Owned<IPropertyTreeIterator> it(connDFURecovery->queryRoot()->getElements(\"job\"));\n+    ForEach(*it)\n     {\n-        IPropertyTree &serviceTree = services->query();\n-        const char *qname = serviceTree.queryProp(\"@queue\");\n-        const char *serverName = serviceTree.queryProp(\"@name\");\n-        if (!qname || !*qname)\n+        IPropertyTree &jb=it->query();\n+        if (!jb.getPropBool(\"Running\",false))\n             continue;\n \n-        StringArray queues;\n-        queues.appendListUniq(qname, \",\");\n-        ForEachItemIn(q, queues)\n+        unsigned done = 0, total = 0;\n+        Owned<IPropertyTreeIterator> it = jb.getElements(\"DFT/progress\");\n+        ForEach(*it)\n         {\n-            const char *queueName = queues.item(q);\n-            readDFUWUs(context, queueName, serverName, aws);\n-            addServerJobQueue(serverJobQueues, queueName, serverName, STATUS_SERVER_DFUSERVER, NULL, 0);\n+            IPropertyTree &p=it->query();\n+            if (p.getPropInt(\"@done\",0))\n+                done++;\n+            total++;\n         }\n+\n+        StringBuffer cmd;\n+        cmd.append(jb.queryProp(\"@command\")).append(\" \").append(jb.queryProp(\"@command_parameters\"));\n+\n+        Owned<IEspDFUJob> job = new CDFUJob(\"\",\"\");\n+        job->setTimeStarted(jb.queryProp(\"@time_started\"));\n+        job->setDone(done);\n+        job->setTotal(total);\n+        job->setCommand(cmd.str());\n+        DFURecoveryJobs.append(*job.getLink());","path":"esp/services/ws_smc/ws_smcService.cpp","position":806,"original_position":806,"commit_id":"600e53d2aa96227d64376c880b599489a5203ba8","original_commit_id":"600e53d2aa96227d64376c880b599489a5203ba8","user":{"login":"wangkx","id":903406,"avatar_url":"https://avatars.githubusercontent.com/u/903406?v=3","gravatar_id":"","url":"https://api.github.com/users/wangkx","html_url":"https://github.com/wangkx","followers_url":"https://api.github.com/users/wangkx/followers","following_url":"https://api.github.com/users/wangkx/following{/other_user}","gists_url":"https://api.github.com/users/wangkx/gists{/gist_id}","starred_url":"https://api.github.com/users/wangkx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wangkx/subscriptions","organizations_url":"https://api.github.com/users/wangkx/orgs","repos_url":"https://api.github.com/users/wangkx/repos","events_url":"https://api.github.com/users/wangkx/events{/privacy}","received_events_url":"https://api.github.com/users/wangkx/received_events","type":"User","site_admin":false},"body":"ok","created_at":"2014-11-19T14:50:43Z","updated_at":"2014-11-19T14:50:43Z","html_url":"https://github.com/hpcc-systems/HPCC-Platform/pull/6515#discussion_r20578654","pull_request_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/pulls/6515","_links":{"self":{"href":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/pulls/comments/20578654"},"html":{"href":"https://github.com/hpcc-systems/HPCC-Platform/pull/6515#discussion_r20578654"},"pull_request":{"href":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/pulls/6515"}}},"pull_request":{"url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/pulls/6515","id":22166607,"html_url":"https://github.com/hpcc-systems/HPCC-Platform/pull/6515","diff_url":"https://github.com/hpcc-systems/HPCC-Platform/pull/6515.diff","patch_url":"https://github.com/hpcc-systems/HPCC-Platform/pull/6515.patch","issue_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/issues/6515","number":6515,"state":"open","locked":false,"title":"HPCC-12311 Remove extra calls to Dali for JobQueues","user":{"login":"wangkx","id":903406,"avatar_url":"https://avatars.githubusercontent.com/u/903406?v=3","gravatar_id":"","url":"https://api.github.com/users/wangkx","html_url":"https://github.com/wangkx","followers_url":"https://api.github.com/users/wangkx/followers","following_url":"https://api.github.com/users/wangkx/following{/other_user}","gists_url":"https://api.github.com/users/wangkx/gists{/gist_id}","starred_url":"https://api.github.com/users/wangkx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wangkx/subscriptions","organizations_url":"https://api.github.com/users/wangkx/orgs","repos_url":"https://api.github.com/users/wangkx/repos","events_url":"https://api.github.com/users/wangkx/events{/privacy}","received_events_url":"https://api.github.com/users/wangkx/received_events","type":"User","site_admin":false},"body":"The existing WsSMC.Activity code retrieves JobQueue info\r\nusing the functions inside wujobq and dfuwu. The\r\ncreateJobQueue() and copyItemsAndState() are used for an\r\nECL job queue. The queuedJobs() is used for a DFL job queue.\r\nEach of those functions creates at least one connection to\r\nDali. Since an HPCC systrem contains multiple job queues, a\r\nlot of the connections are created for one onActivity call.\r\nIn this fix, only one connection is used to Dali which gets\r\nthe /JobQueues tree and the tree has the JobQueue info for\r\nall of the job queues.\r\n\r\nSigned-off-by: wangkx <kevin.wang@lexisnexis.com>","created_at":"2014-10-02T20:10:17Z","updated_at":"2014-11-19T14:50:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8fda20c9dbadf6094393f2949dd5e2ecba592eaf","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/pulls/6515/commits","review_comments_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/pulls/6515/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/6515/comments","statuses_url":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/statuses/600e53d2aa96227d64376c880b599489a5203ba8","head":{"label":"wangkx:h12311b","ref":"h12311b","sha":"600e53d2aa96227d64376c880b599489a5203ba8","user":{"login":"wangkx","id":903406,"avatar_url":"https://avatars.githubusercontent.com/u/903406?v=3","gravatar_id":"","url":"https://api.github.com/users/wangkx","html_url":"https://github.com/wangkx","followers_url":"https://api.github.com/users/wangkx/followers","following_url":"https://api.github.com/users/wangkx/following{/other_user}","gists_url":"https://api.github.com/users/wangkx/gists{/gist_id}","starred_url":"https://api.github.com/users/wangkx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wangkx/subscriptions","organizations_url":"https://api.github.com/users/wangkx/orgs","repos_url":"https://api.github.com/users/wangkx/repos","events_url":"https://api.github.com/users/wangkx/events{/privacy}","received_events_url":"https://api.github.com/users/wangkx/received_events","type":"User","site_admin":false},"repo":{"id":2199076,"name":"HPCC-Platform","full_name":"wangkx/HPCC-Platform","owner":{"login":"wangkx","id":903406,"avatar_url":"https://avatars.githubusercontent.com/u/903406?v=3","gravatar_id":"","url":"https://api.github.com/users/wangkx","html_url":"https://github.com/wangkx","followers_url":"https://api.github.com/users/wangkx/followers","following_url":"https://api.github.com/users/wangkx/following{/other_user}","gists_url":"https://api.github.com/users/wangkx/gists{/gist_id}","starred_url":"https://api.github.com/users/wangkx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wangkx/subscriptions","organizations_url":"https://api.github.com/users/wangkx/orgs","repos_url":"https://api.github.com/users/wangkx/repos","events_url":"https://api.github.com/users/wangkx/events{/privacy}","received_events_url":"https://api.github.com/users/wangkx/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/wangkx/HPCC-Platform","description":"HPCC Systems big data solution, community edition","fork":true,"url":"https://api.github.com/repos/wangkx/HPCC-Platform","forks_url":"https://api.github.com/repos/wangkx/HPCC-Platform/forks","keys_url":"https://api.github.com/repos/wangkx/HPCC-Platform/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wangkx/HPCC-Platform/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wangkx/HPCC-Platform/teams","hooks_url":"https://api.github.com/repos/wangkx/HPCC-Platform/hooks","issue_events_url":"https://api.github.com/repos/wangkx/HPCC-Platform/issues/events{/number}","events_url":"https://api.github.com/repos/wangkx/HPCC-Platform/events","assignees_url":"https://api.github.com/repos/wangkx/HPCC-Platform/assignees{/user}","branches_url":"https://api.github.com/repos/wangkx/HPCC-Platform/branches{/branch}","tags_url":"https://api.github.com/repos/wangkx/HPCC-Platform/tags","blobs_url":"https://api.github.com/repos/wangkx/HPCC-Platform/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wangkx/HPCC-Platform/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wangkx/HPCC-Platform/git/refs{/sha}","trees_url":"https://api.github.com/repos/wangkx/HPCC-Platform/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wangkx/HPCC-Platform/statuses/{sha}","languages_url":"https://api.github.com/repos/wangkx/HPCC-Platform/languages","stargazers_url":"https://api.github.com/repos/wangkx/HPCC-Platform/stargazers","contributors_url":"https://api.github.com/repos/wangkx/HPCC-Platform/contributors","subscribers_url":"https://api.github.com/repos/wangkx/HPCC-Platform/subscribers","subscription_url":"https://api.github.com/repos/wangkx/HPCC-Platform/subscription","commits_url":"https://api.github.com/repos/wangkx/HPCC-Platform/commits{/sha}","git_commits_url":"https://api.github.com/repos/wangkx/HPCC-Platform/git/commits{/sha}","comments_url":"https://api.github.com/repos/wangkx/HPCC-Platform/comments{/number}","issue_comment_url":"https://api.github.com/repos/wangkx/HPCC-Platform/issues/comments/{number}","contents_url":"https://api.github.com/repos/wangkx/HPCC-Platform/contents/{+path}","compare_url":"https://api.github.com/repos/wangkx/HPCC-Platform/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wangkx/HPCC-Platform/merges","archive_url":"https://api.github.com/repos/wangkx/HPCC-Platform/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wangkx/HPCC-Platform/downloads","issues_url":"https://api.github.com/repos/wangkx/HPCC-Platform/issues{/number}","pulls_url":"https://api.github.com/repos/wangkx/HPCC-Platform/pulls{/number}","milestones_url":"https://api.github.com/repos/wangkx/HPCC-Platform/milestones{/number}","notifications_url":"https://api.github.com/repos/wangkx/HPCC-Platform/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wangkx/HPCC-Platform/labels{/name}","releases_url":"https://api.github.com/repos/wangkx/HPCC-Platform/releases{/id}","created_at":"2011-08-12T20:36:10Z","updated_at":"2014-06-24T21:33:39Z","pushed_at":"2014-11-17T20:40:05Z","git_url":"git://github.com/wangkx/HPCC-Platform.git","ssh_url":"git@github.com:wangkx/HPCC-Platform.git","clone_url":"https://github.com/wangkx/HPCC-Platform.git","svn_url":"https://github.com/wangkx/HPCC-Platform","homepage":"www.hpccsystems.com","size":131421,"stargazers_count":1,"watchers_count":1,"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":1,"default_branch":"master"}},"base":{"label":"hpcc-systems:master","ref":"master","sha":"240d601d86fb8f30fbd02aed8f623954556fbb4a","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":"2014-11-19T13:34:30Z","pushed_at":"2014-11-19T13:34:29Z","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":272053,"stargazers_count":236,"watchers_count":236,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":94,"mirror_url":null,"open_issues_count":425,"forks":94,"open_issues":425,"watchers":236,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/pulls/6515"},"html":{"href":"https://github.com/hpcc-systems/HPCC-Platform/pull/6515"},"issue":{"href":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/issues/6515"},"comments":{"href":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/issues/6515/comments"},"review_comments":{"href":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/pulls/6515/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/6515/commits"},"statuses":{"href":"https://api.github.com/repos/hpcc-systems/HPCC-Platform/statuses/600e53d2aa96227d64376c880b599489a5203ba8"}}}}