Interface ForStInnerTable<K,​N,​V>

  • Type Parameters:
    K - The key type of the table.
    V - The value type of the table.
    All Known Implementing Classes:
    ForStAggregatingState, ForStListState, ForStMapState, ForStReducingState, ForStValueState

    public interface ForStInnerTable<K,​N,​V>
    The concept of an abstracted table oriented towards ForStDB, and each ForStInnerTable can be mapped to a ForSt internal State.

    The mapping between ForStInnerTable and ForStDB's columnFamily can be one-to-one or many-to-one.

    • Method Detail

      • getColumnFamilyHandle

        org.forstdb.ColumnFamilyHandle getColumnFamilyHandle()
        Get the columnFamily handle corresponding to table.
      • serializeKey

        byte[] serializeKey​(ContextKey<K,​N> key)
                     throws IOException
        Serialize the given key to bytes.
        Parameters:
        key - the key to be serialized.
        Returns:
        the key bytes
        Throws:
        IOException - Thrown if the serialization encountered an I/O related error.
      • serializeValue

        byte[] serializeValue​(V value)
                       throws IOException
        Serialize the given value to the outputView.
        Parameters:
        value - the value to be serialized.
        Returns:
        the value bytes
        Throws:
        IOException - Thrown if the serialization encountered an I/O related error.
      • deserializeValue

        V deserializeValue​(byte[] value)
                    throws IOException
        Deserialize the given bytes value to POJO value.
        Parameters:
        value - the value bytes to be deserialized.
        Returns:
        the deserialized POJO value
        Throws:
        IOException - Thrown if the deserialization encountered an I/O related error.
      • buildDBGetRequest

        ForStDBGetRequest<?,​?,​?,​?> buildDBGetRequest​(org.apache.flink.runtime.asyncprocessing.StateRequest<?,​?,​?,​?> stateRequest)
        Build a ForStDBGetRequest that belong to this ForStInnerTable with the given stateRequest.
        Parameters:
        stateRequest - The given stateRequest.
        Returns:
        The corresponding ForSt GetRequest.
      • buildDBPutRequest

        ForStDBPutRequest<?,​?,​?> buildDBPutRequest​(org.apache.flink.runtime.asyncprocessing.StateRequest<?,​?,​?,​?> stateRequest)
        Build a ForStDBPutRequest that belong to ForStInnerTable with the given stateRequest.
        Parameters:
        stateRequest - The given stateRequest.
        Returns:
        The corresponding ForSt PutRequest.