Kafka环境搭建

下载Kafka的release包

http://kafka.apache.org/downloads

kafka/config/zookeeper.properties配置文件注意

# 注意此处的dataDir和dataLogDir都需要配置(否则可能会出现znode节点写入错误问题)
dataDir=/Users/zhangsan/Documents/zookeeper-3.4.8/data
dataLogDir=/Users/xusijun/Documents/zookeeper-3.4.8/logs
# 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

kafka/config/server.properties配置文件注意

broker.id=0
 
# The number of threads that the server uses for receiving requests from the network and sending responses to the network
num.network.threads=3

# The number of threads that the server uses for processing requests, which may include disk I/O
num.io.threads=8

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

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

# The maximum size of a request that the socket server will accept (protection against OOM)
socket.request.max.bytes=104857600
 
# A comma separated list of directories under which to store log files
log.dirs=/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=1

# The number of threads per data directory to be used for log recovery at startup and flushing at shutdown.
# This value is recommended to be increased for installations with data dirs located in RAID array.
num.recovery.threads.per.data.dir=1

############################# Internal Topic Settings  #############################
# The replication factor for the group metadata internal topics "__consumer_offsets" and "__transaction_state"
# For anything other than development testing, a value greater than 1 is recommended for to ensure availability such as 3.
offsets.topic.replication.factor=1
transaction.state.log.replication.factor=1
transaction.state.log.min.isr=1

# The minimum age of a log file to be eligible for deletion due to age
log.retention.hours=168

# A size-based retention policy for logs. Segments are pruned from the log unless the remaining
# segments drop below log.retention.bytes. Functions independently of log.retention.hours.
#log.retention.bytes=1073741824

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

# 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=300000

# Zookeeper connection string (see zookeeper docs for details).
zookeeper.connect=localhost:2181

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


############################# Group Coordinator Settings #############################

# The following configuration specifies the time, in milliseconds, that the GroupCoordinator will delay the initial consumer rebalance.
# The rebalance will be further delayed by the value of group.initial.rebalance.delay.ms as new members join the group, up to a maximum of max.poll.interval.ms.
# The default value for this is 3 seconds.
# We override this to 0 here as it makes for a better out-of-the-box experience for development and testing.
# However, in production environments the default value of 3 seconds is more suitable as this will help to avoid unnecessary, and potentially expensive, rebalances during application startup.
group.initial.rebalance.delay.ms=0

启动命令

> cd kafka/bin
> ./zookeeper-server-start.sh ../config/zookeeper.properties &
> ./kafka-server-start.sh ../config/server.properties &
nohup /usr/local/kafka/bin/zookeeper-server-start.sh /usr/local/kafka/config/zookeeper.properties >> /usr/local/kafka/my_dir/zookeeper/log/my.file 2>&1 &
nohup /usr/local/kafka/bin/kafka-server-start.sh /usr/local/kafka/config/server.properties >> /usr/local/kafka/my_dir/kafka/log/my.file 2>&1 &

创建topic

./kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic example
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
【标题】"语音识别的一个matlab程序"是一个与语音处理和模式识别技术相关的项目,它使用MATLAB编程语言实现。MATLAB是MathWorks公司开发的一种数值计算和数据可视化环境,广泛应用于工程、科学和数学领域,尤其在信号处理和机器学习方面有很强的功能。 【描述】提到的"在一个网站看到,大家分享一下"表明这是一个社区共享的资源,可能来源于一个在线论坛或编程交流平台。这样的共享行为旨在促进技术交流和学习,让其他对语音识别感兴趣的用户能够参考、学习和改进代码。 【标签】"语音识别"是这个项目的关键词,意味着该程序涉及将人类语音转化为文本或命令的过程。语音识别技术的核心是将音频信号转换为可理解的数据,这通常包括预处理、特征提取、模型训练和匹配等步骤。 在提供的【压缩包子文件的文件名称列表】中,我们可以推断出这个MATLAB程序的组成部分: 1. `demo.m`:通常是演示脚本,用于展示程序的主要功能和用法,用户可以通过运行这个文件快速了解程序的工作原理。 2. `.p` 文件(melfb.p, mfcc.p, vqlbg.p, disteu.p, test.p, blockFrames.p, train.p):这些是MATLAB的编译函数文件,可能包含特定的算法实现,如梅尔频率倒谱系数(MFCC)提取、声学建模、距离计算、训练和测试等功能。例如: - `melfb.p` 可能实现了梅尔滤波器组,用于对语音信号进行频谱分析。 - `mfcc.p` 可能负责MFCC的计算,这是语音识别中常用的特征提取方法。 - `train.p` 和 `test.p` 可能分别对应模型的训练和测试过程。 3. `Read Me.txt`:通常包含关于如何使用、配置和运行程序的说明和指导。 4. `www.pudn.com.txt`:可能指向源文件的下载地址或发布者的信息,PUDN(太平洋下载网)是一个提供各类资源下载的网站。 这个MATLAB程序可能涵盖了语音识别的完整流程,包括预处理、特征提取、模型训练和评估。通过运行`demo.m`,用户可以体验整个识别过程,并可根据源代码深入了解语音识别的实现细节。对于学习和研究语音识别技术的人来说,这是一个宝贵的实践资源。
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值