Sfoglia il codice sorgente

Merge pull request #8012 from richardkchapman/remove-aborting-from-roxie-stop

HPCC-397 Tidy up hthor/roxie input interfaces

Reviewed-by: Gavin Halliday <ghalliday@hpccsystems.com>
Gavin Halliday 9 anni fa
parent
commit
0ad2daf685

+ 1 - 1
common/thorhelper/roxiehelper.hpp

@@ -144,7 +144,7 @@ extern THORHELPER_API ISortAlgorithm *createSortAlgorithm(RoxieSortAlgorithm alg
 
 //=========================================================================================
 
-interface IGroupedInput : extends IInterface, extends IInputBase
+interface IGroupedInput : extends IInputBase
 {
 };
 

+ 1 - 1
common/thorhelper/roxiehelper.ipp

@@ -27,7 +27,7 @@ extern THORHELPER_API unsigned traceLevel;
 //---------------------------------------------------
 // Base classes for all Roxie/HThor activities
 //---------------------------------------------------
-struct THORHELPER_API ISimpleInputBase //base for IInputBase and IHThorSimpleInput
+struct THORHELPER_API ISimpleInputBase : public IInterface //base for IInputBase and IHThorSimpleInput
 {
     virtual const void * nextInGroup() = 0;     // return NULL for eog/eof
     virtual bool nextGroup(ConstPointerArray & group);      // note: default implementation can be overridden for efficiency...

+ 1 - 3
ecl/eclagent/eclagent.ipp

@@ -845,7 +845,7 @@ class EclSubGraph : public CInterface, implements ILocalEclGraphResults, public
     friend class EclGraphElement;
 private:
 
-    class LegacyInputProbe : public CInterface, implements IHThorInput, implements IInterface
+    class LegacyInputProbe : public CInterfaceOf<IHThorInput>
     {
         IHThorInput  *in;
         EclSubGraph  *owner;
@@ -856,8 +856,6 @@ private:
         StringAttr edgeId;
 
     public:
-        IMPLEMENT_IINTERFACE;
-
         LegacyInputProbe(IHThorInput *_in, EclSubGraph *_owner, unsigned _sourceId, int outputidx)
             : in(_in), owner(_owner), sourceId(_sourceId), outputIndex(outputidx)
         {

+ 2 - 2
ecl/hthor/hthor.ipp

@@ -2565,7 +2565,7 @@ protected:
 };
 
 
-class LocalResultInput : public ISimpleInputBase
+class LocalResultInput : public CInterfaceOf<ISimpleInputBase>
 {
 public:
     void init(IHThorGraphResult * _result)      
@@ -2586,7 +2586,7 @@ protected:
 
 
 
-class ConstPointerArrayInput : public ISimpleInputBase
+class ConstPointerArrayInput : public CInterfaceOf<ISimpleInputBase>
 {
 public:
     void init(ConstPointerArray * _array)       { array = _array; curRow = 0; }

+ 4 - 4
roxie/ccd/ccddebug.cpp

@@ -115,10 +115,10 @@ public:
         inMeta = in->queryOutputMeta();
         assertex(inMeta);
     }
-    virtual void stop(bool aborting)
+    virtual void stop()
     {
         hasStopped = true;
-        in->stop(aborting);
+        in->stop();
     }
     virtual void reset()
     {
@@ -851,9 +851,9 @@ public:
         targetAct->updateTimes(debugContext->querySequence());
     }
 
-    virtual void stop(bool aborting)
+    virtual void stop()
     {
-        InputProbe::stop(aborting);
+        InputProbe::stop();
         sourceAct->updateTimes(debugContext->querySequence());
         targetAct->updateTimes(debugContext->querySequence());
     }

File diff suppressed because it is too large
+ 210 - 175
roxie/ccd/ccdserver.cpp


+ 4 - 3
roxie/ccd/ccdserver.hpp

@@ -90,10 +90,10 @@ interface IRoxieServerContext;
 interface IRoxieSlaveContext;
 class ClusterWriteHandler;
 
-interface IRoxieInput : extends IInterface, extends IInputBase
+interface IRoxieInput : extends IInputBase
 {
     virtual void start(unsigned parentExtractSize, const byte *parentExtract, bool paused) = 0;
-    virtual void stop(bool aborting) = 0;
+    virtual void stop() = 0;
     virtual void reset() = 0;
     virtual void checkAbort() = 0;
     virtual unsigned queryId() const = 0;
@@ -148,7 +148,8 @@ interface IRoxieServerActivity : extends IActivityBase
     virtual void execute(unsigned parentExtractSize, const byte *parentExtract) = 0;
     virtual void onCreate(IRoxieSlaveContext *ctx, IHThorArg *colocalArg) = 0;
     virtual void start(unsigned parentExtractSize, const byte *parentExtract, bool paused) = 0;
-    virtual void stop(bool aborting) = 0;
+    virtual void stop() = 0;
+    virtual void abort() = 0;
     virtual void reset() = 0;
     virtual void addDependency(IRoxieServerActivity &source, unsigned sourceIdx, int controlId) = 0;
     virtual unsigned queryId() const = 0;