You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by da...@apache.org on 2018/12/11 20:58:32 UTC

[08/27] lucene-solr:jira/http2: Revert "Pre-commit fixes for LUCENE-8374 (JavaDoc + arguments)". LUCENE-8374 was committed without consensus and is expected to be superseded by LUCENE-8585.

Revert "Pre-commit fixes for LUCENE-8374 (JavaDoc + arguments)".
LUCENE-8374 was committed without consensus and is expected to be superseded by LUCENE-8585.

This reverts commit 6c111611118ceda0837f25a27e5b4549f2693457.


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/870bb11c
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/870bb11c
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/870bb11c

Branch: refs/heads/jira/http2
Commit: 870bb11cc85c961f9ca9fb638143d8189a5abd6a
Parents: 05d728f
Author: Toke Eskildsen <to...@apache.org>
Authored: Tue Dec 11 14:13:17 2018 +0100
Committer: Toke Eskildsen <to...@apache.org>
Committed: Tue Dec 11 14:13:17 2018 +0100

----------------------------------------------------------------------
 .../lucene/codecs/lucene70/IndexedDISICache.java | 10 +---------
 .../codecs/lucene70/IndexedDISICacheFactory.java | 19 +------------------
 .../lucene/codecs/lucene70/LongCompressor.java   |  7 +------
 3 files changed, 3 insertions(+), 33 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/870bb11c/lucene/core/src/java/org/apache/lucene/codecs/lucene70/IndexedDISICache.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/codecs/lucene70/IndexedDISICache.java b/lucene/core/src/java/org/apache/lucene/codecs/lucene70/IndexedDISICache.java
index 80867a3..fdf93cf 100644
--- a/lucene/core/src/java/org/apache/lucene/codecs/lucene70/IndexedDISICache.java
+++ b/lucene/core/src/java/org/apache/lucene/codecs/lucene70/IndexedDISICache.java
@@ -118,9 +118,7 @@ public class IndexedDISICache implements Accountable {
     this.name = "";
   }
 
-  /**
-   * Shared between all structures that are too small to meaningfully use jump-tables.
-   */
+  // Used to represent no caching.
   public static final IndexedDISICache EMPTY = new IndexedDISICache();
 
   /**
@@ -158,10 +156,6 @@ public class IndexedDISICache implements Accountable {
        return target >> RANK_BLOCK_BITS << RANK_BLOCK_BITS;
   }
 
-  /**
-   * Offsets stated the block starts.
-   * @return true if the cache has offsets.
-   */
   public boolean hasOffsets() {
     return blockCache != null;
   }
@@ -305,7 +299,6 @@ public class IndexedDISICache implements Accountable {
   }
 
   /**
-   * Creation stats intended for human inspection.
    * @return Human readable details from the creation of the cache instance.
    */
   public String getCreationStats() {
@@ -313,7 +306,6 @@ public class IndexedDISICache implements Accountable {
   }
 
   /**
-   * Cache name, as stated in the constructor.
    * @return Human-readable name for the cache instance.
    */
   public String getName() {

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/870bb11c/lucene/core/src/java/org/apache/lucene/codecs/lucene70/IndexedDISICacheFactory.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/codecs/lucene70/IndexedDISICacheFactory.java b/lucene/core/src/java/org/apache/lucene/codecs/lucene70/IndexedDISICacheFactory.java
index f177210..610529a 100644
--- a/lucene/core/src/java/org/apache/lucene/codecs/lucene70/IndexedDISICacheFactory.java
+++ b/lucene/core/src/java/org/apache/lucene/codecs/lucene70/IndexedDISICacheFactory.java
@@ -48,12 +48,6 @@ public class IndexedDISICacheFactory implements Accountable {
   private final Map<String, VaryingBPVJumpTable> vBPVPool = new HashMap<>();
 
   /**
-   * Creates a {@link IndexedDISICache} and {@link VaryingBPVJumpTable} holding factory,
-   * intended for shared use within a single segment.
-   */
-  public IndexedDISICacheFactory() { }
-
-  /**
    * Create a cached {@link IndexedDISI} instance.
    * @param data   persistent data containing the DISI-structure.
    * @param cost   cost as defined for IndexedDISI.
@@ -152,24 +146,13 @@ public class IndexedDISICacheFactory implements Accountable {
     return cache;
   }
 
-  /**
-   * Cache statistics intended for external inspection.
-   * @return the number of total blocks where jumps are accelerated by jump-tables.
-   */
+  // Statistics
   public long getDISIBlocksWithOffsetsCount() {
     return disiPool.values().stream().filter(IndexedDISICache::hasOffsets).count();
   }
-  /**
-   * Cache statistics intended for external inspection.
-   * @return the total number of DENSE blocks where index-counts are accelerated by rank.
-   */
   public long getDISIBlocksWithRankCount() {
     return disiPool.values().stream().filter(IndexedDISICache::hasRank).count();
   }
-  /**
-   * Cache statistics intended for external inspection.
-   * @return the number of numeric blocks where jumps are accelerated by jump-tables
-   */
   public long getVaryingBPVCount() {
     return vBPVPool.size();
   }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/870bb11c/lucene/core/src/java/org/apache/lucene/codecs/lucene70/LongCompressor.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/codecs/lucene70/LongCompressor.java b/lucene/core/src/java/org/apache/lucene/codecs/lucene70/LongCompressor.java
index 7b12cc6..1c030a7 100644
--- a/lucene/core/src/java/org/apache/lucene/codecs/lucene70/LongCompressor.java
+++ b/lucene/core/src/java/org/apache/lucene/codecs/lucene70/LongCompressor.java
@@ -48,11 +48,6 @@ public class LongCompressor {
   private static final double DEFAULT_MIN_ZERO_VALUES_FRACTION_FOR_SPARSE = 0.2; // 20% (just guessing of a value here)
 
   /**
-   * LongCompressor exclusively uses static methods and is never instantiated.
-   */
-  private LongCompressor() { }
-
-  /**
    * Create a compact version of the given values.
    * @param values PackedInts with no special constraints.
    * @return a compact version of the given values or the given values if compression did not improve on heap overhead.
@@ -68,7 +63,7 @@ public class LongCompressor {
    * @return a compact version of the given values or the given values if compression did not improve on heap overhead.
    */
   public static PackedInts.Reader compress(PackedInts.Reader values, int length) {
-    return compress(values, length, true);
+    return compress(values, values.size(), true);
   }
 
   /**