Skip to content

Commit

Permalink
Return empty list from TaskSource after finish
Browse files Browse the repository at this point in the history
  • Loading branch information
raunaqmorarka authored and losipiuk committed May 21, 2022
1 parent 3b9e47d commit cb18890
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,9 @@ public SingleDistributionTaskSource(ListMultimap<PlanNodeId, ExchangeSourceHandl
@Override
public ListenableFuture<List<TaskDescriptor>> getMoreTasks()
{
if (finished) {
return immediateFuture(ImmutableList.of());
}
List<TaskDescriptor> result = ImmutableList.of(new TaskDescriptor(
0,
ImmutableListMultimap.of(),
Expand Down Expand Up @@ -291,6 +294,9 @@ public ArbitraryDistributionTaskSource(
@Override
public ListenableFuture<List<TaskDescriptor>> getMoreTasks()
{
if (finished) {
return immediateFuture(ImmutableList.of());
}
NodeRequirements nodeRequirements = new NodeRequirements(Optional.empty(), ImmutableSet.of(), taskMemory);

ImmutableList.Builder<TaskDescriptor> result = ImmutableList.builder();
Expand Down

0 comments on commit cb18890

Please sign in to comment.