- unicorn 部署 FastAPI 应用程序
九品神元师
fastapi
本地部署本地开发调试过程中,我通常是这样启动Fastapi服务的在终端中运行:uvicornmain:app--host0.0.0.0--port80当然,也可以python脚本启动:importuvicornuvicorn.run(app="main:app",host="0.0.0.0",port=8088,reload=True)这样就好启动一个服务,reload=True支持热重载,方便
- 【Python】微信发送信息
onenote_1
python微信开发语言
Python微信发送信息cat/opt/shell/weixin.py#!/usr/bin/python#-*-coding:utf-8-*-importsysimporturllib2importtimeimportjsonimportrequestsreload(sys)sys.setdefaultencoding('utf-8')touser=sys.argv[1]title=sys.arg
- 前端工程化——脚手架及自动化构建
Jelly-JK
前端工程化javascriptnode.jshtml
定义一切以提高效率、降低成本、质量保证为目的的手段,都属于工程化前端工程化主要解决的问题传统语言或语法的弊端无法使用模块化/组件化重复性的机械工作代码风格统一、质量保证依赖后端服务接口的保证整体依赖后端项目工程化的表现体现在项目的整个流程:创建项目创建项目结构创建特定类型文件编码格式化校验校验代码风格编译/构建/打包预览/测试WebServer/MockLiveReloading/HMRSourc
- Linux防火墙,常用的三个命令
风雪山神喵
https://blog.csdn.net/weixin_38492591/article/details/78474310关闭某个端口的防火墙firewall-cmd--zone=public--add-port=80/tcp--permanent重启防火墙,让关闭防火墙的操作生效firewall-cmd--reload查看防火墙列表信息firewall-cmd--list-all
- “Jmeter-InfluxDB-Grafana“常见错误有哪些如何解决?
神即道 道法自然 如来
jmetergrafana
常见错误:1.网络不同,检查网络IP是否写对,端口号有没有放开(Centos7端口号命令),防火墙是否关闭firewall-cmd--add-port=3000/tcp--permanentfirewall-cmd--add-port=3000/udp--permanentfirewall-cmd--reload2.Jmeter里面的influxDB地址里面的db=jmeter,和在influxd
- html网页制作每周食谱,新增食谱.html
PEI Lobster
新增食谱$axure.utils.getTransparentGifPath=function(){return'resources/images/transparent.gif';};$axure.utils.getOtherPath=function(){return'resources/Other.html';};$axure.utils.getReloadPath=function(){
- vue3+vite+electron开发桌面端应用流程
沪cares
vueelectronjavascript前端
一、创建项目初始化项目:npminitvite@latest'projectname:输入项目名称,selectaframework:选择框架vueselectavariant:选择使用js或者ts安装默认依赖包:进入项目,npminstall安装electron:npminstall--save-develectron安装热加载(自动加载更新):npminstallelectron-reload
- IOS 21 发现界面(UITableView)单曲列表(UITableView)实现
sziitjin
IOSiosUITableView
发现界面完整效果本文实现歌单列表效果文章基于IOS20发现界面(UITableView)歌单列表(UICollectionView)实现继续实现发现界面单曲列表效果单曲列表Cell实现实现流程:1.创建Cell,及在使用UITableView的Controller控制器上注册Cell;2.获取data列表数据,并调用UITableView的reloadData(),将数据更新到列表;3.将data
- nginx 部署前端项目的详细步骤(vue项目build打包+nginx部署)_前端工程打包部署到nginx(2)
2401_84437170
程序员前端nginxvue.js
//开启服务1.startnginx.exe//cmd命令进入nginx文件夹后,使用该命令2.直接点击nginx目录下的nginx.exe//停止服务nginx-sstop//快速停止nginxnginx-squit//quit是完整有序的停止nginx//重新加载配置文件nginx-sreload//热加载####2.2.2默认配置**nginx-1.21.0\conf下的nginx.conf
- JavaScript初级——Location
Fan_web
前端学习分享前端cssjavascript开发语言html
1、Location——该对象中封装了浏览器的地址栏的信息2、如果直接打印Location,则可以获取到地址栏的信息(当前页面的完整路径)。3、如果直接将location属性修改为一个完整的路径或者相对路径,则页面会自动跳转到该路径,并且会生成相应的历史记录。4、方法:①assign()——用来跳转到其他页面,作用和直接修改location一样。②reload()——用于重新加载当前页面,作用和刷
- IOS 20 发现界面(UITableView)歌单列表(UICollectionView)实现
sziitjin
IOSiosUITableViewCollectionView
发现界面完整效果本文实现歌单列表效果文章基于IOS19发现界面(UITableView)快捷按钮实现继续实现发现界面歌单列表效果歌单列表Cell实现实现流程:1.创建Cell,及在使用UITableView的Controller控制器上注册Cell;2.获取data列表数据,并调用UITableView的reloadData(),将数据更新到列表;3.将data的Item数据绑定UITableVi
- 算法学习-2024.8.16
蓝纹绿茶
学习
一、Tensorrt学习补充TensorRT支持INT8和FP16的计算。深度学习网络在训练时,通常使用32位或16位数据。TensorRT则在网络的推理时选用不这么高的精度,达到加速推断的目的。TensorRT对于网络结构进行了重构,把一些能够合并的运算合并在了一起,针对GPU的特性做了优化。一个深度学习模型,在没有优化的情况下,比如一个卷积层、一个偏置层和一个reload层,这三层是需要调用三
- nginx 配置详解
做个专注的工程师
#nginxnginx
基本命令nginx-t检查配置文件是否有语法错误nginx-sreload热加载,重新加载配置文件nginx-sstop快速关闭nginx-squit等待工作进程处理完成后关闭复制代码搭建好nginx服务器并启动过后,我们先看nginx默认配置,再逐个介绍不同使用场景。默认配置Nginx安装目录下,我们复制一份`nginx.conf`成`nginx.conf.default`作为配置文件备份,然后
- tableView reloadData 刷新结束后再执行后续操作
wg刚
[self.tableViewreloadData]并不会等待tableview更新结束后才执行后续代码,而是立即执行后续代码做个试验:代码如下@interfaceViewController()@property(nonatomic,strong)UITableView*tableView;@property(nonatomic,strong)NSArray*dataArr;@end@imple
- brew 更新php,在Mac上使用Homebrew升级到PHP 8
人家卖汽车的啦
brew更新php
本文翻译自:https://stitcher.io/blog/php-8-upgrade-mac用Homebrew升级首先要确保Brew是最新的:brewupdate接下来,升级PHP:brewupgradephp通过运行php-v以下命令检查当前版本:php-v重新启动Nginx或Apache:sudonginx-sreloadsudoapachectlrestart并通过访问以下脚本确保本地W
- 前端性能优化-CSS性能优化
LYFlied
css前端css性能优化面试
文章目录一、内联首屏关键CSS二、异步加载CSS异步加载的几种方式1.js动态创建样式表link元素,并插入到DOM中。2.设置media属性3.设置rel属性4.rel="preload"三、文件压缩四、去除无用CSS五、有选择地使用选择器六、减少使用昂贵的属性七、优化重排与重绘1.减少重排2.避免不必要的重绘八、让元素及其内容尽可能独立于文档树的其余部分九、避免使用@import十、开启GPU
- 群辉docker前端部署失败处理2
脚大江山稳
docker前端容器
失败的原因是需要提升权限chmod-R755/usr/share/nginx/htmlchown-Rroot:root/usr/share/nginx/htmlnginx-sreloaddockerrestartdfdgdemo_vue构建镜像处理方式RUNchmod-Ra+rw/usr/share/nginx/html
- mysql+索引+rebuild_MySQL如何进行索引重建操作?
驴放屁
在MySQL数据库中,没有类似于SQLServer数据库或Oracle数据库中索引重建的语法(ALTERINDEX...REBUILD),那么在MySQL数据库中,是否有什么方式重建索引呢?在官方文档中"2.11.10RebuildingorRepairingTablesorIndexes"中,提到下面三种方式可以RebuildIndex·DumpandReloadMethod·ALTERTABL
- golang学习笔记——grom连接mysql
怪我冷i
golang从入门到入门golang
GORM指南ThefantasticORMlibraryforGolangaimstobedeveloperfriendly.Golang的ORM库旨在对开发人员友好。特性全功能ORM关联(HasOne,HasMany,BelongsTo,ManyToMany,多态,单表继承)Create,Save,Update,Delete,Find中钩子方法支持Preload、Joins的预加载事务,嵌套事务
- Tomcat热加载和热部署
阿立聊代码
Tomcattomcatjavatomcat热加载tomcat热部署
2.Tomcat热加载和热部署在项目开发过程中,经常要改动Java/JSP文件,但是又不想重新启动Tomcat,有两种方式:热加载和热部署。热部署表示重新部署应⽤,它的执行主体是Host。热加载表示重新加载class,它的执行主体是Context。热加载:在server.xml->context标签中设置reloadable="true"热部署:在server.xml->Host标签中设置auto
- nginx解决跨域问题
默默且听风
如题第一步:下载nginx传送门:nginx。笔者使用的是win系统,选择的是nginx/Windows-1.20.1。第二部:启动nginx双击启动##特别注意,win下每次开机只需要启动一次,以后更改配置cmd中nginx-sreload重新载入配置文件即可。多次启动会启动多个nginx进程导致你无法看到最新的更改第三部:填写配置文件下载完成后得到是一个压缩包,解压后进入目录(根目录/conf
- Electron入门教程2 ——进程模型
害恶细君
windows前端框架electronchromenode.js
欢迎来到Electron的第二期入门教程,上一期我们从零开始编写并发布了第一个简单的windows桌面应用程序,对electron的项目结构等也有了基本了解。这一期开始,会继续深入地学习Electron的其他知识点,这一节概念性的东西会比较多,虽然后面也有实操的点,但重在理解。上一节写preload.js的时候,就提到过进程相关的概念,但是并没有详细地去学习。Electron继承了Chromium
- 学习electron遇到的问题
太龙
经验electron
1、遇到requireisnotdefined的问题·。解决:webPreferences加入contextIsolation:false注:似乎是electron的开发者不提倡renderer.js使用node,而提倡用preload.js使用node。2、使用alert()出现输入框无法再编辑的问题。解决方式:未解决,事实上我使用alert()时还导致了其他问题,不知什么原因。可以使用elec
- electron v12.0.1 后一些配置的变化
陈鹏-hhuiot
web
设置权限在main.js的webPreferences中加入两行配置constmainWindow=newBrowserWindow({width:800,height:600,webPreferences:{nodeIntegration:true,contextIsolation:false,preload:path.join(__dirname,'preload.js')}})设置页面中的安
- linux使用nginx部署springboot + vue分离项目
Miki_souls
付费专栏Javaweb开发linuxspringbootvue.js
第一步,打包后端项目maven打包springboot项目为jar文件,上传到服务器,然后运行此jar,具体操作参考:centos部署jar包_centosjar静态资源文件-CSDN博客第二步,安装nginx具体操作自行查找,相关命令:启动:/usr/local/nginx/sbin/nginx重新加载配置:/usr/local/nginx/sbin/nginx-sreload第三步,打包前端项
- 游戏引擎phaser.js3的使用之图片资源加载及显示
m0_61177996
游戏引擎
上一篇有说基础的使用,这篇接着说如何把图片正确的加载进去首先在preload里面加载资源,引入你的图片加载进去functionpreload(){this.load.image('sky','assets/sky.png');this.load.image('ground','assets/platform.png');this.load.spritesheet('dude','assets/du
- Qt3D给圆环等立体图形添加纹理图片
1号程序媛
3D开发大全3dqtquickQt3DQt3D建模QtOpenGL
添加纹理图片,首先需要自己找一个纹理图,当然了,随便什么图片都行。创建3D图形的主要步骤查看另一篇文章。这里主要代码如下:使用QTextureLoader加载图片,图片路径需为qrc:/的路径。auto*planeTransform1=newQt3DCore::QTransform();planeTransform1->setTranslation(QVector3D(0,0,0));Qt3DEx
- extjs 中store 关于baseParams的一个bug
hwssz
extjsactionfunctionnull
困扰于roload参数不变的问题,很幸运在网上找到了答案,贴在下面:http://www.javaeye.com/topic/713163ExtJs中,我们使用GirdPanel的时候往往需要给后台传递查询条件。一般是通过修改Store的baseParams。Js代码varstore=GirdPanel.getStore();store.baseParams={查询条件}store.reload(
- 20240229笔记
xiaoxiao无脸男
笔记javascript
浏览器预加载器手动:prefetchpreload会尽早加载但不会过早执行script自动:浏览器自身的智能预测和预先加载下一页内容的功能。浏览器内部策略决定。动态加载脚本通过script标签实现缺点:对浏览器预加载器是不可见的https2优点多路复用二进制分帧头部压缩服务器推送优先级和流量控制下载图片并不一定要将image添加到dom中,只要添加了src就会下载。下载Js需要添加src,并添加到
- 面试官:Feign 第一次调用为什么会很慢?大部分人都答不上来!
z.jiaminf
java开发语言
前言Ribbon是如何进行负载的RibbonClientConfigurationZoneAwareLoadBalancerRibbon负载均衡策略Ribbon-eager-load(饥饿加载)模式开启Ribbon饥饿加载总结前言首先要了解Feign是如何进行远程调用的,这里面包括,注册中心、负载均衡、FeignClient之间的关系,微服务通过不论是eureka、nacos也好注册到服务端,Fe
- 算法 单链的创建与删除
换个号韩国红果果
c算法
先创建结构体
struct student {
int data;
//int tag;//标记这是第几个
struct student *next;
};
// addone 用于将一个数插入已从小到大排好序的链中
struct student *addone(struct student *h,int x){
if(h==NULL) //??????
- 《大型网站系统与Java中间件实践》第2章读后感
白糖_
java中间件
断断续续花了两天时间试读了《大型网站系统与Java中间件实践》的第2章,这章总述了从一个小型单机构建的网站发展到大型网站的演化过程---整个过程会遇到很多困难,但每一个屏障都会有解决方案,最终就是依靠这些个解决方案汇聚到一起组成了一个健壮稳定高效的大型系统。
看完整章内容,
- zeus持久层spring事务单元测试
deng520159
javaDAOspringjdbc
今天把zeus事务单元测试放出来,让大家指出他的毛病,
1.ZeusTransactionTest.java 单元测试
package com.dengliang.zeus.webdemo.test;
import java.util.ArrayList;
import java.util.List;
import org.junit.Test;
import
- Rss 订阅 开发
周凡杨
htmlxml订阅rss规范
RSS是 Really Simple Syndication的缩写(对rss2.0而言,是这三个词的缩写,对rss1.0而言则是RDF Site Summary的缩写,1.0与2.0走的是两个体系)。
RSS
- 分页查询实现
g21121
分页查询
在查询列表时我们常常会用到分页,分页的好处就是减少数据交换,每次查询一定数量减少数据库压力等等。
按实现形式分前台分页和服务器分页:
前台分页就是一次查询出所有记录,在页面中用js进行虚拟分页,这种形式在数据量较小时优势比较明显,一次加载就不必再访问服务器了,但当数据量较大时会对页面造成压力,传输速度也会大幅下降。
服务器分页就是每次请求相同数量记录,按一定规则排序,每次取一定序号直接的数据
- spring jms异步消息处理
510888780
jms
spring JMS对于异步消息处理基本上只需配置下就能进行高效的处理。其核心就是消息侦听器容器,常用的类就是DefaultMessageListenerContainer。该容器可配置侦听器的并发数量,以及配合MessageListenerAdapter使用消息驱动POJO进行消息处理。且消息驱动POJO是放入TaskExecutor中进行处理,进一步提高性能,减少侦听器的阻塞。具体配置如下:
- highCharts柱状图
布衣凌宇
hightCharts柱图
第一步:导入 exporting.js,grid.js,highcharts.js;第二步:写controller
@Controller@RequestMapping(value="${adminPath}/statistick")public class StatistickController { private UserServi
- 我的spring学习笔记2-IoC(反向控制 依赖注入)
aijuans
springmvcSpring 教程spring3 教程Spring 入门
IoC(反向控制 依赖注入)这是Spring提出来了,这也是Spring一大特色。这里我不用多说,我们看Spring教程就可以了解。当然我们不用Spring也可以用IoC,下面我将介绍不用Spring的IoC。
IoC不是框架,她是java的技术,如今大多数轻量级的容器都会用到IoC技术。这里我就用一个例子来说明:
如:程序中有 Mysql.calss 、Oracle.class 、SqlSe
- TLS java简单实现
antlove
javasslkeystoretlssecure
1. SSLServer.java
package ssl;
import java.io.FileInputStream;
import java.io.InputStream;
import java.net.ServerSocket;
import java.net.Socket;
import java.security.KeyStore;
import
- Zip解压压缩文件
百合不是茶
Zip格式解压Zip流的使用文件解压
ZIP文件的解压缩实质上就是从输入流中读取数据。Java.util.zip包提供了类ZipInputStream来读取ZIP文件,下面的代码段创建了一个输入流来读取ZIP格式的文件;
ZipInputStream in = new ZipInputStream(new FileInputStream(zipFileName));
&n
- underscore.js 学习(一)
bijian1013
JavaScriptunderscore
工作中需要用到underscore.js,发现这是一个包括了很多基本功能函数的js库,里面有很多实用的函数。而且它没有扩展 javascript的原生对象。主要涉及对Collection、Object、Array、Function的操作。 学
- java jvm常用命令工具——jstatd命令(Java Statistics Monitoring Daemon)
bijian1013
javajvmjstatd
1.介绍
jstatd是一个基于RMI(Remove Method Invocation)的服务程序,它用于监控基于HotSpot的JVM中资源的创建及销毁,并且提供了一个远程接口允许远程的监控工具连接到本地的JVM执行命令。
jstatd是基于RMI的,所以在运行jstatd的服务
- 【Spring框架三】Spring常用注解之Transactional
bit1129
transactional
Spring可以通过注解@Transactional来为业务逻辑层的方法(调用DAO完成持久化动作)添加事务能力,如下是@Transactional注解的定义:
/*
* Copyright 2002-2010 the original author or authors.
*
* Licensed under the Apache License, Version
- 我(程序员)的前进方向
bitray
程序员
作为一个普通的程序员,我一直游走在java语言中,java也确实让我有了很多的体会.不过随着学习的深入,java语言的新技术产生的越来越多,从最初期的javase,我逐渐开始转变到ssh,ssi,这种主流的码农,.过了几天为了解决新问题,webservice的大旗也被我祭出来了,又过了些日子jms架构的activemq也开始必须学习了.再后来开始了一系列技术学习,osgi,restful.....
- nginx lua开发经验总结
ronin47
使用nginx lua已经两三个月了,项目接开发完毕了,这几天准备上线并且跟高德地图对接。回顾下来lua在项目中占得必中还是比较大的,跟PHP的占比差不多持平了,因此在开发中遇到一些问题备忘一下 1:content_by_lua中代码容量有限制,一般不要写太多代码,正常编写代码一般在100行左右(具体容量没有细心测哈哈,在4kb左右),如果超出了则重启nginx的时候会报 too long pa
- java-66-用递归颠倒一个栈。例如输入栈{1,2,3,4,5},1在栈顶。颠倒之后的栈为{5,4,3,2,1},5处在栈顶
bylijinnan
java
import java.util.Stack;
public class ReverseStackRecursive {
/**
* Q 66.颠倒栈。
* 题目:用递归颠倒一个栈。例如输入栈{1,2,3,4,5},1在栈顶。
* 颠倒之后的栈为{5,4,3,2,1},5处在栈顶。
*1. Pop the top element
*2. Revers
- 正确理解Linux内存占用过高的问题
cfyme
linux
Linux开机后,使用top命令查看,4G物理内存发现已使用的多大3.2G,占用率高达80%以上:
Mem: 3889836k total, 3341868k used, 547968k free, 286044k buffers
Swap: 6127608k total,&nb
- [JWFD开源工作流]当前流程引擎设计的一个急需解决的问题
comsci
工作流
当我们的流程引擎进入IRC阶段的时候,当循环反馈模型出现之后,每次循环都会导致一大堆节点内存数据残留在系统内存中,循环的次数越多,这些残留数据将导致系统内存溢出,并使得引擎崩溃。。。。。。
而解决办法就是利用汇编语言或者其它系统编程语言,在引擎运行时,把这些残留数据清除掉。
- 自定义类的equals函数
dai_lm
equals
仅作笔记使用
public class VectorQueue {
private final Vector<VectorItem> queue;
private class VectorItem {
private final Object item;
private final int quantity;
public VectorI
- Linux下安装R语言
datageek
R语言 linux
命令如下:sudo gedit /etc/apt/sources.list1、deb http://mirrors.ustc.edu.cn/CRAN/bin/linux/ubuntu/ precise/ 2、deb http://dk.archive.ubuntu.com/ubuntu hardy universesudo apt-key adv --keyserver ke
- 如何修改mysql 并发数(连接数)最大值
dcj3sjt126com
mysql
MySQL的连接数最大值跟MySQL没关系,主要看系统和业务逻辑了
方法一:进入MYSQL安装目录 打开MYSQL配置文件 my.ini 或 my.cnf查找 max_connections=100 修改为 max_connections=1000 服务里重起MYSQL即可
方法二:MySQL的最大连接数默认是100客户端登录:mysql -uusername -ppass
- 单一功能原则
dcj3sjt126com
面向对象的程序设计软件设计编程原则
单一功能原则[
编辑]
SOLID 原则
单一功能原则
开闭原则
Liskov代换原则
接口隔离原则
依赖反转原则
查
论
编
在面向对象编程领域中,单一功能原则(Single responsibility principle)规定每个类都应该有
- POJO、VO和JavaBean区别和联系
fanmingxing
VOPOJOjavabean
POJO和JavaBean是我们常见的两个关键字,一般容易混淆,POJO全称是Plain Ordinary Java Object / Plain Old Java Object,中文可以翻译成:普通Java类,具有一部分getter/setter方法的那种类就可以称作POJO,但是JavaBean则比POJO复杂很多,JavaBean是一种组件技术,就好像你做了一个扳子,而这个扳子会在很多地方被
- SpringSecurity3.X--LDAP:AD配置
hanqunfeng
SpringSecurity
前面介绍过基于本地数据库验证的方式,参考http://hanqunfeng.iteye.com/blog/1155226,这里说一下如何修改为使用AD进行身份验证【只对用户名和密码进行验证,权限依旧存储在本地数据库中】。
将配置文件中的如下部分删除:
<!-- 认证管理器,使用自定义的UserDetailsService,并对密码采用md5加密-->
- mac mysql 修改密码
IXHONG
mysql
$ sudo /usr/local/mysql/bin/mysqld_safe –user=root & //启动MySQL(也可以通过偏好设置面板来启动)$ sudo /usr/local/mysql/bin/mysqladmin -uroot password yourpassword //设置MySQL密码(注意,这是第一次MySQL密码为空的时候的设置命令,如果是修改密码,还需在-
- 设计模式--抽象工厂模式
kerryg
设计模式
抽象工厂模式:
工厂模式有一个问题就是,类的创建依赖于工厂类,也就是说,如果想要拓展程序,必须对工厂类进行修改,这违背了闭包原则。我们采用抽象工厂模式,创建多个工厂类,这样一旦需要增加新的功能,直接增加新的工厂类就可以了,不需要修改之前的代码。
总结:这个模式的好处就是,如果想增加一个功能,就需要做一个实现类,
- 评"高中女生军训期跳楼”
nannan408
首先,先抛出我的观点,各位看官少点砖头。那就是,中国的差异化教育必须做起来。
孔圣人有云:有教无类。不同类型的人,都应该有对应的教育方法。目前中国的一体化教育,不知道已经扼杀了多少创造性人才。我们出不了爱迪生,出不了爱因斯坦,很大原因,是我们的培养思路错了,我们是第一要“顺从”。如果不顺从,我们的学校,就会用各种方法,罚站,罚写作业,各种罚。军
- scala如何读取和写入文件内容?
qindongliang1922
javajvmscala
直接看如下代码:
package file
import java.io.RandomAccessFile
import java.nio.charset.Charset
import scala.io.Source
import scala.reflect.io.{File, Path}
/**
* Created by qindongliang on 2015/
- C语言算法之百元买百鸡
qiufeihu
c算法
中国古代数学家张丘建在他的《算经》中提出了一个著名的“百钱买百鸡问题”,鸡翁一,值钱五,鸡母一,值钱三,鸡雏三,值钱一,百钱买百鸡,问翁,母,雏各几何?
代码如下:
#include <stdio.h>
int main()
{
int cock,hen,chick; /*定义变量为基本整型*/
for(coc
- Hadoop集群安全性:Hadoop中Namenode单点故障的解决方案及详细介绍AvatarNode
wyz2009107220
NameNode
正如大家所知,NameNode在Hadoop系统中存在单点故障问题,这个对于标榜高可用性的Hadoop来说一直是个软肋。本文讨论一下为了解决这个问题而存在的几个solution。
1. Secondary NameNode
原理:Secondary NN会定期的从NN中读取editlog,与自己存储的Image进行合并形成新的metadata image
优点:Hadoop较早的版本都自带,