You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Xiangfei Ni <xi...@cm-dt.com> on 2018/06/08 05:36:50 UTC
sstabledump and liveness_info question
Hi Expert,
I have questions about sstabledump
1,create table and insert data:
create table test2(a text,b text,primary key (a));
insert into test2(a,b) values ('a','b');
2,flush data to disk
3,sstabledump the sstable
[cassandra@concar-cassandra01] /opt/database/apache-cassandra-data/stresscql/test2-a9d1a1306adb11e8a14077a1580c0a40 $ /opt/database/apache-cassandra/tools/bin/sstabledump ./mc-1-big-Data.db
[
{
"partition" : {
"key" : [ "a" ],
"position" : 0
},
"rows" : [
{
"type" : "row",
"position" : 15,
"liveness_info" : { "tstamp" : "2018-06-08T05:20:39.932553Z" },
"cells" : [
{ "name" : "b", "value" : "b" }
]
}
]
}
4,update data:
update test2 set b='2' where a='a';
5,flush data to disk
6,sstabledump the sstable
[cassandra@concar-cassandra01] /opt/database/apache-cassandra-data/stresscql/test2-a9d1a1306adb11e8a14077a1580c0a40 $ /opt/database/apache-cassandra/tools/bin/sstabledump ./mc-2-big-Data.db
[
{
"partition" : {
"key" : [ "a" ],
"position" : 0
},
"rows" : [
{
"type" : "row",
"position" : 15,
"cells" : [
{ "name" : "b", "value" : "2", "tstamp" : "2018-06-08T05:22:17.959558Z" }
]
}
]
}
]
My questions are:
1,why there is no liveness_info element in the second sstable dump?
2,why the output format is not the same?The second dump has the "tstamp" : "2018-06-08T05:22:17.959558Z" in the cell element but there is no in the first output?
3,is there detail instruction about sstableoutput?
答复: sstabledump and liveness_info question
Posted by Xiangfei Ni <xi...@cm-dt.com>.
Hi
Anyone can help on this would be highly appreciated.
Best Regards,
倪项菲/ David Ni
中移德电网络科技有限公司
Virtue Intelligent Network Ltd, co.
Add: 2003,20F No.35 Luojia creative city,Luoyu Road,Wuhan,HuBei
Mob: +86 13797007811|Tel: + 86 27 5024 2516
发件人: Xiangfei Ni
发送时间: 2018年6月8日 13:37
收件人: user <us...@cassandra.apache.org>
主题: sstabledump and liveness_info question
Hi Expert,
I have questions about sstabledump
1,create table and insert data:
create table test2(a text,b text,primary key (a));
insert into test2(a,b) values ('a','b');
2,flush data to disk
3,sstabledump the sstable
[cassandra@concar-cassandra01] /opt/database/apache-cassandra-data/stresscql/test2-a9d1a1306adb11e8a14077a1580c0a40 $ /opt/database/apache-cassandra/tools/bin/sstabledump ./mc-1-big-Data.db
[
{
"partition" : {
"key" : [ "a" ],
"position" : 0
},
"rows" : [
{
"type" : "row",
"position" : 15,
"liveness_info" : { "tstamp" : "2018-06-08T05:20:39.932553Z" },
"cells" : [
{ "name" : "b", "value" : "b" }
]
}
]
}
4,update data:
update test2 set b='2' where a='a';
5,flush data to disk
6,sstabledump the sstable
[cassandra@concar-cassandra01] /opt/database/apache-cassandra-data/stresscql/test2-a9d1a1306adb11e8a14077a1580c0a40 $ /opt/database/apache-cassandra/tools/bin/sstabledump ./mc-2-big-Data.db
[
{
"partition" : {
"key" : [ "a" ],
"position" : 0
},
"rows" : [
{
"type" : "row",
"position" : 15,
"cells" : [
{ "name" : "b", "value" : "2", "tstamp" : "2018-06-08T05:22:17.959558Z" }
]
}
]
}
]
My questions are:
1,why there is no liveness_info element in the second sstable dump?
2,why the output format is not the same?The second dump has the "tstamp" : "2018-06-08T05:22:17.959558Z" in the cell element but there is no in the first output?
3,is there detail instruction about sstableoutput?