Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add README #9

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions Spark 样例工程/spark_hello_world/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# 如何将这个 Hello world 在mac上用idea跑起来 #


## 一、安装JDK

首先没有安装JKD的小伙伴可以按照以下步骤安装jkd。

1. 首先可以到[官网](http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html)下载自己对应的版本,我这里下载的是jdk-8u65-macosx-x64.dmg这个mac版本的。
2. 对于mac用户来说安装上面的文件就行了。

## 二、安装Scala

1. 首先可以到[官网](http://www.scala-lang.org/download/)下载自己对应的版本,我这里下载的是 2.11.7这个版本的。
2. 将下载好的scala解压,我这里是解压到
![image](imgs/1.png)
这个目录下面的。
3. 设置环境变量:vim ~/.bash_profile,在里面添加scala的路径:
![image](imgs/2.png)
4. 让它生效:source ~/.bash_profile
5. 验证一下:![image](imgs/5.png)

## 三、安装Spark

1. 首先可以到[官网](http://www.scala-lang.org/download/)下载自己对应的版本,我这里下载的是 spark-1.5.0-bin-hadoop2.4 这个预编译版本的。
2. 将下载好的scala解压,我这里是解压到
![image](imgs/3.png)
这个目录下面的。
3. 设置环境变量:vim ~/.bash_profile,在里面添加spark的路径:
![image](imgs/4.png)
4. 让它生效:source ~/.bash_profile

## 四、安装Maven

1. 首先可以到[官网](http://maven.apache.org/download.cgi)下载自己对应的版本。
2. 将下载好的maven解压,我这里是解压到
![image](imgs/6.png)
这个目录下面的。
3. 设置环境变量:vim ~/.bash_profile,在里面添加maven的路径:
![image](imgs/7.png)
4. 让它生效:source ~/.bash_profile

## 五、克隆本项目

1. git clone https://github.com/proflin/CoolplaySpark.git
2. 在idea里面导入这个项目:File->New->Project from Esisting Sources..
![image](imgs/8.png)
3. 之后等待idea漫长的导包过程...
4. 完毕之后可以看到项目的结构是这样的
![image](imgs/9.png)
5. 右键:![image](imgs/10.png)
6. 看一下UI界面:![image](imgs/11.png)
7. 看到这个界面,之后你就可以愉快的玩耍Spark了😄

Binary file added Spark 样例工程/spark_hello_world/imgs/1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Spark 样例工程/spark_hello_world/imgs/10.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Spark 样例工程/spark_hello_world/imgs/11.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Spark 样例工程/spark_hello_world/imgs/2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Spark 样例工程/spark_hello_world/imgs/3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Spark 样例工程/spark_hello_world/imgs/4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Spark 样例工程/spark_hello_world/imgs/5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Spark 样例工程/spark_hello_world/imgs/6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Spark 样例工程/spark_hello_world/imgs/7.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Spark 样例工程/spark_hello_world/imgs/8.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Spark 样例工程/spark_hello_world/imgs/9.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.