Class CloudSolrStream

java.lang.Object
org.apache.solr.client.solrj.io.stream.TupleStream
org.apache.solr.client.solrj.io.stream.CloudSolrStream
All Implemented Interfaces:
Closeable, Serializable, AutoCloseable, Expressible, org.apache.solr.common.MapWriter, org.apache.solr.common.NavigableObject, org.noggit.JSONWriter.Writable
Direct Known Subclasses:
DrillStream, ParallelStream, ShuffleStream, TopicStream

public class CloudSolrStream extends TupleStream implements Expressible
Connects to Zookeeper to pick replicas from a specific collection to send the query to. Under the covers the SolrStream instances send the query to the replicas. SolrStreams are opened using a thread pool, but a single thread is used to iterate and merge Tuples from each SolrStream.
Since:
5.1.0
See Also:
  • Field Details

    • solrConnection

      protected org.apache.solr.client.solrj.impl.CloudSolrClient.CloudSolrClientConnection solrConnection
    • collection

      protected String collection
    • path

      protected String path
    • params

      protected org.apache.solr.common.params.SolrParams params
    • fieldMappings

      protected Map<String,String> fieldMappings
    • comp

      protected StreamComparator comp
    • eofTuples

      protected transient Map<String,Tuple> eofTuples
    • solrStreams

      protected transient List<TupleStream> solrStreams
    • tuples

      protected transient TreeSet<CloudSolrStream.TupleWrapper> tuples
    • streamContext

      protected transient StreamContext streamContext
  • Constructor Details

    • CloudSolrStream

      protected CloudSolrStream()
    • CloudSolrStream

      public CloudSolrStream(org.apache.solr.client.solrj.impl.CloudSolrClient.CloudSolrClientConnection solrConnection, String collectionName, org.apache.solr.common.params.SolrParams params) throws IOException
      Parameters:
      solrConnection - Zookeeper or HTTPS(s) ensemble connection string
      collectionName - Name of the collection to operate on
      params - Map<String, String[]> of parameter/value pairs
      Throws:
      IOException - Something went wrong
    • CloudSolrStream

      public CloudSolrStream(org.apache.solr.client.solrj.impl.CloudSolrClient.CloudSolrClientConnection solrConnection, String collectionName, String path, org.apache.solr.common.params.SolrParams params) throws IOException
      Parameters:
      solrConnection - Zookeeper or HTTPS(s) ensemble connection string
      collectionName - Name of the collection to operate on
      path - the request handler path to query (e.g. "/export"). If not provided (i.e. null), the handler is instead resolved from a "qt" param embedded in params, or defaults to "/select" if no such param is present.
      params - Map<String, String[]> of parameter/value pairs
      Throws:
      IOException - Something went wrong
    • CloudSolrStream

      public CloudSolrStream(StreamExpression expression, StreamFactory factory) throws IOException
      Throws:
      IOException
  • Method Details