[SPARK-23522][PYTHON] always use sys.exit over builtin exit
authorBenjamin Peterson <benjamin@python.org>
Thu, 8 Mar 2018 11:38:34 +0000 (20:38 +0900)
committerhyukjinkwon <gurwls223@gmail.com>
Thu, 8 Mar 2018 11:38:34 +0000 (20:38 +0900)
commit7013eea11cb32b1e0038dc751c485da5c94a484b
treedb62737a2f4aa25f0500268d0e1574ce7d4463e9
parent2cb23a8f51a151970c121015fcbad9beeafa8295
[SPARK-23522][PYTHON] always use sys.exit over builtin exit

The exit() builtin is only for interactive use. applications should use sys.exit().

## What changes were proposed in this pull request?

All usage of the builtin `exit()` function is replaced by `sys.exit()`.

## How was this patch tested?

I ran `python/run-tests`.

Please review http://spark.apache.org/contributing.html before opening a pull request.

Author: Benjamin Peterson <benjamin@python.org>

Closes #20682 from benjaminp/sys-exit.
79 files changed:
dev/merge_spark_pr.py
dev/run-tests.py
examples/src/main/python/avro_inputformat.py
examples/src/main/python/kmeans.py
examples/src/main/python/logistic_regression.py
examples/src/main/python/ml/dataframe_example.py
examples/src/main/python/mllib/correlations.py
examples/src/main/python/mllib/kmeans.py
examples/src/main/python/mllib/logistic_regression.py
examples/src/main/python/mllib/random_rdd_generation.py
examples/src/main/python/mllib/sampled_rdds.py
examples/src/main/python/mllib/streaming_linear_regression_example.py
examples/src/main/python/pagerank.py
examples/src/main/python/parquet_inputformat.py
examples/src/main/python/sort.py
examples/src/main/python/sql/streaming/structured_kafka_wordcount.py
examples/src/main/python/sql/streaming/structured_network_wordcount.py
examples/src/main/python/sql/streaming/structured_network_wordcount_windowed.py
examples/src/main/python/streaming/direct_kafka_wordcount.py
examples/src/main/python/streaming/flume_wordcount.py
examples/src/main/python/streaming/hdfs_wordcount.py
examples/src/main/python/streaming/kafka_wordcount.py
examples/src/main/python/streaming/network_wordcount.py
examples/src/main/python/streaming/network_wordjoinsentiments.py
examples/src/main/python/streaming/recoverable_network_wordcount.py
examples/src/main/python/streaming/sql_network_wordcount.py
examples/src/main/python/streaming/stateful_network_wordcount.py
examples/src/main/python/wordcount.py
python/pyspark/accumulators.py
python/pyspark/broadcast.py
python/pyspark/conf.py
python/pyspark/context.py
python/pyspark/daemon.py
python/pyspark/find_spark_home.py
python/pyspark/heapq3.py
python/pyspark/ml/classification.py
python/pyspark/ml/clustering.py
python/pyspark/ml/evaluation.py
python/pyspark/ml/feature.py
python/pyspark/ml/image.py
python/pyspark/ml/linalg/__init__.py
python/pyspark/ml/recommendation.py
python/pyspark/ml/regression.py
python/pyspark/ml/stat.py
python/pyspark/ml/tuning.py
python/pyspark/mllib/classification.py
python/pyspark/mllib/clustering.py
python/pyspark/mllib/evaluation.py
python/pyspark/mllib/feature.py
python/pyspark/mllib/fpm.py
python/pyspark/mllib/linalg/__init__.py
python/pyspark/mllib/linalg/distributed.py
python/pyspark/mllib/random.py
python/pyspark/mllib/recommendation.py
python/pyspark/mllib/regression.py
python/pyspark/mllib/stat/_statistics.py
python/pyspark/mllib/tree.py
python/pyspark/mllib/util.py
python/pyspark/profiler.py
python/pyspark/rdd.py
python/pyspark/serializers.py
python/pyspark/shuffle.py
python/pyspark/sql/catalog.py
python/pyspark/sql/column.py
python/pyspark/sql/conf.py
python/pyspark/sql/context.py
python/pyspark/sql/dataframe.py
python/pyspark/sql/functions.py
python/pyspark/sql/group.py
python/pyspark/sql/readwriter.py
python/pyspark/sql/session.py
python/pyspark/sql/streaming.py
python/pyspark/sql/types.py
python/pyspark/sql/udf.py
python/pyspark/sql/window.py
python/pyspark/streaming/util.py
python/pyspark/util.py
python/pyspark/worker.py
python/setup.py