title: pyspark: run a python script and see results on commandline
body: <p>I execute a python script file in pyspark 1.6.2 (yes an old one for certification training reasons).</p>
  
  <pre><code>spark-submit --master yarn-cluster s01.py
  </code></pre>
  
  <p>when run it just returns "Application report for application_somelongnumber". What I was expecting, was that it shows the output of my script-command. So that I can check if I developed correctly. What should I do better to get what I want?</p>
  
  <p>The content of my script:</p>
  
  <pre><code>#!/usr/bin/python
  
  from pyspark.sql import Row
  from pyspark.sql.functions import *
  from pyspark import SparkContext
  sc = SparkContext(appName = "solution01")
  
  a = sc.textFile("/data/crime.csv")
  b = a.take(1)
  sc.stop()
  print(b)
  </code></pre>
  
  <p><em>UPDATE</em>
  : When I execute pyspark s01.py I see my results but that is not the intended behaviour, because I want it to be executed with parameters on the cluster.</p>