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/12/07 05:50:37 UTC
svn commit: r1211301 - in
/lucene/dev/branches/lucene3622/lucene/src/java/org/apache/lucene/index/codecs:
DocValuesConsumer.java lucene40/values/Writer.java
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;
}
/**