|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.senseidb.indexing.hadoop.keyvalueformat.IntermediateForm
public class IntermediateForm
An intermediate form for one or more parsed Lucene documents and/or delete terms. It actually uses Lucene file format as the format for the intermediate form by using RAM dir files. Note: If process(*) is ever called, closeWriter() should be called. Otherwise, no need to call closeWriter().
Constructor Summary | |
---|---|
IntermediateForm()
Constructor |
Method Summary | |
---|---|
void |
closeWriter()
Close the Lucene index writer associated with the intermediate form, if created. |
void |
configure(org.apache.hadoop.conf.Configuration iconf)
Configure using an index update configuration. |
org.apache.lucene.store.Directory |
getDirectory()
Get the ram directory of the intermediate form. |
void |
process(org.apache.lucene.document.Document doc,
org.apache.lucene.analysis.Analyzer analyzer)
This method is used by the index update mapper and process a document operation into the current intermediate form. |
void |
process(IntermediateForm form)
This method is used by the index update combiner and process an intermediate form into the current intermediate form. |
void |
readFields(DataInput in)
|
String |
toString()
|
long |
totalSizeInBytes()
The total size of files in the directory and ram used by the index writer. |
void |
write(DataOutput out)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public IntermediateForm() throws IOException
IOException
Method Detail |
---|
public void configure(org.apache.hadoop.conf.Configuration iconf)
iconf
- the index update configurationpublic org.apache.lucene.store.Directory getDirectory()
public void process(org.apache.lucene.document.Document doc, org.apache.lucene.analysis.Analyzer analyzer) throws IOException
doc
- input document operationanalyzer
- the analyzer
IOException
public void process(IntermediateForm form) throws IOException
form
- the input intermediate form
IOException
public void closeWriter() throws IOException
IOException
public long totalSizeInBytes() throws IOException
IOException
public String toString()
toString
in class Object
public void write(DataOutput out) throws IOException
write
in interface org.apache.hadoop.io.Writable
IOException
public void readFields(DataInput in) throws IOException
readFields
in interface org.apache.hadoop.io.Writable
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |