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

Installing the prebuilt distribution

Let's download prebuilt Spark and install it. Later, we will also compile a version and build from the source. The download is straightforward. The download page is at http://spark.apache.org/downloads.html. Select the options as shown in the following screenshot:

We will use wget from the command line. You can do a direct download as well:

cd /opt
sudo wget http://www-us.apache.org/dist/spark/spark-2.0.0/spark-2.0.0-bin-hadoop2.7.tgz

We are downloading the prebuilt version for Apache Hadoop 2.7 from one of the possible mirrors. We could have easily downloaded other prebuilt versions as well, as shown in the following screenshot:

To uncompress it, execute the following command:

sudo tar xvf spark-2.0.0-bin-hadoop2.7.tgz

To test the installation, run the following command:

/opt/spark-2.0.0-bin-hadoop2.7/bin/run-example SparkPi 10

It will fire up the Spark stack and calculate the value of Pi. The result will be as shown in the following screenshot:

主站蜘蛛池模板: 天镇县| 虹口区| 峨山| 交城县| 沙河市| 荔波县| 宁夏| 贵南县| 汽车| 通江县| 榆树市| 东平县| 登封市| 民丰县| 鸡泽县| 东乡县| 琼海市| 垫江县| 应城市| 祁阳县| 桂林市| 年辖:市辖区| 兴宁市| 苍溪县| 河曲县| 宁晋县| 乐东| 白河县| 南开区| 民勤县| 皮山县| 荆门市| 论坛| 天柱县| 贵港市| 塔城市| 连江县| 水城县| 滦平县| 那坡县| 屯留县|