|
@@ -55,7 +55,9 @@ class CJobManager : public CSimpleInterface, implements IJobManager, implements
|
|
Owned<IConversation> conversation;
|
|
Owned<IConversation> conversation;
|
|
StringAttr queueName;
|
|
StringAttr queueName;
|
|
CriticalSection replyCrit, jobCrit;
|
|
CriticalSection replyCrit, jobCrit;
|
|
|
|
+#ifndef _CONTAINERIZED
|
|
CFifoFileCache querySoCache;
|
|
CFifoFileCache querySoCache;
|
|
|
|
+#endif
|
|
Owned<IJobQueue> jobq;
|
|
Owned<IJobQueue> jobq;
|
|
ICopyArrayOf<CJobMaster> jobs;
|
|
ICopyArrayOf<CJobMaster> jobs;
|
|
Owned<IException> exitException;
|
|
Owned<IException> exitException;
|
|
@@ -248,7 +250,9 @@ public:
|
|
virtual void setWuid(const char *wuid, const char *cluster=NULL);
|
|
virtual void setWuid(const char *wuid, const char *cluster=NULL);
|
|
virtual IDeMonServer *queryDeMonServer() { return demonServer; }
|
|
virtual IDeMonServer *queryDeMonServer() { return demonServer; }
|
|
virtual void fatal(IException *e);
|
|
virtual void fatal(IException *e);
|
|
|
|
+#ifndef _CONTAINERIZED
|
|
virtual void addCachedSo(const char *name);
|
|
virtual void addCachedSo(const char *name);
|
|
|
|
+#endif
|
|
virtual void updateWorkUnitLog(IWorkUnit &workunit);
|
|
virtual void updateWorkUnitLog(IWorkUnit &workunit);
|
|
};
|
|
};
|
|
|
|
|
|
@@ -477,6 +481,7 @@ void CJobManager::run()
|
|
LOG(MCdebugProgress, thorJob, "Listening for graph");
|
|
LOG(MCdebugProgress, thorJob, "Listening for graph");
|
|
|
|
|
|
setWuid(NULL);
|
|
setWuid(NULL);
|
|
|
|
+#ifndef _CONTAINERIZED
|
|
StringBuffer soPath;
|
|
StringBuffer soPath;
|
|
globals->getProp("@query_so_dir", soPath);
|
|
globals->getProp("@query_so_dir", soPath);
|
|
StringBuffer soPattern("*.");
|
|
StringBuffer soPattern("*.");
|
|
@@ -487,7 +492,6 @@ void CJobManager::run()
|
|
#endif
|
|
#endif
|
|
querySoCache.init(soPath.str(), DEFAULT_QUERYSO_LIMIT, soPattern);
|
|
querySoCache.init(soPath.str(), DEFAULT_QUERYSO_LIMIT, soPattern);
|
|
|
|
|
|
-#ifndef _CONTAINERIZED
|
|
|
|
SCMStringBuffer _queueNames;
|
|
SCMStringBuffer _queueNames;
|
|
const char *thorName = globals->queryProp("@name");
|
|
const char *thorName = globals->queryProp("@name");
|
|
if (!thorName) thorName = "thor";
|
|
if (!thorName) thorName = "thor";
|
|
@@ -930,16 +934,24 @@ bool CJobManager::executeGraph(IConstWorkUnit &workunit, const char *graphName,
|
|
Owned<IConstWUQuery> query = workunit.getQuery();
|
|
Owned<IConstWUQuery> query = workunit.getQuery();
|
|
SCMStringBuffer soName;
|
|
SCMStringBuffer soName;
|
|
query->getQueryDllName(soName);
|
|
query->getQueryDllName(soName);
|
|
|
|
+#ifndef _CONTAINERIZED
|
|
unsigned version = query->getQueryDllCrc();
|
|
unsigned version = query->getQueryDllCrc();
|
|
|
|
+#endif
|
|
query.clear();
|
|
query.clear();
|
|
|
|
|
|
|
|
+ bool sendSo = false;
|
|
|
|
+ Owned<ILoadedDllEntry> querySo;
|
|
StringBuffer soPath;
|
|
StringBuffer soPath;
|
|
|
|
+#ifdef _CONTAINERIZED
|
|
|
|
+ PROGLOG("Loading query name: %s", soName.str());
|
|
|
|
+ querySo.setown(queryDllServer().loadDll(soName.str(), DllLocationLocal));
|
|
|
|
+ soPath.append(querySo->queryName());
|
|
|
|
+#else
|
|
globals->getProp("@query_so_dir", soPath);
|
|
globals->getProp("@query_so_dir", soPath);
|
|
StringBuffer compoundPath;
|
|
StringBuffer compoundPath;
|
|
compoundPath.append(soPath.str());
|
|
compoundPath.append(soPath.str());
|
|
soPath.append(soName.str());
|
|
soPath.append(soName.str());
|
|
getCompoundQueryName(compoundPath, soName.str(), version);
|
|
getCompoundQueryName(compoundPath, soName.str(), version);
|
|
- bool sendSo = false;
|
|
|
|
if (querySoCache.isAvailable(compoundPath.str()))
|
|
if (querySoCache.isAvailable(compoundPath.str()))
|
|
PROGLOG("Using existing local dll: %s", compoundPath.str()); // It is assumed if present here then _still_ present on slaves from previous send.
|
|
PROGLOG("Using existing local dll: %s", compoundPath.str()); // It is assumed if present here then _still_ present on slaves from previous send.
|
|
else
|
|
else
|
|
@@ -962,15 +974,16 @@ bool CJobManager::executeGraph(IConstWorkUnit &workunit, const char *graphName,
|
|
}
|
|
}
|
|
sendSo = globals->getPropBool("Debug/@dllsToSlaves", true);
|
|
sendSo = globals->getPropBool("Debug/@dllsToSlaves", true);
|
|
}
|
|
}
|
|
-
|
|
|
|
- Owned<ILoadedDllEntry> querySo = createDllEntry(compoundPath.str(), false, NULL, false);
|
|
|
|
|
|
+ querySo.setown(createDllEntry(compoundPath.str(), false, NULL, false));
|
|
|
|
+ soPath.swapWith(compoundPath);
|
|
|
|
+#endif
|
|
|
|
|
|
SCMStringBuffer eclstr;
|
|
SCMStringBuffer eclstr;
|
|
StringAttr user(workunit.queryUser());
|
|
StringAttr user(workunit.queryUser());
|
|
|
|
|
|
PROGLOG("Started wuid=%s, user=%s, graph=%s\n", wuid.str(), user.str(), graphName);
|
|
PROGLOG("Started wuid=%s, user=%s, graph=%s\n", wuid.str(), user.str(), graphName);
|
|
|
|
|
|
- PROGLOG("Query %s loaded", compoundPath.str());
|
|
|
|
|
|
+ PROGLOG("Query %s loaded", soPath.str());
|
|
Owned<CJobMaster> job = createThorGraph(graphName, workunit, querySo, sendSo, agentEp);
|
|
Owned<CJobMaster> job = createThorGraph(graphName, workunit, querySo, sendSo, agentEp);
|
|
unsigned wfid = job->getWfid();
|
|
unsigned wfid = job->getWfid();
|
|
StringBuffer graphScope;
|
|
StringBuffer graphScope;
|
|
@@ -1038,10 +1051,12 @@ bool CJobManager::executeGraph(IConstWorkUnit &workunit, const char *graphName,
|
|
return allDone;
|
|
return allDone;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+#ifndef _CONTAINERIZED
|
|
void CJobManager::addCachedSo(const char *name)
|
|
void CJobManager::addCachedSo(const char *name)
|
|
{
|
|
{
|
|
querySoCache.add(name);
|
|
querySoCache.add(name);
|
|
}
|
|
}
|
|
|
|
+#endif
|
|
|
|
|
|
static int exitCode = -1;
|
|
static int exitCode = -1;
|
|
void setExitCode(int code) { exitCode = code; }
|
|
void setExitCode(int code) { exitCode = code; }
|