Skip to content

Conversation

@MechCoder
Copy link
Contributor

What changes were proposed in this pull request?

I would like to change

if hash python2.7 2>/dev/null; then
  # Attempt to use Python 2.7, if installed:
  DEFAULT_PYTHON="python2.7"
else
  DEFAULT_PYTHON="python"
fi

to just DEFAULT_PYTHON="python"

I'm not sure if it is a great assumption that python2.7 is used by default, when python points to something else.

How was this patch tested?

(Please explain how this patch was tested. E.g. unit tests, integration tests, manual tests)

(If this patch involves UI changes, please attach a screenshot; otherwise, remove this)

@MechCoder
Copy link
Contributor Author

ping @srowen @JoshRosen

@JoshRosen
Copy link
Contributor

If I recall, the original motivation for preferring the python2.7 executable to plain python was that python might be Python 2.6 on older CentOS / RHEL systems and certain parts of PySpark performance are adversely impacted by Python 2.6. Given that we're planning to drop Python 2.6 support, this may no longer be necessary.

@MechCoder
Copy link
Contributor Author

Thanks for clarifying! It might be a good time to get rid of it..

bin/pyspark Outdated
else
DEFAULT_PYTHON="python"
fi
DEFAULT_PYTHON="python"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't even need to be a variable anymore right?

@MechCoder
Copy link
Contributor Author

@srowen fixed.

@SparkQA
Copy link

SparkQA commented Jul 1, 2016

Test build #61623 has finished for PR 14016 at commit 4661493.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Jul 1, 2016

Test build #61632 has finished for PR 14016 at commit 01c405b.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Jul 1, 2016

Test build #61633 has finished for PR 14016 at commit 871281d.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@srowen
Copy link
Member

srowen commented Jul 4, 2016

Is this safe to merge for 2.0.0? I don't think Python 2.6 support is officially gone yet. It seems OK for master at least, and you can of course force a version of Python if needed.

If it's only for master we should not attach this to SPARK-15761

@MechCoder MechCoder changed the title [SPARK-15761] [FOLLOWUP] Set DEFAULT_PYTHON to python [SPARK-16399] Force PYSPARK_PYTHON to python Jul 6, 2016
@MechCoder
Copy link
Contributor Author

I agree with you, I created a new JIRA and renamed the title.

@MechCoder MechCoder changed the title [SPARK-16399] Force PYSPARK_PYTHON to python [SPARK-16399] [PYSPARK] Force PYSPARK_PYTHON to python Jul 7, 2016
@srowen
Copy link
Member

srowen commented Jul 7, 2016

Merged to master

@asfgit asfgit closed this in 6343f66 Jul 7, 2016
@MechCoder MechCoder deleted the followup branch July 7, 2016 16:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants