-
Notifications
You must be signed in to change notification settings - Fork 304
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HPCC-30184 Expose WU "Process" meta info in WsWorkunits.WUInfo #17997
Conversation
https://track.hpccsystems.com/browse/HPCC-30184 |
@jakesmith I tested this PR and it does report all the items of the WU "Process" section in my local containerized environment and bare metal environment. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@wangkx - looks good, a couple of minor comments.
common/workunit/workunit.hpp
Outdated
@@ -1294,6 +1294,7 @@ interface IConstWorkUnit : extends IConstWorkUnitInfo | |||
virtual IStringIterator *getLogs(const char *type, const char *instance=NULL) const = 0; | |||
virtual IStringIterator *getProcesses(const char *type) const = 0; | |||
virtual IPropertyTreeIterator* getProcesses(const char *type, const char *instance) const = 0; | |||
virtual IPropertyTreeIterator* getAllProcesses() const = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
instead of extending the interface, can you allow the existing getProcesses calls to return all, if type and/or instance are null?
@jakesmith please review my changes. |
common/workunit/workunit.cpp
Outdated
xpath.append(instance); | ||
else | ||
StringBuffer xpath("Process/"); | ||
if (isEmptyString(type) && isEmptyString(instance)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
apologies, I don't think this is right (my fault of suggesting it), it now conflates the purpose of the method (it can now return 'processes' or 'types'.
It was better as you had it before with a new method, but the name should have been clearer to indicate it is returning an iterator of types not processes, e.g. call it 'getProcessTypes'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No problem. I will change back to the new method with the new name.
if (!isEmptyString(pattern)) | ||
p->setPattern(pattern); | ||
|
||
processList.append(*p.getLink()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
trivial: could be p.getClear()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@wangkx - please see comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@wangkx - looks good.
@wangkx - please squash |
Revise based on review: 1. rename the getAllProcesses() to getProcessTypes(). 2. revise the code for querying process data from IPropertyTree. 3. set default values from ecm file. Signed-off-by: wangkx <[email protected]>
@ghalliday please merge this PR. |
90a2a67
into
hpcc-systems:candidate-9.4.x
Type of change:
Checklist:
Smoketest:
Testing: