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:
parent
3a386e2389
commit
0aea33d39e
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue