Class BufferBundle<T>

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected int actualSize  
      protected Map<org.apache.flink.table.data.RowData,​T> bundle  
      protected int count  
    • Constructor Summary

      Constructors 
      Constructor Description
      BufferBundle()  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      abstract int addRecord​(org.apache.flink.table.data.RowData joinKey, org.apache.flink.table.data.RowData uniqueKey, org.apache.flink.table.data.RowData record)
      Adds a record into the bufferBundle when processing element in a stream and this function would return the size of the bufferBundle.
      void clear()
      Clear this bufferBundle.
      Set<org.apache.flink.table.data.RowData> getJoinKeys()
      Get the joinKeys in bufferBundle.
      abstract Map<org.apache.flink.table.data.RowData,​List<org.apache.flink.table.data.RowData>> getRecords()
      Get records associated with joinKeys from bufferBundle.
      abstract Map<org.apache.flink.table.data.RowData,​List<org.apache.flink.table.data.RowData>> getRecordsWithJoinKey​(org.apache.flink.table.data.RowData joinKey)
      Get records associated with joinKeys from bufferBundle.
      boolean isEmpty()
      Check if this bufferBundle is empty.
      int reducedSize()
      Return the number of reduced records.
    • Field Detail

      • bundle

        protected final Map<org.apache.flink.table.data.RowData,​T> bundle
      • count

        protected int count
      • actualSize

        protected int actualSize
    • Constructor Detail

      • BufferBundle

        public BufferBundle()
    • Method Detail

      • isEmpty

        public boolean isEmpty()
        Check if this bufferBundle is empty.
      • reducedSize

        public int reducedSize()
        Return the number of reduced records.
      • clear

        public void clear()
        Clear this bufferBundle.
      • getJoinKeys

        public Set<org.apache.flink.table.data.RowData> getJoinKeys()
        Get the joinKeys in bufferBundle. Whether to override this method is based on the implementing class.
      • addRecord

        public abstract int addRecord​(org.apache.flink.table.data.RowData joinKey,
                                      @Nullable
                                      org.apache.flink.table.data.RowData uniqueKey,
                                      org.apache.flink.table.data.RowData record)
        Adds a record into the bufferBundle when processing element in a stream and this function would return the size of the bufferBundle.
        Parameters:
        joinKey - the joinKey associated with the record.
        uniqueKey - the uniqueKey associated with the record. This could be null.
        record - The record to add.
        Returns:
        number of processed by current bundle.
      • getRecords

        public abstract Map<org.apache.flink.table.data.RowData,​List<org.apache.flink.table.data.RowData>> getRecords()
                                                                                                                     throws Exception
        Get records associated with joinKeys from bufferBundle.
        Returns:
        a map whose key is joinKey and value is list of records.
        Throws:
        Exception
      • getRecordsWithJoinKey

        public abstract Map<org.apache.flink.table.data.RowData,​List<org.apache.flink.table.data.RowData>> getRecordsWithJoinKey​(org.apache.flink.table.data.RowData joinKey)
                                                                                                                                throws Exception
        Get records associated with joinKeys from bufferBundle. And this function is different from getRecords() above where getRecords() returns a map whose key is joinKey and value is list of records.
        Parameters:
        joinKey - one of joinKeys stored in this bundle.
        Returns:
        a map whose key is uniqueKey and value is a list of records.
        Throws:
        Exception