# Insert a large document using Java Client

**URL:** <https://discuss.aerospike.com/t/insert-a-large-document-using-java-client/101>\
**Category:** Java Client\
**Created:** [August 15, 2014, 11:35pm UTC](https://discuss.aerospike.com/t/insert-a-large-document-using-java-client/101 "2014-08-15T23:35:00Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![bbulkow](https://avatars.discourse-cdn.com/v4/letter/b/779978/32.png) [@bbulkow](https://discuss.aerospike.com/u/bbulkow)\
**Post date:** [August 15, 2014, 11:35pm UTC](https://discuss.aerospike.com/t/insert-a-large-document-using-java-client/101/1 "2014-08-15T23:35:00Z")

</div>

Originally posted by: girishs wrote Fri Dec 06, 2013 1:29 pm

Can we use aerospike as a content store to store multiple documents ? If so then can you please point me to a sample Java implementation ?

---

<div class="post-metadata">

**Author:** ![bbulkow](https://avatars.discourse-cdn.com/v4/letter/b/779978/32.png) [@bbulkow](https://discuss.aerospike.com/u/bbulkow)\
**Post date:** [August 15, 2014, 11:35pm UTC](https://discuss.aerospike.com/t/insert-a-large-document-using-java-client/101/2 "2014-08-15T23:35:43Z")

</div>

This does depend on how large. Aerospike stores records in blocks. By default the size of this is 128KB. You can make this as large as 1MB. However, if you are looking to store objects larger than that, this will be an issue.

If you wish to change the block size, you can set it in the namespace with the “write-block-size”. Set this to 128KB or any multiple thereof up to 1 MB.

---

<div class="post-metadata">

**Author:** ![bbulkow](https://avatars.discourse-cdn.com/v4/letter/b/779978/32.png) [@bbulkow](https://discuss.aerospike.com/u/bbulkow)\
**Post date:** [August 15, 2014, 11:36pm UTC](https://discuss.aerospike.com/t/insert-a-large-document-using-java-client/101/3 "2014-08-15T23:36:35Z")

</div>

originally posted by girishs » Mon Dec 09, 2013 8:15 am

Thanks for the reply …Instead of storing in a single block (128 kb - 1 MB) ,is there a way to chunk a large document (100+ GB) while storing and when we assemble it while doing a retrieve operation…

---

<div class="post-metadata">

**Author:** ![bbulkow](https://avatars.discourse-cdn.com/v4/letter/b/779978/32.png) [@bbulkow](https://discuss.aerospike.com/u/bbulkow)\
**Post date:** [August 15, 2014, 11:37pm UTC](https://discuss.aerospike.com/t/insert-a-large-document-using-java-client/101/4 "2014-08-15T23:37:40Z")

</div>

Currently there is no built in mechanism for doing this. We do have customers that have written their own client-side functions to do this. However, for objects as large as 100GB+, we would probably not recommend using Aerospike at this time.

In the future, we will have a feature called Large Data Types (LDTs), which will allow you to store very large objects in parts, giving you random access to any piece of the data. This can allow you to load time series data or any data that is based on some index (such as time, etc). However, this is set for a 2014 release.

Could you share the nature of the large objects? This might help us guide you to a better answer.

---

<div class="post-metadata">

**Author:** ![oldforum](https://avatars.discourse-cdn.com/v4/letter/o/13edae/32.png) [@oldforum](https://discuss.aerospike.com/u/oldforum)\
**Post date:** [August 15, 2014, 11:40pm UTC](https://discuss.aerospike.com/t/insert-a-large-document-using-java-client/101/5 "2014-08-15T23:40:26Z")

</div>

Large objects (100+GB) can be a word document having images,XML or a multipage TIFF document.

If the size of the image (PNG/TIFF) is less than 1 MB. Can we load it as a block in Database ? if so then can you point me to an example or let me know feature that can be used ?
