Expose method and class - so that we can use it from user code (particularly since checkpoint directory is autogenerated now

This commit is contained in:
Mridul Muralidharan 2014-01-15 12:44:44 +05:30
parent 3a386e2389
commit 0aea33d39e
2 changed files with 3 additions and 2 deletions

View file

@ -956,6 +956,8 @@ class SparkContext(
}
}
def getCheckpointDir = checkpointDir.getOrElse(null)
/** Default level of parallelism to use when not given by user (e.g. parallelize and makeRDD). */
def defaultParallelism: Int = taskScheduler.defaultParallelism
@ -1125,7 +1127,7 @@ object SparkContext {
if (sparkHome != null) {
res.setSparkHome(sparkHome)
}
if (!jars.isEmpty) {
if (null != jars && !jars.isEmpty) {
res.setJars(jars)
}
res.setExecutorEnv(environment.toSeq)

View file

@ -28,7 +28,6 @@ import org.apache.spark.{SparkContext, SparkException}
/**
* Contains util methods to interact with Hadoop from Spark.
*/
private[spark]
class SparkHadoopUtil {
val conf = newConfiguration()
UserGroupInformation.setConfiguration(conf)