Browse Source

HPCC-11958 Remove the context from CRoxie...Param class

And also remove the context from getRoxieStateInfo().

Signed-off-by: wangkx <kevin.wang@lexisnexis.com>
wangkx 10 năm trước cách đây
mục cha
commit
fab7e0b7bf

+ 5 - 6
esp/services/ws_machine/ws_machineService.cpp

@@ -119,18 +119,17 @@ Mutex CMachineInfoThreadParam::s_mutex;
 class CRoxieStateInfoThreadParam : public CWsMachineThreadParam
 {
 public:
-    IEspContext&                    context;
     StringAttr                      clusterName;
     IArrayOf<IEspMachineInfoEx>&    machineInfoTable;     //For response
 
-    CRoxieStateInfoThreadParam(Cws_machineEx* pService, IEspContext& _context, const char* _clusterName, IArrayOf<IEspMachineInfoEx>& _machineInfoTable)
-       : CWsMachineThreadParam(pService), context(_context), clusterName(_clusterName), machineInfoTable(_machineInfoTable)
+    CRoxieStateInfoThreadParam(Cws_machineEx* pService, const char* _clusterName, IArrayOf<IEspMachineInfoEx>& _machineInfoTable)
+       : CWsMachineThreadParam(pService), clusterName(_clusterName), machineInfoTable(_machineInfoTable)
     {
     }
 
     virtual void doWork()
     {
-        m_pService->getRoxieStateInfo(context, this);
+        m_pService->getRoxieStateInfo(this);
     }
 };
 
@@ -960,7 +959,7 @@ void Cws_machineEx::readRoxieStatus(const Owned<IPropertyTree> controlResp, CIAr
     updateMajorRoxieStateHash(stateHashes, roxieStates);
 }
 
-void Cws_machineEx::getRoxieStateInfo(IEspContext& context, CRoxieStateInfoThreadParam* param)
+void Cws_machineEx::getRoxieStateInfo(CRoxieStateInfoThreadParam* param)
 {
     const char* clusterName = param->clusterName.get();
     if (!clusterName || !*clusterName)
@@ -1027,7 +1026,7 @@ void Cws_machineEx::getMachineInfo(IEspContext& context, bool getRoxieState, CGe
         StringArray& roxieClusters = machineInfoData.getRoxieClusters();
         ForEachItemIn(i, roxieClusters)
         {
-            Owned<CRoxieStateInfoThreadParam> pThreadReq = new CRoxieStateInfoThreadParam(this, context, roxieClusters.item(i),
+            Owned<CRoxieStateInfoThreadParam> pThreadReq = new CRoxieStateInfoThreadParam(this, roxieClusters.item(i),
                 machineInfoData.getMachineInfoTable());
             PooledThreadHandle handle = m_threadPool->start( pThreadReq.getClear());
             threadHandles.append(handle);

+ 1 - 1
esp/services/ws_machine/ws_machineService.hpp

@@ -739,7 +739,7 @@ public:
     bool onStartStopBegin( IEspContext &context, IEspStartStopBeginRequest &req,  IEspStartStopBeginResponse &resp);
     bool onStartStopDone( IEspContext &context, IEspStartStopDoneRequest &req,  IEspStartStopResponse &resp);
 
-    void getRoxieStateInfo(IEspContext& context, CRoxieStateInfoThreadParam* param);
+    void getRoxieStateInfo(CRoxieStateInfoThreadParam* param);
     void doGetMachineInfo(IEspContext& context, CMachineInfoThreadParam* pReq);
     void doGetMetrics(CMetricsThreadParam* pParam);
     bool doStartStop(IEspContext &context, StringArray& addresses, char* userName, char* password, bool bStop, IEspStartStopResponse &resp);