Implementing a custom Hadoop key type