You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by rm...@apache.org on 2011/02/11 19:16:44 UTC

svn commit: r1069912 - in /lucene/dev/trunk: ./ lucene/ lucene/src/java/org/apache/lucene/index/codecs/intblock/ lucene/src/java/org/apache/lucene/index/codecs/sep/ lucene/src/test-framework/org/apache/lucene/index/codecs/mocksep/ solr/

Author: rmuir
Date: Fri Feb 11 18:16:43 2011
New Revision: 1069912

URL: http://svn.apache.org/viewvc?rev=1069912&view=rev
Log:
remove dead code

Modified:
    lucene/dev/trunk/   (props changed)
    lucene/dev/trunk/lucene/   (props changed)
    lucene/dev/trunk/lucene/src/java/org/apache/lucene/index/codecs/intblock/FixedIntBlockIndexInput.java
    lucene/dev/trunk/lucene/src/java/org/apache/lucene/index/codecs/intblock/FixedIntBlockIndexOutput.java
    lucene/dev/trunk/lucene/src/java/org/apache/lucene/index/codecs/intblock/VariableIntBlockIndexInput.java
    lucene/dev/trunk/lucene/src/java/org/apache/lucene/index/codecs/intblock/VariableIntBlockIndexOutput.java
    lucene/dev/trunk/lucene/src/java/org/apache/lucene/index/codecs/sep/IntIndexInput.java
    lucene/dev/trunk/lucene/src/java/org/apache/lucene/index/codecs/sep/IntIndexOutput.java
    lucene/dev/trunk/lucene/src/test-framework/org/apache/lucene/index/codecs/mocksep/MockSingleIntIndexInput.java
    lucene/dev/trunk/lucene/src/test-framework/org/apache/lucene/index/codecs/mocksep/MockSingleIntIndexOutput.java
    lucene/dev/trunk/solr/   (props changed)

Modified: lucene/dev/trunk/lucene/src/java/org/apache/lucene/index/codecs/intblock/FixedIntBlockIndexInput.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/src/java/org/apache/lucene/index/codecs/intblock/FixedIntBlockIndexInput.java?rev=1069912&r1=1069911&r2=1069912&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/src/java/org/apache/lucene/index/codecs/intblock/FixedIntBlockIndexInput.java (original)
+++ lucene/dev/trunk/lucene/src/java/org/apache/lucene/index/codecs/intblock/FixedIntBlockIndexInput.java Fri Feb 11 18:16:43 2011
@@ -169,25 +169,6 @@ public abstract class FixedIntBlockIndex
     }
 
     @Override
-    public void read(final IntIndexInput.Reader indexIn, final boolean absolute) throws IOException {
-      if (absolute) {
-        fp = indexIn.readVLong();
-        upto = indexIn.next();
-      } else {
-        final long delta = indexIn.readVLong();
-        if (delta == 0) {
-          // same block
-          upto += indexIn.next();
-        } else {
-          // new block
-          fp += delta;
-          upto = indexIn.next();
-        }
-      }
-      assert upto < blockSize;
-    }
-
-    @Override
     public void seek(final IntIndexInput.Reader other) throws IOException {
       ((Reader) other).seek(fp, upto);
     }

Modified: lucene/dev/trunk/lucene/src/java/org/apache/lucene/index/codecs/intblock/FixedIntBlockIndexOutput.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/src/java/org/apache/lucene/index/codecs/intblock/FixedIntBlockIndexOutput.java?rev=1069912&r1=1069911&r2=1069912&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/src/java/org/apache/lucene/index/codecs/intblock/FixedIntBlockIndexOutput.java (original)
+++ lucene/dev/trunk/lucene/src/java/org/apache/lucene/index/codecs/intblock/FixedIntBlockIndexOutput.java Fri Feb 11 18:16:43 2011
@@ -94,25 +94,6 @@ public abstract class FixedIntBlockIndex
     }
 
     @Override
-    public void write(IntIndexOutput indexOut, boolean absolute) throws IOException {
-      if (absolute) {
-        indexOut.writeVLong(fp);
-        indexOut.write(upto);
-      } else if (fp == lastFP) {
-        // same block
-        indexOut.writeVLong(0);
-        assert upto >= lastUpto;
-        indexOut.write(upto - lastUpto);
-      } else {      
-        // new block
-        indexOut.writeVLong(fp - lastFP);
-        indexOut.write(upto);
-      }
-      lastUpto = upto;
-      lastFP = fp;
-    }
-
-    @Override
     public String toString() {
       return "fp=" + fp + " upto=" + upto;
     }

Modified: lucene/dev/trunk/lucene/src/java/org/apache/lucene/index/codecs/intblock/VariableIntBlockIndexInput.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/src/java/org/apache/lucene/index/codecs/intblock/VariableIntBlockIndexInput.java?rev=1069912&r1=1069911&r2=1069912&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/src/java/org/apache/lucene/index/codecs/intblock/VariableIntBlockIndexInput.java (original)
+++ lucene/dev/trunk/lucene/src/java/org/apache/lucene/index/codecs/intblock/VariableIntBlockIndexInput.java Fri Feb 11 18:16:43 2011
@@ -190,24 +190,6 @@ public abstract class VariableIntBlockIn
     }
 
     @Override
-    public void read(final IntIndexInput.Reader indexIn, final boolean absolute) throws IOException {
-      if (absolute) {
-        fp = indexIn.readVLong();
-        upto = indexIn.next()&0xFF;
-      } else {
-        final long delta = indexIn.readVLong();
-        if (delta == 0) {
-          // same block
-          upto = indexIn.next()&0xFF;
-        } else {
-          // new block
-          fp += delta;
-          upto = indexIn.next()&0xFF;
-        }
-      }
-    }
-
-    @Override
     public String toString() {
       return "VarIntBlock.Index fp=" + fp + " upto=" + upto + " maxBlock=" + maxBlockSize;
     }

Modified: lucene/dev/trunk/lucene/src/java/org/apache/lucene/index/codecs/intblock/VariableIntBlockIndexOutput.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/src/java/org/apache/lucene/index/codecs/intblock/VariableIntBlockIndexOutput.java?rev=1069912&r1=1069911&r2=1069912&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/src/java/org/apache/lucene/index/codecs/intblock/VariableIntBlockIndexOutput.java (original)
+++ lucene/dev/trunk/lucene/src/java/org/apache/lucene/index/codecs/intblock/VariableIntBlockIndexOutput.java Fri Feb 11 18:16:43 2011
@@ -103,26 +103,6 @@ public abstract class VariableIntBlockIn
       lastUpto = upto;
       lastFP = fp;
     }
-
-    @Override
-    public void write(IntIndexOutput indexOut, boolean absolute) throws IOException {
-      assert upto >= 0;
-      if (absolute) {
-        indexOut.writeVLong(fp);
-        indexOut.write(upto);
-      } else if (fp == lastFP) {
-        // same block
-        indexOut.writeVLong(0);
-        assert upto >= lastUpto;
-        indexOut.write(upto);
-      } else {      
-        // new block
-        indexOut.writeVLong(fp - lastFP);
-        indexOut.write(upto);
-      }
-      lastUpto = upto;
-      lastFP = fp;
-    }
   }
 
   @Override

Modified: lucene/dev/trunk/lucene/src/java/org/apache/lucene/index/codecs/sep/IntIndexInput.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/src/java/org/apache/lucene/index/codecs/sep/IntIndexInput.java?rev=1069912&r1=1069911&r2=1069912&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/src/java/org/apache/lucene/index/codecs/sep/IntIndexInput.java (original)
+++ lucene/dev/trunk/lucene/src/java/org/apache/lucene/index/codecs/sep/IntIndexInput.java Fri Feb 11 18:16:43 2011
@@ -41,8 +41,6 @@ public abstract class IntIndexInput impl
 
     public abstract void read(DataInput indexIn, boolean absolute) throws IOException;
 
-    public abstract void read(IntIndexInput.Reader indexIn, boolean absolute) throws IOException;
-
     /** Seeks primary stream to the last read offset */
     public abstract void seek(IntIndexInput.Reader stream) throws IOException;
 
@@ -57,18 +55,6 @@ public abstract class IntIndexInput impl
     /** Reads next single int */
     public abstract int next() throws IOException;
 
-    /** Encodes as 1 or 2 ints, and can only use 61 of the 64
-     *  long bits. */
-    public long readVLong() throws IOException {
-      final int v = next();
-      if ((v & 1) == 0) {
-        return v >> 1;
-      } else {
-        final long v2 = next();
-        return (v2 << 30) | (v >> 1);
-      }
-    }
-
     /** Reads next chunk of ints */
     private IntsRef bulkResult;
 

Modified: lucene/dev/trunk/lucene/src/java/org/apache/lucene/index/codecs/sep/IntIndexOutput.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/src/java/org/apache/lucene/index/codecs/sep/IntIndexOutput.java?rev=1069912&r1=1069911&r2=1069912&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/src/java/org/apache/lucene/index/codecs/sep/IntIndexOutput.java (original)
+++ lucene/dev/trunk/lucene/src/java/org/apache/lucene/index/codecs/sep/IntIndexOutput.java Fri Feb 11 18:16:43 2011
@@ -38,23 +38,6 @@ public abstract class IntIndexOutput imp
    * >= 0.  */
   public abstract void write(int v) throws IOException;
 
-  public static final long MAX_SINGLE_INT_VLONG = Integer.MAX_VALUE - (1<<30);
-  public static final long MAX_VLONG = Long.MAX_VALUE - (1L<<62) - (1L<<61);
-
-  /** Encodes as 1 or 2 ints, and can only use 61 of the 64
-   *  long bits. */
-  public void writeVLong(long v) throws IOException {
-    assert v >= 0: "v=" + v;
-    assert v < MAX_VLONG: "v=" + v;
-    // we cannot pass a negative int 
-    if (v <= MAX_SINGLE_INT_VLONG) {
-      write(((int) v)<<1);
-    } else {
-      write(((int) ((v & MAX_SINGLE_INT_VLONG))<<1) | 1);
-      write(((int) (v >> 30)));
-    }
-  }
-
   public abstract static class Index {
 
     /** Internally records the current location */
@@ -66,8 +49,6 @@ public abstract class IntIndexOutput imp
     /** Writes "location" of current output pointer of primary
      *  output to different output (out) */
     public abstract void write(IndexOutput indexOut, boolean absolute) throws IOException;
-
-    public abstract void write(IntIndexOutput indexOut, boolean absolute) throws IOException;
   }
 
   /** If you are indexing the primary output file, call

Modified: lucene/dev/trunk/lucene/src/test-framework/org/apache/lucene/index/codecs/mocksep/MockSingleIntIndexInput.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/src/test-framework/org/apache/lucene/index/codecs/mocksep/MockSingleIntIndexInput.java?rev=1069912&r1=1069911&r2=1069912&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/src/test-framework/org/apache/lucene/index/codecs/mocksep/MockSingleIntIndexInput.java (original)
+++ lucene/dev/trunk/lucene/src/test-framework/org/apache/lucene/index/codecs/mocksep/MockSingleIntIndexInput.java Fri Feb 11 18:16:43 2011
@@ -83,16 +83,6 @@ public class MockSingleIntIndexInput ext
     }
 
     @Override
-    public void read(IntIndexInput.Reader indexIn, boolean absolute)
-      throws IOException {
-      if (absolute) {
-        fp = indexIn.readVLong();
-      } else {
-        fp += indexIn.readVLong();
-      }
-    }
-
-    @Override
     public void set(IntIndexInput.Index other) {
       fp = ((Index) other).fp;
     }

Modified: lucene/dev/trunk/lucene/src/test-framework/org/apache/lucene/index/codecs/mocksep/MockSingleIntIndexOutput.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/src/test-framework/org/apache/lucene/index/codecs/mocksep/MockSingleIntIndexOutput.java?rev=1069912&r1=1069911&r2=1069912&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/src/test-framework/org/apache/lucene/index/codecs/mocksep/MockSingleIntIndexOutput.java (original)
+++ lucene/dev/trunk/lucene/src/test-framework/org/apache/lucene/index/codecs/mocksep/MockSingleIntIndexOutput.java Fri Feb 11 18:16:43 2011
@@ -77,17 +77,6 @@ public class MockSingleIntIndexOutput ex
       }
       lastFP = fp;
     }
-
-    @Override
-    public void write(IntIndexOutput indexOut, boolean absolute) 
-      throws IOException {
-      if (absolute) {
-        indexOut.writeVLong(fp);
-      } else {
-        indexOut.writeVLong(fp - lastFP);
-      }
-      lastFP = fp;
-    }
       
     @Override
     public String toString() {