mirror of https://github.com/apache/druid.git
Fix issue that tasks failed because of no sink for identifier
This commit is contained in:
parent
3443f9a008
commit
c9a6de7fc5
|
@ -90,6 +90,7 @@ import java.util.ArrayList;
|
|||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
@ -485,8 +486,12 @@ public class AppenderatorImpl implements Appenderator
|
|||
final List<Pair<FireHydrant, SegmentIdentifier>> indexesToPersist = new ArrayList<>();
|
||||
int numPersistedRows = 0;
|
||||
long bytesPersisted = 0L;
|
||||
for (SegmentIdentifier identifier : sinks.keySet()) {
|
||||
final Sink sink = sinks.get(identifier);
|
||||
Iterator<Map.Entry<SegmentIdentifier, Sink>> iterator = sinks.entrySet().iterator();
|
||||
|
||||
while (iterator.hasNext()) {
|
||||
final Map.Entry<SegmentIdentifier, Sink> entry = iterator.next();
|
||||
final SegmentIdentifier identifier = entry.getKey();
|
||||
final Sink sink = entry.getValue();
|
||||
if (sink == null) {
|
||||
throw new ISE("No sink for identifier: %s", identifier);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue