You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by "Josh Elser (JIRA)" <ji...@apache.org> on 2014/10/25 08:28:33 UTC
[jira] [Created] (ACCUMULO-3260) TreeMap usage in
LargestFirstMemoryManager could preclude certain tablets
Josh Elser created ACCUMULO-3260:
------------------------------------
Summary: TreeMap usage in LargestFirstMemoryManager could preclude certain tablets
Key: ACCUMULO-3260
URL: https://issues.apache.org/jira/browse/ACCUMULO-3260
Project: Accumulo
Issue Type: Improvement
Components: tserver
Reporter: Josh Elser
Priority: Minor
[~kturner]'s comment on https://reviews.apache.org/r/22647/
{code}
// find the largest and most idle tablets
for (TabletState ts : tablets) {
final long memTabletSize = ts.getMemTableSize();
final long minorCompactingSize = ts.getMinorCompactingMemTableSize();
final long idleTime = now - Math.max(ts.getLastCommitTime(), ZERO_TIME);
final long timeMemoryLoad = timeMemoryLoad(memTabletSize, idleTime);
ingestMemory += memTabletSize;
if (minorCompactingSize == 0 && memTabletSize > 0) {
TabletInfo tabletInfo = new TabletInfo(ts.getExtent(), memTabletSize, idleTime, timeMemoryLoad);
largestMemTablets.put(timeMemoryLoad, tabletInfo);
if (idleTime > getMinCIdleThreshold(ts.getExtent())) {
largestIdleMemTablets.put(timeMemoryLoad, tabletInfo);
}
}
{code}
Because {{largestMemTablets}} is a {{TreeMap}}, it's possible that multiple tablets would create the same key and override entries in the map. Not a big concern because a tablet should be re-added to the map multiple times and the likelihood of a collision should be small.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)