title: SparkSession taking too long on a local standalone cluster
body: <p>I'm quite new to Big Data and currently I'm learning Apache Spark. I've created a standalone cluster with a master and one slave in the same machine. SPARK_WORKER_MEMORY is set to "1g" and SPARK_LOCAL_IP points to my ip address. So, I wrote a python code to simply create a SparkSession:</p>
  
  <pre><code>from pyspark.sql import SparkSession
  from time import time
  
  def main( ):
      start_time = time( )
      sparkSession = ( SparkSession.builder
                                   .master( "spark://nilson:7077" )
                                   .appName( "pyclient" )
                                   .config( "spark.executor.memory", "512m" )
                                   .getOrCreate( ) )
  
      elapsed_time = time( ) - start_time
  
      print ("\n\nelapsed time: %.4gs" %elapsed_time)
      return
  
  if __name__ == '__main__':
      main( )
  </code></pre>
  
  <p>It is taking almost 6 seconds, as you can see
  <a href="https://i.stack.imgur.com/hefpr.png" rel="nofollow noreferrer">here</a></p>
  
  <p>So, my question is:</p>
  
  <p>Does it really take this time or there is something missing in my environment variables?</p>
  
  <p>I also tried to read a simple json file which contains just two lines of data. The whole process took almost 13 seconds to open it and print its content.</p>
  
  <p>Thank you.</p>