Why did you make this an inner class instead of a top-level one? Also, it should probably be private[spark].