Class ColumnarStorageEngine

java.lang.Object
org.gridgain.internal.columnar.ColumnarStorageEngine
All Implemented Interfaces:
AutoCloseable, org.apache.ignite.internal.storage.secondary.SecondaryStorageEngine

public class ColumnarStorageEngine extends Object implements AutoCloseable, org.apache.ignite.internal.storage.secondary.SecondaryStorageEngine
Native storage receiver interface.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    Engine name.
  • Constructor Summary

    Constructors
    Constructor
    Description
    ColumnarStorageEngine(org.apache.ignite.internal.storage.configurations.StorageConfiguration storageConfig, Path storageDir)
    Makes a native storage instance.
  • Method Summary

    Modifier and Type
    Method
    Description
    static int
    calculateColumnSchemaBytes(org.apache.ignite.internal.schema.Column column)
    Calculates size of the column schema in bytes.
    void
    Releases a native storage instance.
    org.apache.ignite.internal.storage.secondary.SecondaryTableStorage
    createTable(org.apache.ignite.internal.storage.secondary.SecondaryStorageTableDescriptor tableDescriptor)
     
    createTablePartition(org.apache.ignite.internal.storage.secondary.SecondaryStorageTableDescriptor tableDescriptor, int partitionId)
    Creates a native table instance with given schema.
    static org.apache.ignite.internal.util.Pair<org.apache.ignite.internal.schema.Column,Integer>
    Deserializes column schema and writes it to the ByteBuffer.
    void
    dropTablePartition(int tableId, int partitionId)
    Drops a table partition with given table ID and partition ID.
    getTablePartition(int tableId, int partitionId)
    Gets a table partition object.
    @Nullable org.apache.ignite.internal.schema.SchemaDescriptor
    getTableSchema(int tableId, int partitionId)
    Returns schema descriptor of the table.
    boolean
     
    org.gridgain.internal.license.LicenseFeature
     
     
    static void
    serializeColumnSchema(ByteBuffer buf, org.apache.ignite.internal.schema.Column column)
    Serializes column schema and writes it to the ByteBuffer.
    void
    setLowWatermark(org.apache.ignite.internal.hlc.HybridTimestamp timestamp)
    Sets the cutoff transaction timestamp value for retaining overwritten row versions.
    void
    setParameter(String name, String value)
    Sets parameter in the native columnar engine.
    void
     
    void
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • ColumnarStorageEngine

      public ColumnarStorageEngine(org.apache.ignite.internal.storage.configurations.StorageConfiguration storageConfig, Path storageDir)
      Makes a native storage instance.
      Parameters:
      storageConfig - Storage engine and storage profiles configurations.
      storageDir - Storage root directory.
  • Method Details

    • name

      public String name()
      Specified by:
      name in interface org.apache.ignite.internal.storage.secondary.SecondaryStorageEngine
    • start

      public void start() throws org.apache.ignite.internal.storage.StorageException
      Specified by:
      start in interface org.apache.ignite.internal.storage.secondary.SecondaryStorageEngine
      Throws:
      org.apache.ignite.internal.storage.StorageException
    • stop

      public void stop() throws org.apache.ignite.internal.storage.StorageException
      Specified by:
      stop in interface org.apache.ignite.internal.storage.secondary.SecondaryStorageEngine
      Throws:
      org.apache.ignite.internal.storage.StorageException
    • createTable

      public org.apache.ignite.internal.storage.secondary.SecondaryTableStorage createTable(org.apache.ignite.internal.storage.secondary.SecondaryStorageTableDescriptor tableDescriptor) throws org.apache.ignite.internal.storage.StorageException
      Specified by:
      createTable in interface org.apache.ignite.internal.storage.secondary.SecondaryStorageEngine
      Throws:
      org.apache.ignite.internal.storage.StorageException
    • licenseFeature

      public org.gridgain.internal.license.LicenseFeature licenseFeature()
      Specified by:
      licenseFeature in interface org.apache.ignite.internal.storage.secondary.SecondaryStorageEngine
    • setParameter

      public void setParameter(String name, String value)
      Sets parameter in the native columnar engine.
      Parameters:
      name - Name of the parameter.
      value - Value of the parameter as a string. Value will be parsed in the native engine.
    • setLowWatermark

      public void setLowWatermark(org.apache.ignite.internal.hlc.HybridTimestamp timestamp)
      Sets the cutoff transaction timestamp value for retaining overwritten row versions.
      Parameters:
      timestamp - Retention timestamp value.
    • getTablePartition

      @Nullable public @Nullable ColumnarPartitionStorage getTablePartition(int tableId, int partitionId)
      Gets a table partition object.
      Parameters:
      tableId - Table id.
      partitionId - Partition id.
      Returns:
      Native storage table object.
    • getTableSchema

      @Nullable public @Nullable org.apache.ignite.internal.schema.SchemaDescriptor getTableSchema(int tableId, int partitionId)
      Returns schema descriptor of the table.
      Parameters:
      tableId - Table id.
      partitionId - Partition id.
      Returns:
      Schema descriptor.
    • dropTablePartition

      public void dropTablePartition(int tableId, int partitionId)
      Drops a table partition with given table ID and partition ID.
      Parameters:
      tableId - Table ID.
      partitionId - Partition ID.
    • createTablePartition

      public ColumnarPartitionStorage createTablePartition(org.apache.ignite.internal.storage.secondary.SecondaryStorageTableDescriptor tableDescriptor, int partitionId)
      Creates a native table instance with given schema. This method isn't thread safe.
      Parameters:
      tableDescriptor - Table descriptor.
      partitionId - Partition id.
      Returns:
      New table instance.
    • calculateColumnSchemaBytes

      public static int calculateColumnSchemaBytes(org.apache.ignite.internal.schema.Column column)
      Calculates size of the column schema in bytes.
      Parameters:
      column - Column object.
      Returns:
      Column byte size.
    • serializeColumnSchema

      public static void serializeColumnSchema(ByteBuffer buf, org.apache.ignite.internal.schema.Column column)
      Serializes column schema and writes it to the ByteBuffer.
      Parameters:
      buf - ByteBuffer to write serialized schema.
      column - Column object to serialize.
    • deserializeColumnSchema

      public static org.apache.ignite.internal.util.Pair<org.apache.ignite.internal.schema.Column,Integer> deserializeColumnSchema(ByteBuffer buf)
      Deserializes column schema and writes it to the ByteBuffer.
      Parameters:
      buf - ByteBuffer to write serialized schema.
      Returns:
      Pair of objects: Column object and its position in the PK.
    • close

      public void close()
      Releases a native storage instance.
      Specified by:
      close in interface AutoCloseable
    • hasConfiguredStorageProfiles

      public boolean hasConfiguredStorageProfiles()
      Specified by:
      hasConfiguredStorageProfiles in interface org.apache.ignite.internal.storage.secondary.SecondaryStorageEngine