浏览代码

HPCC-8562 Remove support for legacy thor from the code generator

Signed-off-by: Gavin Halliday <gavin.halliday@lexisnexis.com>
Gavin Halliday 12 年之前
父节点
当前提交
256a4494d4

+ 4 - 9
common/workunit/workunit.cpp

@@ -3951,7 +3951,7 @@ public:
 ClusterType getClusterType(const char * platform, ClusterType dft)
 {
     if (stricmp(platform, "thor") == 0)
-        return ThorCluster;
+        return ThorLCRCluster;
     if (stricmp(platform, "thorlcr") == 0)
         return ThorLCRCluster;
     if (stricmp(platform, "hthor") == 0)
@@ -3968,8 +3968,6 @@ const char *clusterTypeString(ClusterType clusterType, bool lcrSensitive)
     case ThorLCRCluster:
         if (lcrSensitive)
             return "thorlcr";
-        // fall through
-    case ThorCluster:
         return "thor";
     case RoxieCluster:
         return "roxie";
@@ -4034,7 +4032,6 @@ public:
         {
             thorQueue.set(getClusterThorQueueName(queue.clear(), name));
             clusterWidth = 0;
-            bool lcr = false;
             ForEachItemIn(i,thors) 
             {
                 IPropertyTree &thor = thors.item(i);
@@ -4047,12 +4044,10 @@ public:
                     throw MakeStringException(WUERR_MismatchClusterSize,"CEnvironmentClusterInfo: mismatched thor sizes in cluster");
                 clusterWidth = ts;
                 bool islcr = !thor.getPropBool("@Legacy");
-                if (i==0)
-                    lcr = islcr;
-                else if (lcr!=islcr)
-                    throw MakeStringException(WUERR_MismatchThorType,"CEnvironmentClusterInfo: mismatched thor Legacy in cluster");
+                if (!islcr)
+                    throw MakeStringException(WUERR_MismatchThorType,"CEnvironmentClusterInfo: Legacy Thor no longer supported");
             }
-            platform = lcr ? ThorLCRCluster : ThorCluster;
+            platform = ThorLCRCluster;
         }
         else if (roxie)
         {

+ 2 - 2
common/workunit/workunit.hpp

@@ -534,11 +534,11 @@ interface IConstWUExceptionIterator : extends IScmIterator
     virtual IConstWUException & query() = 0;
 };
 
-enum ClusterType { NoCluster, ThorCluster, HThorCluster, RoxieCluster, ThorLCRCluster };
+enum ClusterType { NoCluster, HThorCluster, RoxieCluster, ThorLCRCluster };
 
 extern WORKUNIT_API ClusterType getClusterType(const char * platform, ClusterType dft = NoCluster);
 extern WORKUNIT_API const char *clusterTypeString(ClusterType clusterType, bool lcrSensitive);
-inline bool isThorCluster(ClusterType type) { return (type == ThorCluster) || (type == ThorLCRCluster); }
+inline bool isThorCluster(ClusterType type) { return (type == ThorLCRCluster); }
 
 //! IClusterInfo
 interface IConstWUClusterInfo : extends IInterface

+ 1 - 9
ecl/hqlcpp/hqlcpp.cpp

@@ -1577,7 +1577,7 @@ void HqlCppTranslator::cacheOptions()
         DebugOption(options.minimizeActivityClasses,"minimizeActivityClasses", true),
         DebugOption(options.maxRootMaybeThorActions, "maxRootMaybeThorActions", 0),
         DebugOption(options.includeHelperInGraph,"includeHelperInGraph", false),
-        DebugOption(options.supportsLinkedChildRows,"supportsLinkedChildRows", (targetClusterType != ThorCluster)),
+        DebugOption(options.supportsLinkedChildRows,"supportsLinkedChildRows", true),
         DebugOption(options.minimizeSkewBeforeSpill,"minimizeSkewBeforeSpill", false),
         DebugOption(options.createSerializeForUnknownSize,"createSerializeForUnknownSize", false),
         DebugOption(options.implicitLinkedChildRows,"implicitLinkedChildRows", false),
@@ -1795,13 +1795,6 @@ void HqlCppTranslator::cacheOptions()
 void HqlCppTranslator::postProcessOptions()
 {
 //Any post processing - e.g., dependent flags goes here...
-    if (targetClusterType == ThorCluster)
-    {
-        options.supportDynamicRows = false;
-        options.resourceConditionalActions = false;
-        options.resourceSequential = false;
-    }
-
     if (options.supportDynamicRows)
     {
         options.finalizeAllVariableRows = true;
@@ -1864,7 +1857,6 @@ unsigned HqlCppTranslator::getOptimizeFlags() const
     case HThorCluster:
         optFlags |= HOOnocloneindexlimit|HOOalwayslocal;
         break;
-    case ThorCluster:
     case ThorLCRCluster:
         break;
     default:

+ 0 - 1
ecl/hqlcpp/hqlcppds.cpp

@@ -1655,7 +1655,6 @@ IHqlExpression * HqlCppTranslator::getResourcedChildGraph(BuildCtx & ctx, IHqlEx
     case HThorCluster:
         csfFlags |= CSFcompoundSpill;
         break;
-    case ThorCluster:
     case ThorLCRCluster:
         //Don't compound spills inside a child query because it can cause non remote projects to become remote
         //And we'll also probably be using the roxie code to implement

+ 1 - 1
ecl/hqlcpp/hqlecl.cpp

@@ -623,7 +623,7 @@ extern HQLCPP_API ClusterType queryClusterType(IConstWorkUnit * wu, ClusterType
     if (wu->getDebugValueBool("forceRoxie", false))
         targetClusterType = RoxieCluster;
     else if (prevType == NoCluster)
-        targetClusterType = ThorCluster;
+        targetClusterType = ThorLCRCluster;
 
     SCMStringBuffer targetText;
     wu->getDebugValue("targetClusterType", targetText);

+ 0 - 3
ecl/hqlcpp/hqlhtcpp.cpp

@@ -5518,9 +5518,6 @@ void HqlCppTranslator::updateClusterType()
     const char * clusterTypeText="?";
     switch (targetClusterType)
     {
-    case ThorCluster:
-         clusterTypeText = "thor";
-         break;
     case ThorLCRCluster:
          clusterTypeText = "thorlcr";
          break;

+ 0 - 2
ecl/hqlcpp/hqliproj.cpp

@@ -824,7 +824,6 @@ static unsigned getActivityCost(IHqlExpression * expr, ClusterType targetCluster
 {
     switch (targetClusterType)
     {
-    case ThorCluster:
     case ThorLCRCluster:
         {
             switch (expr->getOperator())
@@ -3147,7 +3146,6 @@ IHqlExpression * ImplicitProjectTransformer::process(IHqlExpression * expr)
     case HThorCluster:
         // same as roxie, but also maybe worth inserting projects to minimise the amount of data that is spilled.
         break;
-    case ThorCluster:
     case ThorLCRCluster:
         //worth inserting projects to reduce copying, spilling, but primarily data transfered between nodes.
         if (options.insertProjectCostLevel || options.optimizeSpills)

+ 1 - 3
ecl/hqlcpp/hqlresource.cpp

@@ -1779,7 +1779,6 @@ EclResourcer::EclResourcer(IErrorReceiver * _errors, IConstWorkUnit * _wu, Clust
     resourceLimit->set(RESactivities, maxActivities);
     switch (targetClusterType)
     {
-    case ThorCluster:
     case ThorLCRCluster:
         resourceLimit->set(RESheavy, maxHeavy).set(REShashdist, maxDistribute);
         resourceLimit->set(RESmastersocket, maxSockets).set(RESslavememory,totalMemory);
@@ -1825,7 +1824,7 @@ EclResourcer::EclResourcer(IErrorReceiver * _errors, IConstWorkUnit * _wu, Clust
     options.useGraphResults = false;        // modified by later call
     options.groupedChildIterators = _translatorOptions.groupedChildIterators;
     options.allowSplitBetweenSubGraphs = false;//(targetClusterType == RoxieCluster);
-    options.supportsChildQueries = (targetClusterType != ThorCluster);
+    options.supportsChildQueries = true;
     options.clusterSize = clusterSize;
     options.preventKeyedSplit = _translatorOptions.preventKeyedSplit;
     options.preventSteppedSplit = _translatorOptions.preventSteppedSplit;
@@ -3749,7 +3748,6 @@ void EclResourcer::spotUnbalancedSplitters(HqlExprArray & exprs)
     {
     case HThorCluster:
         break;
-    case ThorCluster:
     case ThorLCRCluster:
         {
             //Thor only handles one graph at a time, so only walk expressions within a single graph.

+ 1 - 1
ecl/hqlcpp/hqlresource.ipp

@@ -83,7 +83,7 @@ public:
     inline bool canSplit() const            { return targetClusterType != HThorCluster; }
     inline bool checkResources() const      { return isThorCluster(targetClusterType) && !isChildQuery; }
     inline bool targetRoxie() const         { return targetClusterType == RoxieCluster; }
-    inline bool targetThor() const          { return targetClusterType == ThorCluster || targetClusterType == ThorLCRCluster; }
+    inline bool targetThor() const          { return targetClusterType == ThorLCRCluster; }
 };
 
 struct CResources : public CInterface

+ 1 - 1
ecl/hqlcpp/hqlsource.cpp

@@ -941,7 +941,7 @@ void SourceBuilder::analyse(IHqlExpression * expr)
             break;
         }
     case no_stepped:
-        if ((translator.getTargetClusterType() == ThorCluster) && translator.queryOptions().checkThorRestrictions)
+        if ((translator.getTargetClusterType() == ThorLCRCluster) && translator.queryOptions().checkThorRestrictions)
             throwError(HQLERR_ThorNotSupportStepping);
         if (steppedExpr)
             throwError(HQLERR_MultipleStepped);

+ 0 - 1
ecl/hqlcpp/hqlttcpp.cpp

@@ -4215,7 +4215,6 @@ bool CompoundSourceTransformer::needToCloneLimit(IHqlExpression * expr, node_ope
         return false;
     case HThorCluster:
         return (sourceOp != no_compound_indexread) || (op != no_limit);
-    case ThorCluster:
     case ThorLCRCluster:
         return true;
     default: