Merge pull request #449 from CrazyJvm/master SPARK-1028 : fix "set MASTER automatically fails" bug.
spark-shell intends to set MASTER automatically if we do not provide the option when we start the shell , but there's a problem. The condition is "if [[ "x" != "x$SPARK_MASTER_IP" && "y" != "y$SPARK_MASTER_PORT" ]];" we sure will set SPARK_MASTER_IP explicitly, the SPARK_MASTER_PORT option, however, we probably do not set just using spark default port 7077. So if we do not set SPARK_MASTER_PORT, the condition will never be true. We should just use default port if users do not set port explicitly I think. Project: http://git-wip-us.apache.org/repos/asf/incubator-spark/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-spark/commit/6b4eed77 Tree: http://git-wip-us.apache.org/repos/asf/incubator-spark/tree/6b4eed77 Diff: http://git-wip-us.apache.org/repos/asf/incubator-spark/diff/6b4eed77 Branch: refs/heads/master Commit: 6b4eed779bd1889543ac2c058745bd0864f02b2a Parents: 0367981 8400536 Author: Reynold Xin <r...@apache.org> Authored: Mon Jan 20 22:35:45 2014 -0800 Committer: Reynold Xin <r...@apache.org> Committed: Mon Jan 20 22:35:45 2014 -0800 ---------------------------------------------------------------------- bin/spark-shell | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) ----------------------------------------------------------------------