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

Using local shuffle reader avoid flight rpc call. #347

Merged
merged 2 commits into from
Oct 15, 2022

Conversation

Ted-Jiang
Copy link
Member

@Ted-Jiang Ted-Jiang commented Oct 14, 2022

Which issue does this PR close?

Closes #346.

There is a situation when shuffler reader and writer are on the same machine. So we can read from directly from local disk without calling RPC and arrow-flight decoding.

Rationale for this change

What changes are included in this PR?

Are there any user-facing changes?

@@ -498,36 +639,37 @@ mod tests {
Schema::new(vec![Field::new("id", DataType::Int32, false)])
}

#[derive(Clone)]
struct MockPartitionReader {}
Copy link
Member Author

Choose a reason for hiding this comment

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

this will replace by PartitionReaderEnum::local

@Ted-Jiang
Copy link
Member Author

@mingmwang @andygrove @yahoNanJing PTAL😊

}

AbortableReceiverStream::create(response_receiver, join_handles)
}

fn check_is_local_location(host: &str) -> bool {
Copy link
Member

Choose a reason for hiding this comment

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

An alternate approach here would be to just look on disk and see if the shuffle files exist, then this can work in containerized environments, such as k8s.

Copy link
Member

Choose a reason for hiding this comment

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

Filed #356 so we can discuss this as a follow on

Copy link
Member Author

Choose a reason for hiding this comment

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

Sounds like a better approach🤔

@andygrove
Copy link
Member

Thanks @Ted-Jiang! I will test this over the weekend.

Copy link
Member

@andygrove andygrove left a comment

Choose a reason for hiding this comment

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

This is awesome! Thanks @Ted-Jiang. I see a nice 30% speedup when running queries locally. 🚀

@andygrove andygrove merged commit dd01ed9 into apache:master Oct 15, 2022
@Ted-Jiang
Copy link
Member Author

This is awesome! Thanks @Ted-Jiang. I see a nice 30% speedup when running queries locally. 🚀

@andygrove Cool! We can care the locality of shuffle in the future!👍

@mingmwang
Copy link
Contributor

@Ted-Jiang Could you please add some log info to indicate how many shuffle partitions are read from local and how many are ready from remote?

@mingmwang
Copy link
Contributor

@Ted-Jiang

Please pay attention to the error handling, both remote shuffle read and local shuffle read should return the same error when encounter issues, so that the Scheduler can reschedule tasks/stages.

BallistaError::FetchFailed

@Ted-Jiang
Copy link
Member Author

@Ted-Jiang

Please pay attention to the error handling, both remote shuffle read and local shuffle read should return the same error when encounter issues, so that the Scheduler can reschedule tasks/stages.

BallistaError::FetchFailed

Sure!

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

Successfully merging this pull request may close these issues.

Using local shuffle reader avoid flight rpc call.
3 participants