You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by jb...@apache.org on 2017/01/04 15:52:52 UTC

[1/2] lucene-solr:branch_6x: SOLR-9919: random Streaming Expression is not registered in /stream or /graph handler

Repository: lucene-solr
Updated Branches:
  refs/heads/branch_6x 78a3fdfdc -> fad618a40


SOLR-9919: random Streaming Expression is not registered in /stream or /graph handler


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/258d6c64
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/258d6c64
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/258d6c64

Branch: refs/heads/branch_6x
Commit: 258d6c647f3d336755979d596897417310b16a16
Parents: 78a3fdf
Author: Joel Bernstein <jb...@apache.org>
Authored: Wed Jan 4 10:25:14 2017 -0500
Committer: Joel Bernstein <jb...@apache.org>
Committed: Wed Jan 4 10:38:51 2017 -0500

----------------------------------------------------------------------
 .../core/src/java/org/apache/solr/handler/GraphHandler.java | 3 ++-
 .../src/java/org/apache/solr/handler/StreamHandler.java     | 1 +
 .../solr/client/solrj/io/stream/StreamExpressionTest.java   | 9 +++++++++
 3 files changed, 12 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/258d6c64/solr/core/src/java/org/apache/solr/handler/GraphHandler.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/handler/GraphHandler.java b/solr/core/src/java/org/apache/solr/handler/GraphHandler.java
index 339b4d7..5e5934f 100644
--- a/solr/core/src/java/org/apache/solr/handler/GraphHandler.java
+++ b/solr/core/src/java/org/apache/solr/handler/GraphHandler.java
@@ -118,7 +118,8 @@ public class GraphHandler extends RequestHandlerBase implements SolrCoreAware, P
         .withFunctionName("shortestPath", ShortestPathStream.class)
         .withFunctionName("gatherNodes", GatherNodesStream.class)
         .withFunctionName("sort", SortStream.class)
-            .withFunctionName("scoreNodes", ScoreNodesStream.class)
+        .withFunctionName("scoreNodes", ScoreNodesStream.class)
+        .withFunctionName("random", RandomStream.class)
 
         // metrics
         .withFunctionName("min", MinMetric.class)

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/258d6c64/solr/core/src/java/org/apache/solr/handler/StreamHandler.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/handler/StreamHandler.java b/solr/core/src/java/org/apache/solr/handler/StreamHandler.java
index dd79462..71aba75 100644
--- a/solr/core/src/java/org/apache/solr/handler/StreamHandler.java
+++ b/solr/core/src/java/org/apache/solr/handler/StreamHandler.java
@@ -119,6 +119,7 @@ public class StreamHandler extends RequestHandlerBase implements SolrCoreAware,
       .withFunctionName("jdbc", JDBCStream.class)
       .withFunctionName("topic", TopicStream.class)
       .withFunctionName("commit", CommitStream.class)
+      .withFunctionName("random", RandomStream.class)
       
       // decorator streams
       .withFunctionName("merge", MergeStream.class)

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/258d6c64/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/StreamExpressionTest.java
----------------------------------------------------------------------
diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/StreamExpressionTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/StreamExpressionTest.java
index 83c093c..49814a3 100644
--- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/StreamExpressionTest.java
+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/StreamExpressionTest.java
@@ -728,6 +728,15 @@ public class StreamExpressionTest extends SolrCloudTestCase {
       List<Tuple> tuples3 = getTuples(stream);
       assert (tuples3.size() == 1);
 
+
+      //Exercise the /stream handler
+      ModifiableSolrParams sParams = new ModifiableSolrParams(StreamingTest.mapParams(CommonParams.QT, "/stream"));
+      sParams.add("expr", "random(" + COLLECTIONORALIAS + ", q=\"*:*\", rows=\"1\", fl=\"id, a_i\")" );
+      JettySolrRunner jetty = cluster.getJettySolrRunner(0);
+      SolrStream solrStream = new SolrStream(jetty.getBaseUrl().toString() + "/collection1", sParams);
+      List<Tuple> tuples4 = getTuples(solrStream);
+      assert (tuples4.size() == 1);
+
     } finally {
       cache.close();
     }


[2/2] lucene-solr:branch_6x: SOLR-9919: Update CHANGES.txt

Posted by jb...@apache.org.
SOLR-9919: Update CHANGES.txt


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/fad618a4
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/fad618a4
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/fad618a4

Branch: refs/heads/branch_6x
Commit: fad618a4073f9a23f9d00fc141b43bea8835c634
Parents: 258d6c6
Author: Joel Bernstein <jb...@apache.org>
Authored: Wed Jan 4 10:35:23 2017 -0500
Committer: Joel Bernstein <jb...@apache.org>
Committed: Wed Jan 4 10:41:04 2017 -0500

----------------------------------------------------------------------
 solr/CHANGES.txt | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/fad618a4/solr/CHANGES.txt
----------------------------------------------------------------------
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index e295bfc..42a94ec 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -262,6 +262,8 @@ Bug Fixes
 
 * SOLR-9901: Implement move in HdfsDirectoryFactory. (Mark Miller)
 
+* SOLR-9919: random Streaming Expression is not registered in /stream or /graph handler (Joel Bernstein)
+
 Other Changes
 ----------------------