嗨伙计,
我们需要追踪一天中插入表中插入的总记录。什么是最好的方法。
谢谢
ritu.
对于这种用例,没有一个开箱即用的解决方案。通常,您需要编写一个可以为您执行此操作或运行Spark作业的应用程序。
I don't recommend using the CQL COUNT()
function because it will affect the performance of your cluster. I've discussed it in detail in this post -- 为什么cassandra差价()很糟糕.
或者,您可以使用 计数命令 在里面 DataStax Bulk Loader. ( Dsbulk. ) utility. At the same time each, you can run a dsbulk count
on a table to get the total records and subtract the previous day's total to get today's tally.
计数记录的挑战是弄清楚如何处理更新和删除。除非您每天只插入新记录,否则几乎无法协调有多少新功能以及删除了多少。干杯!
谢谢 @ @ Ramirez. 。实际要求是为了获得插入日常的记录。我们可以通过分区或我们可以在DB Server中使用的东西来获得计数。
DataStax Enterprise由jj游戏官方下载 Cassandra™的最佳分发供电
©2021年DataStax,Titan和Titandb是Datastax,Inc。及其附属公司在美国和/或其他国家的注册商标。
jj游戏官方下载,jj游戏官方下载 Cassandra,Cassandra,jj游戏官方下载 Tomcat,Tomcat,jj游戏官方下载 Lucene,Lucene,jj游戏官方下载 Solr,jj游戏官方下载 Hadoop,Hadoop,jj游戏官方下载 Spark,Spark,jj游戏官方下载 Tinkerpop,Tinkerpop,jj游戏官方下载 Kafka和Kafka是jj游戏官方下载软件基金会的注册商标或商标或其在加拿大,美国和/或其他国家的子公司。
隐私政策 使用条款