lucene-solr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From markrmil...@apache.org
Subject svn commit: r900869 - in /lucene/solr/branches/cloud/src/java/org/apache/solr/cloud: CloudState.java Slice.java ZkController.java
Date Tue, 19 Jan 2010 18:06:02 GMT
Author: markrmiller
Date: Tue Jan 19 18:06:01 2010
New Revision: 900869

URL: http://svn.apache.org/viewvc?rev=900869&view=rev
Log:
add name to slice

Modified:
    lucene/solr/branches/cloud/src/java/org/apache/solr/cloud/CloudState.java
    lucene/solr/branches/cloud/src/java/org/apache/solr/cloud/Slice.java
    lucene/solr/branches/cloud/src/java/org/apache/solr/cloud/ZkController.java

Modified: lucene/solr/branches/cloud/src/java/org/apache/solr/cloud/CloudState.java
URL: http://svn.apache.org/viewvc/lucene/solr/branches/cloud/src/java/org/apache/solr/cloud/CloudState.java?rev=900869&r1=900868&r2=900869&view=diff
==============================================================================
--- lucene/solr/branches/cloud/src/java/org/apache/solr/cloud/CloudState.java (original)
+++ lucene/solr/branches/cloud/src/java/org/apache/solr/cloud/CloudState.java Tue Jan 19 18:06:01
2010
@@ -32,7 +32,7 @@
   }
   
   // nocommit : only call before publishing
-  public void addSlices(String collection, List<Slice> slices) {
+  void addSlices(String collection, List<Slice> slices) {
     collectionStates.put(collection, slices);
   }
   
@@ -41,7 +41,7 @@
     return Collections.unmodifiableList(collectionStates.get(collection));
   }
   
-  public List<String> getNodes() {
+  public List<String> getLiveNodes() {
     return Collections.unmodifiableList(liveNodes);
   }
 

Modified: lucene/solr/branches/cloud/src/java/org/apache/solr/cloud/Slice.java
URL: http://svn.apache.org/viewvc/lucene/solr/branches/cloud/src/java/org/apache/solr/cloud/Slice.java?rev=900869&r1=900868&r2=900869&view=diff
==============================================================================
--- lucene/solr/branches/cloud/src/java/org/apache/solr/cloud/Slice.java (original)
+++ lucene/solr/branches/cloud/src/java/org/apache/solr/cloud/Slice.java Tue Jan 19 18:06:01
2010
@@ -23,12 +23,18 @@
 // effectively immutable
 public class Slice {
   private final Map<String,ZkNodeProps> shards;
+  private final String name;
 
-  public Slice(Map<String,ZkNodeProps> shards) {
+  public Slice(String name, Map<String,ZkNodeProps> shards) {
     this.shards = shards;
+    this.name = name;
   }
   
   public Map<String,ZkNodeProps> getShards() {
     return Collections.unmodifiableMap(shards);
   }
+  
+  public String getName() {
+    return name;
+  }
 }

Modified: lucene/solr/branches/cloud/src/java/org/apache/solr/cloud/ZkController.java
URL: http://svn.apache.org/viewvc/lucene/solr/branches/cloud/src/java/org/apache/solr/cloud/ZkController.java?rev=900869&r1=900868&r2=900869&view=diff
==============================================================================
--- lucene/solr/branches/cloud/src/java/org/apache/solr/cloud/ZkController.java (original)
+++ lucene/solr/branches/cloud/src/java/org/apache/solr/cloud/ZkController.java Tue Jan 19
18:06:01 2010
@@ -403,7 +403,7 @@
       List<Slice> slices = new ArrayList<Slice>();
       for(String shardIdZkPath : shardIdNames) {
         Map<String,ZkNodeProps> shardsMap = readShards(shardIdPaths + "/" + shardIdZkPath);
-        Slice slice = new Slice(shardsMap);
+        Slice slice = new Slice(shardIdZkPath, shardsMap);
         slices.add(slice);
       }
       cloudInfo.addSlices(collection, slices);



Mime
View raw message