incubator-blur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amccu...@apache.org
Subject git commit: Working on BLUR-9 package thrift in blur-core.
Date Wed, 17 Oct 2012 01:56:05 GMT
Updated Branches:
  refs/heads/lucene-4.0.0 55a3b5f44 -> 86cc7fcd7


Working on BLUR-9 package thrift in blur-core.


Project: http://git-wip-us.apache.org/repos/asf/incubator-blur/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-blur/commit/86cc7fcd
Tree: http://git-wip-us.apache.org/repos/asf/incubator-blur/tree/86cc7fcd
Diff: http://git-wip-us.apache.org/repos/asf/incubator-blur/diff/86cc7fcd

Branch: refs/heads/lucene-4.0.0
Commit: 86cc7fcd769f60f7dd78032a1ffb1f5d30ef2980
Parents: 55a3b5f
Author: Aaron McCurry <amccurry@gmail.com>
Authored: Tue Oct 16 21:55:00 2012 -0400
Committer: Aaron McCurry <amccurry@gmail.com>
Committed: Tue Oct 16 21:55:00 2012 -0400

----------------------------------------------------------------------
 .../java/org/apache/blur/manager/IndexServer.java  |    2 +-
 .../apache/blur/thrift/ThriftBlurShardServer.java  |   27 +++++----------
 .../apache/blur/thrift/BlurShardServerTest.java    |    2 +-
 3 files changed, 11 insertions(+), 20 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/86cc7fcd/src/blur-core/src/main/java/org/apache/blur/manager/IndexServer.java
----------------------------------------------------------------------
diff --git a/src/blur-core/src/main/java/org/apache/blur/manager/IndexServer.java b/src/blur-core/src/main/java/org/apache/blur/manager/IndexServer.java
index 2a3f937..1097048 100644
--- a/src/blur-core/src/main/java/org/apache/blur/manager/IndexServer.java
+++ b/src/blur-core/src/main/java/org/apache/blur/manager/IndexServer.java
@@ -24,7 +24,7 @@ import java.util.SortedSet;
 import org.apache.blur.analysis.BlurAnalyzer;
 import org.apache.blur.manager.writer.BlurIndex;
 import org.apache.hadoop.io.compress.CompressionCodec;
-import org.apache.lucene.search.Similarity;
+import org.apache.lucene.search.similarities.Similarity;
 
 
 public interface IndexServer {

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/86cc7fcd/src/blur-core/src/main/java/org/apache/blur/thrift/ThriftBlurShardServer.java
----------------------------------------------------------------------
diff --git a/src/blur-core/src/main/java/org/apache/blur/thrift/ThriftBlurShardServer.java
b/src/blur-core/src/main/java/org/apache/blur/thrift/ThriftBlurShardServer.java
index 55b6c60..02cbee1 100644
--- a/src/blur-core/src/main/java/org/apache/blur/thrift/ThriftBlurShardServer.java
+++ b/src/blur-core/src/main/java/org/apache/blur/thrift/ThriftBlurShardServer.java
@@ -16,8 +16,8 @@ package org.apache.blur.thrift;
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-import static org.apache.blur.utils.BlurConstants.BLUR_CLUSTER_NAME;
 import static org.apache.blur.utils.BlurConstants.BLUR_CLUSTER;
+import static org.apache.blur.utils.BlurConstants.BLUR_CLUSTER_NAME;
 import static org.apache.blur.utils.BlurConstants.BLUR_CONTROLLER_BIND_PORT;
 import static org.apache.blur.utils.BlurConstants.BLUR_GUI_CONTROLLER_PORT;
 import static org.apache.blur.utils.BlurConstants.BLUR_GUI_SHARD_PORT;
@@ -27,9 +27,6 @@ import static org.apache.blur.utils.BlurConstants.BLUR_SHARD_BIND_ADDRESS;
 import static org.apache.blur.utils.BlurConstants.BLUR_SHARD_BIND_PORT;
 import static org.apache.blur.utils.BlurConstants.BLUR_SHARD_BLOCKCACHE_DIRECT_MEMORY_ALLOCATION;
 import static org.apache.blur.utils.BlurConstants.BLUR_SHARD_BLOCKCACHE_SLAB_COUNT;
-import static org.apache.blur.utils.BlurConstants.BLUR_SHARD_CACHE_MAX_QUERYCACHE_ELEMENTS;
-import static org.apache.blur.utils.BlurConstants.BLUR_SHARD_CACHE_MAX_TIMETOLIVE;
-import static org.apache.blur.utils.BlurConstants.BLUR_SHARD_DATA_FETCH_THREAD_COUNT;
 import static org.apache.blur.utils.BlurConstants.BLUR_SHARD_FILTER_CACHE_CLASS;
 import static org.apache.blur.utils.BlurConstants.BLUR_SHARD_HOSTNAME;
 import static org.apache.blur.utils.BlurConstants.BLUR_SHARD_INDEX_WARMUP_CLASS;
@@ -42,8 +39,6 @@ import static org.apache.blur.utils.BlurConstants.BLUR_ZOOKEEPER_CONNECTION;
 import static org.apache.blur.utils.BlurConstants.BLUR_ZOOKEEPER_SYSTEM_TIME_TOLERANCE;
 import static org.apache.blur.utils.BlurUtil.quietClose;
 
-import java.util.concurrent.TimeUnit;
-
 import org.apache.blur.BlurConfiguration;
 import org.apache.blur.concurrent.SimpleUncaughtExceptionHandler;
 import org.apache.blur.concurrent.ThreadWatcher;
@@ -57,16 +52,16 @@ import org.apache.blur.manager.IndexManager;
 import org.apache.blur.manager.clusterstatus.ZookeeperClusterStatus;
 import org.apache.blur.manager.indexserver.BlurIndexWarmup;
 import org.apache.blur.manager.indexserver.BlurServerShutDown;
+import org.apache.blur.manager.indexserver.BlurServerShutDown.BlurShutdown;
 import org.apache.blur.manager.indexserver.DefaultBlurIndexWarmup;
 import org.apache.blur.manager.indexserver.DistributedIndexServer;
-import org.apache.blur.manager.indexserver.BlurServerShutDown.BlurShutdown;
 import org.apache.blur.manager.writer.BlurIndexRefresher;
 import org.apache.blur.metrics.BlurMetrics;
-import org.apache.blur.store.BufferStore;
 import org.apache.blur.store.blockcache.BlockCache;
 import org.apache.blur.store.blockcache.BlockDirectory;
 import org.apache.blur.store.blockcache.BlockDirectoryCache;
 import org.apache.blur.store.blockcache.Cache;
+import org.apache.blur.store.buffer.BufferStore;
 import org.apache.blur.thrift.generated.Blur.Iface;
 import org.apache.blur.utils.BlurUtil;
 import org.apache.blur.zookeeper.ZkUtils;
@@ -77,7 +72,6 @@ import org.apache.zookeeper.KeeperException;
 import org.apache.zookeeper.KeeperException.Code;
 import org.apache.zookeeper.ZooKeeper;
 
-
 public class ThriftBlurShardServer extends ThriftServer {
 
   private static final Log LOG = LogFactory.getLog(ThriftBlurShardServer.class);
@@ -102,13 +96,13 @@ public class ThriftBlurShardServer extends ThriftServer {
     int slabCount = configuration.getInt(BLUR_SHARD_BLOCKCACHE_SLAB_COUNT, 1);
     Cache cache;
     Configuration config = new Configuration();
-    
+
     String bindAddress = configuration.get(BLUR_SHARD_BIND_ADDRESS);
     int bindPort = configuration.getInt(BLUR_SHARD_BIND_PORT, -1);
     bindPort += serverIndex;
-    
+
     BlurMetrics blurMetrics = new BlurMetrics(config);
-    
+
     int baseGuiPort = Integer.parseInt(configuration.get(BLUR_GUI_SHARD_PORT));
     final HttpJettyServer httpServer;
     if (baseGuiPort > 0) {
@@ -122,8 +116,7 @@ public class ThriftBlurShardServer extends ThriftServer {
     } else {
       httpServer = null;
     }
-    
-    
+
     if (slabCount >= 1) {
       BlockCache blockCache;
       boolean directAllocation = configuration.getBoolean(BLUR_SHARD_BLOCKCACHE_DIRECT_MEMORY_ALLOCATION,
true);
@@ -136,7 +129,7 @@ public class ThriftBlurShardServer extends ThriftServer {
 
       try {
         long totalMemory = (long) slabCount * (long) numberOfBlocksPerSlab * (long) blockSize;
-        blockCache = new BlockCache(blurMetrics, directAllocation, totalMemory, slabSize,
blockSize);
+        blockCache = new BlockCache(directAllocation, totalMemory, slabSize);
       } catch (OutOfMemoryError e) {
         if ("Direct buffer memory".equals(e.getMessage())) {
           System.err
@@ -145,12 +138,11 @@ public class ThriftBlurShardServer extends ThriftServer {
         }
         throw e;
       }
-      cache = new BlockDirectoryCache(blockCache, blurMetrics);
+      cache = new BlockDirectoryCache(blockCache);
     } else {
       cache = BlockDirectory.NO_CACHE;
     }
 
-
     LOG.info("Shard Server using index [{0}] bind address [{1}]", serverIndex, bindAddress
+ ":" + bindPort);
 
     String nodeNameHostName = getNodeName(configuration, BLUR_SHARD_HOSTNAME);
@@ -227,7 +219,6 @@ public class ThriftBlurShardServer extends ThriftServer {
     server.setIface(iface);
     server.setConfiguration(configuration);
 
-
     // This will shutdown the server when the correct path is set in zk
     BlurShutdown shutdown = new BlurShutdown() {
       @Override

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/86cc7fcd/src/blur-core/src/test/java/org/apache/blur/thrift/BlurShardServerTest.java
----------------------------------------------------------------------
diff --git a/src/blur-core/src/test/java/org/apache/blur/thrift/BlurShardServerTest.java b/src/blur-core/src/test/java/org/apache/blur/thrift/BlurShardServerTest.java
index 8fc566b..7f78ba4 100644
--- a/src/blur-core/src/test/java/org/apache/blur/thrift/BlurShardServerTest.java
+++ b/src/blur-core/src/test/java/org/apache/blur/thrift/BlurShardServerTest.java
@@ -29,7 +29,7 @@ import org.apache.blur.manager.IndexServer;
 import org.apache.blur.manager.writer.BlurIndex;
 import org.apache.blur.thrift.generated.BlurException;
 import org.apache.hadoop.io.compress.CompressionCodec;
-import org.apache.lucene.search.Similarity;
+import org.apache.lucene.search.similarities.Similarity;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;


Mime
View raw message