|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.senseidb.indexing.hadoop.reduce.ShardWriter
public class ShardWriter
The initial version of an index is stored in the perm dir. Index files created by newer versions are written to a temp dir on the local FS. After successfully creating the new version in the temp dir, the shard writer moves the new files to the perm dir and deletes the temp dir in close().
Constructor Summary | |
---|---|
ShardWriter(org.apache.hadoop.fs.FileSystem fs,
Shard shard,
String tempDir,
org.apache.hadoop.conf.Configuration iconf)
Constructor |
Method Summary | |
---|---|
void |
close()
Close the shard writer. |
static void |
moveToTrash(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.Path path)
|
void |
optimize()
|
void |
process(IntermediateForm form)
Process an intermediate form by carrying out, on the Lucene instance of the shard, the deletes and the inserts (a ram index) in the form. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ShardWriter(org.apache.hadoop.fs.FileSystem fs, Shard shard, String tempDir, org.apache.hadoop.conf.Configuration iconf) throws IOException
fs
- shard
- tempDir
- iconf
-
IOException
Method Detail |
---|
public void process(IntermediateForm form) throws IOException
form
- the intermediate form containing deletes and a ram index
IOException
public void close() throws IOException
IOException
public String toString()
toString
in class Object
public void optimize()
public static void moveToTrash(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.Path path) throws IOException
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |