mirror of https://github.com/apache/lucene.git
clear nocommits
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/branches/lucene4547@1440845 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
8e053920cc
commit
54773d36a3
|
@ -130,7 +130,7 @@ public final class BytesRefHash {
|
|||
* order to reuse this {@link BytesRefHash} instance.
|
||||
* </p>
|
||||
*/
|
||||
private int[] compact() {
|
||||
int[] compact() {
|
||||
assert bytesStart != null : "Bytesstart is null - not initialized";
|
||||
int upto = 0;
|
||||
for (int i = 0; i < hashSize; i++) {
|
||||
|
|
|
@ -848,7 +848,18 @@ public class PackedInts {
|
|||
}
|
||||
}
|
||||
|
||||
//nocommit javadoc
|
||||
/**
|
||||
* Expert: Restore a {@link Reader} from a stream without reading metadata at
|
||||
* the beginning of the stream. This method is useful to restore data when
|
||||
* metadata has been previously read using {@link #readHeader(DataInput)}.
|
||||
*
|
||||
* @param in the stream to read data from, positioned at the beginning of the packed values
|
||||
* @param header metadata result from <code>readHeader()</code>
|
||||
* @return a Reader
|
||||
* @throws IOException If there is a low-level I/O error
|
||||
* @see #readHeader(DataInput)
|
||||
* @lucene.internal
|
||||
*/
|
||||
public static Reader getReaderNoHeader(DataInput in, Header header) throws IOException {
|
||||
return getReaderNoHeader(in, header.format, header.version, header.valueCount, header.bitsPerValue);
|
||||
}
|
||||
|
@ -965,7 +976,19 @@ public class PackedInts {
|
|||
}
|
||||
}
|
||||
|
||||
//nocommit javadoc
|
||||
/**
|
||||
* Expert: Construct a direct {@link Reader} from an {@link IndexInput}
|
||||
* without reading metadata at the beginning of the stream. This method is
|
||||
* useful to restore data when metadata has been previously read using
|
||||
* {@link #readHeader(DataInput)}.
|
||||
*
|
||||
* @param in the stream to read data from, positioned at the beginning of the packed values
|
||||
* @param header metadata result from <code>readHeader()</code>
|
||||
* @return a Reader
|
||||
* @throws IOException If there is a low-level I/O error
|
||||
* @see #readHeader(DataInput)
|
||||
* @lucene.internal
|
||||
*/
|
||||
public static Reader getDirectReaderNoHeader(IndexInput in, Header header) throws IOException {
|
||||
return getDirectReaderNoHeader(in, header.format, header.version, header.valueCount, header.bitsPerValue);
|
||||
}
|
||||
|
@ -1200,8 +1223,18 @@ public class PackedInts {
|
|||
}
|
||||
}
|
||||
|
||||
//nocommit javadoc
|
||||
public static Header readHeader(IndexInput in) throws IOException {
|
||||
/**
|
||||
* Expert: reads only the metadata from a stream. This is useful to later
|
||||
* restore a stream or open a direct reader via
|
||||
* {@link #getReaderNoHeader(DataInput, Header)}
|
||||
* or {@link #getDirectReaderNoHeader(IndexInput, Header)}.
|
||||
* @param in the stream to read data
|
||||
* @return packed integer metadata.
|
||||
* @throws IOException If there is a low-level I/O error
|
||||
* @see #getReaderNoHeader(DataInput, Header)
|
||||
* @see #getDirectReaderNoHeader(IndexInput, Header)
|
||||
*/
|
||||
public static Header readHeader(DataInput in) throws IOException {
|
||||
final int version = CodecUtil.checkHeader(in, CODEC_NAME, VERSION_START, VERSION_CURRENT);
|
||||
final int bitsPerValue = in.readVInt();
|
||||
assert bitsPerValue > 0 && bitsPerValue <= 64: "bitsPerValue=" + bitsPerValue;
|
||||
|
|
|
@ -133,7 +133,6 @@ public class TestBytesRefHash extends LuceneTestCase {
|
|||
/**
|
||||
* Test method for {@link org.apache.lucene.util.BytesRefHash#compact()}.
|
||||
*/
|
||||
/* nocommit: rewrite in terms of TestSort?
|
||||
@Test
|
||||
public void testCompact() {
|
||||
BytesRef ref = new BytesRef();
|
||||
|
@ -170,7 +169,7 @@ public class TestBytesRefHash extends LuceneTestCase {
|
|||
assertEquals(0, hash.size());
|
||||
hash.reinit();
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
/**
|
||||
* Test method for
|
||||
|
|
Loading…
Reference in New Issue