Class PersistentQueryConfigurationLoggerImpl

java.lang.Object
io.deephaven.enterprise.binlog.internal.gen.PersistentQueryConfigurationLoggerImpl
All Implemented Interfaces:
io.deephaven.enterprise.binlog.support.LoggerInfo
Direct Known Subclasses:
PersistentQueryConfigurationLoggerImpl

public class PersistentQueryConfigurationLoggerImpl extends Object implements io.deephaven.enterprise.binlog.support.LoggerInfo
Automatically generated Deephaven binary logger for DbInternal.PersistentQueryConfigurationLogV2 format 7
  • Field Details

  • Constructor Details

    • PersistentQueryConfigurationLoggerImpl

      public PersistentQueryConfigurationLoggerImpl()
  • Method Details

    • initialBufferSize

      protected int initialBufferSize(PersistentQueryConfiguration config, String EventType, String RestartUsers)
      Compute the initial size of the buffer for logging the row. If the buffer is not large enough, then it can be exponentially increased up until the maximum size. The initial size takes into account all fixed fields for the row, and then quickly estimates without actually encoding variable length fields.
    • allocateBuffer

      protected ByteBuffer allocateBuffer(int size)
      Allocate a buffer for logging.

      This method is protected so that it can be overridden by sub-classes, which may elect to use pooling or another allocation strategy. The buffers returned from this method must be released using releaseBuffer(java.nio.ByteBuffer) after they are done being used. The logger implementations may retain a buffer for the life of the logger if it will be reused (e.g., header buffers are used across files and connections).

    • releaseBuffer

      public void releaseBuffer(ByteBuffer buffer)
      Release a buffer previously allocated for logging the row.

      This method is protected so that it can be overridden by sub-classes, which may elect to use pooling or another allocation strategy. The logger implementations may retain a buffer for the life of the logger if it will be reused (e.g., header buffers are used across files and connections).

    • setStringEstimateMultiplier

      public void setStringEstimateMultiplier(double stringEstimateMultiplier)
      Sets For strings that do not use a simple encoding, how many bytes (multiplied by length) should be initially allocated for each string?
    • setMaxEntrySize

      public void setMaxEntrySize(int maxEntrySize)
      Sets The maximum size of a binary log entry. This defaults to the value of BinaryStoreV2Constants.MAX_ENTRY_SIZE (1048576) at logger generation time. You must ensure that the loggers value is less than or equal to the value of the running system, or it the Data Import Server may not make progress consuming the generated binary log.
    • initLog

      public PersistentQueryConfigurationLoggerImpl initLog(io.deephaven.enterprise.binlog.support.MultiPartitionBufferWriter multiPartitionBufferWriter, DateTimeFormatter partitionFormatter) throws IOException
      Initialize a logger for the DbInternal.PersistentQueryConfigurationLogV2 table, with log format 7.
      Parameters:
      multiPartitionBufferWriter - the writer for this logger, required for calling log(com.illumon.iris.controller.PersistentQueryConfiguration, long, java.lang.String, java.lang.String)@param partitionFormatter A datetime formatter for time based partition using the Timestamp column. You must pass in a formatter that is thread safe, or otherwise externally synchronize this logger.
      Throws:
      IOException
    • log

      public void log(PersistentQueryConfiguration config, long Timestamp, String EventType, String RestartUsers) throws IOException
      Throws:
      IOException
    • close

      public void close() throws IOException
      Closes the underlying writer for this logger.
      Throws:
      IOException
    • makeRowBuffer

      public ByteBuffer makeRowBuffer(PersistentQueryConfiguration config, long Timestamp, String EventType, String RestartUsers) throws IOException
      Allocates and populates a row buffer for the given inputs.

      The buffer is allocated with allocateBuffer based on a size estimate, and exponentially doubled up until the value of maxEntrySize. The caller is responsible for calling releaseBuffer after the buffer is no longer necessary.

      Throws:
      IOException
    • populateRowBuffer

      public ByteBuffer populateRowBuffer(ByteBuffer outputBuffer, PersistentQueryConfiguration config, long Timestamp, String EventType, String RestartUsers)
      Populates the outputBuffer with the parameter values. The outputBuffer must be sufficiently sized to contain the output.
    • makeHeaderBuffer

      public ByteBuffer makeHeaderBuffer()
      Create a long-lived header buffer.

      The header buffer includes all column definitions, constant columns and the application version.

      The returned buffer is duplicated after calling populateHeaderBuffer(), and is owned by the caller. It should not be passed to makeHeaderBuffer.

    • populateHeaderBuffer

      public ByteBuffer populateHeaderBuffer()
      Populate a header buffer.

      The header buffer includes all column definitions, constant columns and the application version.

      The returned buffer is allocated with allocateBuffer, the caller is responsible for calling releaseBuffer after the buffer is done being used.

    • systemNamespace

      public boolean systemNamespace()
      Specified by:
      systemNamespace in interface io.deephaven.enterprise.binlog.support.LoggerInfo
    • namespaceSet

      public String namespaceSet()
      Specified by:
      namespaceSet in interface io.deephaven.enterprise.binlog.support.LoggerInfo
    • dynamicPartitions

      public boolean dynamicPartitions()
      Specified by:
      dynamicPartitions in interface io.deephaven.enterprise.binlog.support.LoggerInfo
    • tableName

      public String tableName()
      Specified by:
      tableName in interface io.deephaven.enterprise.binlog.support.LoggerInfo
    • namespace

      public String namespace()
      Specified by:
      namespace in interface io.deephaven.enterprise.binlog.support.LoggerInfo
    • logFormat

      public int logFormat()
      Specified by:
      logFormat in interface io.deephaven.enterprise.binlog.support.LoggerInfo
    • toString

      public String toString()
      Overrides:
      toString in class Object