mirror of https://github.com/apache/druid.git
MinTimeFirehose: Care less about making nextRow work without hasMore
This commit is contained in:
parent
7da1466340
commit
78850a0706
|
@ -44,20 +44,9 @@ public class MinTimeFirehose implements Firehose
|
||||||
@Override
|
@Override
|
||||||
public InputRow nextRow()
|
public InputRow nextRow()
|
||||||
{
|
{
|
||||||
if (savedInputRow != null) {
|
|
||||||
final InputRow row = savedInputRow;
|
final InputRow row = savedInputRow;
|
||||||
savedInputRow = null;
|
savedInputRow = null;
|
||||||
return row;
|
return row;
|
||||||
} else {
|
|
||||||
while (firehose.hasMore()) {
|
|
||||||
final InputRow row = firehose.nextRow();
|
|
||||||
if (acceptable(row)) {
|
|
||||||
return row;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
throw new NoSuchElementException("No more rows!");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in New Issue