浏览代码

HPCC-10732 Call sendRoxieControlAllNodes() to send control:querystats

The --lock flag is needed when sending control:querystats to get
correct Accumulated Counts. Inside the sendRoxieControlAllNodes(), the
sendRoxieControlLock() is called to set the flag. I also revised the
xpath for reading xgmml based on the data structure returned from
roxie.

Signed-off-by: Kevin Wang kevin.wang@lexisnexis.com
Kevin Wang 11 年之前
父节点
当前提交
c8aebb154b
共有 1 个文件被更改,包括 5 次插入4 次删除
  1. 5 4
      esp/services/ws_workunits/ws_workunitsQuerySets.cpp

+ 5 - 4
esp/services/ws_workunits/ws_workunitsQuerySets.cpp

@@ -32,6 +32,7 @@
 
 const unsigned ROXIECONNECTIONTIMEOUT = 1000;   //1 second
 const unsigned ROXIECONTROLQUERYTIMEOUT = 3000; //3 second
+const unsigned ROXIELOCKCONNECTIONTIMEOUT = 60000; //60 second
 
 #define SDS_LOCK_TIMEOUT (5*60*1000) // 5mins, 30s a bit short
 
@@ -1623,9 +1624,8 @@ void CWsWorkunitsEx::getGraphsByQueryId(const char *target, const char *queryId,
     if (eps.empty())
         return;
 
-    VStringBuffer xpath("<control:querystats><Query id='%s'/></control:querystats>", queryId);
-    Owned<ISocket> sock = ISocket::connect_timeout(eps.item(0), ROXIECONNECTIONTIMEOUT);
-    Owned<IPropertyTree> querystats = sendRoxieControlQuery(sock, xpath.str(), ROXIECONTROLQUERYTIMEOUT);
+    VStringBuffer control("<control:querystats><Query id='%s'/></control:querystats>", queryId);
+    Owned<IPropertyTree> querystats = sendRoxieControlAllNodes(eps.item(0), control.str(), false, ROXIELOCKCONNECTIONTIMEOUT);
     if (!querystats)
         return;
 
@@ -1637,7 +1637,7 @@ void CWsWorkunitsEx::getGraphsByQueryId(const char *target, const char *queryId,
         if (graphId && *graphId && !strieq(graphId, aGraphId))
             continue;
 
-        IPropertyTree* xgmml = graph.getBranch("xgmml/graph/graph");
+        IPropertyTree* xgmml = graph.getBranch("xgmml/graph");
         if (!xgmml)
             continue;
 
@@ -1652,6 +1652,7 @@ void CWsWorkunitsEx::getGraphsByQueryId(const char *target, const char *queryId,
             VStringBuffer xpath("//node[@id='%s']", subGraphId);
             toXML(xgmml->queryPropTree(xpath.str()), xml);
         }
+
         g->setGraph(xml.str());
         ECLGraphs.append(*g.getClear());
     }