Class SparkKeyExtractor

  • All Implemented Interfaces:
    java.io.Serializable, KeyExtractor

    public final class SparkKeyExtractor
    extends java.lang.Object
    implements KeyExtractor
    Extracts the key from a KV element. For non-KV elements, the elements themselves become the key.
    See Also:
    Serialized Form
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object o)  
      java.lang.Object extractKey​(java.lang.Object element)
      Extracts key.
      int hashCode()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SparkKeyExtractor

        public SparkKeyExtractor()
    • Method Detail

      • extractKey

        public java.lang.Object extractKey​(java.lang.Object element)
        Description copied from interface: KeyExtractor
        Extracts key.
        Specified by:
        extractKey in interface KeyExtractor
        Parameters:
        element - Element to get the key from.
        Returns:
        The extracted key of the element.
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object