Class FixedSizeTextFactory

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected static org.slf4j.Logger logger  
    • Constructor Summary

      Constructors 
      Constructor Description
      FixedSizeTextFactory​(int _termLength)
      Make a factory object with the specified length
      FixedSizeTextFactory​(java.lang.String _termLength)
      Make a factory object with the specified length, decoded using Integer.parseInt()
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static int getMaximumTextLength​(int charCount)
      For the Hadoop Text class, given a String of charCount, how long is the maximum encoded bytes?
      int getSize()
      Returns the size of instance of this class when written using Writable
      org.apache.hadoop.io.Text newInstance()
      Returns a new instance of Text with desired properties
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • logger

        protected static final org.slf4j.Logger logger
    • Constructor Detail

      • FixedSizeTextFactory

        public FixedSizeTextFactory​(java.lang.String _termLength)
        Make a factory object with the specified length, decoded using Integer.parseInt()
      • FixedSizeTextFactory

        public FixedSizeTextFactory​(int _termLength)
        Make a factory object with the specified length
    • Method Detail

      • getSize

        public int getSize()
        Returns the size of instance of this class when written using Writable
        Specified by:
        getSize in interface FixedSizeWriteableFactory<org.apache.hadoop.io.Text>
      • getMaximumTextLength

        public static int getMaximumTextLength​(int charCount)
        For the Hadoop Text class, given a String of charCount, how long is the maximum encoded bytes?
        Parameters:
        charCount - maximum length of the String
        Returns:
        maximum number of bytes
      • newInstance

        public org.apache.hadoop.io.Text newInstance()
        Returns a new instance of Text with desired properties
        Specified by:
        newInstance in interface WriteableFactory<org.apache.hadoop.io.Text>