diff options
author | Matei Zaharia <matei@eecs.berkeley.edu> | 2013-08-31 22:38:32 -0700 |
---|---|---|
committer | Matei Zaharia <matei@eecs.berkeley.edu> | 2013-09-01 14:13:16 -0700 |
commit | bbaa9d7d6e2eef59ff58f97af69dbc5e1cdff82d (patch) | |
tree | 9ae402c23da3bb2f42cfb5f67648afec2125bc4a /python/pyspark | |
parent | 12495ec63ab56e4352bc466ac37c95921f685dc3 (diff) | |
download | spark-bbaa9d7d6e2eef59ff58f97af69dbc5e1cdff82d.tar.gz spark-bbaa9d7d6e2eef59ff58f97af69dbc5e1cdff82d.tar.bz2 spark-bbaa9d7d6e2eef59ff58f97af69dbc5e1cdff82d.zip |
Add banner to PySpark and make wordcount output nicer
Diffstat (limited to 'python/pyspark')
-rw-r--r-- | python/pyspark/shell.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/python/pyspark/shell.py b/python/pyspark/shell.py index 9b4b4e78cb..54823f8037 100644 --- a/python/pyspark/shell.py +++ b/python/pyspark/shell.py @@ -21,6 +21,7 @@ An interactive shell. This file is designed to be launched as a PYTHONSTARTUP script. """ import os +import platform import pyspark from pyspark.context import SparkContext @@ -28,6 +29,18 @@ from pyspark.context import SparkContext add_files = os.environ.get("ADD_FILES").split(',') if os.environ.get("ADD_FILES") != None else None sc = SparkContext(os.environ.get("MASTER", "local"), "PySparkShell", pyFiles=add_files) + +print """Welcome to + ____ __ + / __/__ ___ _____/ /__ + _\ \/ _ \/ _ `/ __/ '_/ + /__ / .__/\_,_/_/ /_/\_\ version 0.8.0 + /_/ +""" +print "Using Python version %s (%s, %s)" % ( + platform.python_version(), + platform.python_build()[0], + platform.python_build()[1]) print "Spark context avaiable as sc." if add_files != None: |