GithubHelp home page GithubHelp logo

spark-kafka-demo's Introduction

spark-kafka整合案例

  • com.hz.streaming.message.Message 是处理消息的超类
  • com.hz.streaming.SparkStreamingKafka 主函数

yarn 提交语句:

spark-submit \
--class com.hz.streaming.SparkStreamingKafka \
--master yarn \
--deploy-mode cluster \
--executor-memory 1G \
--num-executors 1 \
--files /opt/app/config.properties \
/opt/app/target/kafka_Spark-1.0-SNAPSHOT.jar
/opt/app/config.properties
----------------------------------------------
standlone 提交语句

spark-submit \
--class com.hz.streaming.SparkStreamingKafka \
--master spark://hz:7077 \
--executor-memory 1G \
--num-executors 1 \
/opt/app/target/kafka_Spark-1.0-SNAPSHOT.jar
  1. --files 附加的配置文件等
  2. 最后为jar包 以及相关参数(主函数的参数)

config.properties配置

duration=15   //时间窗口、间隔
bootstrap.servers=10.211.55.5:9092    //kafka 地址
topic=test      //消费主题
group.id=kafka  //消费组
message.class=com.hz.streaming.message.messageImpl.MessageOutput //处理消息执行类

spark-kafka-demo's People

Contributors

benwudan avatar fastzhe avatar

Watchers

 avatar

Forkers

vaquarkhan

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.