Skip to content

Commit

Permalink
更新:pom、Spark 版本、程序注释
Browse files Browse the repository at this point in the history
  • Loading branch information
lw-lin committed Mar 23, 2016
1 parent 7452e9e commit 9d9f645
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 11 deletions.
4 changes: 4 additions & 0 deletions Spark 样例工程/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
*.iml
*/.idea
*/target
*.class
25 changes: 15 additions & 10 deletions Spark 样例工程/spark_hello_world/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,30 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>com.github.proflin.spark</groupId>
<groupId>com.github.lw_lin.spark</groupId>
<artifactId>spark_hello_world</artifactId>
<version>1.0-SNAPSHOT</version>

<properties>
<scala.version>2.10</scala.version>
<spark.version>1.6.0</spark.version>
</properties>

<dependencies>
<dependency>
<groupId>org.apache.spark</groupId>
<artifactId>spark-core_2.10</artifactId>
<version>1.5.1</version>
<artifactId>spark-core_${scala.version}</artifactId>
<version>${spark.version}</version>
</dependency>
<dependency>
<groupId>org.apache.spark</groupId>
<artifactId>spark-sql_2.10</artifactId>
<version>1.5.1</version>
<artifactId>spark-sql_${scala.version}</artifactId>
<version>${spark.version}</version>
</dependency>
<dependency>
<groupId>org.apache.spark</groupId>
<artifactId>spark-streaming_2.10</artifactId>
<version>1.5.1</version>
<artifactId>spark-streaming_${scala.version}</artifactId>
<version>${spark.version}</version>
</dependency>
</dependencies>

Expand Down Expand Up @@ -50,15 +55,15 @@
<configuration>
<recompileMode>incremental</recompileMode>
<args>
<arg>-target:jvm-1.7</arg>
<arg>-target:jvm-1.6</arg>
<arg>-encoding</arg>
<arg>UTF-8</arg>
</args>
<javacArgs>
<javacArg>-source</javacArg>
<javacArg>1.7</javacArg>
<javacArg>1.6</javacArg>
<javacArg>-target</javacArg>
<javacArg>1.7</javacArg>
<javacArg>1.6</javacArg>
</javacArgs>
</configuration>
</plugin>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
package com.github.proflin.spark
package com.github.lw_lin.spark

import org.apache.spark.{SparkContext, SparkConf}

/**
* This program can be downloaded at:
* https://github.com/lw-lin/CoolplaySpark/tree/master/Spark%20%E6%A0%B7%E4%BE%8B%E5%B7%A5%E7%A8%8B/spark_hello_world
*/
object SparkHelloWorld {

def main(args: Array[String]) {
val conf = new SparkConf()
conf.setAppName("SparkHelloWorld")
Expand Down

0 comments on commit 9d9f645

Please sign in to comment.