Преглед изворни кода

Merge pull request #15716 from ghalliday/issue27073

HPCC-27073 Add the workunit to the eclcc tracing output

Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman пре 3 година
родитељ
комит
d625a421ee
3 измењених фајлова са 9 додато и 0 уклоњено
  1. 4 0
      ecl/eclcc/eclcc.cpp
  2. 1 0
      ecl/eclcc/eclcc.hpp
  3. 4 0
      ecl/eclccserver/eclccserver.cpp

+ 4 - 0
ecl/eclcc/eclcc.cpp

@@ -2775,6 +2775,10 @@ int EclCC::parseCommandLineOptions(int argc, const char* argv[])
         else if (iter.matchFlag(optIgnoreUnknownImport, "--ignoreunknownimport"))
         {
         }
+        else if (iter.matchOption(tempArg, "--jobid"))
+        {
+            setDefaultJobId(tempArg, false);
+        }
         else if (iter.matchFlag(optKeywords, "--keywords"))
         {
         }

+ 1 - 0
ecl/eclcc/eclcc.hpp

@@ -96,6 +96,7 @@ const char * const helpText[] = {
     "!   --ignoresimplified Do not use simplified expressions when syntax checking",
     "!   --ignoreunknownimport Do not report an error on an unknown import",
     "!   -internal     Run internal tests",
+    "!   --jobid=str   Set the name of the job id output in the logging",
     "?!  -legacy       Use legacy import and when semantics (deprecated)",
     "!   --leakcheck   Clean up memory since checking for memory leaks",
     "!   --keywords    Outputs the list of ECL reserved words to stdout (XML format)",

+ 4 - 0
ecl/eclccserver/eclccserver.cpp

@@ -546,6 +546,8 @@ class EclccCompileThread : implements IPooledThread, implements IErrorReporter,
         splitDirTail(queryCurrentProcessPath(), eclccProgName);
         eclccProgName.append("eclcc");
         StringBuffer eclccCmd(" --xml -shared");
+        eclccCmd.appendf(" --jobid=%s", workunit->queryWuid());
+
         //Clone all the options that were passed to eclccserver (but not the filename) and also pass them to eclcc
         for (const char * * pArg = globalArgv+1; *pArg; pArg++)
             eclccCmd.append(' ').append(*pArg);
@@ -788,6 +790,8 @@ public:
 
     virtual void threadmain() override
     {
+        setDefaultJobId(wuid, true);
+
         DBGLOG("Compile request processing for workunit %s", wuid.get());
         Owned<IPropertyTree> config = getComponentConfig();
 #ifdef _CONTAINERIZED