Hadoop大数据应用:HDFS 集群节点缩容

news2024/12/26 2:16:21

目录

一、实验

1.环境

2.HDFS 集群节点缩容

二、问题

1.数据迁移有哪些状态

2.数据迁移失败


一、实验

1.环境

(1)主机

表1  主机

主机架构软件版本IP备注
hadoop

NameNode (已部署)

SecondaryNameNode (已部署)

ResourceManager(已部署)

hadoop

2.7.7192.168.204.50

node01

DataNode(已部署)

NodeManager(已部署)

hadoop

2.7.7192.168.204.51
node02

DataNode(已部署)

NodeManager(已部署)

hadoop

2.7.7192.168.204.52
node03

DataNode(已部署)

NodeManager(已部署)

hadoop

2.7.7192.168.204.53
node04

DataNode(已部署)

hadoop

2.7.7192.168.204.54需求迁移主机

(2)查看jps

hadoop节点

[root@hadoop ~]# jps

node01节点

node02节点

node03节点

node04节点

2.HDFS 集群节点缩容

(1)查看节点状态 (已使用)

node01: 176KB (约等于0.18M )

node02: 280KB  (约等于0.28M )

node03: 260KB  (约等于0.26M )

node04:  8KB (约等于0.008M)

[root@hadoop hadoop]# ./bin/hdfs dfsadmin -report
Configured Capacity: 822126559232 (765.67 GB)
Present Capacity: 798788423680 (743.93 GB)
DFS Remaining: 798787682304 (743.93 GB)
DFS Used: 741376 (724 KB)
DFS Used%: 0.00%
Under replicated blocks: 0
Blocks with corrupt replicas: 0
Missing blocks: 0
Missing blocks (with replication factor 1): 0

-------------------------------------------------
Live datanodes (4):

Name: 192.168.204.54:50010 (node04)
Hostname: node04
Decommission Status : Normal
Configured Capacity: 205531639808 (191.42 GB)
DFS Used: 8192 (8 KB)
Non DFS Used: 5658730496 (5.27 GB)
DFS Remaining: 199872901120 (186.15 GB)
DFS Used%: 0.00%
DFS Remaining%: 97.25%
Configured Cache Capacity: 0 (0 B)
Cache Used: 0 (0 B)
Cache Remaining: 0 (0 B)
Cache Used%: 100.00%
Cache Remaining%: 0.00%
Xceivers: 1
Last contact: Thu Mar 14 15:16:33 CST 2024


Name: 192.168.204.53:50010 (node03)
Hostname: node03
Decommission Status : Normal
Configured Capacity: 205531639808 (191.42 GB)
DFS Used: 266240 (260 KB)
Non DFS Used: 5620936704 (5.23 GB)
DFS Remaining: 199910436864 (186.18 GB)
DFS Used%: 0.00%
DFS Remaining%: 97.27%
Configured Cache Capacity: 0 (0 B)
Cache Used: 0 (0 B)
Cache Remaining: 0 (0 B)
Cache Used%: 100.00%
Cache Remaining%: 0.00%
Xceivers: 1
Last contact: Thu Mar 14 15:16:33 CST 2024


Name: 192.168.204.51:50010 (node01)
Hostname: node01
Decommission Status : Normal
Configured Capacity: 205531639808 (191.42 GB)
DFS Used: 180224 (176 KB)
Non DFS Used: 6029176832 (5.62 GB)
DFS Remaining: 199502282752 (185.80 GB)
DFS Used%: 0.00%
DFS Remaining%: 97.07%
Configured Cache Capacity: 0 (0 B)
Cache Used: 0 (0 B)
Cache Remaining: 0 (0 B)
Cache Used%: 100.00%
Cache Remaining%: 0.00%
Xceivers: 1
Last contact: Thu Mar 14 15:16:34 CST 2024


Name: 192.168.204.52:50010 (node02)
Hostname: node02
Decommission Status : Normal
Configured Capacity: 205531639808 (191.42 GB)
DFS Used: 286720 (280 KB)
Non DFS Used: 6029291520 (5.62 GB)
DFS Remaining: 199502061568 (185.80 GB)
DFS Used%: 0.00%
DFS Remaining%: 97.07%
Configured Cache Capacity: 0 (0 B)
Cache Used: 0 (0 B)
Cache Remaining: 0 (0 B)
Cache Used%: 100.00%
Cache Remaining%: 0.00%
Xceivers: 1
Last contact: Thu Mar 14 15:16:34 CST 2024

(2)查看

[root@hadoop ~]# cd /usr/local/hadoop/
[root@hadoop hadoop]# ./bin/hadoop fs -ls /

(3)上传第一个测试文件

[root@hadoop ~]# /usr/local/hadoop/bin/hadoop fs -put /root/jenkins.tar.gz /jenkins.tar.gz

观察上传变化

[root@hadoop hadoop]# ./bin/hadoop fs -ls /

(4)上传第二个测试文件

[root@hadoop ~]# /usr/local/hadoop/bin/hadoop fs -put /root/pinpoint-image.tar.gz /pinpoint.tar.gz

 观察上传变化

[root@hadoop hadoop]# ./bin/hadoop fs -ls /

(5)web查看

http://192.168.204.50:50070/

(6)清空本地文件

[root@hadoop ~]# rm -rf jenkins.tar.gz pinpoint-image.tar.gz

(7)再次查看节点状态 (已使用)

node01: 2.41GB 

node02: 2.27GB 

node03: 2.15GB  

node04:  2.26GB 

[root@hadoop hadoop]#  ./bin/hdfs dfsadmin -report
Configured Capacity: 822126559232 (765.67 GB)
Present Capacity: 798784053248 (743.93 GB)
DFS Remaining: 789019389952 (734.83 GB)
DFS Used: 9764663296 (9.09 GB)
DFS Used%: 1.22%
Under replicated blocks: 0
Blocks with corrupt replicas: 0
Missing blocks: 0
Missing blocks (with replication factor 1): 0

-------------------------------------------------
Live datanodes (4):

Name: 192.168.204.54:50010 (node04)
Hostname: node04
Decommission Status : Normal
Configured Capacity: 205531639808 (191.42 GB)
DFS Used: 2424492032 (2.26 GB)
Non DFS Used: 5662638080 (5.27 GB)
DFS Remaining: 197444509696 (183.88 GB)
DFS Used%: 1.18%
DFS Remaining%: 96.07%
Configured Cache Capacity: 0 (0 B)
Cache Used: 0 (0 B)
Cache Remaining: 0 (0 B)
Cache Used%: 100.00%
Cache Remaining%: 0.00%
Xceivers: 1
Last contact: Thu Mar 14 15:57:57 CST 2024


Name: 192.168.204.53:50010 (node03)
Hostname: node03
Decommission Status : Normal
Configured Capacity: 205531639808 (191.42 GB)
DFS Used: 2312085504 (2.15 GB)
Non DFS Used: 5620936704 (5.23 GB)
DFS Remaining: 197598617600 (184.03 GB)
DFS Used%: 1.12%
DFS Remaining%: 96.14%
Configured Cache Capacity: 0 (0 B)
Cache Used: 0 (0 B)
Cache Remaining: 0 (0 B)
Cache Used%: 100.00%
Cache Remaining%: 0.00%
Xceivers: 1
Last contact: Thu Mar 14 15:57:58 CST 2024


Name: 192.168.204.51:50010 (node01)
Hostname: node01
Decommission Status : Normal
Configured Capacity: 205531639808 (191.42 GB)
DFS Used: 2592927744 (2.41 GB)
Non DFS Used: 6029148160 (5.62 GB)
DFS Remaining: 196909563904 (183.39 GB)
DFS Used%: 1.26%
DFS Remaining%: 95.80%
Configured Cache Capacity: 0 (0 B)
Cache Used: 0 (0 B)
Cache Remaining: 0 (0 B)
Cache Used%: 100.00%
Cache Remaining%: 0.00%
Xceivers: 1
Last contact: Thu Mar 14 15:57:57 CST 2024


Name: 192.168.204.52:50010 (node02)
Hostname: node02
Decommission Status : Normal
Configured Capacity: 205531639808 (191.42 GB)
DFS Used: 2435158016 (2.27 GB)
Non DFS Used: 6029783040 (5.62 GB)
DFS Remaining: 197066698752 (183.53 GB)
DFS Used%: 1.18%
DFS Remaining%: 95.88%
Configured Cache Capacity: 0 (0 B)
Cache Used: 0 (0 B)
Cache Remaining: 0 (0 B)
Cache Used%: 100.00%
Cache Remaining%: 0.00%
Xceivers: 1
Last contact: Thu Mar 14 15:57:59 CST 2024

(8)计算总存储使用量

9.09 G (jenkins 1.24 GB,pinpoint 3.27 GB ,存储副本量为2)

(9)修改配置文件(hadoop节点)

#添加代码

[root@hadoop hadoop]# vim hdfs-site.xml

修改前:

修改后:

……
      <property>
          <name>dfs.hosts.exclude</name>
          <value>/usr/local/hadoop/etc/hadoop/exclude</value>
      </property>
……

(10)配置移除主机

[root@hadoop hadoop]# vim /usr/local/hadoop/etc/hadoop/exclude

node04

(11)数据刷新

[root@hadoop hadoop]# ./bin/hdfs dfsadmin -refreshNodes

(12)查看节点状态 

node04节点状态变为Decommissioned in Program

[root@hadoop hadoop]#  ./bin/hdfs dfsadmin -report
Configured Capacity: 619019411456 (576.51 GB)
Present Capacity: 600866701319 (559.60 GB)
DFS Remaining: 590966771712 (550.38 GB)
DFS Used: 9899929607 (9.22 GB)
DFS Used%: 1.65%
Under replicated blocks: 2
Blocks with corrupt replicas: 0
Missing blocks: 0
Missing blocks (with replication factor 1): 0

-------------------------------------------------
Live datanodes (4):

Name: 192.168.204.54:50010 (node04)
Hostname: node04
Decommission Status : Decommission in progress
Configured Capacity: 205531639808 (191.42 GB)
DFS Used: 2424492032 (2.26 GB)
Non DFS Used: 5663162368 (5.27 GB)
DFS Remaining: 197443985408 (183.88 GB)
DFS Used%: 1.18%
DFS Remaining%: 96.06%
Configured Cache Capacity: 0 (0 B)
Cache Used: 0 (0 B)
Cache Remaining: 0 (0 B)
Cache Used%: 100.00%
Cache Remaining%: 0.00%
Xceivers: 1
Last contact: Thu Mar 14 16:34:33 CST 2024


Name: 192.168.204.53:50010 (node03)
Hostname: node03
Decommission Status : Normal
Configured Capacity: 205531639808 (191.42 GB)
DFS Used: 2312085504 (2.15 GB)
Non DFS Used: 5756112896 (5.36 GB)
DFS Remaining: 197463441408 (183.90 GB)
DFS Used%: 1.12%
DFS Remaining%: 96.07%
Configured Cache Capacity: 0 (0 B)
Cache Used: 0 (0 B)
Cache Remaining: 0 (0 B)
Cache Used%: 100.00%
Cache Remaining%: 0.00%
Xceivers: 2
Last contact: Thu Mar 14 16:34:31 CST 2024


Name: 192.168.204.51:50010 (node01)
Hostname: node01
Decommission Status : Normal
Configured Capacity: 205531639808 (191.42 GB)
DFS Used: 2592927744 (2.41 GB)
Non DFS Used: 6232051712 (5.80 GB)
DFS Remaining: 196706660352 (183.20 GB)
DFS Used%: 1.26%
DFS Remaining%: 95.71%
Configured Cache Capacity: 0 (0 B)
Cache Used: 0 (0 B)
Cache Remaining: 0 (0 B)
Cache Used%: 100.00%
Cache Remaining%: 0.00%
Xceivers: 3
Last contact: Thu Mar 14 16:34:33 CST 2024


Name: 192.168.204.52:50010 (node02)
Hostname: node02
Decommission Status : Normal
Configured Capacity: 205531639808 (191.42 GB)
DFS Used: 2570424327 (2.39 GB)
Non DFS Used: 6164545529 (5.74 GB)
DFS Remaining: 196796669952 (183.28 GB)
DFS Used%: 1.25%
DFS Remaining%: 95.75%
Configured Cache Capacity: 0 (0 B)
Cache Used: 0 (0 B)
Cache Remaining: 0 (0 B)
Cache Used%: 100.00%
Cache Remaining%: 0.00%
Xceivers: 2
Last contact: Thu Mar 14 16:34:32 CST 2024


Decommissioning datanodes (1):

Name: 192.168.204.54:50010 (node04)
Hostname: node04
Decommission Status : Decommission in progress
Configured Capacity: 205531639808 (191.42 GB)
DFS Used: 2424492032 (2.26 GB)
Non DFS Used: 5663162368 (5.27 GB)
DFS Remaining: 197443985408 (183.88 GB)
DFS Used%: 1.18%
DFS Remaining%: 96.06%
Configured Cache Capacity: 0 (0 B)
Cache Used: 0 (0 B)
Cache Remaining: 0 (0 B)
Cache Used%: 100.00%
Cache Remaining%: 0.00%
Xceivers: 1
Last contact: Thu Mar 14 16:34:33 CST 2024

(13) 再次查看节点

node04节点状态变为Decommissioned

[root@hadoop hadoop]#  ./bin/hdfs dfsadmin -report
Configured Capacity: 619019411456 (576.51 GB)
Present Capacity: 601338761216 (560.04 GB)
DFS Remaining: 589149618176 (548.69 GB)
DFS Used: 12189143040 (11.35 GB)
DFS Used%: 2.03%
Under replicated blocks: 0
Blocks with corrupt replicas: 0
Missing blocks: 0
Missing blocks (with replication factor 1): 0

-------------------------------------------------
Live datanodes (4):

Name: 192.168.204.54:50010 (node04)
Hostname: node04
Decommission Status : Decommissioned
Configured Capacity: 205531639808 (191.42 GB)
DFS Used: 2424492032 (2.26 GB)
Non DFS Used: 5662666752 (5.27 GB)
DFS Remaining: 197444481024 (183.88 GB)
DFS Used%: 1.18%
DFS Remaining%: 96.07%
Configured Cache Capacity: 0 (0 B)
Cache Used: 0 (0 B)
Cache Remaining: 0 (0 B)
Cache Used%: 100.00%
Cache Remaining%: 0.00%
Xceivers: 1
Last contact: Thu Mar 14 16:42:33 CST 2024


Name: 192.168.204.53:50010 (node03)
Hostname: node03
Decommission Status : Normal
Configured Capacity: 205531639808 (191.42 GB)
DFS Used: 3123707904 (2.91 GB)
Non DFS Used: 5620969472 (5.23 GB)
DFS Remaining: 196786962432 (183.27 GB)
DFS Used%: 1.52%
DFS Remaining%: 95.75%
Configured Cache Capacity: 0 (0 B)
Cache Used: 0 (0 B)
Cache Remaining: 0 (0 B)
Cache Used%: 100.00%
Cache Remaining%: 0.00%
Xceivers: 1
Last contact: Thu Mar 14 16:42:31 CST 2024


Name: 192.168.204.51:50010 (node01)
Hostname: node01
Decommission Status : Normal
Configured Capacity: 205531639808 (191.42 GB)
DFS Used: 2998738944 (2.79 GB)
Non DFS Used: 6029717504 (5.62 GB)
DFS Remaining: 196503183360 (183.01 GB)
DFS Used%: 1.46%
DFS Remaining%: 95.61%
Configured Cache Capacity: 0 (0 B)
Cache Used: 0 (0 B)
Cache Remaining: 0 (0 B)
Cache Used%: 100.00%
Cache Remaining%: 0.00%
Xceivers: 1
Last contact: Thu Mar 14 16:42:33 CST 2024


Name: 192.168.204.52:50010 (node02)
Hostname: node02
Decommission Status : Normal
Configured Capacity: 205531639808 (191.42 GB)
DFS Used: 3642204160 (3.39 GB)
Non DFS Used: 6029963264 (5.62 GB)
DFS Remaining: 195859472384 (182.41 GB)
DFS Used%: 1.77%
DFS Remaining%: 95.29%
Configured Cache Capacity: 0 (0 B)
Cache Used: 0 (0 B)
Cache Remaining: 0 (0 B)
Cache Used%: 100.00%
Cache Remaining%: 0.00%
Xceivers: 1
Last contact: Thu Mar 14 16:42:32 CST 2024

(14) 重启

[root@hadoop hadoop]# ssh node04

[root@node04 ~]# reboot

(15)查看节点(已使用)

node01: 2.79GB 

node02: 3.39GB 

node03: 2.91GB  

[root@hadoop hadoop]#  ./bin/hdfs dfsadmin -report
Configured Capacity: 619019411456 (576.51 GB)
Present Capacity: 601338118144 (560.04 GB)
DFS Remaining: 589148975104 (548.69 GB)
DFS Used: 12189143040 (11.35 GB)
DFS Used%: 2.03%
Under replicated blocks: 0
Blocks with corrupt replicas: 0
Missing blocks: 0
Missing blocks (with replication factor 1): 0

-------------------------------------------------
Live datanodes (3):

Name: 192.168.204.53:50010 (node03)
Hostname: node03
Decommission Status : Normal
Configured Capacity: 205531639808 (191.42 GB)
DFS Used: 3123707904 (2.91 GB)
Non DFS Used: 5621551104 (5.24 GB)
DFS Remaining: 196786380800 (183.27 GB)
DFS Used%: 1.52%
DFS Remaining%: 95.75%
Configured Cache Capacity: 0 (0 B)
Cache Used: 0 (0 B)
Cache Remaining: 0 (0 B)
Cache Used%: 100.00%
Cache Remaining%: 0.00%
Xceivers: 1
Last contact: Thu Mar 14 17:00:14 CST 2024


Name: 192.168.204.51:50010 (node01)
Hostname: node01
Decommission Status : Normal
Configured Capacity: 205531639808 (191.42 GB)
DFS Used: 2998738944 (2.79 GB)
Non DFS Used: 6029742080 (5.62 GB)
DFS Remaining: 196503158784 (183.01 GB)
DFS Used%: 1.46%
DFS Remaining%: 95.61%
Configured Cache Capacity: 0 (0 B)
Cache Used: 0 (0 B)
Cache Remaining: 0 (0 B)
Cache Used%: 100.00%
Cache Remaining%: 0.00%
Xceivers: 1
Last contact: Thu Mar 14 17:00:12 CST 2024


Name: 192.168.204.52:50010 (node02)
Hostname: node02
Decommission Status : Normal
Configured Capacity: 205531639808 (191.42 GB)
DFS Used: 3642204160 (3.39 GB)
Non DFS Used: 6030000128 (5.62 GB)
DFS Remaining: 195859435520 (182.41 GB)
DFS Used%: 1.77%
DFS Remaining%: 95.29%
Configured Cache Capacity: 0 (0 B)
Cache Used: 0 (0 B)
Cache Remaining: 0 (0 B)
Cache Used%: 100.00%
Cache Remaining%: 0.00%
Xceivers: 1
Last contact: Thu Mar 14 17:00:12 CST 2024


Dead datanodes (1):

Name: 192.168.204.54:50010 (node04)
Hostname: node04
Decommission Status : Decommissioned
Configured Capacity: 205531639808 (191.42 GB)
DFS Used: 2424492032 (2.26 GB)
Non DFS Used: 5663240192 (5.27 GB)
DFS Remaining: 197443907584 (183.88 GB)
DFS Used%: 1.18%
DFS Remaining%: 96.06%
Configured Cache Capacity: 0 (0 B)
Cache Used: 0 (0 B)
Cache Remaining: 0 (0 B)
Cache Used%: 100.00%
Cache Remaining%: 0.00%
Xceivers: 1
Last contact: Thu Mar 14 16:47:27 CST 2024

计算总使用量

(16)回顾使用量变化

表2  数据迁移

主机初始上传迁移前迁移后IP备注
node0176KB 

jenkins 1.24 GB

pinpoint 3.27 GB 

2.41GB2.79GB 192.168.204.51

replication 2

(副本备份量)

node02280KB  2.27GB 3.39GB 192.168.204.52
node03260KB  2.15GB  2.91GB  192.168.204.53
node048KB 2.26GB /192.168.204.54迁移主机
总大小9.09GB9.09GB

二、问题

1.数据迁移有哪些状态

(1)状态

1)正常状态
Normal

2)数据正在迁移
Decommissioned in Progress

3)数据迁移完成 (仅变成当前状态才能down机下线)
Decommissioned

2.数据迁移失败

(1)失败

迁移node04状态依然为Normal

(2)原因分析

配置错误。

(3)解决方法

修改配置。

修改前:

修改后:

成功:

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/1518042.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

为什么手机和电视ip地址不一样

在数字化时代&#xff0c;我们每天都会与各种电子设备打交道&#xff0c;其中最常见的就是手机和电视。当我们连接到互联网时&#xff0c;这些设备都会被分配一个独特的IP地址&#xff0c;用于在网络上进行标识和通信。然而&#xff0c;您可能已经注意到&#xff0c;即使手机和…

【linux线程(二)】线程互斥与线程同步

&#x1f493;博主CSDN主页:杭电码农-NEO&#x1f493;   ⏩专栏分类:Linux从入门到精通⏪   &#x1f69a;代码仓库:NEO的学习日记&#x1f69a;   &#x1f339;关注我&#x1faf5;带你学更多操作系统知识   &#x1f51d;&#x1f51d; Linux线程 1. 前言2. 多线程互…

pip 配置镜像加速安装

在使用pip安装Python第三方库时&#xff0c;默认是使用pip官网的非常慢&#xff0c;可通过配置国内镜像源加速下载速度&#xff0c;以下是如何使用国内镜像源安装Python库的两种常见方式&#xff1a; 临时使用镜像源安装 如果你只是想临时使用某个镜像源安装单个或几个库&…

让el-input与其他组件能够显示在同一行

让el-input与其他组件能够显示在同一行 说明&#xff1a;由于el-input标签使用会默认占满一行&#xff0c;所以在某些需要多个展示一行的时候不适用&#xff0c;因此需要能够跟其他组件显示在同一行。 效果&#xff1a; 1、el-input标签内使用css属性inline 111<el-inp…

Mac-自动操作 实现双击即可执行shell脚本

背景 在Mac上运行shell脚本&#xff0c;总是需要开启终端窗口执行&#xff0c;比较麻烦 方案 使用Mac上自带的“自动操作”程序&#xff0c;将shell脚本打包成可运行程序(.app后缀)&#xff0c;实现双击打开即可执行shell脚本 实现细节 找到Mac上 应用程序中的 自动操作&am…

1 redis7概述

Redis7 1 Redis简介 Redis之所以称之为字典服务&#xff0c; 是因为 Redis 是一个 key-value存储系统。 支持存储的 value类型很多&#xff0c; 包括 String(字符串)、List(链表)、Set(集合)、Zset(sorted set --有序集合)和 Hash&#xff08;哈希类型&#xff09;等。 Redis…

Flink通讯模型—Akka与Actor模型

Carl Hewitt 在1973年对Actor模型进行了如下定义&#xff1a;"Actor模型是一个把Actor作为并发计算的通用原语". Actor是异步驱动&#xff0c;可以并行和分布式部署及运行的最小颗粒。也就是说&#xff0c;它可以被分配&#xff0c;分布&#xff0c;调度到不同的CPU&…

2024.3.14 C++

思维导图 封装类 用其成员函数实现&#xff08;对该类的&#xff09;数学运算符的重载&#xff08;加法&#xff09;&#xff0c;并封装一个全局函数实现&#xff08;对该类的&#xff09;数学运算符的重载&#xff08;减法&#xff09;。 #include <iostream>using nam…

202012青少年软件编程(图形化) 等级考试试卷(二级)

青少年软件编程(图形化) 等级考试试卷(二级)2020年12月 第1题:【 单选题】 实现角色一直移动, 碰到舞台边缘发出声音, 正确的选项是?( ) A: B: C: D: 【正确答案】: B 【试题解析】 : 第2题:【 单选题】 执行下图所示的程序, 得到的结果是?( ) A:…

c++ 面试100个题目中的编程题目

88、下列程序的运行结果是? #include <stdlib.h> #include <stdio.h> #include <string.h> #include <iostream> const char* str = "vermeer"; using namespace std; int main(){ const char* pstr = str;cout << "The add…

SAT和SMT介绍及求解器使用

一、SAT 1、介绍 &#xff08;1&#xff09;定义 SAT即命题逻辑公式的可满足性问题/布尔可满足性问题。即给定一个与或非和变量组成的命题公式&#xff0c;判断是否存在一些结果使得这个公式成立 它是第一个被确认为NP完全的问题。 输入&#xff1a;析取范式&#xff08;C…

Linux 大页内存 Huge Pages 虚拟内存

Linux 大页内存 Huge Pages 虚拟内存 - 秋来叶黄 - 博客园 (cnblogs.com) Linux为什么要有大页内存&#xff1f;为什么DPDK必须要设置大页内存&#xff1f;这都是由系统架构决定的。一开始为了解决一个问题&#xff0c;设计了对应的方案&#xff0c;随着事物的发展&#xff0c…

【CesiumJS-5】绘制动态路线实现飞行航线、汽车轨迹、路径漫游等

实现效果 前言 Cesium中&#xff0c;动态路线绘制的核心是借助CZML格式&#xff0c;CZML是一种用来描述动态场景的JSON数组,可以用来描述点、线、多边形、体、模型及其他图元,同时定义它们是怎样随时间变化的&#xff1b; CZML主要做三件事&#xff1a; 1.添加模型信息 2.添加…

Hadoop大数据应用:Yarn 节点实现扩容与缩容

目录 一、实验 1.环境 2.Yarn 节点扩容 3.Yarn 节点缩容 二、问题 1.yarn启动服务报错 一、实验 1.环境 &#xff08;1&#xff09;主机 表1 主机 主机架构软件版本IP备注hadoop NameNode &#xff08;已部署&#xff09; SecondaryNameNode &#xff08;已部署&…

【vue baidu-map】marker鼠标悬浮点击事件失效

要实现的效果&#xff1a;鼠标悬浮或者点击标注点会出现弹窗 验证过鼠标点击悬浮代码没问题&#xff0c;最后发现是控件样式影响的 ::v-deep #bjmap .BMap_noprint {inset: 10px 90% auto auto !important; } 只要增加上述样式&#xff0c;鼠标悬浮事件就会失效

QT使用dumpcpp为COM生成h及cpp的方式,COM是C#的dll注册的

目录 1.C#的dll注册为COM&#xff0c;采用bat的方式 2.通过qt的dumpcpp来生成h及cpp文件 3.h文件和cpp文件处理。 台达数控系统的C#的dll dumpcpp用的tlb文件 dumpcpp生成的原生h文件 dumpcpp生成的原生cpp dump生成后的的原生cpp文件修改后的cpp文资源 dump生成后的的…

【探索Linux】—— 强大的命令行工具 P.27(网络编程套接字 —— UDP协议介绍 | TCP协议介绍 | UDP 和 TCP 的异同)

阅读导航 引言一、UDP协议1. UDP简介2. UDP的特点3. UDP的使用场景4. UDP的局限性 二、TCP协议1. TCP简介2. TCP的特点3. TCP的应用场景 三、UDP 和 TCP 的异同温馨提示 引言 在上一篇文章中&#xff0c;我们深入探讨了Linux网络编程的基石——套接字&#xff08;Socket&#…

pytorch loss及其梯度

目录 1.loss的种类1.1 MSE1.2 MSE推导1.3 autograd.grad1.4 loss.backward 2. Softmax2.1 softmax推导 1.loss的种类 常见两种一种是均方差&#xff0c;一种是交叉熵 1.1 MSE 1.2 MSE推导 1.3 autograd.grad 1.4 loss.backward 注意&#xff1a;autograd.grad直接返回梯度&a…

守护健康,从营养开始 —— 帕金森患者的饮食秘籍

亲爱的读者朋友们&#xff0c;您是否知道&#xff0c;在对抗帕金森病的道路上&#xff0c;正确的饮食和营养补充可以成为我们的有力盟友&#xff1f;今天&#xff0c;就让我们一起探索那些能够帮助帕金森患者改善症状、提高生活质量的营养素&#xff0c;开启健康生活的新篇章。…

【保姆级】GPT的Oops问题快速解决方案

GPT的"Oops"问题通常指的是GPT在处理请求时突然遇到错误或无法提供预期输出的情况。要快速解决这个问题&#xff0c;可以尝试以下分步策略&#xff1a; 确认问题范围&#xff1a; 首先&#xff0c;确认问题是偶发的还是持续存在的。如果是偶发的&#xff0c;可能是临…