You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/08/15 07:46:24 UTC
[GitHub] [arrow-ballista] yahoNanJing opened a new pull request, #141: Ignore the previous job_id inside fill_reservations()
yahoNanJing opened a new pull request, #141:
URL: https://github.com/apache/arrow-ballista/pull/141
# Which issue does this PR close?
<!--
We generally require a GitHub issue to be filed for all bug fixes and enhancements and this helps us generate change logs for our releases. You can link an issue to this PR using the GitHub syntax. For example `Closes #123` indicates that this PR will close issue #123.
-->
Closes #138.
# Rationale for this change
<!--
Why are you proposing this change? If this is already explained clearly in the issue then this section is not needed.
Explaining clearly why changes are proposed helps reviewers understand your changes and offer better suggestions for fixes.
-->
# What changes are included in this PR?
<!--
There is no need to duplicate the description in the issue here but it is sometimes worth providing a summary of the individual changes in this PR.
-->
# Are there any user-facing changes?
<!--
If there are user-facing changes then we may require documentation to be updated before approving the PR.
-->
<!--
If there are any breaking changes to public APIs, please add the `api change` label.
-->
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-ballista] andygrove commented on a diff in pull request #141: Ignore the previous job_id inside fill_reservations()
Posted by GitBox <gi...@apache.org>.
andygrove commented on code in PR #141:
URL: https://github.com/apache/arrow-ballista/pull/141#discussion_r947393519
##########
ballista/rust/scheduler/src/state/execution_graph.rs:
##########
@@ -381,11 +381,21 @@ impl ExecutionPlanVisitor for ExecutionStageBuilder {
} else if let Some(unresolved_shuffle) =
plan.as_any().downcast_ref::<UnresolvedShuffleExec>()
{
- self.output_links
- .insert(unresolved_shuffle.stage_id, self.current_stage_id);
+ if let Some(output_links) =
+ self.output_links.get_mut(&unresolved_shuffle.stage_id)
+ {
+ if !output_links.contains(&self.current_stage_id) {
+ output_links.push(self.current_stage_id);
+ }
+ } else {
+ self.output_links
+ .insert(unresolved_shuffle.stage_id, vec![self.current_stage_id]);
+ }
if let Some(deps) = self.stage_dependencies.get_mut(&self.current_stage_id) {
- deps.push(unresolved_shuffle.stage_id)
+ if !deps.contains(&unresolved_shuffle.stage_id) {
Review Comment:
Same question here - would `HashSet` make more sense?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-ballista] yahoNanJing commented on pull request #141: Ignore the previous job_id inside fill_reservations()
Posted by GitBox <gi...@apache.org>.
yahoNanJing commented on PR #141:
URL: https://github.com/apache/arrow-ballista/pull/141#issuecomment-1214718705
Hi @thinkharderdev, could you help review this PR?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-ballista] andygrove merged pull request #141: Ignore the previous job_id inside fill_reservations()
Posted by GitBox <gi...@apache.org>.
andygrove merged PR #141:
URL: https://github.com/apache/arrow-ballista/pull/141
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-ballista] yahoNanJing commented on pull request #141: Ignore the previous job_id inside fill_reservations()
Posted by GitBox <gi...@apache.org>.
yahoNanJing commented on PR #141:
URL: https://github.com/apache/arrow-ballista/pull/141#issuecomment-1217378340
Thanks @andygrove. Just rebased. I will follow the order listed in #129 to raise PRs for a few performance improvements.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-ballista] andygrove commented on pull request #141: Ignore the previous job_id inside fill_reservations()
Posted by GitBox <gi...@apache.org>.
andygrove commented on PR #141:
URL: https://github.com/apache/arrow-ballista/pull/141#issuecomment-1217347940
@yahoNanJing It looks like this was building on another PR that has now been merged. Could you rebase / upmerge so we can see the changes specific to this PR?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-ballista] yahoNanJing commented on a diff in pull request #141: Ignore the previous job_id inside fill_reservations()
Posted by GitBox <gi...@apache.org>.
yahoNanJing commented on code in PR #141:
URL: https://github.com/apache/arrow-ballista/pull/141#discussion_r947404309
##########
ballista/rust/scheduler/src/state/execution_graph.rs:
##########
@@ -381,11 +381,21 @@ impl ExecutionPlanVisitor for ExecutionStageBuilder {
} else if let Some(unresolved_shuffle) =
plan.as_any().downcast_ref::<UnresolvedShuffleExec>()
{
- self.output_links
- .insert(unresolved_shuffle.stage_id, self.current_stage_id);
+ if let Some(output_links) =
+ self.output_links.get_mut(&unresolved_shuffle.stage_id)
+ {
+ if !output_links.contains(&self.current_stage_id) {
+ output_links.push(self.current_stage_id);
+ }
+ } else {
+ self.output_links
+ .insert(unresolved_shuffle.stage_id, vec![self.current_stage_id]);
+ }
if let Some(deps) = self.stage_dependencies.get_mut(&self.current_stage_id) {
- deps.push(unresolved_shuffle.stage_id)
+ if !deps.contains(&unresolved_shuffle.stage_id) {
Review Comment:
For deps and output_links, there will not be many elements. I think that's why it uses vec rather than the set 🤣 . I'm OK to change it to be set.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-ballista] andygrove commented on a diff in pull request #141: Ignore the previous job_id inside fill_reservations()
Posted by GitBox <gi...@apache.org>.
andygrove commented on code in PR #141:
URL: https://github.com/apache/arrow-ballista/pull/141#discussion_r947393323
##########
ballista/rust/scheduler/src/state/execution_graph.rs:
##########
@@ -381,11 +381,21 @@ impl ExecutionPlanVisitor for ExecutionStageBuilder {
} else if let Some(unresolved_shuffle) =
plan.as_any().downcast_ref::<UnresolvedShuffleExec>()
{
- self.output_links
- .insert(unresolved_shuffle.stage_id, self.current_stage_id);
+ if let Some(output_links) =
+ self.output_links.get_mut(&unresolved_shuffle.stage_id)
+ {
+ if !output_links.contains(&self.current_stage_id) {
Review Comment:
Would it be better to make `output_links` a `HashSet` instead of a `Vec`, given that duplicate values are not allowed?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-ballista] andygrove commented on a diff in pull request #141: Ignore the previous job_id inside fill_reservations()
Posted by GitBox <gi...@apache.org>.
andygrove commented on code in PR #141:
URL: https://github.com/apache/arrow-ballista/pull/141#discussion_r948027540
##########
ballista/rust/scheduler/src/state/execution_graph.rs:
##########
@@ -381,11 +381,21 @@ impl ExecutionPlanVisitor for ExecutionStageBuilder {
} else if let Some(unresolved_shuffle) =
plan.as_any().downcast_ref::<UnresolvedShuffleExec>()
{
- self.output_links
- .insert(unresolved_shuffle.stage_id, self.current_stage_id);
+ if let Some(output_links) =
+ self.output_links.get_mut(&unresolved_shuffle.stage_id)
+ {
+ if !output_links.contains(&self.current_stage_id) {
+ output_links.push(self.current_stage_id);
+ }
+ } else {
+ self.output_links
+ .insert(unresolved_shuffle.stage_id, vec![self.current_stage_id]);
+ }
if let Some(deps) = self.stage_dependencies.get_mut(&self.current_stage_id) {
- deps.push(unresolved_shuffle.stage_id)
+ if !deps.contains(&unresolved_shuffle.stage_id) {
Review Comment:
I don't have a strong opinion on this. Set would reduce the code complexity slightly but possibly add some overhead. :man_shrugging:
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org