|
Kinetica C# API
Version 7.2.3.1
|
Interface for extracting shard key values from a record. More...
Inheritance diagram for IShardKeyExtractor:Public Member Functions | |
| ShardKeyValues | GetShardKeyValues () |
| Returns shard key column names and their typed values. More... | |
Interface for extracting shard key values from a record.
Equivalent to Rust's ShardKeyExtractor trait.
Implementing this interface enables shard-aware routing in the BulkInserter, allowing records to be sent directly to the correct worker node based on their shard key values.
Definition at line 34 of file IShardKeyExtractor.cs.
| ShardKeyValues IShardKeyExtractor.GetShardKeyValues | ( | ) |
Returns shard key column names and their typed values.
Only columns that are part of the shard key need to be included. The values are used for computing the routing hash to determine which worker node should receive the record.
For best performance, implement this method to avoid allocations when possible (e.g., use ShardKeyValues.Single() for single-column keys).
Implemented in GenericRecord, Example.AllTypesExample.AllTypesRecord, Kinetica.Benchmarks.BulkInserterBenchmarks.BenchRecord, Kinetica.LoadGenerator.IngestRecord2, Example.SensorReading, Example.ShardKeyExample.ShardedRecord, Kinetica.Tests.IntegrationTests.BulkInserterTests.ShardedRecord, Kinetica.LoadGenerator.IngestRecord, Kinetica.Tests.IntegrationTests.BulkInserterTests.TestRecord, and Kinetica.Tests.IntegrationTests.BulkInserterDebugTest.TestRecord.