force eagerness of processing of SegmentMetadata queries on the processing executor by converting the Sequence into List

This commit is contained in:
Himanshu Gupta 2015-05-21 21:15:15 -05:00
parent 5852b64852
commit 723df735e9
1 changed files with 4 additions and 1 deletions

View File

@ -42,6 +42,7 @@ import io.druid.query.metadata.metadata.SegmentMetadataQuery;
import io.druid.segment.QueryableIndex;
import io.druid.segment.Segment;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Map;
import java.util.concurrent.CancellationException;
@ -146,7 +147,9 @@ public class SegmentMetadataQueryRunnerFactory implements QueryRunnerFactory<Seg
@Override
public Sequence<SegmentAnalysis> call() throws Exception
{
return input.run(query, responseContext);
return Sequences.simple(
Sequences.toList(input.run(query, responseContext), new ArrayList<SegmentAnalysis>())
);
}
}
);