You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by sh...@apache.org on 2014/05/29 09:27:35 UTC
svn commit: r1598213 - in /lucene/dev/branches/branch_4x: ./ solr/
solr/CHANGES.txt solr/solrj/
solr/solrj/src/java/org/apache/solr/common/cloud/ClusterState.java
solr/solrj/src/java/org/apache/solr/common/cloud/DocRouter.java
Author: shalin
Date: Thu May 29 07:27:35 2014
New Revision: 1598213
URL: http://svn.apache.org/r1598213
Log:
SOLR-6116: Refactor DocRouter.getDocRouter to accept routerName as a String
Modified:
lucene/dev/branches/branch_4x/ (props changed)
lucene/dev/branches/branch_4x/solr/ (props changed)
lucene/dev/branches/branch_4x/solr/CHANGES.txt (contents, props changed)
lucene/dev/branches/branch_4x/solr/solrj/ (props changed)
lucene/dev/branches/branch_4x/solr/solrj/src/java/org/apache/solr/common/cloud/ClusterState.java
lucene/dev/branches/branch_4x/solr/solrj/src/java/org/apache/solr/common/cloud/DocRouter.java
Modified: lucene/dev/branches/branch_4x/solr/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/CHANGES.txt?rev=1598213&r1=1598212&r2=1598213&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/solr/CHANGES.txt (original)
+++ lucene/dev/branches/branch_4x/solr/CHANGES.txt Thu May 29 07:27:35 2014
@@ -109,6 +109,8 @@ Other Changes
recovery scenarios after the leader receives an error trying to forward an
update request to a replica. (Timothy Potter)
+* SOLR-6116: Refactor DocRouter.getDocRouter to accept routerName as a String. (shalin)
+
Optimizations
----------------------
Modified: lucene/dev/branches/branch_4x/solr/solrj/src/java/org/apache/solr/common/cloud/ClusterState.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/solrj/src/java/org/apache/solr/common/cloud/ClusterState.java?rev=1598213&r1=1598212&r2=1598213&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/solr/solrj/src/java/org/apache/solr/common/cloud/ClusterState.java (original)
+++ lucene/dev/branches/branch_4x/solr/solrj/src/java/org/apache/solr/common/cloud/ClusterState.java Thu May 29 07:27:35 2014
@@ -302,7 +302,7 @@ public class ClusterState implements JSO
router = DocRouter.getDocRouter((String)routerObj);
} else {
Map routerProps = (Map)routerObj;
- router = DocRouter.getDocRouter(routerProps.get("name"));
+ router = DocRouter.getDocRouter((String) routerProps.get("name"));
}
return new DocCollection(name, slices, props, router);
Modified: lucene/dev/branches/branch_4x/solr/solrj/src/java/org/apache/solr/common/cloud/DocRouter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/solrj/src/java/org/apache/solr/common/cloud/DocRouter.java?rev=1598213&r1=1598212&r2=1598213&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/solr/solrj/src/java/org/apache/solr/common/cloud/DocRouter.java (original)
+++ lucene/dev/branches/branch_4x/solr/solrj/src/java/org/apache/solr/common/cloud/DocRouter.java Thu May 29 07:27:35 2014
@@ -43,7 +43,7 @@ public abstract class DocRouter {
public static final DocRouter DEFAULT = new CompositeIdRouter();
- public static DocRouter getDocRouter(Object routerName) {
+ public static DocRouter getDocRouter(String routerName) {
DocRouter router = routerMap.get(routerName);
if (router != null) return router;
throw new SolrException(SolrException.ErrorCode.SERVER_ERROR, "Unknown document router '"+ routerName + "'");