twitter/scalding — pull request #829 by isnotinvain (2014-03-19 05:36:04+00:00)
Title: Fix RuntimeStat's backwards use of WeakHashMap

As-is this makes the keys in flowMappingStore strong refs, and the values weak refs, by using a `ConcurrentHashMap[String, WeakReference[FlowProcess[_]]]`

We could go a step further and still use `WeakHashMap` like this:

```
private val flowMappingStore: Map[String, WeakReference[FlowProcess[_]]] = Collections.synchronizedMap(new WeakHashMap[String, WeakReference[FlowProcess[_]]])
```

Which would give us the auto-cleanup aspect of WeakHashMap. Let me know if you think that's worth it. I haven't confirmed that the String keys even get gc-ed as we would hope but they probably do :)