Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Threaded View
MapReduce >> mail # dev >> Can we use String.intern inside WritableUtils#readString()?


Copy link to this message
-
Can we use String.intern inside WritableUtils#readString()?
Hi All,
  I noticed that WritableUtils.readString(), while deserializing the  
strings, creates a string object every time. But there may be  
applications, which serialize a small no of the strings, a huge number  
of times. So while deserializing them, this may lead to OOMs sometimes.

I think using intern() will reduce the creation of the number of  
String objects. Please correct me if my understading is wrong.

--
Thanks&Regards,
Bh.V.S.Kamesh,
+91-9652725948
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB