Skip to content
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-13030 Add row tracing support to engines #7862

Closed
wants to merge 4 commits into from

Conversation

shamser
Copy link
Contributor

@shamser shamser commented Oct 15, 2015

Return last 10 rows for a given activity & edge, when xml submitted to port 9877 (or as configured in global) in the form:

@hpcc-jirabot
Copy link

https://track.hpccsystems.com/browse/HPCC-13030
Jira not updated (state was not active or new)

@shamser
Copy link
Contributor Author

shamser commented Oct 15, 2015

@richardkchapman @jakesmith Not complete but would appreciate interim comments. Thanks.

@HPCCSmoketest
Copy link
Contributor

Automated Smoketest Build: success
Install hpccsystems-platform-community-with-plugins_6.1.0-trunk0.el6.x86_64.rpm
HPCC Start: OK
HPCC Stop: OK
HPCC Uninstall: OK

1 similar comment
@HPCCSmoketest
Copy link
Contributor

Automated Smoketest Build: success
Install hpccsystems-platform-community-with-plugins_6.1.0-trunk0.el6.x86_64.rpm
HPCC Start: OK
HPCC Stop: OK
HPCC Uninstall: OK

@@ -250,6 +250,7 @@ class InputCounter : public CSimpleInterface, implements IThorDataLink
virtual CActivityBase *queryFromActivity();
virtual void dataLinkSerialize(MemoryBuffer &mb);
unsigned __int64 queryTotalCycles() const;
virtual void debugRequest(MemoryBuffer &msg);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor: would be good to make the other IThorDataLink interface definitions here, declared with virtual as well at this juncture.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consistency.
All are virtuals and declared virtuals here, apart from queryTotalCycles(),.

@jakesmith
Copy link
Member

@shamser - looks good, a few comments, mostly minor/trivial.

@HPCCSmoketest
Copy link
Contributor

Automated Smoketest Build: success
Install hpccsystems-platform-community-with-plugins_6.1.0-trunk0.el6.x86_64.rpm
HPCC Start: OK
HPCC Stop: OK
HPCC Uninstall: OK

else if (strncmp(command,"quit", 4) == 0)
{
LOG(MCwarning, thorJob, "ABORT detected from user");
Owned <IException> e = MakeThorException(TE_WorkUnitAborting, "User signalled abort");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

quibble: don't normally have space between Owned and <

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note, should I also modify the original code where there is a space there also? (thgraphmaster.cpp line 1637)

@HPCCSmoketest
Copy link
Contributor

Automated Smoketest Build: success
Install hpccsystems-platform-community-with-plugins_6.1.0-trunk0.el6.x86_64.rpm
HPCC Start: OK
HPCC Stop: OK
HPCC Uninstall: OK

@HPCCSmoketest
Copy link
Contributor

Automated Smoketest Build: success
Install hpccsystems-platform-community-with-plugins_6.1.0-trunk0.el6.x86_64.rpm
HPCC Start: OK
HPCC Stop: OK
HPCC Uninstall: OK

@shamser
Copy link
Contributor Author

shamser commented Nov 23, 2015

@jakesmith Modified as per code review comments.


const __int64 diffUSec = cycle_to_microsec(get_cycles_now() - cycleStamp);
const __int64 adjustSecs = diffUSec / 1000000;
const __int64 adjustUSecs = (diffUSec % 1000000 );
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

trivial: extra space before )

@jakesmith
Copy link
Member

@shamser - final comment I think, will also nee rebasing.

@shamser
Copy link
Contributor Author

shamser commented Nov 23, 2015

@jakesmith @richardkchapman Commit re-based. Over to you.

@HPCCSmoketest
Copy link
Contributor

Automated Smoketest Build: success
Install hpccsystems-platform-community-with-plugins_6.1.0-trunk0.el6.x86_64.rpm
HPCC Start: OK
HPCC Stop: OK
HPCC Uninstall: OK

@jakesmith
Copy link
Member

@shamser - Looks good, but needs rebasing onto master

Implement row tracing for Thor
@shamser
Copy link
Contributor Author

shamser commented Nov 23, 2015

@jakesmith @richardkchapman Rebased to master

@HPCCSmoketest
Copy link
Contributor

Automated Smoketest Build: success
Install hpccsystems-platform-community-with-plugins_6.1.0-trunk0.el6.x86_64.rpm
HPCC Start: OK
HPCC Stop: OK
HPCC Uninstall: OK

sock->cancel_accept();
threaded.join();
}
virtual unsigned getPort() { return port; }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

trivial: could be const

@jakesmith
Copy link
Member

@richardkchapman - ready to merge

CDelayedInput object pointer stored in multiple locations - usage must be tracked
@shamser
Copy link
Contributor Author

shamser commented Nov 23, 2015

@jakesmith bug fix: was storing CDelayedInput in new array but not tracking usage.

@HPCCSmoketest
Copy link
Contributor

Automated Smoketest Build: failed
Number of Error(s): 0

@HPCCSmoketest
Copy link
Contributor

Automated Smoketest Build: success
Install hpccsystems-platform-community-with-plugins_6.1.0-trunk0.el6.x86_64.rpm
HPCC Start: OK
HPCC Stop: OK
HPCC Uninstall: OK

if (queryJob().getOptBool("TRACEROWS"))
{
const unsigned numTraceRows = queryJob().getOptInt("numTraceRows", 10);
outputs.append(new CTracingThorDataLink(itdl, queryHelper(), numTraceRows));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will this work if an output ever gets cast (or query interfaced) back to its original base class?

What I am seeing is that the metaInfo (counts and recordSize etc.) are not getting reported within the graphs and suspect that something is attempting to cast *CTracingThorDataLink to *CThorDataLink (via queryOutput?) and if successful pulls the metaInfo from it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, if outputs is cast back to the original base class, it won't work. We had to make changes to NSplitterSlaveActivity because of this issue. Let me see everywhere that outputs and, if necessary, modify to work with CTracingThorDataLink.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think there is (or was) any casting to the implemented class, except NSplitter's special case where it was casting to it's own derivative of CThorDataLink, which as @shamser says has been handled differently now (not using queryOutput()).

If there were any miscasting, you'd likely get a crash than missing meta info.

@GordonSmith, is the missing meta info involving particular activities/edges ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@GordonSmith The missing meta information is occuring in the master branch. All work-units (even one produced by prior builds) has missing metat information. If I revert to the
candidate-5.4.6, the meta information is visible again. A problem with eclwatch? Jira ticket: https://track.hpccsystems.com/browse/HPCC-14600

@HPCCSmoketest
Copy link
Contributor

Automated Smoketest Build: success
Install hpccsystems-platform-community-with-plugins_6.1.0-trunk0.el6.x86_64.rpm
HPCC Start: OK
HPCC Stop: OK
HPCC Uninstall: OK

@richardkchapman
Copy link
Member

Merged manually to 6.0.0, squashed to single commit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
7 participants