Would it make sense to move this to SparkHadoopUtil ? (generateSecretKey delegates to corresponding SparkHadoopUtil to avoid mixing yarn/non-yarn specific code in core).