| 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.hadoop.contrib.index.lucene.LuceneUtil
public final class LuceneUtil
This class copies some methods from Lucene's SegmentInfos since that class is not public.
| Constructor Summary | |
|---|---|
LuceneUtil()
 | 
|
| Method Summary | |
|---|---|
static long | 
generationFromSegmentsFileName(String fileName)
Parse the generation off the segments file name and return it.  | 
static long | 
getCurrentSegmentGeneration(org.apache.lucene.store.Directory directory)
Get the generation (N) of the current segments_N file in the directory.  | 
static long | 
getCurrentSegmentGeneration(String[] files)
Get the generation (N) of the current segments_N file from a list of files.  | 
static boolean | 
isSegmentsFile(String name)
Check if the file is a segments_N file  | 
static boolean | 
isSegmentsGenFile(String name)
Check if the file is the segments.gen file  | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public LuceneUtil()
| Method Detail | 
|---|
public static boolean isSegmentsFile(String name)
name - 
public static boolean isSegmentsGenFile(String name)
name - 
public static long getCurrentSegmentGeneration(org.apache.lucene.store.Directory directory)
                                        throws IOException
directory - -- directory to search for the latest segments_N file
IOExceptionpublic static long getCurrentSegmentGeneration(String[] files)
files - -- array of file names to checkpublic static long generationFromSegmentsFileName(String fileName)
  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||