You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Shivaram Venkataraman (JIRA)" <ji...@apache.org> on 2015/06/18 00:57:00 UTC

[jira] [Commented] (SPARK-6218) Upgrade spark-ec2 from optparse to argparse

    [ https://issues.apache.org/jira/browse/SPARK-6218?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14590791#comment-14590791 ] 

Shivaram Venkataraman commented on SPARK-6218:
----------------------------------------------

[~nchammas] I just updated the target version to 1.5.0 for this. FWIW I don't have a strong opinion about which argument parsing library we use as long we can maintain compatibility with Python 2.6

> Upgrade spark-ec2 from optparse to argparse
> -------------------------------------------
>
>                 Key: SPARK-6218
>                 URL: https://issues.apache.org/jira/browse/SPARK-6218
>             Project: Spark
>          Issue Type: Improvement
>          Components: EC2
>            Reporter: Nicholas Chammas
>            Priority: Minor
>
> spark-ec2 [currently uses optparse|https://github.com/apache/spark/blob/55b1b32dc8b9b25deea8e5864b53fe802bb92741/ec2/spark_ec2.py#L43].
> In Python 2.7, optparse was [deprecated in favor of argparse|https://docs.python.org/2/library/optparse.html]. This is the main motivation for moving away from optparse.
> Additionally, upgrading to argparse provides some [additional benefits noted in the docs|https://argparse.googlecode.com/svn/trunk/doc/argparse-vs-optparse.html]. The one we are mostly likely to benefit from is the better input validation.
> Specifically, being able to cleanly tie each input parameter to a validation method will cut down the input validation code currently spread out across the script.
> argparse is not include with Python 2.6, which is currently the minimum version of Python we support in Spark, but it can easily be downloaded by spark-ec2 with the work that has already been done in SPARK-6191.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org