我有一个 Java 应用程序,它从分区的 Oracle 表(实际上是几列,大小大约 100G)中读取数据,并使用与分区数相等的线程数加载到 Cassandra 集群中。监控进度的线程显示每个线程的进度(插入的行 @ ?? ms/rec),如下所示:
问题是,无论我调用什么 api 方法(insert/batch_mutate)(从 while 循环内部),延迟都在稳步增加。正如你所看到的,它以小于 10ms/rec 的速度开始,并且稳定且持续地上升。任何猜测可能是什么原因?
PS:出于某些原因,我选择了原始节俭客户端而不是赫克托,除非这是唯一可用的解决方案,否则我不能选择更高级别的客户端。无论如何,我对这种奇怪的行为感到好奇。
监控线程的示例输出:
24@0 ms/rec, 135323@485 ms/rec, 131821@513 ms/rec, 155841@339 ms/rec, 243@0 ms/rec, 226146@538 ms/rec, 0, 0, .
24@0 ms/rec, 135431@523 ms/rec, 131939@427 ms/rec, 156008@316 ms/rec, 243@0 ms/rec, 226247@553 ms/rec, 0, 0, .
24@0 ms/rec, 135534@535 ms/rec, 132052@506 ms/rec, 156172@345 ms/rec, 243@0 ms/rec, 226355@472 ms/rec, 0, 0, .
24@0 ms/rec, 135643@519 ms/rec, 132171@455 ms/rec, 156323@387 ms/rec, 243@0 ms/rec, 226464@492 ms/rec, 0, 0, .
24@0 ms/rec, 135735@498 ms/rec, 132273@514 ms/rec, 156466@355 ms/rec, 243@0 ms/rec, 226561@508 ms/rec, 0, 0, .
24@0 ms/rec, 135858@474 ms/rec, 132404@455 ms/rec, 156630@330 ms/rec, 243@0 ms/rec, 226676@533 ms/rec, 0, 0, .