shikhar / kafka-connect-dynamodb

Kafka Connector for DynamoDB
Apache License 2.0
34 stars 50 forks source link

Divide by zero exception - assignedShards is empty #18

Open krishna9191 opened 6 years ago

krishna9191 commented 6 years ago

Hi Shikhar,

I am trying to run the dynamodb connector. It runs fine initially and after sometime it is throwing exception

java.lang.ArithmeticException: / by zero at dynamok.source.DynamoDbSourceTask.poll(DynamoDbSourceTask.java:105) at org.apache.kafka.connect.runtime.WorkerSourceTask.execute(WorkerSourceTask.java:179) at org.apache.kafka.connect.runtime.WorkerTask.doRun(WorkerTask.java:170) at org.apache.kafka.connect.runtime.WorkerTask.run(WorkerTask.java:214) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748)

which happens at
currentShardIdx = (currentShardIdx + 1) % assignedShards.size();

I am not sure why assignedShards is empty as I can see data in output for some time. I tried it using multiple tables and multiple times but the same error.

anupkumarsharma commented 5 years ago

Did you find any solution to this?