kafka+storm集成并运行demo-单机

大数据进阶实战 | 精选几个硬核GitHub项目,助你从入门到精通 本文精选了几个硬核GitHub项目,帮助大数据开发者从入门到精通。通过真实生产环境配置、性能调优手册和架构设计文档,这些项目如God-Of-BigData、Flink-Learning和Awesome-BigData,提供了企业级调优实战、源码级深度理解和技术选型指南,助力开发者快速掌握PB级数据处理技巧。 阅读详情

1,安装环境jdk1.7,kafka_2.9.2-0.8.1.1.tgz,zookeeper-3.3.6.tar.gz,apache-storm-0.9.2-incubating.tar.gz

2,安装kafka:

I,配置kafka/conf/server.properties

# The id of the broker. This must be set to a unique integer for each broker.
broker.id=0

############################# Socket Server Settings #############################

# The port the socket server listens on
port=9092

# Hostname the broker will bind to. If not set, the server will bind to all interfaces
host.name=node

# Hostname the broker will advertise to producers and consumers. If not set, it uses the
# value for "host.name" if configured.  Otherwise, it will use the value returned from
# java.net.InetAddress.getCanonicalHostName().
advertised.host.name=node

# The port to publish to ZooKeeper for clients to use. If this is not set,
# it will publish the same port that the broker binds to.
#advertised.port=<port accessible by clients>

# The number of threads handling network requests
num.network.threads=2

# The number of threads doing disk I/O
num.io.threads=8

# The send buffer (SO_SNDBUF) used by the socket server
socket.send.buffer.bytes=1048576

# The receive buffer (SO_RCVBUF) used by the socket server
socket.receive.buffer.bytes=1048576

# The maximum size of a request that the socket server will accept (protection against OOM)
socket.request.max.bytes=104857600


############################# Log Basics #############################

# A comma seperated list of directories under which to store log files
log.dirs=/Users/eleme/ruson/tmp/kafka-logs

# The default number of log partitions per topic. More partitions allow greater
# parallelism for consumption, but this will also result in more files across
# the brokers.
num.partitions=2

# The maximum size of a log segment file. When this size is reached a new log segment will be created.
log.segment.bytes=536870912

# The interval at which log segments are checked to see if they can be deleted according
# to the retention policies
log.retention.check.interval.ms=60000

# By default the log cleaner is disabled and the log retention policy will default to just delete segments after their retention expires.
# If log.cleaner.enable=true is set the cleaner will be enabled and individual logs can then be marked for log compaction.
log.cleaner.enable=false

############################# Zookeeper #############################

# Zookeeper connection string (see zookeeper docs for details).
# This is a comma separated host:port pairs, each corresponding to a zk
# server. e.g. "127.0.0.1:3000,127.0.0.1:3001,127.0.0.1:3002".
# You can also append an optional chroot string to the urls to specify the
# root directory for all kafka znodes.
zookeeper.connect=node:2181

# Timeout in ms for connecting to zookeeper
zookeeper.connection.timeout.ms=1000000

II,修改kafka/conf/zookeeper.properties

# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements.  See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License.  You may obtain a copy of the License at
#
#    http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# the directory where the snapshot is stored.
dataDir=/Users/eleme/ruson/tmp/zookeeper
# the port at which the clients will connect
clientPort=2181
# disable the per-ip limit on the number of connections since this is a non-production config
maxClientCnxns=0
III,启动kafka是否成功:

a,启动zookepper:bin/zookeeper-server-start.sh config/zookeeper.properties &

b,启动kafka:bin/kafka-server-start.sh config/server.properties & 
c,查看是否启动成功:jps

有如下两个进程说明启动成功:

1942 Kafka

1845 QuorumPeerMain


d,在一个窗口运行produce:

bin/kafka-console-producer.sh --broker-list localhost:9092 --topic test

e,打开另一个窗口运行consumer

bin/kafka-console-consumer.sh --zookeeper localhost:2181 --topic test --from-beginning 

3,安装storm:

I,修改conf/storm.yaml文件

 

########### These MUST be filled in for a storm configuration
 storm.zookeeper.servers:
     - "node"
#     - "server2"
#
 nimbus.host: "node"

 storm.local.dir: "/Users/eleme/ruson/tmp/storm"
 supervisor.slots.ports:
  - 6700
  - 6701
  - 6702
  - 6703
#
#
# ##### These may optionally be filled in:
#
## List of custom serializations
# topology.kryo.register:
#     - org.mycompany.MyType
#     - org.mycompany.MyType2: org.mycompany.MyType2Serializer

II,运行storm之前,要单独安装zookeeper

  修改

/Users/eleme/ruson/zookeeper-3.3.6/conf/zoo.cfg文件

# The number of milliseconds of each tick
tickTime=2000
# The number of ticks that the initial
# synchronization phase can take
initLimit=10
# The number of ticks that can pass between
# sending a request and getting an acknowledgement
syncLimit=5
# the directory where the snapshot is stored.
dataDir=/Users/eleme/ruson/tmp/zookeeper
logDir=Users/eleme/ruson/tmp/zookeeper/log.log
# the port at which the clients will connect
clientPort=2181
server.1=127.0.0.1:2888:3888


III,验证storm是否成功:

1,启动zookepper:

./zookeeper-3.3.6/bin/zkServer.sh start

2,分别启动:

./storm nimbus 

./storm ui

./storm supervisor 


4,在运行kafka和storm集成的例子之前,先分别启动

./zookeeper-3.3.6/bin/zkServer.sh start

./kafka_2.9.2-0.8.1.1/bin/kafka-server-start.sh kafka_2.9.2-0.8.1.1/config/server.properties 

./apache-storm-0.9.2-incubating/bin/storm nimbus

./apache-storm-0.9.2-incubating/bin/storm ui

./apache-storm-0.9.2-incubating/bin/storm supervisor


java code:

KafkaSpouttest.java文件

package com.test.stormkafka;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Properties;
import kafka.consumer.ConsumerConfig;
import kafka.consumer.ConsumerIterator;
import kafka.consumer.KafkaStream;
import kafka.javaapi.consumer.ConsumerConnector;
import backtype.storm.spout.SpoutOutputCollector;
import backtype.storm.task.TopologyContext;
import backtype.storm.topology.IRichSpout;
import backtype.storm.topology.OutputFieldsDeclarer;
import backtype.storm.tuple.Fields;
import backtype.storm.tuple.Values;
 
/**
 * demo1
 * @author eleme
 *
 */
public class KafkaSpouttest implements IRichSpout {
     
    private SpoutOutputCollector collector;
    private ConsumerConnector consumer;
    private String topic;
 
    public KafkaSpouttest() {
    }
     
    public KafkaSpouttest(String topic) {
        this.topic = topic;
    }
 
    public void nextTuple() {
    }
 
    public void open(Map conf, TopologyContext context, SpoutOutputCollector collector) {
        this.collector = collector;
    }
 
    public void ack(Object msgId) {
    }
 
    public void activate() {
         
    	consumer =kafka.consumer.Consumer.createJavaConsumerConnector(createConsumerConfig());
    	Map<String,Integer> topickMap = new HashMap<String, Integer>();
        topickMap.put(topic, 1);  
 
        System.out.println("*********Results********topic:"+topic);  
 
        Map<String, List<KafkaStream<byte[],byte[]>>>  streamMap=consumer.createMessageStreams(topickMap);  
        KafkaStream<byte[],byte[]>stream = streamMap.get(topic).get(0);  
        ConsumerIterator<byte[],byte[]> it =stream.iterator();   
        while(it.hasNext()){  
             String value =new String(it.next().message());
             SimpleDateFormat formatter = new SimpleDateFormat   ("yyyy年MM月dd日 HH:mm:ss SSS");  
             Date curDate = new Date(System.currentTimeMillis());//获取当前时间       
             String str = formatter.format(curDate);   
                
             System.out.println("storm接收到来自kafka的消息------->" + value);
 
             collector.emit(new Values(value,1,str), value);
        }  
    }
     
    private static ConsumerConfig createConsumerConfig() {  
        Properties props = new Properties();  
        // 设置zookeeper的链接地址
//        props.put("zookeeper.connect","m1:2181,m2:2181,s1:2181,s2:2181");  
        
//        props.put("zookeeper.connect","192.168.101.23:2181");  
        props.put("zookeeper.connect","node:2181");  

        // 设置group id
        props.put("group.id", "1");  
        // kafka的group 消费记录是保存在zookeeper上的, 但这个信息在zookeeper上不是实时更新的, 需要有个间隔时间更新
        props.put("auto.commit.interval.ms", "1000");
        props.put("zookeeper.session.timeout.ms","10000");  
        return new ConsumerConfig(props);  
    }  
 
    public void close() {
    }
 
    public void deactivate() {
    }
 
    public void fail(Object msgId) {
    }
 
    public void declareOutputFields(OutputFieldsDeclarer declarer) {
        declarer.declare(new Fields("word","id","time"));
    }
 
    public Map<String, Object> getComponentConfiguration() {
        System.out.println("getComponentConfiguration被调用");
        topic="idoall_testTopic";
        return null;
    }
}

KafkaTopologytest.java文件:

package com.test.stormkafka;

import java.util.HashMap;
import java.util.Map;

import backtype.storm.Config;
import backtype.storm.LocalCluster;
import backtype.storm.topology.BasicOutputCollector;
import backtype.storm.topology.OutputFieldsDeclarer;
import backtype.storm.topology.TopologyBuilder;
import backtype.storm.topology.base.BaseBasicBolt;
import backtype.storm.tuple.Fields;
import backtype.storm.tuple.Tuple;
import backtype.storm.tuple.Values;
import backtype.storm.utils.Utils;
/**
 * demo1
 * @author eleme
 *
 */
public class KafkaTopologytest {
	public static void main(String[] args) {
		TopologyBuilder builder = new TopologyBuilder();
		builder.setSpout("spout", new KafkaSpouttest(""), 1);
		builder.setBolt("bolt1", new Bolt1(), 2).shuffleGrouping("spout");
		builder.setBolt("bolt2", new Bolt2(), 2).fieldsGrouping("bolt1",
				new Fields("word"));
		Map conf = new HashMap();
		conf.put(Config.TOPOLOGY_WORKERS, 1);
		conf.put(Config.TOPOLOGY_DEBUG, true);

		LocalCluster cluster = new LocalCluster();
		cluster.submitTopology("my-flume-kafka-storm-topology-integration",conf, builder.createTopology());

		Utils.sleep(1000 * 60 * 5); // local cluster test ...
		cluster.shutdown();

	}

	public static class Bolt1 extends BaseBasicBolt {

		public void execute(Tuple input, BasicOutputCollector collector) {
			try {

				String msg = input.getString(0);
				int id = input.getInteger(1);
				String time = input.getString(2);
				msg = msg + "bolt1";
				System.out.println("对消息加工第1次-------[arg0]:" + msg
						+ "---[arg1]:" + id + "---[arg2]:" + time + "------->"
						+ msg);
				if (msg != null) {
					collector.emit(new Values(msg));
				}
			} catch (Exception e) {
				e.printStackTrace();
			}
		}

		public void declareOutputFields(OutputFieldsDeclarer declarer) {
			declarer.declare(new Fields("word"));
		}
	}

	public static class Bolt2 extends BaseBasicBolt {
		Map<String, Integer> counts = new HashMap<String, Integer>();

		public void execute(Tuple tuple, BasicOutputCollector collector) {
			String msg = tuple.getString(0);
			msg = msg + "bolt2";
			System.out.println("对消息加工第2次---------->" + msg);
			collector.emit(new Values(msg, 1));
		}

		public void declareOutputFields(OutputFieldsDeclarer declarer) {
			declarer.declare(new Fields("word", "count"));
		}
	}
}


pom.xml文件:


<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  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.test</groupId>
  <artifactId>stormkafka</artifactId>
  <version>0.0.1-SNAPSHOT</version>
  <packaging>jar</packaging>

  <name>stormkafka</name>
  <url>http://maven.apache.org</url>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  </properties>

  <dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>3.8.1</version>
      <scope>test</scope>
    </dependency>
  
      <dependency>
           <groupId>org.apache.storm</groupId>
             <artifactId>storm-core</artifactId>
             <version>0.9.2-incubating</version>
             <scope>provided</scope> 
       </dependency>
   
    <dependency>
        <groupId>org.apache.kafka</groupId>
        <artifactId>kafka_2.9.2</artifactId>
        <version>0.8.1.1</version>
        <exclusions>
            <exclusion>
                <groupId>org.apache.zookeeper</groupId>
                <artifactId>zookeeper</artifactId>
            </exclusion>
            <exclusion>
                <groupId>log4j</groupId>
                <artifactId>log4j</artifactId>
            </exclusion>
        </exclusions>
    </dependency>
       
        <dependency>  
          <groupId>org.apache.storm</groupId>  
         <artifactId>storm-kafka</artifactId>  
          <version>0.9.2-incubating</version>  
    </dependency>  
  </dependencies>
  
  <build>
    <plugins>
      <plugin>
        <artifactId>maven-assembly-plugin</artifactId>
        <version>2.4</version>
        <configuration>
          <descriptorRefs>
            <descriptorRef>jar-with-dependencies</descriptorRef>
          </descriptorRefs>
        </configuration>
        <executions>
          <execution>
            <id>make-assembly</id> 
            <phase>package</phase>
            <goals>
              <goal>single</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
  
</project>


1,运行main方法:

2,运行kafka的producer

bin/kafka-console-producer.sh --broker-list localhost:9092 --topic idoall_testTopic

在shell命令行输入:


=======

elemedeMacBook-Pro:ruson eleme$ ./kafka_2.9.2-0.8.1.1/bin/kafka-console-producer.sh --broker-list node:9092 --topic testTopic

SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".

SLF4J: Defaulting to no-operation (NOP) logger implementation

SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.

[2014-12-14 09:58:13,005] INFO Closing socket connection to /127.0.0.1. (kafka.network.Processor)

========

[2014-12-14 09:58:23,665] INFO Closing socket connection to /127.0.0.1. (kafka.network.Processor)

[2014-12-14 09:59:25,795] INFO Closing socket connection to /127.0.0.1. (kafka.network.Processor)

=======

[2014-12-14 10:00:49,132] INFO Closing socket connection to /127.0.0.1. (kafka.network.Processor)

[2014-12-14 10:01:04,765] INFO Closing socket connection to /127.0.0.1. (kafka.network.Processor)

[2014-12-14 10:01:22,591] INFO Closing socket connection to /127.0.0.1. (kafka.network.Processor)



在eclipse控制台显示如下:

对消息加工第1次-------[arg0]:bolt1---[arg1]:1---[arg2]:2014年12月14日 09:58:13 144------->bolt1
33664 [Thread-8-bolt1] INFO  backtype.storm.daemon.task - Emitting: bolt1 default [bolt1]
33664 [Thread-20-__acker] INFO  backtype.storm.daemon.executor - Processing received message source: spout:6, stream: __ack_init, id: {}, [-5044490574571788562 -6834576169241042166 6]
33665 [Thread-8-bolt1] INFO  backtype.storm.daemon.task - Emitting: bolt1 __ack_ack [-5044490574571788562 -8030044259304607564]
33665 [Thread-14-bolt2] INFO  backtype.storm.daemon.executor - Processing received message source: bolt1:2, stream: default, id: {-5044490574571788562=3578453389181342654}, [bolt1]
对消息加工第2次---------->bolt1bolt2
33665 [Thread-20-__acker] INFO  backtype.storm.daemon.executor - Processing received message source: bolt1:2, stream: __ack_ack, id: {}, [-5044490574571788562 -8030044259304607564]
33665 [Thread-14-bolt2] INFO  backtype.storm.daemon.task - Emitting: bolt2 default [bolt1bolt2, 1]
33666 [Thread-14-bolt2] INFO  backtype.storm.daemon.task - Emitting: bolt2 __ack_ack [-5044490574571788562 3578453389181342654]
33666 [Thread-20-__acker] INFO  backtype.storm.daemon.executor - Processing received message source: bolt2:5, stream: __ack_ack, id: {}, [-5044490574571788562 3578453389181342654]
33666 [Thread-20-__acker] INFO  backtype.storm.daemon.task - Emitting direct: 6; __acker __ack_ack [-5044490574571788562]
storm接收到来自kafka的消息------->========
44249 [Thread-16-spout] INFO  backtype.storm.daemon.task - Emitting: spout default [========, 1, 2014年12月14日 09:58:23 729]
44249 [Thread-16-spout] INFO  backtype.storm.daemon.task - Emitting: spout __ack_init [7355713949317680184 8328867585479832335 6]
44249 [Thread-8-bolt1] INFO  backtype.storm.daemon.executor - Processing received message source: spout:6, stream: default, id: {7355713949317680184=8328867585479832335}, [========, 1, 2014年12月14日 09:58:23 729]
对消息加工第1次-------[arg0]:========bolt1---[arg1]:1---[arg2]:2014年12月14日 09:58:23 729------->========bolt1
44249 [Thread-20-__acker] INFO  backtype.storm.daemon.executor - Processing received message source: spout:6, stream: __ack_init, id: {}, [7355713949317680184 8328867585479832335 6]
44250 [Thread-8-bolt1] INFO  backtype.storm.daemon.task - Emitting: bolt1 default [========bolt1]
44250 [Thread-8-bolt1] INFO  backtype.storm.daemon.task - Emitting: bolt1 __ack_ack [7355713949317680184 -6542584687991049767]
44250 [Thread-14-bolt2] INFO  backtype.storm.daemon.executor - Processing received message source: bolt1:2, stream: default, id: {7355713949317680184=-2980814423219223850}, [========bolt1]
对消息加工第2次---------->========bolt1bolt2
44250 [Thread-14-bolt2] INFO  backtype.storm.daemon.task - Emitting: bolt2 default [========bolt1bolt2, 1]




总结:java例子参考其他人,此时集成成功,只是在单机上的





基于Spark Streaming的新闻大数据实时分析系统:从架构设计到工程实践 实时数据处理是当今大数据领域的核心技术之一,其核心原理在于对持续产生的数据流进行即时计算与分析,而非传统的批量处理模式。这项技术的核心价值在于能够为业务提供近乎实时的洞察力,支撑快速决策与响应。从技术实现层面看,一个典型的实时数据处理系统通常包含数据采集、消息缓冲、流式计算、结果存储与可视化等核心环节。其中,Apache Kafka作为高吞吐量的分布式消息队列,常被用于解耦数据生产与消费,保障数据流的平稳传输;而Apache Spark的微批处理模型(Spark Streaming)则提供了强大的容错能力和 阅读详情

相关推荐

基于Spark Structured Streaming的新闻大数据实时分析系统架构与实现

实时数据处理是应对海量、高速数据流的核心技术,其核心原理在于对连续到达的数据进行即时计算与分析,而非传统的批量处理。这项技术的价值在于能够为业务决策提供近乎实时的洞察,广泛应用于舆情监控、实时推荐、金融风控等场景。在众多实时计算框架中,Apache Spark以其统一的批流一体编程模型和强大的生态系统脱颖而出。其Structured Streaming模块,通过微批(Micro-batch)和连续处理(Continuous Processing)模式,在保证高吞吐量的同时,实现了端到端的精确一次(Exact

weixin_34416649的博客 453

storm集成kafka简单使用示例

KafkaStormSample.javapackage kafkaUse.kafkaUse.withStorm;import java.util.Properties; import java.util.UUID;import org.apache.storm.Config; import org.apache.storm.LocalCluster; import org.apache.storm

wenwenxiong的专栏 2328

ETL第八章无人售货机零售项目实践

ETL实战项目——无人售货机

m0_52058217的博客 4432

Kafka+Storm+HBase项目Demo(4)--Kafka使用

第一个需求是按地区实时计算销售额,并进行3D柱图实时展示结果,含周同比。图表的数据3s自动更新。 期望效果 项目的架构:

zhi_fu的博客 1351

混合动作空间在强化学习中的创新应用:PDQN与MPDQN算法解析

本文深入解析了强化学习中处理混合动作空间的PDQN与MPDQN算法。针对既有离散选择又有连续调节的复杂决策场景,PDQN通过参数化深度Q网络,巧妙结合DQN与DDPG进行交替优化;MPDQN则进一步改进,为每个离散动作提供专属参数评估以减少干扰。文章通过游戏、自动驾驶等实例阐述了其应用价值与面临的挑战。

efc123456的博客 878

斯坦福HumanPlus机器人核心技术解析:从HST强化学习框架到HIT模仿学习的实现路径

本文深入解析了斯坦福HumanPlus人形机器人的核心技术实现路径。其核心在于HST强化学习框架与HIT模仿学习架构的协同:HST作为“小脑”,通过rsl_rl框架在仿真中训练稳健的低级运动控制;HIT作为“大脑”,基于改进的Transformer架构学习高级任务规划。文章详细拆解了从算法原理、代码实现到硬件部署的全流程,为复现这一前沿机器人系统提供了实战指南。

weixin_29082143的博客 290

Kafka、Flume、Storm 结合学习案例

storm drpc JavaAPI调用报错 conf初始化错误解决如下 Map config = Utils.readDefaultConfig(); Kafka、Flume、Storm 结合学习案例 flume 写入 kafka, storm作为kafka消费者处理消息, 处理完再作为生产者给kafka写入消息 flume 配置部分 使用远程调用flume 即avro source 传入k...

程序员小李的博客 1064

模拟IC设计笔记:拆解一个经典的时钟占空比校正(DCC)电路模块,从理论到SPICE仿真

本文深入解析了时钟占空比校正(DCC)电路在模拟IC设计中的关键作用,特别是在高速ADC应用中。通过晶体管级拆解,详细介绍了基于电荷泵和积分器的模拟反馈型DCC电路设计,包括占空比检测、误差放大与校正执行单元的实现。文章还提供了SPICE仿真验证方法,确保电路在100MHz时钟下的稳定性和性能。

weixin_33725722的博客 448

kafka重启报错 ERROR Processor got uncaught exception. (kafka.network.Processor)

[2021-11-19 16:00:07,685] ERROR Processor got uncaught exception. (kafka.network.Processor) java.lang.NoClassDefFoundError: Could not initialize class kafka.network.RequestChannel$ at kafka.network.RequestChannelRequest.<init>(RequestChannel.scala:12

weixin_43697701的博客 2848

USB之ch376s数据手册

         最近师兄交给我一个项目,虽说刚学嵌入式起步,但上手一个项目怎说都是最好的快速学习方式。因为刚了解ch376s管理U盘的数据,所以先是看了ch376s的数据手册。那我就把数据手册直接放上来吧。。。。      1、概述 CH376 是文件管理控制芯片,用于单片机系统读写 U 盘或者 SD 卡中的文件。 CH376 支持 USB 设备方式和 USB 主机方式,并且内置了 USB 通...

iBGG的博客 6018

如何在 Linux 上安装 RTX 5090 / 5080 /5070 Ti / 5070 驱动程序 — 详细指南

Linux 上的 NVIDIA 5090 是 AI、游戏和渲染的强大引擎,但需要耐心。如果稳定性是首要考虑因素,请坚持使用开源驱动程序,并关注 NVIDIA 论坛以获取未来更新。

iCloudEnd的博客 6950

Storm+kafka 开发

但是这又引入了另外一个问题,如果session.timeout.ms设置得很大,那么检测一个consumer挂掉的时间就会很长,如果业务是实时的,那这就是不能忍受的。session.timeout.ms用于心跳线程,而max.poll.interval.ms用于处理线程。如果处理线程死掉,则需要max.poll.interval.ms来检测它,但是,如果整个消费者死亡(并且一个垂死的处理线程很可能崩溃包括心跳线程在内的整个消费者),则只需要session.timeout.ms来检测它。

csdnzhang365的博客 950

【零基础入门unity游戏开发——unity3D篇】3D光源之——三种灯光模式、光照烘焙 (Light Baking)、Global Illumination(Gl)全局光照和静态间接光照的使用

文章摘要 本文深入介绍了Unity URP中三种3D光源模式:Realtime实时灯光、Baked烘焙光照和Mixed混合光照。通过搭建测试场景并逐步移除所有光源,作者演示了如何从零开始配置光照系统。对于实时灯光,详细讲解了定向光的使用、间接光照计算及Global Illumination的配置方法;烘焙光照部分则重点说明光照烘焙原理、参数设置和生成光照贴图的过程。文章还指出动态物体间接光照的问题,并预告将另文介绍光照探针技术解决方案。通过对比不同光照模式的效果和性能特点,为开发者提供了实用配置指南。

向宇的博客,专注php/web全栈 unity游戏开发,欢迎大家评论纠错 884

java storm demo_1 storm基本概念 + storm编程规范及demo编写

本博文的主要内容有.Storm的单机模式安装.Storm的分布式安装(3节点).No space left on device.storm工程的eclipse的java编写分布式的一个计算系统,但是跟mr不一样,就是实时的,实时的跟Mr离线批处理不一样。离线mr主要是做数据挖掘、数据分析、数据统计和br分析。Storm,主要是在线的业务系统。数据像水一样,源源不断的来,然后,在流动的过程中啊,就要...

weixin_30563489的博客 1038

18、基于FSDD数据集的深度学习案例分析

本文基于FSDD(Free Spoken Digit Dataset)数据集,系统介绍了深度学习在语音数字识别中的应用。内容涵盖动态与静态计算图的对比、数据预处理流程(包括数据增强、固定长度处理和归一化)、监督学习与无监督学习的模型构建与训练过程,并通过实验对比了不同网络架构的性能。文中使用PyTorch实现2层全连接网络和自编码器模型,展示了正则化技术对提升模型准确率的关键作用。最后总结了关键技术并提出了实际应用建议,展望了未来在复杂模型、多模态融合和实时应用方向的发展潜力。

vscode6remote的博客 268

最新的sdio 4.0 spec 协议标准 带书签 高清完整PDF版

Part-E1-SDIO-Specification-Ver4.00-Final-120220.pdf:最新的sdio 4.0 spec 协议标准 带书签 高清完整PDF版,包括SDIO 接口的外设,SDIO 接口官方协议等。

1 storm基本概念 + storm编程规范及demo编写

  本博文的主要内容有   .Storm的单机模式安装   .Storm的分布式安装(3节点)       .No space left on device   .storm工程的eclipse的java编写              http://storm.apache.org/       分布式的一个计算系统,但是跟mr不一样,就是实时的,实时的跟Mr离线批处...

weixin_33919941的博客 494

Devexpress16.2.6破解工具

Devexpress16.2.6破解工具Devexpress16.2.6破解工具Devexpress16.2.6破解工具Devexpress16.2.6破解工具

Storm平台搭建3--项目中用到的一些内容

一共做了两个demo程序 第一:http://edu.csdn.net/course/detail/350 中介绍的WordCountTopology,这个在Storm单机下就可以完成 第二:http://edu.51cto.com/lesson/id-24513.html 做了这个示例项目,具体大家看视频来学习好了 其中用到的技术有 Storm 0.9.1 Kafka0.8.1.1

u013905744的专栏 435

TMS_WebGMaps_1.9.8.0_Full_Source

TMS_WebGMaps_1.9.8.0_Full_Source 全源码 delphi cbuilder

ET2012新版免狗免安装绿色软件

ET2012新版免狗免安祖昂绿色软件。,新界面,新视觉,

实时开发笔试核心考点:Flink、Kafka与流式计算实战解析

流式计算是处理海量实时数据的核心技术,在电商大促、实时推荐、风控监控等场景中扮演关键角色。理解消息队列与计算引擎的协同原理,是掌握实时链路的基础。Kafka作为数据主动脉,负责高吞吐、低延迟的数据传输;Flink则通过窗口、水印、状态管理与CheckPoint机制,保障计算的准确性与容错性。从实时UV统计到实时数仓分层,工程师需要具备全链路架构能力,并兼顾精确性与资源消耗的权衡。本文以唯品会校招真题为例,拆解实时开发岗位的考察逻辑,涵盖框架原理、场景设计、手写代码与常见踩坑点,帮助读者构建从理论到实战的完整

weixin_33841722的博客 489

实时日志分析平台搭建笔记(一)

2019独角兽企业重金招聘Python工程师标准>>> ...

weixin_33736048的博客 182

Flink案例代码,面试题

公众号zhisheng : https://github.com/zhisheng17/flink-learning 面试题来自微信公众号地址: https://mp.weixin.qq.com/s/RT4YUkUUNVO1mfihPoTVjQ Flink面试题,有时间会解决这些问题: 1、为何我使用 ValueState 保存状态 Job 恢复是状态没恢复? 2、fl...

qq_31866793的博客 6622

生产者消费者问题:高并发系统稳定性核心原理与实战

生产者消费者问题本质是多线程/多进程协作中数据流节奏失衡引发的系统性风险,其底层原理在于缓冲区容量、处理速率差与背压机制三者的动态博弈。该模型直接决定消息队列吞吐、线程池稳定性、实时服务延迟等关键技术指标,广泛应用于订单系统、IoT数据采集、风控引擎等高并发场景。理解其在Java阻塞队列、Kafka offset管理、Disruptor环形缓冲区中的差异化实现,是构建可监控、可降级、可伸缩分布式系统的前提。本文聚焦真实线上问题——如无界队列导致OOM、notifyAll引发唤醒风暴、消费者CPU 100%实

weixin_34067102的博客 665

数据科学求职:三份定制简历策略与ATS优化指南

数据科学不是单一岗位,而是涵盖数据分析、机器学习工程与数据科学建模的连续能力光谱。其招聘本质是解决具体业务问题,而非匹配抽象头衔。理解这一原理,才能突破‘一份简历走天下’的认知误区——ATS系统依赖结构化关键词筛选,HR关注经验匹配与结果可读性,技术面试官则深挖项目细节与工程落地能力。因此,构建面向不同角色、不同地域、不同岗位方向的定制化简历,成为提升面试转化率的核心策略。本文结合PAR法则、地域招聘逻辑与三类岗位(DA/MLE/DS)的表达范式,详解如何用真实项目、量化结果与生产级术语重构简历叙事,同时规

weixin_33871366的博客 377

基于Flume的美团日志收集系统(一)架构和设计

问题导读: 1.Flume-NG与Scribe对比,Flume-NG的优势在什么地方? 2.架构设计考虑需要考虑什么问题? 3.Agent死机该如何解决? 4.Collector死机是否会有影响? 5.Flume-NG可靠性(reliability)方面做了哪些措施? 美团的日志...

choudoudie6944的博客 123

TREK流处理框架实战:从核心概念到实时词频统计应用

流处理技术是处理实时数据流的核心范式,它通过持续处理无界数据序列,实现对数据的即时转换、聚合与分析。其原理基于事件驱动架构,通过数据源、转换操作和数据汇的管道模型,结合状态管理与窗口机制,确保数据处理的低延迟与高吞吐。这项技术的价值在于能够统一流批处理,为实时监控、风险预警和动态推荐等场景提供关键支撑。在开源生态中,TREK作为一个分布式流处理框架,以其轻量资源消耗和简化运维模型受到关注。本文将以TREK为例,结合实时计算和数据处理管道等热词,深入解析其编程模型与部署实践,帮助开发者构建高效的数据处理解决方

weixin_34265814的博客 371

大数据平台从零到一实战:技术选型、环境搭建与生产落地指南

大数据技术本质是一套解决海量数据存储、计算与应用的工程方法体系。其核心原理在于通过分布式架构突破单机性能瓶颈,实现数据的高效处理。从技术价值看,它使企业能够基于全量数据进行智能决策、实时预测和业务优化,驱动数字化转型。在实际应用场景中,大数据平台通常服务于用户行为分析、实时风控、智能推荐和运营报表等关键业务。本文聚焦于大数据平台落地实践,详细解析了从环境搭建、技术选型到生产部署的全链路流程,特别针对Spark计算框架和HDFS分布式存储的集成应用提供了实操方案,并深入探讨了数据质量保障和集群性能调优等工程实

weixin_33924220的博客 344
上一篇: spark-sparkSQL
下一篇: java.io.IOException: No FileSystem for scheme: hdfs异常解决
谷雨hadoop
博客等级 码龄14年 16粉丝 64原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值
⌂ 换网址