what does load() do in spark?
问题 spark is lazy right? so what does load() do? start = timeit.default_timer() df = sqlContext.read.option( "es.resource", indexes ).format("org.elasticsearch.spark.sql") end = timeit.default_timer() print('without load: ', end - start) # almost instant start = timeit.default_timer() df = df.load() end = timeit.default_timer() print('load: ', end - start) # takes 1sec start = timeit.default_timer() df.show() end = timeit.default_timer() print('show: ', end - start) # takes 4 sec If show() is the