以后spark,mapreduce,mpi可能三者集于同一平台,各自的侧重点有所不用,相当于云计算与高性能计算的集合,互补,把spark的基础看了看,现在把开发环境看看,主要是看源码,最近Apache Spark源码走读系列挺好的,看了些。具体环境配置不是太复杂,具体可以看https://github.com/apache/spark

1、代码下载

git clone  https://github.com/apache/spark.git

2、直接构建spark

我是基于hadoop2.2.0的,因此执行如下:

SPARK_HADOOP_VERSION=2.2.0 SPARK_YARN=true sbt/sbt assembly

3、具体使用参考https://github.com/apache/spark

Interactive Scala Shell

The easiest way to start using Spark is through the Scala shell:

./bin/spark-shell

Try the following command, which should return 1000:

scala> sc.parallelize(1 to 1000).count()

Interactive Python Shell

Alternatively, if you prefer Python, you can use the Python shell:

./bin/pyspark

And run the following command, which should also return 1000:

>>> sc.parallelize(range(1000)).count()

Example Programs

Spark also comes with several sample programs in the examples directory. To run one of them, use./bin/run-example <class> [params]. For example:

./bin/run-example SparkPi

will run the Pi example locally.

You can set the MASTER environment variable when running examples to submit examples to a cluster. This can be a mesos:// or spark:// URL, "yarn-cluster" or "yarn-client" to run on YARN, and "local" to run locally with one thread, or "local[N]" to run locally with N threads. You can also use an abbreviated class name if the class is in the examples package. For instance:

MASTER=spark://host:7077 ./bin/run-example SparkPi

Many of the example programs print usage help if no params are given.

Running Tests

Testing first requires building Spark. Once Spark is built, tests can be run using:

./sbt/sbt test

使用IDE,安装 Intellj Idea,并安装scala插件

去idea官网下载idea的tar.gz包,解压就行。运行idea,安装scala插件。

在源码根目录,使用如下命令

./sbt/sbt gen-idea

就生成了idea项目文件。使用 idea,点击File->Open project,浏览到 incubator-spark文件夹,打开项目,就可以修改Spark代码了。

具体参考:https://github.com/apache/spark

http://cn.soulmachine.me/blog/20140130/

spark开发环境配置的更多相关文章

  1. windows下spark开发环境配置

    http://www.cnblogs.com/davidwang456/p/5032766.html windows下spark开发环境配置 --本篇随笔由同事葛同学提供. windows下spark ...

  2. Hadoop/Spark开发环境配置

    修改hostname bogon 为localhost 查看ip地址 [training@bogon ~]$ sudo hostname localhost [training@bogon ~]$ h ...

  3. Jupyter配置Spark开发环境

    兄弟连大数据培训和大家一起探究Jupyter配置 Spark 开发环境 简介 为Jupyter配置Spark开发环境,可以安装全家桶–Spark Kernel或Toree,也可按需安装相关组件. 考虑 ...

  4. Windows下单机安装Spark开发环境

    机器:windows 10 64位. 因Spark支持java.python等语言,所以尝试安装了两种语言环境下的spark开发环境. 1.Java下Spark开发环境搭建 1.1.jdk安装 安装o ...

  5. Spark编译及spark开发环境搭建

    最近需要将生产环境的spark1.3版本升级到spark1.6(尽管spark2.0已经发布一段时间了,稳定可靠起见,还是选择了spark1.6),同时需要基于spark开发一些中间件,因此需要搭建一 ...

  6. Intellij IDEA使用Maven搭建spark开发环境(scala)

    如何一步一步地在Intellij IDEA使用Maven搭建spark开发环境,并基于scala编写简单的spark中wordcount实例. 1.准备工作 首先需要在你电脑上安装jdk和scala以 ...

  7. Spark开发环境

    1. Win7下利用Intellij IDEA构建Spark开发环境 前提:Intellij IDEA Community 免费版下载(最新版14.0.1),Scala插件下载(最新版scala-in ...

  8. 分别用Eclipse和IDEA搭建Scala+Spark开发环境

    开发机器上安装jdk1.7.0_60和scala2.10.4,配置好相关环境变量.网上资料很多,安装过程忽略.此外,Eclipse使用Luna4.4.1,IDEA使用14.0.2版本. 1. Ecli ...

  9. PyCharm搭建Spark开发环境 + 第一个pyspark程序

    一, PyCharm搭建Spark开发环境 Windows7, Java 1.8.0_74, Scala 2.12.6, Spark 2.2.1, Hadoop 2.7.6 通常情况下,Spark开发 ...

随机推荐

  1. spring 配置 shiro rememberMe

    1.shiro 提供记住我的功能,当将form表单中name="rememberMe" 的value设为true或者登陆的token中.token.setRememberMe(tr ...

  2. 4 Visual Effects 视觉效果 读书笔记 第四章

    4   Visual Effects    视觉效果        读书笔记 第四章 Well, circles and ovals are good, but how about drawing r ...

  3. 使用Let's Encrypt 生成免费的ssl证书的详细过程

    参考连接:https://github.com/diafygi/acme-tiny 中文:https://hacpai.com/article/1487899289204 目前我了解可以生成免费证书的 ...

  4. 使用python划分数据集

    无论是训练机器学习或是深度学习,第一步当然是先划分数据集啦,今天小白整理了一些划分数据集的方法,希望大佬们多多指教啊,嘻嘻~ 首先看一下数据集的样子,flower_data文件夹下有四个文件夹,每个文 ...

  5. Java基础(十四)--装箱、拆箱详解

    Java中基本数据类型都有相对应的包装类 什么是装箱?什么是拆箱? 在Java SE5之前,Integer是这样初始化的 Integer i = new Integer(10); 而在从Java SE ...

  6. WebStorm改变字体大小以及更换背景颜色

    参考文章:https://blog.csdn.net/weixin_42676530/article/details/82961279

  7. idea开启/关闭单词拼写检查

  8. scikit-learn - 分类模型的评估 (classification_report)

    使用说明 参数 sklearn.metrics.classification_report(y_true, y_pred, labels=None, target_names=None, sample ...

  9. Linux从入门到适应(二):更换清华源

    1 进入到/etc/apt文件夹当中,找到sources.list,将其备份.命令:cp -p sources.list sources.list.old 2 采用管理员方式打开sources.lis ...

  10. Redis Hashes 巧用sort排序

    假设我们有如下的数据结构: 我们想按download排序,并且返回hash中的其他field,需要怎么处理呢? 我们首先会想到sort命令.对,就是这个sort. 我们先看一下sort的语法: 可以看 ...