org.apache.hadoop.hbase.coprocessor

Interface ColumnInterpreter<T,S>

    • Method Summary

      Methods 
      Modifier and Type Method and Description
      S add(S l1, S l2) 
      S castToReturnType(T o)
      provides casting opportunity between the data types.
      int compare(T l1, T l2)
      This takes care if either of arguments are null.
      double divideForAvg(S o, Long l)
      used for computing average of data values.
      T getMaxValue()
      returns the maximum value for this type T
      T getMinValue() 
      T getValue(byte[] colFamily, byte[] colQualifier, KeyValue kv) 
      S increment(S o) 
      S multiply(S o1, S o2) 
      • Methods inherited from interface org.apache.hadoop.io.Writable

        readFields, write
    • Method Detail

      • getValue

        T getValue(byte[] colFamily,
                 byte[] colQualifier,
                 KeyValue kv)
                   throws IOException
        Parameters:
        colFamily -
        colQualifier -
        kv -
        Returns:
        value of type T
        Throws:
        IOException
      • add

        S add(S l1,
            S l2)
        Parameters:
        l1 -
        l2 -
        Returns:
        sum or non null value among (if either of them is null); otherwise returns a null.
      • getMaxValue

        T getMaxValue()
        returns the maximum value for this type T
        Returns:
        max
      • getMinValue

        T getMinValue()
      • multiply

        S multiply(S o1,
                 S o2)
        Parameters:
        o1 -
        o2 -
        Returns:
        multiplication
      • increment

        S increment(S o)
        Parameters:
        o -
        Returns:
        increment
      • castToReturnType

        S castToReturnType(T o)
        provides casting opportunity between the data types.
        Parameters:
        o -
        Returns:
        cast
      • compare

        int compare(T l1,
                  T l2)
        This takes care if either of arguments are null. returns 0 if they are equal or both are null;
        • >0 if l1 > l2 or l1 is not null and l2 is null.
        • < 0 if l1 < l2 or l1 is null and l2 is not null.
      • divideForAvg

        double divideForAvg(S o,
                          Long l)
        used for computing average of data values. Not providing the divide method that takes two values as it is not needed as of now.
        Parameters:
        o -
        l -
        Returns:
        Average

Copyright © 2014 The Apache Software Foundation. All Rights Reserved.