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

Add TableScan Replayer #11205

Closed
wants to merge 1 commit into from
Closed

Conversation

duanmeng
Copy link
Collaborator

@duanmeng duanmeng commented Oct 9, 2024

Add a split tracer to record and load the input splits from a tracing 'TableScan'
operator, and for getting the traced splits when replaying 'TableScan'.
Currently, it only works with 'HiveConnectorSplit'. In the future, it will
be extended to handle more types of splits, such as 'IcebergHiveConnectorSplit'.

part of #9668

@duanmeng duanmeng requested a review from xiaoxmeng October 9, 2024 10:51
@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Oct 9, 2024
Copy link

netlify bot commented Oct 9, 2024

Deploy Preview for meta-velox canceled.

Name Link
🔨 Latest commit 35a67df
🔍 Latest deploy log https://app.netlify.com/sites/meta-velox/deploys/6730088a3bf0c400089a44a0

@duanmeng duanmeng force-pushed the split_tracer branch 5 times, most recently from cb32bbb to 8bc94c4 Compare October 9, 2024 13:06
Copy link
Contributor

@xiaoxmeng xiaoxmeng left a comment

Choose a reason for hiding this comment

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

@duanmeng thanks for the change % comments!

velox/exec/QuerySplitTracer.h Outdated Show resolved Hide resolved
velox/exec/QuerySplitTracer.h Outdated Show resolved Hide resolved
velox/exec/QuerySplitTracer.h Outdated Show resolved Hide resolved
velox/exec/QuerySplitTracer.cpp Outdated Show resolved Hide resolved
velox/exec/QuerySplitTracer.cpp Outdated Show resolved Hide resolved
@duanmeng duanmeng force-pushed the split_tracer branch 7 times, most recently from cdba012 to 1e45029 Compare October 13, 2024 14:44
velox/exec/QuerySplitWriter.h Outdated Show resolved Hide resolved
velox/exec/QuerySplitWriter.cpp Outdated Show resolved Hide resolved
velox/exec/QuerySplitReader.h Outdated Show resolved Hide resolved
velox/exec/QuerySplitReader.cpp Outdated Show resolved Hide resolved
velox/exec/QuerySplitReader.cpp Outdated Show resolved Hide resolved
velox/exec/tests/QueryTraceTest.cpp Outdated Show resolved Hide resolved
velox/exec/tests/QueryTraceTest.cpp Outdated Show resolved Hide resolved
@duanmeng duanmeng changed the title Add QuerySplitTracer to records and rebuild splits Add TableScanReplayer Oct 14, 2024
@duanmeng duanmeng changed the title Add TableScanReplayer Add TableScan Replayer Oct 14, 2024
@duanmeng duanmeng force-pushed the split_tracer branch 5 times, most recently from 73387d0 to dfdedd0 Compare October 15, 2024 08:21
Copy link
Contributor

@xiaoxmeng xiaoxmeng left a comment

Choose a reason for hiding this comment

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

@duanmeng thanks!

@facebook-github-bot
Copy link
Contributor

@xiaoxmeng has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@duanmeng duanmeng force-pushed the split_tracer branch 4 times, most recently from cbe9dee to 507c1e6 Compare October 30, 2024 15:12
Copy link
Contributor

@xiaoxmeng xiaoxmeng left a comment

Choose a reason for hiding this comment

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

@duanmeng LGTM % minors. Thanks!

velox/exec/TraceUtil.h Show resolved Hide resolved
velox/exec/OperatorTraceReader.h Outdated Show resolved Hide resolved
velox/exec/OperatorTraceWriter.h Show resolved Hide resolved
velox/exec/OperatorTraceWriter.h Show resolved Hide resolved
velox/exec/OperatorTraceWriter.cpp Outdated Show resolved Hide resolved
}

void OperatorTraceSplitWriter::write(const exec::Split& split) const {
VELOX_CHECK(!split.hasGroup(), "Do not support grouped execution");
Copy link
Contributor

Choose a reason for hiding this comment

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

I guess we could support group later once we have driver id mapping in trace node? Leave a TODO here? thanks!

@@ -117,6 +118,9 @@ RowVectorPtr TableScan::getOutput() {
if (!split.hasConnectorSplit()) {
noMoreSplits_ = true;
dynamicFilters_.clear();
if (splitTracer_ != nullptr) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's just call this in Operator::finishTrace()? Let the framework handle the tracing calls? Thanks!

velox/tool/trace/TraceReplayRunner.cpp Show resolved Hide resolved
velox/exec/tests/OperatorTraceTest.cpp Outdated Show resolved Hide resolved
velox/exec/tests/OperatorTraceTest.cpp Show resolved Hide resolved
@duanmeng duanmeng force-pushed the split_tracer branch 11 times, most recently from 2cc5150 to 6dc8fe8 Compare November 7, 2024 02:32
velox/connectors/hive/HiveConnectorSplit.cpp Outdated Show resolved Hide resolved
velox/exec/tests/OperatorTraceTest.cpp Outdated Show resolved Hide resolved
@facebook-github-bot
Copy link
Contributor

@xiaoxmeng has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@xiaoxmeng has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@xiaoxmeng merged this pull request in 12b52e7.

Copy link

Conbench analyzed the 1 benchmark run on commit 12b52e70.

There were no benchmark performance regressions. 🎉

The full Conbench report has more details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants