Merge pull request #145 from aarondav/sls-fix

Attempt to fix SparkListenerSuite breakage

Could not reproduce locally, but this test could've been flaky if the build machine was too fast, due to typo. (index 0 is intentionally slowed down to ensure total time is >= 1 ms)

This should be merged into branch-0.8 as well.

(cherry picked from commit 951024feeadcf73b50c3c80ec9e75c7e2214a7a4)
Signed-off-by: Reynold Xin <rxin@apache.org>
Merge pull request #144 from liancheng/runjob-clean

Removed unused return value in SparkContext.runJob

Return type of this `runJob` version is `Unit`:

    def runJob[T, U: ClassManifest](
        rdd: RDD[T],
        func: (TaskContext, Iterator[T]) => U,
        partitions: Seq[Int],
        allowLocal: Boolean,
        resultHandler: (Int, U) => Unit) {
        ...
    }

It's obviously unnecessary to "return" `result`.

(cherry picked from commit aadeda5e7697a433c82879033e758fbc403680dc)
Signed-off-by: Reynold Xin <rxin@apache.org>
Merge pull request #23 from jerryshao/multi-user

Add Spark multi-user support for standalone mode and Mesos

This PR add multi-user support for Spark both standalone mode and Mesos (coarse and fine grained ) mode, user can specify the user name who submit app through environment variable `SPARK_USER` or use default one. Executor will communicate with Hadoop using  specified user name.

Also I fixed one bug in JobLogger when different user wrote job log to specified folder which has no right file  permission.

I separate previous [PR750](https://github.com/mesos/spark/pull/750) into two PRs, in this PR I only solve multi-user support problem. I will try to solve security auth problem in subsequent PR because security auth is a complicated problem especially for Shark Server like long-run app (both Kerberos TGT and HDFS delegation token should be renewed or re-created through app's run time).

(cherry picked from commit be7e8da98ad04d66b61cd7fc8af7ae61a649d71c)
Signed-off-by: Reynold Xin <rxin@apache.org>
Merge pull request #148 from squito/include_appId

Include appId in executor cmd line args

add the appId back into the executor cmd line args.

I also made a pretty lame regression test, just to make sure it doesn't get dropped in the future.  not sure it will run on the build server, though, b/c `ExecutorRunner.buildCommandSeq()` expects to be abel to run the scripts in `bin`.

(cherry picked from commit 3d4ad84b63e440fd3f4b3edb1b120ff7c14a42d1)
Signed-off-by: Reynold Xin <rxin@apache.org>
Use SPARK_HOME instead of user.dir in ExecutorRunnerTest

(cherry picked from commit dd63c548c228d7775670e4664be18ebd1c62bed7)
Signed-off-by: Reynold Xin <rxin@apache.org>
Merge pull request #152 from rxin/repl

Propagate SparkContext local properties from spark-repl caller thread to the repl execution thread.

(cherry picked from commit 72a601ec318d017e5ec2b878abeac19e30ebb554)
Signed-off-by: Reynold Xin <rxin@apache.org>
Merge pull request #155 from rxin/jobgroup

Don't reset job group when a new job description is set.

(cherry picked from commit 83bf1920c85c33d8d725831b28bc5d11b53c27bd)
Signed-off-by: Reynold Xin <rxin@apache.org>
Merge pull request #149 from tgravescs/fixSecureHdfsAccess

Fix secure hdfs access for spark on yarn

https://github.com/apache/incubator-spark/pull/23 broke secure hdfs access. Not sure if it works with secure hdfs on standalone. Fixing it at least for spark on yarn.

The broadcasting of jobconf change also broke secure hdfs access as it didn't take into account things calling the getPartitions before sparkContext is initialized. The DAGScheduler does this as it tries to getShuffleMapStage.

(cherry picked from commit 8af99f2356ed19fe43d722ada02f8802cbd46d40)
Signed-off-by: Reynold Xin <rxin@apache.org>
Merge pull request #147 from JoshRosen/fix-java-api-completeness-checker

Add spark-tools assembly to spark-class'ss classpath

This commit adds an assembly for `spark-tools` and adds it to `spark-class`'s classpath, allowing the JavaAPICompletenessChecker to be run against Spark 0.8+ with

    ./spark-class org.apache.spark.tools.JavaAPICompletenessChecker

Previously, this tool was run through the `run` script.  I chose to add this to `run-example` because I didn't want to duplicate code in a `run-tool` script.

(cherry picked from commit 3efc0195625977335914f0a18cf32bd4e9b1d6d4)
Signed-off-by: Reynold Xin <rxin@apache.org>
Merge pull request #157 from rxin/kryo

3 Kryo related changes.

1. Call Kryo setReferences before calling user specified Kryo registrator. This is done so the user specified registrator can override the default setting.

2. Register more internal classes (MapStatus, BlockManagerId).

3. Slightly refactored the internal class registration to allocate less memory.

(cherry picked from commit 58d4f6c8a5d9739dc2a3f26f116528457336f0d3)
Signed-off-by: Reynold Xin <rxin@apache.org>
Merge branch 'branch-0.8' of https://github.com/apache/incubator-spark into master-csd