Over on pig-dev, Sam Pullara pointed out the following Java mechanism that permits one to be notified when memory usage exceeds a threshold.

http://java.sun.com/javase/6/docs/api/java/lang/management/MemoryPoolMXBean.html#UsageThreshold

Perhaps we could use something like this on the namenode? For example, when memory usage is too high, the namenode could refuse creation of new files. This would still crash applications, but it would keep the filesystem itself from crashing in a way that is hard to recover while folks remove excessive (presumably) small files.

Doug

Reply via email to