Apache Lucene open-source search software
SOLR-7082: Editing Javadoc
Joel Bernsteinb51277fecfc3
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/io/CloudSolrStream.java b/solr/solrj/src/java/org/apache/solr/client/solrj/io/CloudSolrStream.javaindex ab992342395..18823e710e6 100644--- a/solr/solrj/src/java/org/apache/solr/client/solrj/io/CloudSolrStream.java+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/io/CloudSolrStream.java@@ -42,10 +42,11 @@ import org.apache.solr.common.cloud.Slice;import org.apache.solr.common.util.SolrjNamedThreadFactory;/**-* Connects to Zookeeper to pick replicas from a specific collection to send the query to.-* Under the covers SolrStream instances are used to send the query to the replicas.-* SolrStreams are opened using a Thread pool, but a single thread is used to iterate through each stream's tuples.-**/+ * 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.+ **/public class CloudSolrStream extends TupleStream {@@ -100,6 +101,10 @@ public class CloudSolrStream extends TupleStream {this.streamContext = context;}+ /**+ * Opens the CloudSolrStream+ *+ ***/public void open() throws IOException {this.tuples = new TreeSet();this.solrStreams = new ArrayList();@@ -216,6 +221,9 @@ public class CloudSolrStream extends TupleStream {}}+ /**+ * Closes the CloudSolrStream+ **/public void close() throws IOException {for(TupleStream solrStream : solrStreams) {solrStream.close();diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/io/MultiComp.java b/solr/solrj/src/java/org/apache/solr/client/solrj/io/MultiComp.javaindex 28c9529241c..b8e99f2a92e 100644--- a/solr/solrj/src/java/org/apache/solr/client/solrj/io/MultiComp.java+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/io/MultiComp.java@@ -22,7 +22,7 @@ import java.util.Comparator;/**- * Wraps multiple Comparators to provide sub sorting.+ * Wraps multiple Comparators to provide sub-sorting.**/public class MultiComp implements Comparator<Tuple>, Serializable {diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/io/ParallelStream.java b/solr/solrj/src/java/org/apache/solr/client/solrj/io/ParallelStream.javaindex 9c2111428a7..5b15edb4232 100644--- a/solr/solrj/src/java/org/apache/solr/client/solrj/io/ParallelStream.java+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/io/ParallelStream.java@@ -40,7 +40,7 @@ import org.apache.solr.common.cloud.ZkStateReader;import org.apache.solr.common.util.Base64;/**- * The ParallelStream decorates a TupleStream implementation and pushes it N workers for parallel execution.+ * 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.**/diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/io/PushBackStream.java b/solr/solrj/src/java/org/apache/solr/client/solrj/io/PushBackStream.javaindex 5687406df61..5bba303bca7 100644--- a/solr/solrj/src/java/org/apache/solr/client/solrj/io/PushBackStream.java+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/io/PushBackStream.java@@ -22,6 +22,12 @@ import java.util.Comparator;import java.util.List;import java.util.ArrayList;+/**+ * A TupleStream that allows a single Tuple to be pushed back onto the stream after it's been read.+ * This is a useful class when building streams that maintain the order of Tuples between multiple+ * substreams.+ **/+public class PushBackStream extends TupleStream {private static final long serialVersionUID = 1;@@ -29,12 +35,6 @@ public class PushBackStream extends TupleStream {private TupleStream stream;private Tuple tuple;- /**- * A TupleStream that allows a single Tuple to be pushed back into Stream after it's been read.- * This is a useful class when building streams that maintain the order of the tuples from two or- * more substreams.- **/-public PushBackStream(TupleStream stream) {this.stream = stream;diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/io/ReducerStream.java b/solr/solrj/src/java/org/apache/solr/client/solrj/io/ReducerStream.javaindex f22e66de3f8..b27a1fe6f6d 100644--- a/solr/solrj/src/java/org/apache/solr/client/solrj/io/ReducerStream.java+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/io/ReducerStream.java@@ -25,16 +25,16 @@ import java.util.Map;import java.util.HashMap;/**- * Iterates over a TupleStream and buffers Tuples that are equal based on a field comparator.- * This allows tuples to be grouped by a common field.+ * Iterates over a TupleStream and buffers Tuples that are equal based on a comparator.+ * This allows tuples to be grouped by common field(s).*- * The read() method emits one tuple per group. The top levels fields reflect the first tuple+ * The read() method emits one tuple per group. The fields of the emitted Tuple reflect the first tuple* encountered in the group.*- * Use the Tuple.getMaps() method to return the all the Tuples in the group. The method returns+ * Use the Tuple.getMaps() method to return all the Tuples in the group. This method returns* a list of maps (including the group head), which hold the data for each Tuple in the group.*- * Note: This ReducerStream requires that the underlying streams be sorted and partitioned by same+ * Note: The ReducerStream requires that it's underlying stream be sorted and partitioned by the same* fields as it's comparator.***/diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/io/SolrClientCache.java b/solr/solrj/src/java/org/apache/solr/client/solrj/io/SolrClientCache.javaindex a876792bb0d..306e69f9e60 100644--- a/solr/solrj/src/java/org/apache/solr/client/solrj/io/SolrClientCache.java+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/io/SolrClientCache.java@@ -30,7 +30,7 @@ import org.slf4j.LoggerFactory;/**- * The SolrClientCache caches SolrClients that they can be reused by different TupleStreams.+ * The SolrClientCache caches SolrClients so they can be reused by different TupleStreams.**/public class SolrClientCache implements Serializable {diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/io/SolrStream.java b/solr/solrj/src/java/org/apache/solr/client/solrj/io/SolrStream.javaindex 9bbedb0613c..bcf6c65c4a6 100644--- a/solr/solrj/src/java/org/apache/solr/client/solrj/io/SolrStream.java+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/io/SolrStream.java@@ -29,7 +29,7 @@ import org.apache.solr.common.params.ModifiableSolrParams;import org.apache.solr.common.params.SolrParams;/**-* Queries a Solr instance, and maps SolrDocs to a Stream of Tuples.+* Queries a single Solr instance and maps SolrDocs to a Stream of Tuples.**/public class SolrStream extends TupleStream {@@ -88,6 +88,10 @@ public class SolrStream extends TupleStream {}}+ /**+ * Setting trace to true will include the "_CORE_" field in each Tuple emitted by the stream.+ **/+public void setTrace(boolean trace) {this.trace = trace;}diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/io/StreamContext.java b/solr/solrj/src/java/org/apache/solr/client/solrj/io/StreamContext.javaindex 5e1fd6e7ee9..9f9f703f58c 100644--- a/solr/solrj/src/java/org/apache/solr/client/solrj/io/StreamContext.java+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/io/StreamContext.java@@ -24,7 +24,7 @@ import java.util.concurrent.ConcurrentHashMap;/*** The StreamContext is passed to TupleStreams using the TupleStream.setStreamContext() method.- * The StreamContext is used pass shared context info from to concentrically wrapped TupleStreams.+ * The StreamContext is used to pass shared context to concentrically wrapped TupleStreams.** Note: The StreamContext contains the SolrClientCache which is used to cache SolrClients for reuse* across multiple TupleStreams.diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/io/Tuple.java b/solr/solrj/src/java/org/apache/solr/client/solrj/io/Tuple.javaindex cbcea6464b6..399fce1f6f5 100644--- a/solr/solrj/src/java/org/apache/solr/client/solrj/io/Tuple.java+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/io/Tuple.java@@ -32,7 +32,13 @@ import java.util.Iterator;public class Tuple implements Cloneable {- public boolean EOF;+ /**+ * When EOF field is true the Tuple marks the end of the stream.+ * The EOF Tuple will not contain a record from the stream, but it may contain+ * metrics/aggregates gathered by underlying streams.+ * */++ public boolean EOF;public Map fields = new HashMap();public Tuple(Map fields) {diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/io/TupleStream.java b/solr/solrj/src/java/org/apache/solr/client/solrj/io/TupleStream.javaindex 36888e26660..05edd2b2e3c 100644--- a/solr/solrj/src/java/org/apache/solr/client/solrj/io/TupleStream.java+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/io/TupleStream.java@@ -20,12 +20,6 @@ package org.apache.solr.client.solrj.io;import java.io.IOException;import java.io.Serializable;import java.util.List;-import java.util.Map;-import java.util.HashMap;-import org.apache.solr.client.solrj.SolrClient;-import org.apache.solr.client.solrj.impl.CloudSolrClient;-import org.apache.solr.client.solrj.impl.HttpSolrClient;-public abstract class TupleStream implements Serializable {