lucene-solr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yo...@apache.org
Subject svn commit: r902333 - in /lucene/solr/branches/cloud/src/java/org/apache/solr: cloud/SolrZkServer.java core/CoreContainer.java
Date Sat, 23 Jan 2010 02:00:20 GMT
Author: yonik
Date: Sat Jan 23 02:00:19 2010
New Revision: 902333

URL: http://svn.apache.org/viewvc?rev=902333&view=rev
Log:
refactor runZk -> zkRun

Modified:
    lucene/solr/branches/cloud/src/java/org/apache/solr/cloud/SolrZkServer.java
    lucene/solr/branches/cloud/src/java/org/apache/solr/core/CoreContainer.java

Modified: lucene/solr/branches/cloud/src/java/org/apache/solr/cloud/SolrZkServer.java
URL: http://svn.apache.org/viewvc/lucene/solr/branches/cloud/src/java/org/apache/solr/cloud/SolrZkServer.java?rev=902333&r1=902332&r2=902333&view=diff
==============================================================================
--- lucene/solr/branches/cloud/src/java/org/apache/solr/cloud/SolrZkServer.java (original)
+++ lucene/solr/branches/cloud/src/java/org/apache/solr/cloud/SolrZkServer.java Sat Jan 23
02:00:19 2010
@@ -7,7 +7,6 @@
 import org.apache.zookeeper.server.quorum.flexible.QuorumMaj;
 import org.apache.zookeeper.server.ZooKeeperServerMain;
 import org.apache.zookeeper.server.ServerConfig;
-import org.apache.log4j.Logger;
 import org.apache.solr.common.SolrException;
 import org.slf4j.LoggerFactory;
 
@@ -16,23 +15,22 @@
 import java.io.*;
 import java.util.Map.Entry;
 import java.net.InetSocketAddress;
-import java.net.SocketAddress;
 
 
 public class SolrZkServer {
   static org.slf4j.Logger log = LoggerFactory.getLogger(SolrZkServer.class);
   
-  String runZk;
+  String zkRun;
   String zkHost;
   String solrHome;
   String solrPort;
   Properties props;
   SolrZkServerProps zkProps;
 
-  private Thread zkThread;  // the thread running a zookeeper server, only if runZk is set
+  private Thread zkThread;  // the thread running a zookeeper server, only if zkRun is set
 
   public SolrZkServer(String runZk, String zkHost, String solrHome, String solrPort) {
-    this.runZk = runZk;
+    this.zkRun = runZk;
     this.zkHost = zkHost;
     this.solrHome = solrHome;
     this.solrPort = solrPort;
@@ -62,7 +60,7 @@
       zkProps = new SolrZkServerProps();
       // set default data dir
       zkProps.setDataDir(solrHome + '/' + "zoo_data");
-      zkProps.runZk = runZk;
+      zkProps.runZk = zkRun;
       zkProps.solrPort = solrPort;
     }
     
@@ -71,16 +69,16 @@
       SolrZkServerProps.injectServers(props, zkHost);
       zkProps.parseProperties(props);
     } catch (QuorumPeerConfig.ConfigException e) {
-      if (runZk != null)
+      if (zkRun != null)
         throw new SolrException(SolrException.ErrorCode.SERVER_ERROR, e);
     } catch (IOException e) {
-      if (runZk != null)
+      if (zkRun != null)
       throw new SolrException(SolrException.ErrorCode.SERVER_ERROR, e);
     }
   }
 
   public void start() {
-    if (runZk == null) return;
+    if (zkRun == null) return;
 
     zkThread = new Thread() {
       @Override
@@ -119,7 +117,7 @@
   }
 
   public void stop() {
-    if (runZk == null) return;
+    if (zkRun == null) return;
     // TODO: how to do an orderly shutdown?
     zkThread.interrupt();
   }
@@ -134,7 +132,7 @@
   protected static org.slf4j.Logger LOG = LoggerFactory.getLogger(QuorumPeerConfig.class);
 
   String solrPort; // port that Solr is listening on
-  String runZk;    // the runZk param
+  String runZk;    // the zkRun param
   Properties sourceProps;
 
   /**

Modified: lucene/solr/branches/cloud/src/java/org/apache/solr/core/CoreContainer.java
URL: http://svn.apache.org/viewvc/lucene/solr/branches/cloud/src/java/org/apache/solr/core/CoreContainer.java?rev=902333&r1=902332&r2=902333&view=diff
==============================================================================
--- lucene/solr/branches/cloud/src/java/org/apache/solr/core/CoreContainer.java (original)
+++ lucene/solr/branches/cloud/src/java/org/apache/solr/core/CoreContainer.java Sat Jan 23
02:00:19 2010
@@ -105,7 +105,7 @@
       zookeeperHost = zkHost;
     }
 
-    zkServer = new SolrZkServer(System.getProperty("runZk"), zookeeperHost, solrHome, hostPort);
+    zkServer = new SolrZkServer(System.getProperty("zkRun"), zookeeperHost, solrHome, hostPort);
     zkServer.parseConfig();
     zkServer.start();
 



Mime
View raw message