To prevent these from getting out of sync with SparkHadoopWriter in the future, would it be possible to make this a static helper function in HadoopRDD's object, and using that in the writer?