Class ParallelStream
- java.lang.Object
- 
- org.apache.solr.client.solrj.io.stream.TupleStream
- 
- org.apache.solr.client.solrj.io.stream.CloudSolrStream
- 
- org.apache.solr.client.solrj.io.stream.ParallelStream
 
 
 
- 
- All Implemented Interfaces:
- Closeable,- Serializable,- AutoCloseable,- Expressible,- MapSerializable,- MapWriter,- NavigableObject
 
 public class ParallelStream extends CloudSolrStream implements Expressible The ParallelStream decorates a TupleStream implementation and pushes it to N workers for parallel execution. Workers are chosen from a SolrCloud collection. Tuples that are streamed back from the workers are ordered by a Comparator.- Since:
- 5.1.0
- See Also:
- Serialized Form
 
- 
- 
Nested Class Summary- 
Nested classes/interfaces inherited from class org.apache.solr.client.solrj.io.stream.CloudSolrStreamCloudSolrStream.StreamOpener, CloudSolrStream.TupleWrapper
 - 
Nested classes/interfaces inherited from class org.apache.solr.client.solrj.io.stream.TupleStreamTupleStream.IgnoreException
 - 
Nested classes/interfaces inherited from interface org.apache.solr.common.MapWriterMapWriter.EntryWriter
 
- 
 - 
Field Summary- 
Fields inherited from class org.apache.solr.client.solrj.io.stream.CloudSolrStreamcloudSolrClient, collection, comp, eofTuples, fieldMappings, params, solrStreams, streamContext, tuples, zkHost
 
- 
 - 
Constructor SummaryConstructors Constructor Description ParallelStream(String zkHost, String collection, String expressionString, int workers, StreamComparator comp)ParallelStream(String zkHost, String collection, TupleStream tupleStream, int workers, StreamComparator comp)ParallelStream(StreamExpression expression, StreamFactory factory)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description List<TupleStream>children()protected voidconstructStreams()Tupleread()voidsetStreamContext(StreamContext streamContext)voidsetStreamFactory(StreamFactory streamFactory)ExplanationtoExplanation(StreamFactory factory)Returns an explanation about the stream objectStreamExpressiontoExpression(StreamFactory factory)- 
Methods inherited from class org.apache.solr.client.solrj.io.stream.CloudSolrStream_read, adjustParams, close, getEofTuples, getSlices, getStreamSort, open, setFieldMappings, setTrace
 - 
Methods inherited from class org.apache.solr.client.solrj.io.stream.TupleStreamgetCost, getShards, getShards, getStreamNodeId, writeMap
 - 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface org.apache.solr.common.NavigableObject_forEachEntry, _forEachEntry, _forEachEntry, _get, _get, _getStr, _getStr, _size
 
- 
 
- 
- 
- 
Constructor Detail- 
ParallelStreampublic ParallelStream(String zkHost, String collection, TupleStream tupleStream, int workers, StreamComparator comp) throws IOException - Throws:
- IOException
 
 - 
ParallelStreampublic ParallelStream(String zkHost, String collection, String expressionString, int workers, StreamComparator comp) throws IOException - Throws:
- IOException
 
 - 
ParallelStreampublic ParallelStream(StreamExpression expression, StreamFactory factory) throws IOException - Throws:
- IOException
 
 
- 
 - 
Method Detail- 
setStreamFactorypublic void setStreamFactory(StreamFactory streamFactory) 
 - 
toExpressionpublic StreamExpression toExpression(StreamFactory factory) throws IOException - Specified by:
- toExpressionin interface- Expressible
- Overrides:
- toExpressionin class- CloudSolrStream
- Throws:
- IOException
 
 - 
toExplanationpublic Explanation toExplanation(StreamFactory factory) throws IOException Description copied from interface:ExpressibleReturns an explanation about the stream object- Specified by:
- toExplanationin interface- Expressible
- Overrides:
- toExplanationin class- CloudSolrStream
- Parameters:
- factory- Stream factory for this, contains information about the function name
- Returns:
- Explanation about this stream object containing explanations of any child stream objects
- Throws:
- IOException- throw on any error
 
 - 
childrenpublic List<TupleStream> children() - Overrides:
- childrenin class- CloudSolrStream
 
 - 
readpublic Tuple read() throws IOException - Overrides:
- readin class- CloudSolrStream
- Throws:
- IOException
 
 - 
setStreamContextpublic void setStreamContext(StreamContext streamContext) - Overrides:
- setStreamContextin class- CloudSolrStream
 
 - 
constructStreamsprotected void constructStreams() throws IOException- Overrides:
- constructStreamsin class- CloudSolrStream
- Throws:
- IOException
 
 
- 
 
-