public final class OfflinePointWriter extends java.lang.Object implements PointWriter
Modifier and Type | Field and Description |
---|---|
java.lang.String |
name |
IndexOutput |
out |
Constructor and Description |
---|
OfflinePointWriter(Directory tempDir,
java.lang.String tempFileNamePrefix,
int packedBytesLength,
boolean longOrds,
java.lang.String desc,
long expectedCount,
boolean singleValuePerDoc)
Create a new writer with an unknown number of incoming points
|
OfflinePointWriter(Directory tempDir,
java.lang.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,
java.util.List<java.io.Closeable> toCloseHeroically)
Returns the single shared reader, used at multiple times during the recursion, to read previously added points
|
java.lang.String |
toString() |
public final IndexOutput out
public final java.lang.String name
public OfflinePointWriter(Directory tempDir, java.lang.String tempFileNamePrefix, int packedBytesLength, boolean longOrds, java.lang.String desc, long expectedCount, boolean singleValuePerDoc) throws java.io.IOException
java.io.IOException
public OfflinePointWriter(Directory tempDir, java.lang.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 java.io.IOException
PointWriter
append
in interface PointWriter
java.io.IOException
public PointReader getReader(long start, long length) throws java.io.IOException
PointWriter
PointReader
iterator to step through all previously added pointsgetReader
in interface PointWriter
java.io.IOException
public PointReader getSharedReader(long start, long length, java.util.List<java.io.Closeable> toCloseHeroically) throws java.io.IOException
PointWriter
getSharedReader
in interface PointWriter
java.io.IOException
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
java.io.IOException
public void destroy() throws java.io.IOException
PointWriter
destroy
in interface PointWriter
java.io.IOException
public java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2000–2019 The Apache Software Foundation. All rights reserved.