Github user JoshRosen commented on the pull request:
https://github.com/apache/spark/pull/2351#issuecomment-56863846
I noticed that we don't have any automated tests for `show_profiles()`, so
I tested it manually and found a problem when running this file through
`spark-submit`:
```python
from pyspark import SparkContext, SparkConf
conf = SparkConf()
conf.set("spark.python.profile", "true")
sc = SparkContext(appName="test", conf=conf)
count = sc.parallelize(range(10000)).count()
sc.show_profiles()
```
This results in:
```
Traceback (most recent call last):
File "/Users/joshrosen/Documents/spark/test.py", line 6, in <module>
sc.show_profiles()
File "/Users/joshrosen/Documents/Spark/python/pyspark/context.py", line
811, in show_profiles
for i, (id, acc, showed) in self._profile_stats:
ValueError: too many values to unpack
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
File "/Users/joshrosen/anaconda/lib/python2.7/atexit.py", line 24, in
_run_exitfuncs
func(*targs, **kargs)
File "/Users/joshrosen/Documents/Spark/python/pyspark/context.py", line
811, in show_profiles
for i, (id, acc, showed) in self._profile_stats:
ValueError: too many values to unpack
Error in sys.exitfunc:
Traceback (most recent call last):
File "/Users/joshrosen/anaconda/lib/python2.7/atexit.py", line 24, in
_run_exitfuncs
func(*targs, **kargs)
File "/Users/joshrosen/Documents/Spark/python/pyspark/context.py", line
811, in show_profiles
for i, (id, acc, showed) in self._profile_stats:
ValueError: too many values to unpack
```
Can we add a test for this, too?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]