Insert large blob with Java Cassandra Driver

706 views
Skip to first unread message

Ramamoorthy Krishna Reddy

unread,
Aug 3, 2016, 2:37:33 PM8/3/16
to DataStax Java Driver for Apache Cassandra User Mailing List
Hi,

We have file upload functionality implemented using restful service which published into wildfly 8.2 server. 
We store the file object into cassandra table blob column. If the file size larger than 16MB it's not storing into cassandra database. I don't see any error log printed when file getting uploaded. 
Note: The files which are less than 16MB stores without any problem. 

We convert file content byte[] to ByteBuffer by,

ByteBuffer b = ByteBuffer.wrap(fileContents); and persist them by async. 

Please let me know if need more information. Could let me know if this is a known issue? or any workaround?

thanks,
Ram

Aneesh Mohan

unread,
Aug 3, 2016, 2:41:40 PM8/3/16
to java-dri...@lists.datastax.com

The max blog size allowed is half of commitlog_segment_size_in_mb. The default value for this is 32Mb in cassandra.yaml file.

Increasing this and restarting would help you resolve this issue.


This message and any attachment are confidential and may be privileged or otherwise protected from disclosure. If you are not the intended recipient, you must not copy this message or attachment or disclose the contents to any other person. If you have received this transmission in error, please notify the sender immediately and delete the message and any attachment from your system. Merck KGaA, Darmstadt, Germany and any of its subsidiaries do not accept liability for any omissions or errors in this message which may arise as a result of E-Mail-transmission or for damages resulting from any unauthorized changes of the content of this message and any attachment thereto. Merck KGaA, Darmstadt, Germany and any of its subsidiaries do not guarantee that this message is free of viruses and does not accept liability for any damages caused by any virus transmitted therewith.

Click http://www.merckgroup.com/disclaimer to access the German, French, Spanish and Portuguese versions of this disclaimer.

--
You received this message because you are subscribed to the Google Groups "DataStax Java Driver for Apache Cassandra User Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to java-driver-us...@lists.datastax.com.

Deepak Dabi

unread,
Aug 3, 2016, 2:41:45 PM8/3/16
to java-dri...@lists.datastax.com
Hi Ram,

What is the error you are facing ? i was able to push till 100 MB in one column value by increasing commitlog_segment_size_in_mb: 200 , and increasing timeout.

Regards,
Deepak dabi

Ramamoorthy Krishna Reddy

unread,
Aug 3, 2016, 2:48:03 PM8/3/16
to DataStax Java Driver for Apache Cassandra User Mailing List
Hi Deepak, I'm not getting any error and the file not getting stored to cassandra. 
thanks,
Ram

Ramamoorthy Krishna Reddy

unread,
Aug 3, 2016, 2:49:24 PM8/3/16
to DataStax Java Driver for Apache Cassandra User Mailing List
 We haven't increased from default value yet. I'm trying with 19MB file.

Ramamoorthy K

unread,
Aug 4, 2016, 11:51:05 AM8/4/16
to java-dri...@lists.datastax.com
All, It worked after increasing the commitlog_segment_size_in_mb  size value. Thank you very much.



To unsubscribe from this group and stop receiving emails from it, send an email to java-driver-user+unsubscribe@lists.datastax.com.

Reply all
Reply to author
Forward
0 new messages