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
IOException
public 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
PointWriter
append
in interface PointWriter
IOException
public PointReader getReader(long start, long length) throws IOException
PointWriter
PointReader
iterator to step through all previously added pointsgetReader
in interface PointWriter
IOException
public PointReader getSharedReader(long start, long length, List<Closeable> toCloseHeroically) throws IOException
PointWriter
getSharedReader
in interface PointWriter
IOException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
public void destroy() throws IOException
PointWriter
destroy
in interface PointWriter
IOException
Copyright © 2000-2017 Apache Software Foundation. All Rights Reserved.