Package org.gridgain.internal.columnar
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 -
Constructor Summary
ConstructorsConstructorDescriptionColumnarStorageEngine(org.apache.ignite.internal.storage.configurations.StorageConfiguration storageConfig, Path storageDir) Makes a native storage instance. -
Method Summary
Modifier and TypeMethodDescriptionstatic intcalculateColumnSchemaBytes(org.apache.ignite.internal.schema.Column column) Calculates size of the column schema in bytes.voidclose()Releases a native storage instance.org.apache.ignite.internal.storage.secondary.SecondaryTableStoragecreateTable(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.voiddropTablePartition(int tableId, int partitionId) Drops a table partition with given table ID and partition ID.@Nullable ColumnarPartitionStoragegetTablePartition(int tableId, int partitionId) Gets a table partition object.@Nullable org.apache.ignite.internal.schema.SchemaDescriptorgetTableSchema(int tableId, int partitionId) Returns schema descriptor of the table.booleanorg.gridgain.internal.license.LicenseFeaturename()static voidserializeColumnSchema(ByteBuffer buf, org.apache.ignite.internal.schema.Column column) Serializes column schema and writes it to the ByteBuffer.voidsetLowWatermark(org.apache.ignite.internal.hlc.HybridTimestamp timestamp) Sets the cutoff transaction timestamp value for retaining overwritten row versions.voidsetParameter(String name, String value) Sets parameter in the native columnar engine.voidstart()voidstop()
-
Field Details
-
ENGINE_NAME
Engine name.- See Also:
-
-
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
- Specified by:
namein interfaceorg.apache.ignite.internal.storage.secondary.SecondaryStorageEngine
-
start
public void start() throws org.apache.ignite.internal.storage.StorageException- Specified by:
startin interfaceorg.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:
stopin interfaceorg.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:
createTablein interfaceorg.apache.ignite.internal.storage.secondary.SecondaryStorageEngine- Throws:
org.apache.ignite.internal.storage.StorageException
-
licenseFeature
public org.gridgain.internal.license.LicenseFeature licenseFeature()- Specified by:
licenseFeaturein interfaceorg.apache.ignite.internal.storage.secondary.SecondaryStorageEngine
-
setParameter
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
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:
closein interfaceAutoCloseable
-
hasConfiguredStorageProfiles
public boolean hasConfiguredStorageProfiles()- Specified by:
hasConfiguredStorageProfilesin interfaceorg.apache.ignite.internal.storage.secondary.SecondaryStorageEngine
-