在Spark中转储hadoop配置
我使用在Spark中转储hadoop配置,hadoop,apache-spark,Hadoop,Apache Spark,我使用sc.hadoopConfiguration.set来设置配置。 如何转储这些配置?在控制台上打印它们或将它们转储到文件中您可以将hadoop配置转储到xml文件中(我假设您使用的是Scala) val out = new FileOutputStream("conf.xml") sc.hadoopConfiguration.writeXml(out)
sc.hadoopConfiguration.set
来设置配置。
如何转储这些配置?在控制台上打印它们或将它们转储到文件中您可以将hadoop配置转储到xml文件中(我假设您使用的是Scala)
val out = new FileOutputStream("conf.xml")
sc.hadoopConfiguration.writeXml(out)