Interface SegmentCreator
-
- All Superinterfaces:
AutoCloseable,Closeable,Serializable
public interface SegmentCreator extends Closeable, Serializable
Interface for segment creators, which create an index over a set of rows and writes the resulting index to disk.
-
-
Method Summary
Modifier and Type Method Description voidindexRow(GenericRow row)Adds a row to the index.voidinit(SegmentGeneratorConfig segmentCreationSpec, SegmentIndexCreationInfo segmentIndexCreationInfo, Map<String,ColumnIndexCreationInfo> indexCreationInfoMap, Schema schema, File outDir)Initializes the segment creation.voidseal()Seals the segment, flushing it to disk.voidsetSegmentName(String segmentName)Sets the name of the segment.
-
-
-
Method Detail
-
init
void init(SegmentGeneratorConfig segmentCreationSpec, SegmentIndexCreationInfo segmentIndexCreationInfo, Map<String,ColumnIndexCreationInfo> indexCreationInfoMap, Schema schema, File outDir) throws Exception
Initializes the segment creation.- Parameters:
segmentCreationSpec-indexCreationInfoMap-schema-outDir-- Throws:
Exception
-
indexRow
void indexRow(GenericRow row) throws IOException
Adds a row to the index.- Parameters:
row- The row to index.- Throws:
IOException
-
setSegmentName
void setSegmentName(String segmentName)
Sets the name of the segment.- Parameters:
segmentName- The name of the segment
-
seal
void seal() throws org.apache.commons.configuration.ConfigurationException, IOExceptionSeals the segment, flushing it to disk.- Throws:
org.apache.commons.configuration.ConfigurationExceptionIOException
-
-