# \[hadoop\] Performance in using Text vs. MapWritable

**URL:** <https://discuss.elastic.co/t/hadoop-performance-in-using-text-vs-mapwritable/16378>\
**Category:** Elasticsearch\
**Created:** [March 14, 2014, 2:46pm UTC](https://discuss.elastic.co/t/hadoop-performance-in-using-text-vs-mapwritable/16378 "2014-03-14T14:46:55Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Brian\_Stempin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/brian_stempin/32/1714_2.png) [@Brian\_Stempin](https://discuss.elastic.co/u/Brian_Stempin)\
**Post date:** [March 14, 2014, 2:46pm UTC](https://discuss.elastic.co/t/hadoop-performance-in-using-text-vs-mapwritable/16378/1 "2014-03-14T14:46:55Z")

</div>

Hi,  
I'm currently using the elasticsearch-hadoop component to load data into my  
ES cluster. Currently, the ESOutputFormat will accept a Map\<Writable,  
Wrtiable\> or a Text that is already in JSON format. My question: Is there  
a performance advantage to using one over the other?

Thanks,  
Brian

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/20302cc7-799f-4723-89db-3b050123d2bd%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/20302cc7-799f-4723-89db-3b050123d2bd%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![costin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/costin/32/44950_2.png) [@costin](https://discuss.elastic.co/u/costin)\
**Post date:** [March 14, 2014, 3:29pm UTC](https://discuss.elastic.co/t/hadoop-performance-in-using-text-vs-mapwritable/16378/2 "2014-03-14T15:29:10Z")

</div>

Hey,

There is but in the big picture it doesn't make any difference. If the data is already in JSON format then es-hadoop can  
stream the data directly without having to do any conversion. With a data (Map\<Writable,Writable\>) the map has to be  
converted into JSON - note that this process is quite efficient and uses the same amount of memory no matter the number  
of documents/maps.  
Consider Hadoop batch nature I would not worry about choosing one over the other but rather focus on ease of use.

If the data is in JSON or you want ultimate control over what data is sent to Elasticsearch, then JSON is the way to go

- the data is streamed as is.  
If you don't use JSON and have data in various formats readable through Hadoop, then pick the Map\<Writable,Writable\> -  
it gives you maximum interoperability and you don't have to worry about transforming data into an intermediate format.

Hope this helps,

On 3/14/2014 4:46 PM, Brian Stempin wrote:

> Hi,  
> I'm currently using the elasticsearch-hadoop component to load data into my ES cluster. Currently, the ESOutputFormat  
> will accept a Map\<Writable, Wrtiable\> or a Text that is already in JSON format. My question: Is there a performance  
> advantage to using one over the other?
> 
> Thanks,  
> Brian
> 
> --  
> You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an email to  
> [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com) [mailto:elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/20302cc7-799f-4723-89db-3b050123d2bd%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/20302cc7-799f-4723-89db-3b050123d2bd%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/20302cc7-799f-4723-89db-3b050123d2bd%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/20302cc7-799f-4723-89db-3b050123d2bd%40googlegroups.com?utm_medium=email&utm_source=footer).  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
Costin

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/53232046.4080206%40gmail.com](https://groups.google.com/d/msgid/elasticsearch/53232046.4080206%40gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Brian\_Stempin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/brian_stempin/32/1714_2.png) [@Brian\_Stempin](https://discuss.elastic.co/u/Brian_Stempin)\
**Post date:** [March 14, 2014, 4:14pm UTC](https://discuss.elastic.co/t/hadoop-performance-in-using-text-vs-mapwritable/16378/3 "2014-03-14T16:14:28Z")

</div>

It does, thanks.

Brian

On Fri, Mar 14, 2014 at 11:29 AM, Costin Leau [costin.leau@gmail.com](mailto:costin.leau@gmail.com) wrote:

> Hey,
> 
> There is but in the big picture it doesn't make any difference. If the  
> data is already in JSON format then es-hadoop can stream the data directly  
> without having to do any conversion. With a data (Map\<Writable,Writable\>)  
> the map has to be converted into JSON - note that this process is quite  
> efficient and uses the same amount of memory no matter the number of  
> documents/maps.  
> Consider Hadoop batch nature I would not worry about choosing one over the  
> other but rather focus on ease of use.
> 
> If the data is in JSON or you want ultimate control over what data is sent  
> to Elasticsearch, then JSON is the way to go - the data is streamed as is.  
> If you don't use JSON and have data in various formats readable through  
> Hadoop, then pick the Map\<Writable,Writable\> - it gives you maximum  
> interoperability and you don't have to worry about transforming data into  
> an intermediate format.
> 
> Hope this helps,
> 
> On 3/14/2014 4:46 PM, Brian Stempin wrote:
> 
> > Hi,  
> > I'm currently using the elasticsearch-hadoop component to load data into  
> > my ES cluster. Currently, the ESOutputFormat  
> > will accept a Map\<Writable, Wrtiable\> or a Text that is already in JSON  
> > format. My question: Is there a performance  
> > advantage to using one over the other?
> > 
> > Thanks,  
> > Brian
> > 
> > --  
> > You received this message because you are subscribed to the Google Groups  
> > "elasticsearch" group.  
> > To unsubscribe from this group and stop receiving emails from it, send an  
> > email to  
> > [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com) \<mailto:elasticsearch+  
> > [unsubscribe@googlegroups.com](mailto:unsubscribe@googlegroups.com)\>.
> > 
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/20302cc7-](https://groups.google.com/d/msgid/elasticsearch/20302cc7-)  
> > 799f-4723-89db-3b050123d2bd%[40googlegroups.com](http://40googlegroups.com)  
> > \<[https://groups.google.com/d/msgid/elasticsearch/20302cc7-](https://groups.google.com/d/msgid/elasticsearch/20302cc7-)  
> > 799f-4723-89db-3b050123d2bd%[40GGGROUPS CASINO – Real Slot Casino for 10,000+ Senior Players](http://40googlegroups.com?utm_medium=)  
> > email&utm\_source=footer\>.
> > 
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> 
> --  
> Costin
> 
> --  
> You received this message because you are subscribed to a topic in the  
> Google Groups "elasticsearch" group.  
> To unsubscribe from this topic, visit [https://groups.google.com/d/](https://groups.google.com/d/)  
> topic/elasticsearch/hs-LJ6Le2AQ/unsubscribe.  
> To unsubscribe from this group and all its topics, send an email to  
> [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit [https://groups.google.com/d/](https://groups.google.com/d/)  
> msgid/elasticsearch/53232046.4080206%[40gmail.com](http://40gmail.com).
> 
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CANB1ciC56FppVsL6tAha-oad%2BDGMP7cJMdZLPU1-RkRUN1qtkg%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CANB1ciC56FppVsL6tAha-oad%2BDGMP7cJMdZLPU1-RkRUN1qtkg%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 1:43am UTC](https://discuss.elastic.co/t/hadoop-performance-in-using-text-vs-mapwritable/16378/4 "2017-07-06T01:43:07Z")

</div>

Closed on July 6, 2017, 1:43am UTC


