lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rm...@apache.org
Subject svn commit: r1211301 - in /lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/codecs: DocValuesConsumer.java lucene40/values/Writer.java
Date Wed, 07 Dec 2011 04:50:37 GMT
Author: rmuir
Date: Wed Dec  7 04:50:37 2011
New Revision: 1211301

URL: http://svn.apache.org/viewvc?rev=1211301&view=rev
Log:
LUCENE-3622: push this to the impl, its in the perdocwritestate if an impl chooses to buffer

Modified:
    lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/codecs/DocValuesConsumer.java
    lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/codecs/lucene40/values/Writer.java

Modified: lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/codecs/DocValuesConsumer.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/codecs/DocValuesConsumer.java?rev=1211301&r1=1211300&r2=1211301&view=diff
==============================================================================
--- lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/codecs/DocValuesConsumer.java
(original)
+++ lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/codecs/DocValuesConsumer.java
Wed Dec  7 04:50:37 2011
@@ -23,7 +23,6 @@ import org.apache.lucene.index.MergeStat
 import org.apache.lucene.index.values.IndexDocValues;
 import org.apache.lucene.index.values.PerDocFieldValues;
 import org.apache.lucene.util.Bits;
-import org.apache.lucene.util.Counter;
 
 /**
  * Abstract API that consumes {@link PerDocFieldValues}.
@@ -36,20 +35,6 @@ import org.apache.lucene.util.Counter;
  */
 public abstract class DocValuesConsumer {
 
-  protected final Counter bytesUsed;
-
-  /**
-   * Creates a new {@link DocValuesConsumer}.
-   * 
-   * @param bytesUsed
-   *          bytes-usage tracking reference used by implementation to track
-   *          internally allocated memory. All tracked bytes must be released
-   *          once {@link #finish(int)} has been called.
-   */
-  protected DocValuesConsumer(Counter bytesUsed) {
-    this.bytesUsed = bytesUsed == null ? Counter.newCounter() : bytesUsed;
-  }
-
   /**
    * Adds the given {@link PerDocFieldValues} instance to this
    * {@link DocValuesConsumer}

Modified: lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/codecs/lucene40/values/Writer.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/codecs/lucene40/values/Writer.java?rev=1211301&r1=1211300&r2=1211301&view=diff
==============================================================================
--- lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/codecs/lucene40/values/Writer.java
(original)
+++ lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/codecs/lucene40/values/Writer.java
Wed Dec  7 04:50:37 2011
@@ -42,6 +42,8 @@ import org.apache.lucene.util.Counter;
  */
 public abstract class Writer extends DocValuesConsumer {
   protected Source currentMergeSource;
+  protected final Counter bytesUsed;
+
   /**
    * Creates a new {@link Writer}.
    * 
@@ -51,7 +53,7 @@ public abstract class Writer extends Doc
    *          once {@link #finish(int)} has been called.
    */
   protected Writer(Counter bytesUsed) {
-    super(bytesUsed);
+    this.bytesUsed = bytesUsed;
   }
 
   /**



Mime
View raw message