Repository: spark Updated Branches: refs/heads/branch-1.2 576fc54e5 -> 5226dc74d
SPARK-5628 [EC2] Backport: Add version option to spark-ec2 Backport of https://github.com/apache/spark/pull/4414 to 1.2: Add version option to spark-ec2 nchammas JoshRosen : is this about the right backporting of this change? Author: Sean Owen <[email protected]> Closes #4833 from srowen/SPARK-5628.2 and squashes the following commits: e723911 [Sean Owen] Backport of https://github.com/apache/spark/pull/4414 to 1.2: Add version option to spark-ec2 Project: http://git-wip-us.apache.org/repos/asf/spark/repo Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/5226dc74 Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/5226dc74 Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/5226dc74 Branch: refs/heads/branch-1.2 Commit: 5226dc74d85265771a3d26f046d9ea54871aff16 Parents: 576fc54 Author: Sean Owen <[email protected]> Authored: Sun Mar 1 09:20:36 2015 +0000 Committer: Sean Owen <[email protected]> Committed: Sun Mar 1 09:20:36 2015 +0000 ---------------------------------------------------------------------- ec2/spark_ec2.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/spark/blob/5226dc74/ec2/spark_ec2.py ---------------------------------------------------------------------- diff --git a/ec2/spark_ec2.py b/ec2/spark_ec2.py index b4283db..43311c2 100755 --- a/ec2/spark_ec2.py +++ b/ec2/spark_ec2.py @@ -39,9 +39,11 @@ import boto from boto.ec2.blockdevicemapping import BlockDeviceMapping, BlockDeviceType, EBSBlockDeviceType from boto import ec2 -DEFAULT_SPARK_VERSION = "1.2.1" +SPARK_EC2_VERSION = "1.2.2" SPARK_EC2_DIR = os.path.dirname(os.path.realpath(__file__)) +DEFAULT_SPARK_VERSION = SPARK_EC2_VERSION + MESOS_SPARK_EC2_BRANCH = "v4" # A URL prefix from which to fetch AMI information AMI_PREFIX = "https://raw.github.com/mesos/spark-ec2/{b}/ami-list".format(b=MESOS_SPARK_EC2_BRANCH) @@ -54,12 +56,10 @@ class UsageError(Exception): # Configure and parse our command-line arguments def parse_args(): parser = OptionParser( - usage="spark-ec2 [options] <action> <cluster_name>" - + "\n\n<action> can be: launch, destroy, login, stop, start, get-master, reboot-slaves", - add_help_option=False) - parser.add_option( - "-h", "--help", action="help", - help="Show this help message and exit") + prog="spark-ec2", + version="%prog {v}".format(v=SPARK_EC2_VERSION), + usage="%prog [options] <action> <cluster_name>\n\n" + + "<action> can be: launch, destroy, login, stop, start, get-master, reboot-slaves") parser.add_option( "-s", "--slaves", type="int", default=1, help="Number of slaves to launch (default: %default)") --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
