diff options
author | Mridul Muralidharan <mridul@gmail.com> | 2013-04-15 18:12:11 +0530 |
---|---|---|
committer | Mridul Muralidharan <mridul@gmail.com> | 2013-04-15 18:12:11 +0530 |
commit | d90d2af1036e909f81cf77c85bfe589993c4f9f3 (patch) | |
tree | 4119f2702709fe62317e15273b49183678fe24e0 /core/src/hadoop1/scala | |
parent | 6798a09df84fb97e196c84d55cf3e21ad676871f (diff) | |
download | spark-d90d2af1036e909f81cf77c85bfe589993c4f9f3.tar.gz spark-d90d2af1036e909f81cf77c85bfe589993c4f9f3.tar.bz2 spark-d90d2af1036e909f81cf77c85bfe589993c4f9f3.zip |
Checkpoint commit - compiles and passes a lot of tests - not all though, looking into FileSuite issues
Diffstat (limited to 'core/src/hadoop1/scala')
-rw-r--r-- | core/src/hadoop1/scala/spark/deploy/SparkHadoopUtil.scala | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/core/src/hadoop1/scala/spark/deploy/SparkHadoopUtil.scala b/core/src/hadoop1/scala/spark/deploy/SparkHadoopUtil.scala new file mode 100644 index 0000000000..d4badbc5c4 --- /dev/null +++ b/core/src/hadoop1/scala/spark/deploy/SparkHadoopUtil.scala @@ -0,0 +1,18 @@ +package spark.deploy + +/** + * Contains util methods to interact with Hadoop from spark. + */ +object SparkHadoopUtil { + + def getUserNameFromEnvironment(): String = { + // defaulting to -D ... + System.getProperty("user.name") + } + + def runAsUser(func: (Product) => Unit, args: Product) { + + // Add support, if exists - for now, simply run func ! + func(args) + } +} |