Please enable JavaScript.
Coggle requires JavaScript to display documents.
Client Driver (Statements (Object Mapper (MappingManager (new…
Client Driver
Statements
-
-
-
-
-
-
-
SchemaStatement
SchemaBuilder.createTable("hotels").addPartitionKey(name,type)
.addColumn(name,type)
-
Cluster
-
-
-
-
-
Session
-
-
heavyweight object, as maintaining multiple TCP conn pools.
create a single session and reuse
or create session per keyspace
Connection Pool
-
-
-
-
connection heartbeat - make sure conns are not closed prematurely by intervening network devices.
PoolingOptions.setHeartbeatIntervalSeconds()
Batch
only INSERT, UPDATE, DELETE allowed in batch
-
all updates to a given pertition key are done in isolation,
no isolation between partitions,
modifications to diff partition keys may be read before batch completes
-
Counter change only allowed in counter batch,
no other type allowed in counter batch
Steps
coordinator sends batchlog(copy of the batch) to 2 other nodes,
stored in system.batchlog
-
-
each node check its batchlog once a minute,
if a batch exists longer than write timeout,
it will be replayed and then deleted from remaining node
batch size is limited, too large batch will result in warning/failure
-
-
-