当前位置: 首页 > news >正文

01_kafka_环境搭建安装_topic管理

文章目录

  • 安装jdk
  • 配置主机名
  • Zookeeper 下载与安装
  • Kafka 下载与安装
  • 测试
  • 集群版安装
    • 测试
    • 输出


安装jdk

配置主机名

  • hostnamectl set-hostname kafka_1

  • /etc/sysconfig/network

HOSTNAME=kafka_1
  • /etc/hosts
ip  kafka_1
  • ping kafka_1 测试

Zookeeper 下载与安装

  • 由于 集群中的 Leader 的监控 和 Topic 元数据 存储在 Zookeeper 中 ,所以需要安装 zk;
  • https://zookeeper.apache.org/releases.html 中选择需要的版本;
  • conf 目录 复制zoo_sample.cfg 为 zoo.cfg, 修改其中的配置 dataDir 指定自己的目录;
  • 启动zk:使用 zkServer.sh start zoo.cfg
cd /opt/pkg/
wget --no-check-certificate  https://dlcdn.apache.org/zookeeper/zookeeper-3.8.2/apache-zookeeper-3.8.2-bin.tar.gz
tar zxf apache-zookeeper-3.8.2-bin.tar.gz
mv apache-zookeeper-3.8.2-bin ../app/
cd /opt/app/apache-zookeeper-3.8.2-bin/
cp zoo_sample.cfg zoo.cfg
./bin/zkServer.sh start zoo.cfg---
[root@loaclhost bin]# ./zkServer.sh status
/usr/bin/java
ZooKeeper JMX enabled by default
Using config: /opt/app/apache-zookeeper-3.8.2-bin/bin/../conf/zoo.cfg
Client port found: 2181. Client address: localhost. Client SSL: false.
Mode: standalone

Kafka 下载与安装

  • https://kafka.apache.org/downloads
cd /opt/pkg/
wget https://downloads.apache.org/kafka/3.5.1/kafka_2.13-3.5.1.tgz
tar zxf kafka_2.13-3.5.1.tgz
mv kafka_2.13-3.5.1 ../app/
cd /opt/app
cd kafka_2.13-3.5.1/
cd config/
cp server.properties server.properties.bak
vim server.properties
---
listeners=PLAINTEXT://kafka_1:9092
og.dirs=./kafka-logs
zookeeper.connect=kafka_1:2181
---cd ../
./bin/kafka-server-start.sh -daemon config/server.properties
  • 配置: config/server.properties
broker.id
listeners=PLAINTEXT://主机名:9092
log.dirs= # 日志目录
zookeeper.connect=主机名:2181
  • 启动:./bin/kafka-server-start.sh -daemon config/server.properties
  • 停止:./bin/kafka-server-stop.sh

测试

./bin/kafka-topics.sh --bootstrap-server kafka_1:9092 --create --topic topic_01 --partitions 3 --replication-factor 1 # 单机版副本因子为1 多了没有意义
./bin/kafka-console-consumer.sh --bootstrap-server kafka_1:9092 --topic topic_01 --group g1 # 消费者 查看输出
./bin/kafka-console-producer.sh --broker-list kafka_1:9092  --topic topic_01  # 开始输入

root@loaclhost kafka_2.13-3.5.1]# ./bin/kafka-topics.sh --bootstrap-server kafka_1:9092 --create --topic topic_0
OpenJDK 64-Bit Server VM warning: If the number of processors is expected to increase from one, then you should c
WARNING: Due to limitations in metric names, topics with a period (‘.’) or underscore ('') could collide. To avo
Created topic topic_01.
[root@loaclhost kafka_2.13-3.5.1]# ./bin/kafka-console-consumer.sh --bootstrap-server kafka_1:9092 --topic topic

OpenJDK 64-Bit Server VM warning: If the number of processors is expected to increase from one, then you should c


root@loaclhost kafka_2.13-3.5.1]# ./bin/kafka-console-consumer.sh --bootstrap-server kafka_1:9092 --topic topic_01 --group g1
OpenJDK 64-Bit Server VM warning: If the number of processors is expected to increase from one, then you should configure the number of parallel GC threads appropriately using -XX:ParallelGCThreads=N


在这里插入图片描述

集群版安装

  • 使用3台主机进行搭建,三台机器上都需要安装 jdk,Zookeeper,Kafka
  • 其中 /etc/hosts 都需要配置好三台主机的ip 主机名映射;
  • 需要额外注意的是,三台主机需要做一次时间同步
yum -y install ntpdate
timedatectl set-timezone Asia/Shanghai
ntpdate ntp1.aliyun.com # aliyun 有ntp1~7, 或者 cn.pool.ntp.org
  • 复制文件到 另外两台主机
[root@kafka_1 pkg]# pwd
/opt/pkg
scp kafka_2.13-3.5.1.tgz root@kafka_2:/opt/pkg 
scp kafka_2.13-3.5.1.tgz root@kafka_3:/opt/pkg
scp apache-zookeeper-3.8.2-bin.tar.gz root@kafka_3:/opt/pkg
scp apache-zookeeper-3.8.2-bin.tar.gz root@kafka_2:/opt/pkg
  • 配置 zoo.cfg:
# 数据目录 每个机器中,此目录下 需要创建 myid文件内容 和server.id 对应 , 可以指定一个绝对目录
dataDir=/opt/app/cluster/apache-zookeeper-3.8.2/dataDir server.1=kafka_1:2888:3888
server.2=kafka_2:2888:3888
server.3=kafka_3:2888:3888
4lw.commands.whitelist=*
  • myid生成: echo 1 > /opt/app/cluster/apache-zookeeper-3.8.2/dataDir/myid # 1,2,3

  • 配置: config/server.properties

broker.id=0 # 需要修改 1,2 
listeners=PLAINTEXT://kafka_1:9092 # 主机名和当前机器对应
log.dirs=/opt/app/cluster/kafka_2.13-3.5.1/log_dirs # 日志目录
zookeeper.connect=kafka_1:2181,kafka_2:2181,kafka_3:2181
  • 启动zk 和 kafka:
cd /opt/app/cluster/apache-zookeeper-3.8.2/
./bin/zkServer.sh start zoo.cfg
cd /opt/app/cluster/kafka_2.13-3.5.1
./bin/kafka-server-start.sh -daemon config/server.properties
  • 报错:

Using config: /opt/app/cluster/apache-zookeeper-3.8.2/bin/…/conf/zoo.cfg
Client port found: 2181. Client address: localhost. Client SSL: false.
Error contacting service. It is probably not running.

  • 原因是防火墙没关:
 systemctl status firewalld
#● firewalld.service - firewalld - dynamic firewall daemon
#   Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled; vendor preset: enabled)
#   Active: active (running) since Sun 2023-08-27 19:48:04 CST; 2h 32min ago
#     Docs: man:firewalld(1)
# Main PID: 649 (firewalld)
#   CGroup: /system.slice/firewalld.service
#           └─649 /usr/bin/python -Es /usr/sbin/firewalld --nofork --nopid
#           
systemctl disable firewalld

测试

./bin/kafka-topics.sh --bootstrap-server kafka_1:9092,kafka_2:9092,kafka_3:9092 --create --topic topic01 --partitions 3 --replication-factor 3  # 创建 topic
./bin/kafka-topics.sh --bootstrap-server kafka_1:9092,kafka_2:9092,kafka_3:9092 --create --topic topic02 --partitions 3 --replication-factor 3  # 创建 topic
./bin/kafka-topics.sh --bootstrap-server kafka_1:9092,kafka_2:9092,kafka_3:9092 --list # 查看
./bin/kafka-topics.sh --bootstrap-server kafka_1:9092,kafka_2:9092,kafka_3:9092 --describe --topic topic02 # 查看详细描述
./bin/kafka-topics.sh --bootstrap-server kafka_1:9092,kafka_2:9092,kafka_3:9092 --alter --topic topic02 --partitions 4   # 修改分区数量,只能增不能减,设置小于3则报错
./bin/kafka-topics.sh --bootstrap-server kafka_1:9092,kafka_2:9092,kafka_3:9092 --delete --topic topic02  # 删除topic---
# 消息的生产与消费/订阅
./bin/kafka-console-producer.sh --broker-list kafka_1:9092,kafka_2:9092,kafka_3:9092 --topic topic01 # 生产
./bin/kafka-console-consumer.sh --bootstrap-server kafka_1:9092,kafka_2:9092,kafka_3:9092 --topic topic01 --group g1 --property print.key=true  --property print.value=true  --property key.separator=, # 消费
---
# 查看消费组信息
./bin/kafka-consumer-groups.sh --bootstrap-server kafka_1:9092,kafka_2:9092,kafka_3:9092 --list g1  # 查看
./bin/kafka-consumer-groups.sh --bootstrap-server kafka_1:9092,kafka_2:9092,kafka_3:9092 --describe --group g1  # 查看详情

输出

[root@kafka_1 kafka_2.13-3.5.1]# ./bin/kafka-topics.sh --bootstrap-server kafka_1:9092,kafka_2:9092,kafka_3:9092 --create --topic topic01 --partitions 3 --replication-factor 3
OpenJDK 64-Bit Server VM warning: If the number of processors is expected to increase from one, then you should configure the number of parallel GC threads appropriately using -XX:ParallelGCThreads=N
Created topic topic01.
[root@kafka_1 kafka_2.13-3.5.1]# ./bin/kafka-topics.sh --bootstrap-server kafka_1:9092,kafka_2:9092,kafka_3:9092 --create --topic topic02 --partitions 3 --replication-factor 3
OpenJDK 64-Bit Server VM warning: If the number of processors is expected to increase from one, then you should configure the number of parallel GC threads appropriately using -XX:ParallelGCThreads=N
Created topic topic02.
[root@kafka_1 kafka_2.13-3.5.1]# ./bin/kafka-topics.sh --bootstrap-server kafka_1:9092,kafka_2:9092,kafka_3:9092 --list
OpenJDK 64-Bit Server VM warning: If the number of processors is expected to increase from one, then you should configure the number of parallel GC threads appropriately using -XX:ParallelGCThreads=N
topic01
topic02[root@kafka_1 kafka_2.13-3.5.1]# ./bin/kafka-topics.sh --bootstrap-server kafka_1:9092,kafka_2:9092,kafka_3:9092 --describe --topic topic02
OpenJDK 64-Bit Server VM warning: If the number of processors is expected to increase from one, then you should configure the number of parallel GC threads appropriately using -XX:ParallelGCThreads=N
Topic: topic02  TopicId: _s44mBQqTLaSmVWcZA2GTw PartitionCount: 3       ReplicationFactor: 3    Configs:Topic: topic02  Partition: 0    Leader: 2       Replicas: 2,0,1 Isr: 2,1Topic: topic02  Partition: 1    Leader: 1       Replicas: 1,2,0 Isr: 1,2Topic: topic02  Partition: 2    Leader: 0       Replicas: 0,1,2 Isr: 0,1,2[root@kafka_1 kafka_2.13-3.5.1]# ./bin/kafka-topics.sh --bootstrap-server kafka_1:9092,kafka_2:9092,kafka_3:9092 --alter --topic topic02 --partitions 4[root@kafka_1 kafka_2.13-3.5.1]# ./bin/kafka-topics.sh --bootstrap-server kafka_1:9092,kafka_2:9092,kafka_3:9092 --describe --topic topic02
OpenJDK 64-Bit Server VM warning: If the number of processors is expected to increase from one, then you should configure the number of parallel GC threads appropriately using -XX:ParallelGCThreads=N
Topic: topic02  TopicId: _s44mBQqTLaSmVWcZA2GTw PartitionCount: 4       ReplicationFactor: 3    Configs:Topic: topic02  Partition: 0    Leader: 2       Replicas: 2,0,1 Isr: 2,1Topic: topic02  Partition: 1    Leader: 1       Replicas: 1,2,0 Isr: 1,2Topic: topic02  Partition: 2    Leader: 0       Replicas: 0,1,2 Isr: 0,1,2Topic: topic02  Partition: 3    Leader: 2       Replicas: 2,1,0 Isr: 2,1[root@kafka_1 kafka_2.13-3.5.1]# ./bin/kafka-topics.sh --bootstrap-server kafka_1:9092,kafka_2:9092,kafka_3:9092 --list
OpenJDK 64-Bit Server VM warning: If the number of processors is expected to increase from one, then you should configure the number of parallel GC threads appropriately using -XX:ParallelGCThreads=N
topic01
topic02
[root@kafka_1 kafka_2.13-3.5.1]# ./bin/kafka-topics.sh --bootstrap-server kafka_1:9092,kafka_2:9092,kafka_3:9092 --delete --topic topic02
OpenJDK 64-Bit Server VM warning: If the number of processors is expected to increase from one, then you should configure the number of parallel GC threads appropriately using -XX:ParallelGCThreads=N
[root@kafka_1 kafka_2.13-3.5.1]# ./bin/kafka-topics.sh --bootstrap-server kafka_1:9092,kafka_2:9092,kafka_3:9092 --list
OpenJDK 64-Bit Server VM warning: If the number of processors is expected to increase from one, then you should configure the number of parallel GC threads appropriately using -XX:ParallelGCThreads=N
topic01---
# 生产者
[root@kafka_1 kafka_2.13-3.5.1]# ./bin/kafka-console-producer.sh --broker-list kafka_1:9092,kafka_2:9092,kafka_3:9092 --topic topic01
OpenJDK 64-Bit Server VM warning: If the number of processors is expected to increase from one, then you should configure the number of parallel GC threads appropriately using -XX:ParallelGCThreads=N
>123
>123
>key=123
># 消费者
[root@kafka_1 kafka_2.13-3.5.1]# ./bin/kafka-console-consumer.sh --bootstrap-server kafka_1:9092,kafka_2:9092,kafka_3:9092 --topic topic01 --group g1 --property print.key=true  --property print.value=true  --property key.separator=,
OpenJDK 64-Bit Server VM warning: If the number of processors is expected to increase from one, then you should configure the number of parallel GC threads appropriately using -XX:ParallelGCThreads=Nnull,123
null,123
null,key=123

相关文章:

01_kafka_环境搭建安装_topic管理

文章目录 安装jdk配置主机名Zookeeper 下载与安装Kafka 下载与安装测试集群版安装测试输出 安装jdk 略 配置主机名 hostnamectl set-hostname kafka_1 /etc/sysconfig/network HOSTNAMEkafka_1/etc/hosts ip kafka_1ping kafka_1 测试 Zookeeper 下载与安装 由于 集群…...

Python+Requests+Excel接口测试实战

1、EXCEL文件接口保存方式,如图。 2、然后就是读取EXCEL文件中的数据方法,如下: 1 import xlrd2 3 4 class readExcel(object):5 def __init__(self, path):6 self.path path7 8 property9 def getSheet(self): 10 …...

10:STM32------I2C通信

目录​​​​​​​ 一:I2C通信协议 1:I2C简历 2:硬件电路 3:I2C时序基本单元 A : 开/ 终条件 2:发送一个字节 3:接收一个字节 4:应答机制 4:I2C时序 1:指定地址写 2:当前地址读 3: 指定地址读 二:MPU6050 1:简历 2:参数 3:硬件电路 4:框图 5:寄存器地址 …...

Git多人开发解决冲突案例

准备工作: 1.创建一个gitee远程仓库https://gitee.com/xxxxxxx.git 2.初始化两个本地git仓库用户,目的是模拟多人协作开发时提交代码发生冲突的场景 3.解决冲突并提交。 进入正题: lisi 通过vim指令修改readme.md文件内容,推送到…...

医疗机构如何维护电力系统?来看看这个小技巧

在现代医疗领域,电力是不可或缺的。从手术室里的手术灯到病房中的呼吸机,医院的各种医疗设备和系统都依赖于稳定的电源供应。 然而,电力中断和紧急情况不可避免,而这些情况下的电力可靠性可能会直接影响病人的生命和健康。为了确保…...

时序预测 | MATLAB实现ELM极限学习机时间序列预测未来

时序预测 | MATLAB实现ELM极限学习机时间序列预测未来 目录 时序预测 | MATLAB实现ELM极限学习机时间序列预测未来预测效果基本介绍程序设计参考资料 预测效果 基本介绍 1.MATLAB实现ELM极限学习机时间序列预测未来; 2.运行环境Matlab2018及以上,data为数…...

【数据分享】1901-2022年我国省市县镇四级的逐年平均气温数据(免费获取/Shp/Excel格式)

气象数据在日常研究中非常常用,之前我们分享过来自国家青藏高原科学数据中心提供的1901-2022年1km分辨率逐月平均气温栅格数据,2001-2022年我国省市县镇四级的逐月平均气温数据,以及基于该栅格数据处理得到的1901-2022年1km分辨率的逐年平均气…...

【Axure高保真原型】日历日期原型模板

今天和大家分享日历日期的原型模板,包括月计划、周计划、日计划的原型案例,以及日期、时间、月份、区间选择器……具体效果可以点击下方视频观看 【原型预览及下载地址】 Axure 原型 备用地址:Untitled Document 【原型效果】 【原型效果…...

深入了解接口测试:Postman 接口测试指南

在现代软件开发生命周期中,接口测试是一个至关重要的部分。使用 Postman 这一工具,可以轻松地进行 接口测试。以下是一份简单的使用教程,帮助你快速上手。 安装 Postman 首先,你需要在电脑上安装 Postman。你可以从官网上下载并…...

【ROS】Ubuntu20.04+ROS Noetic 配置PX4-v1.12.2和Gazebo11联合仿真环境【教程】

【ROS】Ubuntu20.04ROS Noetic 配置PX4-v-v1.12.2和Gazebo11联合仿真环境【教程】 文章目录 【ROS】Ubuntu20.04ROS Noetic 配置PX4-v-v1.12.2和Gazebo11联合仿真环境【教程】0. 安装UbuntuROS1. 安装依赖2. 安装QGC地面站3. 配置PX4-v1.12.23.1 安装PX43.2 测试PX4是否成功安装…...

Java 代理模式之静态代理与动态代理

1,代理模式 代理模式给某一个对象提供一个代理对象,并由代理对象控制对原对象的引用。通俗的来讲代理模式就是我们生活中常见的中介。 代理模式的目的: (1)通过引入代理对象的方式来间接访问目标对象,防…...

打造基于终端命令行的IDE,Termux配置Vim C++开发环境

Termux配置Vim C开发环境,打造基于终端命令行的IDE 主要利用VimCoc插件,配置C的代码提示等功能。 Termux换源 打开termux,输入termux-change-repo 找到mirrors.tuna.tsinghua.edu.cn,清华源,空格选中,回…...

【初阶C语言】操作符2---表达式求值

前言:本节重点介绍操作符的使用,如,优先级高低、类型转换等 一、逻辑操作符 前言:逻辑操作符包括逻辑与(&&)和逻辑或(||),操作对象:两个 1.逻辑与&…...

代码随想录day50|123. 买卖股票的最佳时机 III188. 买卖股票的最佳时机 IV

123. 买卖股票的最佳时机 III class Solution:def maxProfit(self, prices: List[int]) -> int:dp[[0]*5 for _ in range(len(prices))]dp[0][0]0dp[0][1]-prices[0]dp[0][2]0dp[0][3]-prices[0]dp[0][4]0for i in range(1,len(prices)):dp[i][0] dp[i-1][0]dp[i][1] max…...

Word 表格单元格无法垂直居中

Word使用 由于平时也需要用到word编写一些文档,但是咱们就是用的少,很多操作或者技巧不太清楚,很多小问题处理起来反而需要消耗很多时间,所以在这里记录平时遇到的一些问题。 表格无法垂直居中 类似于上图的情况,总之…...

python实现Flask POST Demo

数据处理逻辑 from flask import Flask, requestapp Flask(__name__)app.route(/, methods[POST]) def index():username request.form[username]password request.form[password]if username "Jhon" and password "1":return f"<html>&l…...

3-Pytorch张量的运算、形状改变、自动微分

3-Pytorch张量的运算、形状改变、自动微分 1 导入必备库2 张量的运算3 张量的算数运算4 一个元素的张量可以使用tensor.item()方法转成标量5 torch.from_numpy()和tensor.numpy()6 张量的变形7 张量的自动微分8 使用with torch.no_grad():包含上下文中使其不再跟踪计算9 使用te…...

用户权限数据转换为用户组列表(3/3) - Excel PY公式

最近Excel圈里的大事情就是微软把PY塞进了Excel单元格&#xff0c;可以作为公式使用&#xff0c;轻松用PY做数据分析。系好安全带&#xff0c;老司机带你玩一把。 实例需求&#xff1a;如下是AD用户的列表,每个用户拥有该应用程序的只读或读写权限&#xff0c;现在需要创建新的…...

VS2022+CMAKE+OPENCV+QT+PCL安装及环境搭建

VS2022安装&#xff1a; Visual Studio 2022安装教程&#xff08;千字图文详解&#xff09;&#xff0c;手把手带你安装运行VS2022以及背景图设置_vs安装教程_我不是大叔丶的博客-CSDN博客 CMAKE配置&#xff1a; win11下配置vscodecmake_心儿痒痒的博客-CSDN博客 OPENCV配…...

JavaScript的内置类

一、认识包装类型 1.原始类型的包装类 JavaScript的原始类型并非对象类型&#xff0c;所以从理论上来说&#xff0c;它们是没有办法获取属性或者调用方法的。 但是&#xff0c;在开发中会看到&#xff0c;我们会经常这样操作&#xff1a; var message "hello world&q…...

6.英语的十六种时态(三面旗):主动、被动、肯定、否定、一般疑问句、特殊疑问句。

目录 一、do句型&#xff08;以动词allow举例&#xff09;。 &#xff08;1&#xff09;主动语态表格。 &#xff08;2&#xff09;被动语态表格。 &#xff08;3&#xff09;否定。 二、be句型&#xff08;表格里的时态可以参考&#xff0c;查不到对应的资料&#xff09;…...

SpringBoot连接Redis与Redisson【代码】

系列文章目录 一、SpringBoot连接MySQL数据库实例【tk.mybatis连接mysql数据库】 二、SpringBoot连接Redis与Redisson【代码】 三、SpringBoot整合WebSocket【代码】 四、SpringBoot整合ElasticEearch【代码示例】 文章目录 系列文章目录代码下载地地址一、引入依赖二、修改配…...

ardupilot开发 --- MAVSDK 篇

概述 MAVSDK是各种编程语言的库集合&#xff0c;用于与MAVLink系统&#xff08;如无人机、相机或地面系统&#xff09;接口。这些库提供了一个简单的API&#xff0c;用于管理一个或多个车辆&#xff0c;提供对车辆信息和遥测的程序访问&#xff0c;以及对任务、移动和其他操作…...

腾讯云AI超级底座新升级:训练效率提升幅度达到3倍

大模型推动AI进入新纪元&#xff0c;对计算、存储、网络、数据检索及调度容错等方面提出了更高要求。在9月7日举行的2023腾讯全球数字生态大会“AI超级底座专场”上&#xff0c;腾讯云介绍异构计算全新产品矩阵“AI超级底座”及其新能力。 腾讯云副总裁王亚晨在开场致辞中表示&…...

AB测试结果分析

一、假设检验 根据样本&#xff08;小流量&#xff09;的观测结果&#xff0c;拒绝或接受关于总体&#xff08;全部流量&#xff09;的某个假设&#xff0c;称为假设检验。 假设检验的基本依据是小概率事件原理&#xff08;小概率事件几乎不发生&#xff09;&#xff0c;如果…...

Python模块和包:sys模块、os模块和变量函数的使用

文章目录 模块&#xff08;module&#xff09;引入外部模块引入部分内容包 (package)示例代码开箱即用sys模块sys.argvsys.modulessys.pathsys.platformsys.exit() os模块os.environos.system()os模块中的变量、函数和类 测试代码模块中的变量和函数的使用 总结&#xff1a;pyt…...

计算机软件工程毕业设计题目推荐

文章目录 0 简介1 如何选题2 最新软件工程毕设选题3 最后 0 简介 学长搜集分享最新的软件工程业专业毕设选题&#xff0c;难度适中&#xff0c;适合作为毕业设计&#xff0c;大家参考。 学长整理的题目标准&#xff1a; 相对容易工作量达标题目新颖 1 如何选题 最近非常多的…...

嵌入式学习笔记(25)串口通信的基本原理

三根通信线&#xff1a;Tx Rx GND &#xff08;1&#xff09;任何通信都要有信息作为传输载体&#xff0c;或者有线的或则无线的。 &#xff08;2&#xff09;串口通信时有线通信&#xff0c;是通过串口线来通信的。 &#xff08;3&#xff09;串口通信最少需要2根&#xff…...

c++学习第十三

1)循环引用的案例及解决办法: #include <iostream> #include <memory> using namespace std; class A;class B { public:B(){cout<<"B constructor---"<<endl;}~B(){cout<<"B deconstructor----"<<endl;}std::weak_…...

java复习-线程的同步和死锁

线程的同步和死锁 同步问题引出 当多个线程访问同一资源时&#xff0c;会出现不同步问题。比如当票贩子A&#xff08;线程A&#xff09;已经通过了“判断”&#xff0c;但由于网络延迟&#xff0c;暂未修改票数的间隔时间内&#xff0c;票贩子B&#xff08;线程B&#xff09;…...

寮步镇网站建设公司/百度推广开户费用多少

忘记管理员密码怎么办之第一招:删除sam文件对sp3以前的工作组模式windows2000&#xff0c;删除winntsystem32config文件夹下的sam文件(无后缀)之后&#xff0c;本机所有用户丢失&#xff0c;用administrator登录&#xff0c;密码空即可忘记管理员密码怎么办之第二招:O&O软件…...

宝鸡营销型网站建设/陕西网站推广公司

实现功能&#xff1a;1.修改标题样式。把jquery ui的标题样式放上去。支持换肤。2.修改按钮样式&#xff0c;换成jqueryui的button按钮样式。3.将模式化窗口的背景换成了jqueryui的模式化背景。代码&#xff1a;//首先要引入jquery&#xff0c;以及ui的包和皮肤的样式如&#x…...

学校网站开发实际意义/全网

一、SourceInsight配置步骤 &#xff08;1&#xff09; 点击project->open project&#xff0c;在弹出的对话框中会显示一个缺省的工程 Base。 注意&#xff1a;此工程是Sourceinsight自带的系统工程&#xff0c;它不是我们的工作工程&#xff0c;但是却非常重要&#xff0…...

高校网站建设需求单/做网络推广怎么收费

我们可以通过如下的方法发布VS2005的网站&#xff1a; “生成”→“发布网站”&#xff1b;弹出对话框&#xff01;在打开的对话框中&#xff0c;有一个选项是至关重要的&#xff0c;那就是“允许更新此预编译站点”&#xff1b;“允许更新此预编译站点”这一项&#xff0c;默认…...

湖州网站建设公司排行榜/广州网络推广公司

http://pengbotao.cn/codeigniter-database.html转载于:https://www.cnblogs.com/bravehunter/p/5672452.html...

mac 网站开发软件有哪些/无锡谷歌推广

走出软件作坊&#xff1a;三五个人十来条枪 如何成为开发正规军&#xff08;一&#xff09; 走出软件作坊&#xff1a;三五个人十来条枪 如何成为开发正规军&#xff08;二&#xff09;走出软件作坊&#xff1a;三五个人十来条枪 如何成为开发正规军&#xff08;三&#xff09;…...