incubator-blur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amccu...@apache.org
Subject [59/92] [abbrv] git commit: Removing old library.
Date Tue, 11 Jun 2013 02:41:45 GMT
Removing old library.


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

Branch: refs/heads/master
Commit: 3a11bad7b0058eef60afc6a99b417410d6709236
Parents: b73a6ac
Author: Aaron McCurry <amccurry@gmail.com>
Authored: Thu Jun 6 23:04:44 2013 -0400
Committer: Aaron McCurry <amccurry@gmail.com>
Committed: Thu Jun 6 23:04:44 2013 -0400

----------------------------------------------------------------------
 .../3.6.1.lm/lucene-core-3.6.1.lm.jar           | Bin 1538596 -> 0 bytes
 .../lucene-core/3.6.1.lm/lucene_3.6.1.lm.patch  | 367 -------------------
 2 files changed, 367 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/3a11bad7/src/lib/org/apache/lucene/lucene-core/3.6.1.lm/lucene-core-3.6.1.lm.jar
----------------------------------------------------------------------
diff --git a/src/lib/org/apache/lucene/lucene-core/3.6.1.lm/lucene-core-3.6.1.lm.jar b/src/lib/org/apache/lucene/lucene-core/3.6.1.lm/lucene-core-3.6.1.lm.jar
deleted file mode 100644
index cb7f47a..0000000
Binary files a/src/lib/org/apache/lucene/lucene-core/3.6.1.lm/lucene-core-3.6.1.lm.jar and
/dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/3a11bad7/src/lib/org/apache/lucene/lucene-core/3.6.1.lm/lucene_3.6.1.lm.patch
----------------------------------------------------------------------
diff --git a/src/lib/org/apache/lucene/lucene-core/3.6.1.lm/lucene_3.6.1.lm.patch b/src/lib/org/apache/lucene/lucene-core/3.6.1.lm/lucene_3.6.1.lm.patch
deleted file mode 100644
index 307f2f9..0000000
--- a/src/lib/org/apache/lucene/lucene-core/3.6.1.lm/lucene_3.6.1.lm.patch
+++ /dev/null
@@ -1,367 +0,0 @@
-From 84a68b88d7e51a367b6133dff47a224ad98202d8 Mon Sep 17 00:00:00 2001
-From: Aaron McCurry <amccurry@gmail.com>
-Date: Tue, 21 Aug 2012 23:11:05 -0400
-Subject: [PATCH] Lower memory creation patch.
-
----
- .../org/apache/lucene/index/TermInfosReader.java   |   94 +++++++++++---------
- .../apache/lucene/index/TermInfosReaderIndex.java  |   30 ++++---
- .../lucene/index/TestTermInfosReaderIndex.java     |    4 +-
- 3 files changed, 69 insertions(+), 59 deletions(-)
-
-diff --git a/lucene/core/src/java/org/apache/lucene/index/TermInfosReader.java b/lucene/core/src/java/org/apache/lucene/index/TermInfosReader.java
-index 10a1054..03fbd8d 100644
---- a/lucene/core/src/java/org/apache/lucene/index/TermInfosReader.java
-+++ b/lucene/core/src/java/org/apache/lucene/index/TermInfosReader.java
-@@ -25,9 +25,10 @@ import org.apache.lucene.util.BytesRef;
- import org.apache.lucene.util.DoubleBarrelLRUCache;
- import org.apache.lucene.util.CloseableThreadLocal;
- 
--/** This stores a monotonically increasing set of <Term, TermInfo> pairs in a
-- * Directory.  Pairs are accessed either by Term or by ordinal position the
-- * set.  */
-+/**
-+ * This stores a monotonically increasing set of <Term, TermInfo> pairs in a
-+ * Directory. Pairs are accessed either by Term or by ordinal position the set.
-+ */
- 
- final class TermInfosReader implements Closeable {
-   private final Directory directory;
-@@ -40,7 +41,7 @@ final class TermInfosReader implements Closeable {
- 
-   private final TermInfosReaderIndex index;
-   private final int indexLength;
--  
-+
-   private final int totalIndexInterval;
- 
-   private final static int DEFAULT_CACHE_SIZE = 1024;
-@@ -48,6 +49,7 @@ final class TermInfosReader implements Closeable {
-   // Just adds term's ord to TermInfo
-   private final static class TermInfoAndOrd extends TermInfo {
-     final long termOrd;
-+
-     public TermInfoAndOrd(TermInfo ti, long termOrd) {
-       super(ti);
-       assert termOrd >= 0;
-@@ -79,17 +81,20 @@ final class TermInfosReader implements Closeable {
-     }
-   }
- 
--  private final DoubleBarrelLRUCache<CloneableTerm,TermInfoAndOrd> termsCache = new
DoubleBarrelLRUCache<CloneableTerm,TermInfoAndOrd>(DEFAULT_CACHE_SIZE);
--  
-+  private final DoubleBarrelLRUCache<CloneableTerm, TermInfoAndOrd> termsCache = new
DoubleBarrelLRUCache<CloneableTerm, TermInfoAndOrd>(DEFAULT_CACHE_SIZE);
-+
-   /**
-    * Per-thread resources managed by ThreadLocal
-    */
--  private static final class ThreadResources {
-+  static final class ThreadResources {
-     SegmentTermEnum termEnum;
-+    BytesRef termBytesRefGetMethodTermInfosReader = new BytesRef();
-+    BytesRef scratchGetIndexOffsetMethodTermInfosReaderIndex = new BytesRef();
-+    BytesRef termBytesRefGetIndexOffsetMethodTermInfosReaderIndex = new BytesRef();
-+    BytesRef bufferCompareToMethodTermInfosReaderIndex = new BytesRef();
-   }
--  
--  TermInfosReader(Directory dir, String seg, FieldInfos fis, int readBufferSize, int indexDivisor)
--       throws CorruptIndexException, IOException {
-+
-+  TermInfosReader(Directory dir, String seg, FieldInfos fis, int readBufferSize, int indexDivisor)
throws CorruptIndexException, IOException {
-     boolean success = false;
- 
-     if (indexDivisor < 1 && indexDivisor != -1) {
-@@ -101,17 +106,14 @@ final class TermInfosReader implements Closeable {
-       segment = seg;
-       fieldInfos = fis;
- 
--      origEnum = new SegmentTermEnum(directory.openInput(IndexFileNames.segmentFileName(segment,
IndexFileNames.TERMS_EXTENSION),
--          readBufferSize), fieldInfos, false);
-+      origEnum = new SegmentTermEnum(directory.openInput(IndexFileNames.segmentFileName(segment,
IndexFileNames.TERMS_EXTENSION), readBufferSize), fieldInfos, false);
-       size = origEnum.size;
- 
--
-       if (indexDivisor != -1) {
-         // Load terms index
-         totalIndexInterval = origEnum.indexInterval * indexDivisor;
-         final String indexFileName = IndexFileNames.segmentFileName(segment, IndexFileNames.TERMS_INDEX_EXTENSION);
--        final SegmentTermEnum indexEnum = new SegmentTermEnum(directory.openInput(indexFileName,
--                                                                                  readBufferSize),
fieldInfos, true);
-+        final SegmentTermEnum indexEnum = new SegmentTermEnum(directory.openInput(indexFileName,
readBufferSize), fieldInfos, true);
-         try {
-           index = new TermInfosReaderIndex(indexEnum, indexDivisor, dir.fileLength(indexFileName),
totalIndexInterval);
-           indexLength = index.length();
-@@ -140,7 +142,7 @@ final class TermInfosReader implements Closeable {
-   public int getSkipInterval() {
-     return origEnum.skipInterval;
-   }
--  
-+
-   public int getMaxSkipLevels() {
-     return origEnum.maxSkipLevels;
-   }
-@@ -168,13 +170,13 @@ final class TermInfosReader implements Closeable {
- 
-   /** Returns the TermInfo for a Term in the set, or null. */
-   TermInfo get(Term term) throws IOException {
--    BytesRef termBytesRef = new BytesRef(term.text);
--    return get(term, false, termBytesRef);
-+    return get(term, false);
-   }
--  
-+
-   /** Returns the TermInfo for a Term in the set, or null. */
--  private TermInfo get(Term term, boolean mustSeekEnum, BytesRef termBytesRef) throws IOException
{
--    if (size == 0) return null;
-+  private TermInfo get(Term term, boolean mustSeekEnum) throws IOException {
-+    if (size == 0)
-+      return null;
- 
-     ensureIndexIsRead();
- 
-@@ -182,20 +184,23 @@ final class TermInfosReader implements Closeable {
- 
-     TermInfoAndOrd tiOrd = termsCache.get(cacheKey);
-     ThreadResources resources = getThreadResources();
-+
-+    BytesRef termBytesRef = resources.termBytesRefGetMethodTermInfosReader;
-+    termBytesRef.copyChars(term.text);
-     
-     if (!mustSeekEnum && tiOrd != null) {
-       return tiOrd;
-     }
--    
-+
-     // optimize sequential access: first try scanning cached enum w/o seeking
-     SegmentTermEnum enumerator = resources.termEnum;
--    if (enumerator.term() != null                 // term is at or past current
--	&& ((enumerator.prev() != null && term.compareTo(enumerator.prev())>
0)
--	    || term.compareTo(enumerator.term()) >= 0)) {
--      int enumOffset = (int)(enumerator.position/totalIndexInterval)+1;
--      if (indexLength == enumOffset    // but before end of block
--    || index.compareTo(term,termBytesRef,enumOffset) < 0) {
--       // no need to seek
-+    BytesRef buffer = resources.bufferCompareToMethodTermInfosReaderIndex;
-+    if (enumerator.term() != null // term is at or past current
-+        && ((enumerator.prev() != null && term.compareTo(enumerator.prev())
> 0) || term.compareTo(enumerator.term()) >= 0)) {
-+      int enumOffset = (int) (enumerator.position / totalIndexInterval) + 1;
-+      if (indexLength == enumOffset // but before end of block
-+          || index.compareTo(term, termBytesRef, enumOffset,buffer) < 0) {
-+        // no need to seek
- 
-         final TermInfo ti;
- 
-@@ -203,9 +208,9 @@ final class TermInfosReader implements Closeable {
-         if (enumerator.term() != null && term.compareTo(enumerator.term()) == 0)
{
-           ti = enumerator.termInfo();
-           if (numScans > 1) {
--            // we only  want to put this TermInfo into the cache if
-+            // we only want to put this TermInfo into the cache if
-             // scanEnum skipped more than one dictionary entry.
--            // This prevents RangeQueries or WildcardQueries to 
-+            // This prevents RangeQueries or WildcardQueries to
-             // wipe out the cache when they iterate over a large numbers
-             // of terms in order
-             if (tiOrd == null) {
-@@ -220,7 +225,7 @@ final class TermInfosReader implements Closeable {
-         }
- 
-         return ti;
--      }  
-+      }
-     }
- 
-     // random-access: must seek
-@@ -229,7 +234,7 @@ final class TermInfosReader implements Closeable {
-       indexPos = (int) (tiOrd.termOrd / totalIndexInterval);
-     } else {
-       // Must do binary search:
--      indexPos = index.getIndexOffset(term,termBytesRef);
-+      indexPos = index.getIndexOffset(term, resources);
-     }
- 
-     index.seekEnum(enumerator, indexPos);
-@@ -261,8 +266,7 @@ final class TermInfosReader implements Closeable {
-       return false;
-     }
-     // skipOffset is only valid when docFreq >= skipInterval:
--    if (ti1.docFreq >= enumerator.skipInterval &&
--        ti1.skipOffset != ti2.skipOffset) {
-+    if (ti1.docFreq >= enumerator.skipInterval && ti1.skipOffset != ti2.skipOffset)
{
-       return false;
-     }
-     return true;
-@@ -276,16 +280,19 @@ final class TermInfosReader implements Closeable {
- 
-   /** Returns the position of a Term in the set or -1. */
-   final long getPosition(Term term) throws IOException {
--    if (size == 0) return -1;
-+    if (size == 0)
-+      return -1;
- 
-     ensureIndexIsRead();
--    BytesRef termBytesRef = new BytesRef(term.text);
--    int indexOffset = index.getIndexOffset(term,termBytesRef);
-     
--    SegmentTermEnum enumerator = getThreadResources().termEnum;
-+    ThreadResources resources = getThreadResources();
-+    int indexOffset = index.getIndexOffset(term,resources);
-+
-+    SegmentTermEnum enumerator = resources.termEnum;
-     index.seekEnum(enumerator, indexOffset);
- 
--    while(term.compareTo(enumerator.term()) > 0 && enumerator.next()) {}
-+    while (term.compareTo(enumerator.term()) > 0 && enumerator.next()) {
-+    }
- 
-     if (term.compareTo(enumerator.term()) == 0)
-       return enumerator.position;
-@@ -295,13 +302,12 @@ final class TermInfosReader implements Closeable {
- 
-   /** Returns an enumeration of all the Terms and TermInfos in the set. */
-   public SegmentTermEnum terms() {
--    return (SegmentTermEnum)origEnum.clone();
-+    return (SegmentTermEnum) origEnum.clone();
-   }
- 
-   /** Returns an enumeration of terms starting at or after the named term. */
-   public SegmentTermEnum terms(Term term) throws IOException {
--    BytesRef termBytesRef = new BytesRef(term.text);
--    get(term, true, termBytesRef);
--    return (SegmentTermEnum)getThreadResources().termEnum.clone();
-+    get(term, true);
-+    return (SegmentTermEnum) getThreadResources().termEnum.clone();
-   }
- }
-diff --git a/lucene/core/src/java/org/apache/lucene/index/TermInfosReaderIndex.java b/lucene/core/src/java/org/apache/lucene/index/TermInfosReaderIndex.java
-index 4786bb5..d7286b3 100644
---- a/lucene/core/src/java/org/apache/lucene/index/TermInfosReaderIndex.java
-+++ b/lucene/core/src/java/org/apache/lucene/index/TermInfosReaderIndex.java
-@@ -22,11 +22,12 @@ import java.util.ArrayList;
- import java.util.Comparator;
- import java.util.List;
- 
-+import org.apache.lucene.index.TermInfosReader.ThreadResources;
- import org.apache.lucene.util.BitUtil;
- import org.apache.lucene.util.BytesRef;
-+import org.apache.lucene.util.PagedBytes;
- import org.apache.lucene.util.PagedBytes.PagedBytesDataInput;
- import org.apache.lucene.util.PagedBytes.PagedBytesDataOutput;
--import org.apache.lucene.util.PagedBytes;
- import org.apache.lucene.util.packed.GrowableWriter;
- import org.apache.lucene.util.packed.PackedInts;
- 
-@@ -38,7 +39,7 @@ import org.apache.lucene.util.packed.PackedInts;
-  */
- class TermInfosReaderIndex {
- 
--  private static final int MAX_PAGE_BITS = 18; // 256 KB block
-+  private static final int MAX_PAGE_BITS = 24; // 16 MB block
-   private Term[] fields;
-   private int totalIndexInterval;
-   private Comparator<BytesRef> comparator = BytesRef.getUTF8SortedAsUTF16Comparator();
-@@ -102,7 +103,7 @@ class TermInfosReaderIndex {
-     for (int i = 0; i < fields.length; i++) {
-       fields[i] = new Term(fieldStrs.get(i));
-     }
--    
-+
-     dataPagedBytes.freeze(true);
-     dataInput = dataPagedBytes.getDataInput();
-     indexToDataOffset = indexToTerms.getMutable();
-@@ -114,7 +115,7 @@ class TermInfosReaderIndex {
- 
-   void seekEnum(SegmentTermEnum enumerator, int indexOffset) throws IOException {
-     PagedBytesDataInput input = (PagedBytesDataInput) dataInput.clone();
--    
-+
-     input.setPosition(indexToDataOffset.get(indexOffset));
- 
-     // read the term
-@@ -144,13 +145,16 @@ class TermInfosReaderIndex {
-    * 
-    * @param term
-    *          the term to locate.
--   * @throws IOException 
-+   * @throws IOException
-    */
--  int getIndexOffset(Term term, BytesRef termBytesRef) throws IOException {
-+  int getIndexOffset(Term term, ThreadResources resources) throws IOException {
-     int lo = 0;
-     int hi = indexSize - 1;
-     PagedBytesDataInput input = (PagedBytesDataInput) dataInput.clone();
--    BytesRef scratch = new BytesRef();
-+    BytesRef termBytesRef = resources.termBytesRefGetIndexOffsetMethodTermInfosReaderIndex;
-+    termBytesRef.copyChars(term.text);
-+
-+    BytesRef scratch = resources.scratchGetIndexOffsetMethodTermInfosReaderIndex;
-     while (hi >= lo) {
-       int mid = (lo + hi) >>> 1;
-       int delta = compareTo(term, termBytesRef, mid, input, scratch);
-@@ -165,7 +169,7 @@ class TermInfosReaderIndex {
-   }
- 
-   /**
--   * Gets the term at the given position.  For testing.
-+   * Gets the term at the given position. For testing.
-    * 
-    * @param termIndex
-    *          the position to read the term from the index.
-@@ -200,10 +204,10 @@ class TermInfosReaderIndex {
-    * @param termIndex
-    *          the index of the of term to compare.
-    * @return int.
--   * @throws IOException 
-+   * @throws IOException
-    */
--  int compareTo(Term term, BytesRef termBytesRef, int termIndex) throws IOException {
--    return compareTo(term, termBytesRef, termIndex, (PagedBytesDataInput) dataInput.clone(),
new BytesRef());
-+  int compareTo(Term term, BytesRef termBytesRef, int termIndex, BytesRef buffer) throws
IOException {
-+    return compareTo(term, termBytesRef, termIndex, (PagedBytesDataInput) dataInput.clone(),
buffer);
-   }
- 
-   /**
-@@ -217,7 +221,7 @@ class TermInfosReaderIndex {
-    * @param input
-    *          the input buffer.
-    * @return int.
--   * @throws IOException 
-+   * @throws IOException
-    */
-   private int compareTo(Term term, BytesRef termBytesRef, int termIndex, PagedBytesDataInput
input, BytesRef reuse) throws IOException {
-     // if term field does not equal mid's field index, then compare fields
-@@ -242,7 +246,7 @@ class TermInfosReaderIndex {
-    * @param input
-    *          the data block.
-    * @return int.
--   * @throws IOException 
-+   * @throws IOException
-    */
-   private int compareField(Term term, int termIndex, PagedBytesDataInput input) throws IOException
{
-     input.setPosition(indexToDataOffset.get(termIndex));
-diff --git a/lucene/core/src/test/org/apache/lucene/index/TestTermInfosReaderIndex.java b/lucene/core/src/test/org/apache/lucene/index/TestTermInfosReaderIndex.java
-index 0289b4c..c016588 100644
---- a/lucene/core/src/test/org/apache/lucene/index/TestTermInfosReaderIndex.java
-+++ b/lucene/core/src/test/org/apache/lucene/index/TestTermInfosReaderIndex.java
-@@ -37,8 +37,8 @@ import org.apache.lucene.store.LockObtainFailedException;
- import org.apache.lucene.util.BytesRef;
- import org.apache.lucene.util.LuceneTestCase;
- import org.apache.lucene.util._TestUtil;
--import org.junit.BeforeClass;
- import org.junit.AfterClass;
-+import org.junit.BeforeClass;
- 
- public class TestTermInfosReaderIndex extends LuceneTestCase {
-   
-@@ -119,7 +119,7 @@ public class TestTermInfosReaderIndex extends LuceneTestCase {
-     for (int i = 0; i < index.length(); i++) {
-       Term t = index.getTerm(i);
-       int compareTo = term.compareTo(t);
--      assertEquals(compareTo, index.compareTo(term, termBytesRef, i));
-+      assertEquals(compareTo, index.compareTo(term, termBytesRef, i, new BytesRef()));
-     }
-   }
-   
--- 
-1.7.5.4
-


Mime
View raw message