Class RealtimeIndexOffHeapMemoryManager

    • Constructor Detail

      • RealtimeIndexOffHeapMemoryManager

        protected RealtimeIndexOffHeapMemoryManager​(ServerMetrics serverMetrics,
                                                    String segmentName)
    • Method Detail

      • allocate

        public PinotDataBuffer allocate​(long size,
                                        String allocationContext)
        Allocate memory for use by a column. Sub-classes may implement this method according using different allocation policies. This method can be called multiple times for each column within the segment. Each invocation is guaranteed to return a new block of memory.
        Specified by:
        allocate in interface PinotDataBufferMemoryManager
        Parameters:
        size - size of memory
        allocationContext - Name of the column for which memory is being allocated
        Returns:
        PinotDataBuffer
      • doClose

        protected abstract void doClose()
                                 throws IOException
        Method to be implemented by inheriting concrete classes
        Throws:
        IOException
      • allocateInternal

        protected abstract PinotDataBuffer allocateInternal​(long size,
                                                            String columnName)
      • close

        public void close()
                   throws IOException
        Close out this memory manager and release all memory and resources. This method must be called when all the memory allocated by this class is not longer in use. The application may choose to call (or not call) PinotDataBuffer.close(), but this.close() MUST be called to release all resources allocated.
        Specified by:
        close in interface AutoCloseable
        Specified by:
        close in interface Closeable
        Throws:
        IOException