[ 
https://issues.apache.org/jira/browse/KAFKA-8120?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17350289#comment-17350289
 ] 

Pham Huy Hoang commented on KAFKA-8120:
---------------------------------------

Hi [~wj1918], I tried to test as your above steps. However, I got an 
unfathomable consumer error. When I added "batch.size=1" in 
config/connect-file-source.properties, my console-consumer received only 
19999985 / 20000000 records (with records gen from your mongodump script), as 
well as it received only 96/100 records (with your test.txt file). Sometimes, 
it received only 1 records for each restarting kafka-connect. Please tell me 
why.

Many thanks. 

> Getting NegativeArraySizeException when using Kafka Connect to send data to 
> Kafka
> ---------------------------------------------------------------------------------
>
>                 Key: KAFKA-8120
>                 URL: https://issues.apache.org/jira/browse/KAFKA-8120
>             Project: Kafka
>          Issue Type: Bug
>          Components: KafkaConnect
>    Affects Versions: 2.1.1, 2.5.0
>         Environment: Ubuntu 16.04 LTS
>            Reporter: Prashant Shahi
>            Assignee: Jun Wang
>            Priority: Major
>         Attachments: gen-mongodump.sh.txt, test.txt
>
>
>  
> I have a large MongoDump JSON which I tried pushing to Kafka using Kafka 
> Connect.
> I am getting the following Exception after around 16k messages been pushed. 
> After the exception, the program doesn't get killed or exit, but now no more 
> messages are pushed.
> {code:java}
> [2019-03-15 08:48:13,812] ERROR WorkerSourceTask{id=od-test18-0} Task threw 
> an uncaught and unrecoverable exception 
> (org.apache.kafka.connect.runtime.WorkerTask:177) 
> java.lang.NegativeArraySizeException at 
> org.apache.kafka.connect.file.FileStreamSourceTask.poll(FileStreamSourceTask.java:141)
>  at 
> org.apache.kafka.connect.runtime.WorkerSourceTask.poll(WorkerSourceTask.java:244)
>  at 
> org.apache.kafka.connect.runtime.WorkerSourceTask.execute(WorkerSourceTask.java:220)
>  at org.apache.kafka.connect.runtime.WorkerTask.doRun(WorkerTask.java:175) at 
> org.apache.kafka.connect.runtime.WorkerTask.run(WorkerTask.java:219) 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) [2019-03-15 08:48:13,814] ERROR 
> WorkerSourceTask{id=od-test18-0} Task is being killed and will not recover 
> until manually restarted 
> (org.apache.kafka.connect.runtime.WorkerTask:178){code}
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to