incubator-blur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amccu...@apache.org
Subject [02/10] git commit: Code cleanup, trying to improve the javadocs.
Date Mon, 03 Jun 2013 02:02:17 GMT
Code cleanup, trying to improve the javadocs.


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

Branch: refs/heads/0.1.5
Commit: edf6c8ec02255141aafb665c988bb0e6f5837d13
Parents: b44d547
Author: Aaron McCurry <amccurry@gmail.com>
Authored: Sun Jun 2 10:46:34 2013 -0400
Committer: Aaron McCurry <amccurry@gmail.com>
Committed: Sun Jun 2 10:46:34 2013 -0400

----------------------------------------------------------------------
 .../java/org/apache/blur/manager/IndexManager.java |    2 +-
 .../java/org/apache/blur/manager/IndexServer.java  |   34 +++++-------
 .../indexserver/DistributedIndexServer.java        |   15 -----
 .../blur/manager/indexserver/LocalIndexServer.java |   11 ----
 .../java/org/apache/blur/server/Configured.java    |   42 ---------------
 5 files changed, 16 insertions(+), 88 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/edf6c8ec/src/blur-core/src/main/java/org/apache/blur/manager/IndexManager.java
----------------------------------------------------------------------
diff --git a/src/blur-core/src/main/java/org/apache/blur/manager/IndexManager.java b/src/blur-core/src/main/java/org/apache/blur/manager/IndexManager.java
index 78dcf1f..b21e3e4 100644
--- a/src/blur-core/src/main/java/org/apache/blur/manager/IndexManager.java
+++ b/src/blur-core/src/main/java/org/apache/blur/manager/IndexManager.java
@@ -954,7 +954,7 @@ public class IndexManager {
     return _indexServer.getShardCount(table);
   }
 
-  public static class SimpleQueryParallelCall implements ParallelCall<Entry<String,
BlurIndex>, BlurResultIterable> {
+  static class SimpleQueryParallelCall implements ParallelCall<Entry<String, BlurIndex>,
BlurResultIterable> {
 
     private final String _table;
     private final QueryStatus _status;

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/edf6c8ec/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 62d80b9..6ab5374 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
@@ -27,9 +27,15 @@ import org.apache.blur.thrift.generated.ShardState;
 import org.apache.hadoop.io.compress.CompressionCodec;
 import org.apache.lucene.search.similarities.Similarity;
 
-
+/**
+ * The {@link IndexServer} interface provides the internal API to interact with
+ * the indexes being served in the shard server instance.
+ */
 public interface IndexServer {
 
+  /**
+   * Enum that describes whether a table is enabled or not.
+   */
   public enum TABLE_STATUS {
     ENABLED, DISABLED
   }
@@ -120,24 +126,6 @@ public interface IndexServer {
    */
   int getShardCount(String table);
 
-  /**
-   * Gets the compress codec for the given table.
-   * 
-   * @param table
-   *          the name of the table.
-   * @return the {@link CompressionCodec}
-   */
-  CompressionCodec getCompressionCodec(String table);
-
-  /**
-   * Get the compression block size.
-   * 
-   * @param table
-   *          the name of the table.
-   * @return the block size.
-   */
-  int getCompressionBlockSize(String table);
-
   // Metrics
 
   /**
@@ -175,6 +163,14 @@ public interface IndexServer {
    */
   void close();
 
+  /**
+   * Get the shard state. Provides access to the as is state of the shards in
+   * this instance.
+   * 
+   * @param table
+   *          the table name.
+   * @return the map of shard name to state.
+   */
   Map<String, ShardState> getShardState(String table);
 
 }

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/edf6c8ec/src/blur-core/src/main/java/org/apache/blur/manager/indexserver/DistributedIndexServer.java
----------------------------------------------------------------------
diff --git a/src/blur-core/src/main/java/org/apache/blur/manager/indexserver/DistributedIndexServer.java
b/src/blur-core/src/main/java/org/apache/blur/manager/indexserver/DistributedIndexServer.java
index 8710f8e..c86eeae 100644
--- a/src/blur-core/src/main/java/org/apache/blur/manager/indexserver/DistributedIndexServer.java
+++ b/src/blur-core/src/main/java/org/apache/blur/manager/indexserver/DistributedIndexServer.java
@@ -80,7 +80,6 @@ import org.apache.hadoop.fs.ContentSummary;
 import org.apache.hadoop.fs.FileStatus;
 import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.Path;
-import org.apache.hadoop.io.compress.CompressionCodec;
 import org.apache.lucene.index.IndexReader;
 import org.apache.lucene.search.similarities.Similarity;
 import org.apache.lucene.store.Directory;
@@ -415,20 +414,6 @@ public class DistributedIndexServer extends AbstractIndexServer {
   }
 
   @Override
-  public int getCompressionBlockSize(String table) {
-    checkTable(table);
-    TableDescriptor descriptor = getTableDescriptor(table);
-    return descriptor.compressionBlockSize;
-  }
-
-  @Override
-  public CompressionCodec getCompressionCodec(String table) {
-    checkTable(table);
-    TableDescriptor descriptor = getTableDescriptor(table);
-    return getInstance(descriptor.compressionClass, CompressionCodec.class);
-  }
-
-  @Override
   public SortedSet<String> getShardListCurrentServerOnly(String table) throws IOException
{
     return new TreeSet<String>(getShardsToServe(table));
   }

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/edf6c8ec/src/blur-core/src/main/java/org/apache/blur/manager/indexserver/LocalIndexServer.java
----------------------------------------------------------------------
diff --git a/src/blur-core/src/main/java/org/apache/blur/manager/indexserver/LocalIndexServer.java
b/src/blur-core/src/main/java/org/apache/blur/manager/indexserver/LocalIndexServer.java
index 94270e5..5872c11 100644
--- a/src/blur-core/src/main/java/org/apache/blur/manager/indexserver/LocalIndexServer.java
+++ b/src/blur-core/src/main/java/org/apache/blur/manager/indexserver/LocalIndexServer.java
@@ -49,7 +49,6 @@ import org.apache.blur.thrift.generated.TableDescriptor;
 import org.apache.blur.utils.BlurConstants;
 import org.apache.blur.utils.BlurUtil;
 import org.apache.hadoop.fs.Path;
-import org.apache.hadoop.io.compress.CompressionCodec;
 import org.apache.lucene.analysis.core.KeywordAnalyzer;
 import org.apache.lucene.analysis.standard.StandardAnalyzer;
 import org.apache.lucene.analysis.util.CharArraySet;
@@ -237,16 +236,6 @@ public class LocalIndexServer extends AbstractIndexServer {
   }
 
   @Override
-  public CompressionCodec getCompressionCodec(String table) {
-    throw new RuntimeException("Should not be used.");
-  }
-
-  @Override
-  public int getCompressionBlockSize(String table) {
-    throw new RuntimeException("Should not be used.");
-  }
-
-  @Override
   public Map<String, ShardState> getShardState(String table) {
     throw new RuntimeException("Not supported yet.");
   }

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/edf6c8ec/src/blur-core/src/main/java/org/apache/blur/server/Configured.java
----------------------------------------------------------------------
diff --git a/src/blur-core/src/main/java/org/apache/blur/server/Configured.java b/src/blur-core/src/main/java/org/apache/blur/server/Configured.java
deleted file mode 100644
index 484a148..0000000
--- a/src/blur-core/src/main/java/org/apache/blur/server/Configured.java
+++ /dev/null
@@ -1,42 +0,0 @@
-package org.apache.blur.server;
-
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- * http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-
-public abstract class Configured implements Configurable {
-
-  private TableContext context;
-
-  public Configured() {
-    this(null);
-  }
-
-  public Configured(TableContext context) {
-    this.context = context;
-  }
-
-  @Override
-  public TableContext getTableContext() {
-    return context;
-  }
-
-  @Override
-  public void setTableContext(TableContext context) {
-    this.context = context;
-  }
-
-}


Mime
View raw message