mirror of https://github.com/apache/druid.git
change ParitionHolder.isComplete() to accept chunks beyond the "end"
This commit is contained in:
parent
46a520c07c
commit
22dfa8ecf7
|
@ -95,6 +95,8 @@ public class PartitionHolder<T> implements Iterable<PartitionChunk<T>>
|
||||||
Iterator<PartitionChunk<T>> iter = holderSet.iterator();
|
Iterator<PartitionChunk<T>> iter = holderSet.iterator();
|
||||||
|
|
||||||
PartitionChunk<T> curr = iter.next();
|
PartitionChunk<T> curr = iter.next();
|
||||||
|
boolean endSeen = curr.isEnd();
|
||||||
|
|
||||||
if (!curr.isStart()) {
|
if (!curr.isStart()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -104,14 +106,14 @@ public class PartitionHolder<T> implements Iterable<PartitionChunk<T>>
|
||||||
if (!curr.abuts(next)) {
|
if (!curr.abuts(next)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (next.isEnd()) {
|
||||||
|
endSeen = true;
|
||||||
|
}
|
||||||
curr = next;
|
curr = next;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!curr.isEnd()) {
|
return endSeen;
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public PartitionChunk<T> getChunk(final int partitionNum)
|
public PartitionChunk<T> getChunk(final int partitionNum)
|
||||||
|
|
Loading…
Reference in New Issue