java 我可以在不删除流的情况下从 amazon Kinesis 删除数据记录或分片吗?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/25461394/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Can I delete data records or shards from amazon Kinesis without deleting stream?
提问by Kishore Kumar Korada
I know data records in Kinesis Stream will be deleted automatically in 24 hrs. But in my application when ever I write some data into stream, for the 2nd time if I want to write some other data, Data inserted first should be deleted. Please anyone help me since I am new to using AWS Kinesis Stream...I didn't get any help from Kinesis Service API...
我知道 Kinesis Stream 中的数据记录将在 24 小时内自动删除。但是在我的应用程序中,当我将一些数据写入流时,第二次如果我想写入一些其他数据,首先插入的数据应该被删除。请任何人帮助我,因为我是使用 AWS Kinesis Stream 的新手......我没有从 Kinesis Service API 得到任何帮助......
回答by mk-baku
You can not delete previously inserted data from stream, but you can read data using KCL. KCL will create checkpoint every after one data slot read, so whenever you go for next slot of new data, KCL will read it from last checkpoint created in dynamodb table, so previously read data will be not included in next slot.
您不能从流中删除以前插入的数据,但可以使用 KCL 读取数据。KCL 会在每次读取一个数据槽后创建一个检查点,所以每当你去下一个新数据槽时,KCL 都会从 dynamodb 表中创建的最后一个检查点读取它,所以以前读取的数据不会包含在下一个槽中。