码迷,mamicode.com
首页 > 编程语言 > 详细

build jar(sbt)

时间:2017-09-27 00:52:55      阅读:221      评论:0      收藏:0      [点我收藏+]

标签:group   .com   class   href   get   参数   depend   mit   park   

project 中遇到

log file & project file

build.sbt

startup.sh

> sh startup.sh

example:

.sbt

name := "Simple Project" //project name
version := "1.0"  //project version
scalaVersion := "2.11.8" //scala version
libraryDependencies += "org.apache.spark" %% "spark-core" % "2.1.0"
libraryDependencies += "org.apache.spark" % "spark-streaming_2.11" % "2.1.0"
libraryDependencies += "org.apache.spark" % "spark-streaming-kafka-0-8_2.11" % "2.1.0"
libraryDependencies += "org.json4s" %% "json4s-jackson" % "3.2.11"
//all
Dependencies should be aware of the version compatibility

sh

 /usr/local/spark/bin/spark-submit --driver-class-path /usr/local/spark/jars/*:/usr/local/spark/jars/kafka/* --class "org.apache.spark.examples.streaming.KafkaWordCount" /usr/local/spark/mycode/kafka/target/scala-2.11/simple-project_2.11-1.0.jar 127.0.0.1:2181 1 sex 1
spark-submit目录 
参数:
--driver-class-path  spark中的所有jars以及kafka中所有jars

--class  工程文件main所在class + 生成的jar的位置
127.0.0.1:2181 : zookeeper-server kafka-server ip+port

1 sex 1: consumer group;topics; number of consumers

REFERENCE:
http://dblab.xmu.edu.cn

 

 

 

build jar(sbt)

标签:group   .com   class   href   get   参数   depend   mit   park   

原文地址:http://www.cnblogs.com/yumanman/p/7599548.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!