Class FSOMapFileLexicon

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable, java.lang.Iterable<java.util.Map.Entry<java.lang.String,​LexiconEntry>>

    public class FSOMapFileLexicon
    extends FSOMapFileLexiconGeneric<java.lang.String,​org.apache.hadoop.io.Text>
    Instance of a Lexicon<String> where a FSOrderedMapFile is always used as a backing store.

    Index Properties:

    • index.STRUCTURENAME.bsearchshortcut - depicts if the String lookups can be sped up using a binary search shortcut. Possible values are {charmap,default}. Charmap means a hashmap object will be read into memory that defines where to look for a given starting character of the lookup string.
    • See also the super-class
    Since:
    3.0
    Author:
    Craig Macdonald
    • Constructor Detail

      • FSOMapFileLexicon

        public FSOMapFileLexicon​(java.lang.String structureName,
                                 IndexOnDisk index)
                          throws java.io.IOException
        Construct a new FSOMapFileLexicon
        Throws:
        java.io.IOException
      • FSOMapFileLexicon

        public FSOMapFileLexicon​(java.lang.String structureName,
                                 java.lang.String path,
                                 java.lang.String prefix,
                                 FixedSizeWriteableFactory<org.apache.hadoop.io.Text> _keyFactory,
                                 FixedSizeWriteableFactory<LexiconEntry> _valueFactory,
                                 java.lang.String termIdLookup,
                                 java.lang.String termLookup,
                                 java.lang.String dataFile)
                          throws java.io.IOException
        Throws:
        java.io.IOException
    • Method Detail

      • iterator

        public java.util.Iterator<java.util.Map.Entry<java.lang.String,​LexiconEntry>> iterator()
      • toK1

        protected java.lang.String toK1​(org.apache.hadoop.io.Text key)
        Specified by:
        toK1 in class MapLexicon<java.lang.String,​org.apache.hadoop.io.Text>
      • setK2

        protected void setK2​(java.lang.String key,
                             org.apache.hadoop.io.Text instance)
        Specified by:
        setK2 in class MapLexicon<java.lang.String,​org.apache.hadoop.io.Text>
      • renameMapFileLexicon

        public static void renameMapFileLexicon​(java.lang.String SrcStructureName,
                                                java.lang.String SrcPath,
                                                java.lang.String SrcPrefix,
                                                java.lang.String destStructureName,
                                                java.lang.String destPath,
                                                java.lang.String destPrefix)
        Rename a FSOMapFileLexicon within the specified index location
      • deleteMapFileLexicon

        public static void deleteMapFileLexicon​(java.lang.String structureName,
                                                java.lang.String path,
                                                java.lang.String prefix)
        Delete a FSOMapFileLexicon within the specified index location