It is related to an JMX counter within the Datanode process. I am not sure what it is counting but it something within it is throwing an NPE. This is likely coming after the write stream has process all data but since it hits this exception it throws and exits. It should be safe to ignore this error.
A related JIRA although it doesn't seem to be part of CDH yet.