Skip to content

Instantly share code, notes, and snippets.

View aludwiko's full-sized avatar

Andrzej Ludwikowski aludwiko

View GitHub Profile
{
"partition" : {
"key" : [ "4" ],
"position" : 94
},
"rows" : [
{
"type" : "row",
"position" : 134,
"liveness_info" : { "tstamp" : "2019-01-28T10:38:58.742212Z" },
./sstabledump ~/.ccm/test/node1/data0/my_keyspace/orders-90eefa7022d511e9abc5abfbe212c0f3/mc-11-big-Data.db 11:41:32
[
{
"partition" : {
"key" : [ "4" ],
"position" : 0
},
"rows" : [
{
"type" : "row",
cqlsh:my_keyspace> INSERT INTO orders (id, status, country) VALUES ( 4, 'added', 'PL');
#flush
cqlsh:my_keyspace> DELETE country FROM orders WHERE id = 4;
#flush
nodetool getsstables my_keyspace orders '4'
.../my_keyspace/orders-90eefa7022d511e9abc5abfbe212c0f3/mc-11-big-Data.db
.../my_keyspace/orders-90eefa7022d511e9abc5abfbe212c0f3/mc-10-big-Data.db
nodetool getsstables my_keyspace orders '3'
.../my_keyspace/orders-90eefa7022d511e9abc5abfbe212c0f3/mc-8-big-Data.db
.../my_keyspace/orders-90eefa7022d511e9abc5abfbe212c0f3/mc-7-big-Data.db
.../my_keyspace/orders-90eefa7022d511e9abc5abfbe212c0f3/mc-6-big-Data.db
INSERT INTO orders (id, status, country) VALUES ( 3, 'added', 'IT');
#flush
INSERT INTO orders (id, status, country) VALUES ( 3, 'added', 'IT');
#flush
INSERT INTO orders (id, status, country) VALUES ( 3, 'added', 'IT');
#flush
cqlsh:my_keyspace> SELECT * FROM orders WHERE id = 2;
id | country | status
----+---------+---------
2 | UK | shipped
./sstabledump mc-2-big-Data.db
[
{
"partition" : {
"key" : [ "2" ],
"position" : 0
},
"rows" : [
{
"type" : "row",
nodetool getsstables my_keyspace orders '2'
.../my_keyspace/orders-90eefa7022d511e9abc5abfbe212c0f3/mc-4-big-Data.db
.../my_keyspace/orders-90eefa7022d511e9abc5abfbe212c0f3/mc-3-big-Data.db
.../my_keyspace/orders-90eefa7022d511e9abc5abfbe212c0f3/mc-2-big-Data.db
-rw-rw-r-- 1 andrzej andrzej 44 sty 28 09:21 mc-1-big-Data.db
-rw-rw-r-- 1 andrzej andrzej 41 sty 28 09:22 mc-2-big-Data.db
-rw-rw-r-- 1 andrzej andrzej 44 sty 28 09:22 mc-3-big-Data.db
-rw-rw-r-- 1 andrzej andrzej 43 sty 28 09:22 mc-4-big-Data.db
INSERT INTO orders (id, status, country) VALUES ( 2, 'added', 'UK');
#flush
INSERT INTO orders (id, status, country) VALUES ( 2, 'verified', 'UK');
#flush
INSERT INTO orders (id, status, country) VALUES ( 2, 'shipped', 'UK');
#flush