public final class OfflinePointWriter extends Object implements PointWriter
| Modifier and Type | Field and Description |
|---|---|
String |
name |
IndexOutput |
out |
| Constructor and Description |
|---|
OfflinePointWriter(Directory tempDir,
String tempFileNamePrefix,
int packedBytesLength,
boolean longOrds,
String desc,
long expectedCount,
boolean singleValuePerDoc)
Create a new writer with an unknown number of incoming points
|
OfflinePointWriter(Directory tempDir,
String name,
int packedBytesLength,
long count,
boolean longOrds,
boolean singleValuePerDoc)
Initializes on an already written/closed file, just so consumers can use
getReader(long, long) to read the file. |
| Modifier and Type | Method and Description |
|---|---|
void |
append(byte[] packedValue,
long ord,
int docID)
Add a new point
|
void |
close() |
void |
destroy()
Removes any temp files behind this writer
|
PointReader |
getReader(long start,
long length)
Returns a
PointReader iterator to step through all previously added points |
PointReader |
getSharedReader(long start,
long length,
List<Closeable> toCloseHeroically)
Returns the single shared reader, used at multiple times during the recursion, to read previously added points
|
String |
toString() |
public final IndexOutput out
public final String name
public OfflinePointWriter(Directory tempDir, String tempFileNamePrefix, int packedBytesLength, boolean longOrds, String desc, long expectedCount, boolean singleValuePerDoc) throws IOException
IOExceptionpublic OfflinePointWriter(Directory tempDir, String name, int packedBytesLength, long count, boolean longOrds, boolean singleValuePerDoc)
getReader(long, long) to read the file.public void append(byte[] packedValue,
long ord,
int docID)
throws IOException
PointWriterappend in interface PointWriterIOExceptionpublic PointReader getReader(long start, long length) throws IOException
PointWriterPointReader iterator to step through all previously added pointsgetReader in interface PointWriterIOExceptionpublic PointReader getSharedReader(long start, long length, List<Closeable> toCloseHeroically) throws IOException
PointWritergetSharedReader in interface PointWriterIOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionpublic void destroy()
throws IOException
PointWriterdestroy in interface PointWriterIOExceptionCopyright © 2000-2017 Apache Software Foundation. All Rights Reserved.