You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by GitBox <gi...@apache.org> on 2021/02/10 17:59:48 UTC

[GitHub] [accumulo] keith-turner commented on pull request #1920: Use String.intern() instead of WeakHashMap

keith-turner commented on pull request #1920:
URL: https://github.com/apache/accumulo/pull/1920#issuecomment-776900236


   I see this is used for deduping locations and sessions.  The locations and sessions should be relatively low cardinality at a given point in time.  However over longer periods the cardinality could be higher (tservers restarts create a new session and possibly could use different port) for all seen.  But the active set would always be much smaller.  I assume that String.intern() handles strings that are no longer referenced well, but was not quite sure.  Curious if anyone who has done research knows?  Also curious if anyone knows anything about the behavior of String.intern() under concurrent load (like 100 threads all calling String.intern())?    I suspect String.intern() could only be better or the same as the current weak hashmap w.r.t to concurrency.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org