官术网_书友最值得收藏!

The SparkContext object

From a programming standpoint, you're going to be given a SparkContext object. Now remember when we first tested out Spark just to see if it was running, we ran something called Pyspark, which gave us an interactive shell for Spark, and that gave us an sc object automatically, which we could use to run operations on. Once you have that SparkContext object, you can use that for creating RDDs; it's a little bit more useful, obviously, to have a script you can actually run over and over again. So, in a case where you're actually running a stand-alone script, you will create that sc object by hand and initialize it the way you want to. Either way, sc stands for SparkContext, and from a programming standpoint, it is sort of a starting point that you have. This sc object gives you methods you need to actually create an RDD.

主站蜘蛛池模板: 浪卡子县| 凤凰县| 宁晋县| 嘉义县| 莱西市| 恭城| 屯门区| 治多县| 南郑县| 清原| 吉安市| 林州市| 开化县| 泰来县| 武安市| 屏边| 甘洛县| 昌乐县| 白山市| 汽车| 金阳县| 宜黄县| 和龙市| 贡觉县| 定远县| 白朗县| 高淳县| 淮滨县| 敖汉旗| 定安县| 乌兰浩特市| 宁乡县| 砚山县| 疏附县| 阳城县| 石泉县| 屏东县| 绥阳县| 陆川县| 犍为县| 巫山县|