Return-Path: X-Original-To: apmail-lucene-commits-archive@www.apache.org Delivered-To: apmail-lucene-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4CBFA17750 for ; Fri, 27 Mar 2015 12:22:02 +0000 (UTC) Received: (qmail 82903 invoked by uid 500); 27 Mar 2015 12:22:02 -0000 Mailing-List: contact commits-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@lucene.apache.org Delivered-To: mailing list commits@lucene.apache.org Received: (qmail 82894 invoked by uid 99); 27 Mar 2015 12:22:02 -0000 Received: from eris.apache.org (HELO hades.apache.org) (140.211.11.105) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 27 Mar 2015 12:22:02 +0000 Received: from hades.apache.org (localhost [127.0.0.1]) by hades.apache.org (ASF Mail Server at hades.apache.org) with ESMTP id 0B08BAC006E for ; Fri, 27 Mar 2015 12:22:02 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1669557 - in /lucene/dev/branches/branch_5x: ./ solr/ solr/solrj/ solr/solrj/src/java/org/apache/solr/client/solrj/io/ Date: Fri, 27 Mar 2015 12:22:01 -0000 To: commits@lucene.apache.org From: jbernste@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20150327122202.0B08BAC006E@hades.apache.org> Author: jbernste Date: Fri Mar 27 12:22:01 2015 New Revision: 1669557 URL: http://svn.apache.org/r1669557 Log: SOLR-7082: Editing Javadoc Modified: lucene/dev/branches/branch_5x/ (props changed) lucene/dev/branches/branch_5x/solr/ (props changed) lucene/dev/branches/branch_5x/solr/solrj/ (props changed) lucene/dev/branches/branch_5x/solr/solrj/src/java/org/apache/solr/client/solrj/io/CloudSolrStream.java lucene/dev/branches/branch_5x/solr/solrj/src/java/org/apache/solr/client/solrj/io/MultiComp.java lucene/dev/branches/branch_5x/solr/solrj/src/java/org/apache/solr/client/solrj/io/ParallelStream.java lucene/dev/branches/branch_5x/solr/solrj/src/java/org/apache/solr/client/solrj/io/PushBackStream.java lucene/dev/branches/branch_5x/solr/solrj/src/java/org/apache/solr/client/solrj/io/ReducerStream.java lucene/dev/branches/branch_5x/solr/solrj/src/java/org/apache/solr/client/solrj/io/SolrClientCache.java lucene/dev/branches/branch_5x/solr/solrj/src/java/org/apache/solr/client/solrj/io/SolrStream.java lucene/dev/branches/branch_5x/solr/solrj/src/java/org/apache/solr/client/solrj/io/StreamContext.java lucene/dev/branches/branch_5x/solr/solrj/src/java/org/apache/solr/client/solrj/io/Tuple.java lucene/dev/branches/branch_5x/solr/solrj/src/java/org/apache/solr/client/solrj/io/TupleStream.java Modified: lucene/dev/branches/branch_5x/solr/solrj/src/java/org/apache/solr/client/solrj/io/CloudSolrStream.java URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/solrj/src/java/org/apache/solr/client/solrj/io/CloudSolrStream.java?rev=1669557&r1=1669556&r2=1669557&view=diff ============================================================================== --- lucene/dev/branches/branch_5x/solr/solrj/src/java/org/apache/solr/client/solrj/io/CloudSolrStream.java (original) +++ lucene/dev/branches/branch_5x/solr/solrj/src/java/org/apache/solr/client/solrj/io/CloudSolrStream.java Fri Mar 27 12:22:01 2015 @@ -42,10 +42,11 @@ import org.apache.solr.common.cloud.Slic 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 Tup 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 Tup } } + /** + * Closes the CloudSolrStream + **/ public void close() throws IOException { for(TupleStream solrStream : solrStreams) { solrStream.close(); Modified: lucene/dev/branches/branch_5x/solr/solrj/src/java/org/apache/solr/client/solrj/io/MultiComp.java URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/solrj/src/java/org/apache/solr/client/solrj/io/MultiComp.java?rev=1669557&r1=1669556&r2=1669557&view=diff ============================================================================== --- lucene/dev/branches/branch_5x/solr/solrj/src/java/org/apache/solr/client/solrj/io/MultiComp.java (original) +++ lucene/dev/branches/branch_5x/solr/solrj/src/java/org/apache/solr/client/solrj/io/MultiComp.java Fri Mar 27 12:22:01 2015 @@ -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, Serializable { Modified: lucene/dev/branches/branch_5x/solr/solrj/src/java/org/apache/solr/client/solrj/io/ParallelStream.java URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/solrj/src/java/org/apache/solr/client/solrj/io/ParallelStream.java?rev=1669557&r1=1669556&r2=1669557&view=diff ============================================================================== --- lucene/dev/branches/branch_5x/solr/solrj/src/java/org/apache/solr/client/solrj/io/ParallelStream.java (original) +++ lucene/dev/branches/branch_5x/solr/solrj/src/java/org/apache/solr/client/solrj/io/ParallelStream.java Fri Mar 27 12:22:01 2015 @@ -40,7 +40,7 @@ import org.apache.solr.common.cloud.ZkSt 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. **/ Modified: lucene/dev/branches/branch_5x/solr/solrj/src/java/org/apache/solr/client/solrj/io/PushBackStream.java URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/solrj/src/java/org/apache/solr/client/solrj/io/PushBackStream.java?rev=1669557&r1=1669556&r2=1669557&view=diff ============================================================================== --- lucene/dev/branches/branch_5x/solr/solrj/src/java/org/apache/solr/client/solrj/io/PushBackStream.java (original) +++ lucene/dev/branches/branch_5x/solr/solrj/src/java/org/apache/solr/client/solrj/io/PushBackStream.java Fri Mar 27 12:22:01 2015 @@ -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 Tupl 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; Modified: lucene/dev/branches/branch_5x/solr/solrj/src/java/org/apache/solr/client/solrj/io/ReducerStream.java URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/solrj/src/java/org/apache/solr/client/solrj/io/ReducerStream.java?rev=1669557&r1=1669556&r2=1669557&view=diff ============================================================================== --- lucene/dev/branches/branch_5x/solr/solrj/src/java/org/apache/solr/client/solrj/io/ReducerStream.java (original) +++ lucene/dev/branches/branch_5x/solr/solrj/src/java/org/apache/solr/client/solrj/io/ReducerStream.java Fri Mar 27 12:22:01 2015 @@ -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. * **/ Modified: lucene/dev/branches/branch_5x/solr/solrj/src/java/org/apache/solr/client/solrj/io/SolrClientCache.java URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/solrj/src/java/org/apache/solr/client/solrj/io/SolrClientCache.java?rev=1669557&r1=1669556&r2=1669557&view=diff ============================================================================== --- lucene/dev/branches/branch_5x/solr/solrj/src/java/org/apache/solr/client/solrj/io/SolrClientCache.java (original) +++ lucene/dev/branches/branch_5x/solr/solrj/src/java/org/apache/solr/client/solrj/io/SolrClientCache.java Fri Mar 27 12:22:01 2015 @@ -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 { Modified: lucene/dev/branches/branch_5x/solr/solrj/src/java/org/apache/solr/client/solrj/io/SolrStream.java URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/solrj/src/java/org/apache/solr/client/solrj/io/SolrStream.java?rev=1669557&r1=1669556&r2=1669557&view=diff ============================================================================== --- lucene/dev/branches/branch_5x/solr/solrj/src/java/org/apache/solr/client/solrj/io/SolrStream.java (original) +++ lucene/dev/branches/branch_5x/solr/solrj/src/java/org/apache/solr/client/solrj/io/SolrStream.java Fri Mar 27 12:22:01 2015 @@ -29,7 +29,7 @@ import org.apache.solr.common.params.Mod 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 TupleStr } } + /** + * Setting trace to true will include the "_CORE_" field in each Tuple emitted by the stream. + **/ + public void setTrace(boolean trace) { this.trace = trace; } Modified: lucene/dev/branches/branch_5x/solr/solrj/src/java/org/apache/solr/client/solrj/io/StreamContext.java URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/solrj/src/java/org/apache/solr/client/solrj/io/StreamContext.java?rev=1669557&r1=1669556&r2=1669557&view=diff ============================================================================== --- lucene/dev/branches/branch_5x/solr/solrj/src/java/org/apache/solr/client/solrj/io/StreamContext.java (original) +++ lucene/dev/branches/branch_5x/solr/solrj/src/java/org/apache/solr/client/solrj/io/StreamContext.java Fri Mar 27 12:22:01 2015 @@ -24,7 +24,7 @@ import java.util.concurrent.ConcurrentHa /** * 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. Modified: lucene/dev/branches/branch_5x/solr/solrj/src/java/org/apache/solr/client/solrj/io/Tuple.java URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/solrj/src/java/org/apache/solr/client/solrj/io/Tuple.java?rev=1669557&r1=1669556&r2=1669557&view=diff ============================================================================== --- lucene/dev/branches/branch_5x/solr/solrj/src/java/org/apache/solr/client/solrj/io/Tuple.java (original) +++ lucene/dev/branches/branch_5x/solr/solrj/src/java/org/apache/solr/client/solrj/io/Tuple.java Fri Mar 27 12:22:01 2015 @@ -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) { Modified: lucene/dev/branches/branch_5x/solr/solrj/src/java/org/apache/solr/client/solrj/io/TupleStream.java URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/solrj/src/java/org/apache/solr/client/solrj/io/TupleStream.java?rev=1669557&r1=1669556&r2=1669557&view=diff ============================================================================== --- lucene/dev/branches/branch_5x/solr/solrj/src/java/org/apache/solr/client/solrj/io/TupleStream.java (original) +++ lucene/dev/branches/branch_5x/solr/solrj/src/java/org/apache/solr/client/solrj/io/TupleStream.java Fri Mar 27 12:22:01 2015 @@ -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 {