上一页 1 ··· 52 53 54 55 56 57 58 59 60 ··· 234 下一页

2021年1月21日

spark2.2 + jdk1.8 + centos7集群安装教程(单个Master,不依赖hadoop安装)

摘要: 1.准备环境 安装centos7,在此我准备了五个虚拟机,分别命名为L1,L2,L3,L4,L5.计划在L1上面运行Master节点,在L3,L4,L5上面运行Worker节点。网络配置以及ssh免密登陆配置不再详细讲解,请参考我的另外一篇博客:虚拟机网络配置以及准备工作:https://blog. 阅读全文

posted @ 2021-01-21 11:57 ExplorerMan 阅读(188) 评论(0) 推荐(0)

2021年1月19日

MySQL为什么要使用B+树索引

摘要: 目录 MySQL的存储结构 表存储结构 B+树索引结构 B+树页节点结构 B+树的检索过程 为什么要用B+树索引 二叉树 多叉树 B树 B+树 搞懂这个问题之前,我们首先来看一下MySQL表的存储结构,再分别对比二叉树、多叉树、B树和B+树的区别就都懂了。 MySQL的存储结构 表存储结构 单位:表 阅读全文

posted @ 2021-01-19 22:41 ExplorerMan 阅读(160) 评论(0) 推荐(0)

查看mongodb索引被使用的次数

摘要: 版本要求>3.2 db.tablename.aggregate( [ { $indexStats: { } } ] ) 官网地址:https://docs.mongodb.com/manual/reference/operator/aggregation/indexStats/ 阅读全文

posted @ 2021-01-19 18:19 ExplorerMan 阅读(314) 评论(0) 推荐(0)

Flask 流式响应

摘要: 背景 在 web 场景下,经常会碰到下载文件的需求,通常小文件我们会采用 Flask send_file 或者 send_from_directory的方式,下载,但是当下载的文件是一个大压缩文件(>1GiB)时,这种方式就显得不友好了,我们需要采用流式下载的方式返回给客户端。 流式下载 简单实现: 阅读全文

posted @ 2021-01-19 17:07 ExplorerMan 阅读(5141) 评论(0) 推荐(2)

2021年1月18日

删除Rancher节点的正确姿势

摘要: 在Rancher上疏散该节点 删除节点 登录该节点宿主机,删除rancher相关容器 docker rm -f -v $(docker ps -aq) 删除该节点的所有volume docker volume rm $(docker volume ls) 最后删除/var/lib/rancher文件 阅读全文

posted @ 2021-01-18 15:24 ExplorerMan 阅读(1294) 评论(0) 推荐(0)

go深度拷贝json版

摘要: go中的深度拷贝方式 1.使用json的序列化和反序列化 通过将原来的结构序列化成byte数组,然后将byte数组反序列化到 目标结构的方式来进行深度拷贝。相关代码如下: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 2 阅读全文

posted @ 2021-01-18 14:06 ExplorerMan 阅读(235) 评论(0) 推荐(0)

go深度拷贝gob版

摘要: 通过gob的序列化和反序列化进行深度拷贝 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 阅读全文

posted @ 2021-01-18 11:57 ExplorerMan 阅读(174) 评论(0) 推荐(0)

go深度拷贝reflect版

摘要: 使用 reflecting 和 gob 两种方式,性能比较结果: Deep copy with reflecting is 10x faster than gob and it will save more memory. reflecting 使用库 https://github.com/moha 阅读全文

posted @ 2021-01-18 11:56 ExplorerMan 阅读(188) 评论(0) 推荐(0)

深入理解Go Context

摘要: 目录 emptyCtx类型 cancelCtx类型 timerCtx类型 valueCtx类型 在Go语言并发编程中,用一个goroutine来处理一个任务,而它又会创建多个goroutine来负责不同子任务的场景非常常见。如下图 这些场景中,往往会需要在API边界之间以及过程之间传递截止时间、取消 阅读全文

posted @ 2021-01-18 11:24 ExplorerMan 阅读(187) 评论(0) 推荐(0)

2021年1月14日

Ubuntu安装jdk8的两种方式

摘要: 安装方式:1):通过ppa(源) 方式安装.2):通过官网安装包安装.JDK官网下载地址 一:使用ppa(源)方式安装: 1):添加ppa源 sudo add-apt-repository ppa:webupd8team/java sudo apt-get update 1 2 3 2):安装ora 阅读全文

posted @ 2021-01-14 19:02 ExplorerMan 阅读(373) 评论(0) 推荐(0)

上一页 1 ··· 52 53 54 55 56 57 58 59 60 ··· 234 下一页

导航