linux 批量删除文件名中有换行符
摘要:ls -i | grep ^M | awk '{print $1}' | xargs -t -I [] find . -inum [] -exec rm -if {} \; 注意^M 是ctrl+v ctrl+M 不是^M xargs -I 指定替换符号 xargs -i 默认替换{} ll -at
阅读全文
Group by 内部排序
摘要:1、right join # update_time gid=>sid, group_status => s_table select a.* from comment as a right join (select user_id, max(addtime) as maxtime from com
阅读全文
深入MySQL用户自定义变量
摘要:一、到底MySQL的变量分哪几类? MySQL变量一共分为两大类:用户自定义变量和系统变量。如下: 用户自定义变量 局部变量 会话变量 系统变量 会话变量 全局变量 局部变量 会话变量 会话变量 全局变量 本文涉及的内容为用户自定义会话变量,若对其他分类无感,请点击这里。 PS:用户定义的会话变量和
阅读全文
Mysql count(1) group_concat 高级用法(count 过滤条件,group_concat过滤条件)
摘要:1、官方文档: count:COUNT(expr) [over_clause] https://dev.mysql.com/doc/refman/8.0/en/group-by-functions.html#function_count 1.1 实例: select update_time,sid,
阅读全文
chnagyong sql
摘要:select gid,count(distinct mid) from members group by gid
阅读全文
Hadoop slaves 没有nodeManager
摘要:1、./start-yarn.sh 后从服务器没有nodemanager 进程,并且这里没有报错 在从服务器上的日志上见: 从服务器查看日志: 查看2.8.4官方文档: https://hadoop.apache.org/docs/r2.8.4/hadoop-mapreduce-client/had
阅读全文
Fiddler 捕获 nodejs 模拟的http请求
摘要:1、设置Fiddler Tools->Options-> Connections Allow remote computers to connect: 2、nodejs 请求有多种 2.1 用https或者http请求 该种方法貌似需要额外的代理软件监听上图中的8888端口 2.2 用request
阅读全文
TLS/SSL 协议详解 ssL 、TLS 1.0、TLS 1.1、TLS 1.2的了解
摘要:相关链接:https://www.jianshu.com/p/c93612b3abac http://www.ruanyifeng.com/blog/2014/02/ssl_tls.html MicroSoft TechNet, SSL/TLS in Detail Jeff Moser, The F
阅读全文
[Fiddler] The connection to 'xxxxx.com' failed. <br />System.Security.SecurityException Failed to negotiate HTTPS connection with server.fiddler.network.https> HTTPS handshake to intelte
摘要:最近利用模拟发get请求的时候出现: 抓包的结果: 抓包的结果出现Tunnel to 对应的Header是: 1、如何看我们请求的网站的TLS协议是哪种? 通过该请求就能看到所用的协议; 2、Fiddle模拟https所用的协议: Tools -> Options ->Https 默认的协议tls1
阅读全文
centos7 升级python2.7 到python3.6(Centos7 安装Anaconda)
摘要:Anaconda 下载 https://www.anaconda.com/download/#linux 下载文件 Anaconda3-5.2.0-Linux-x86_64.sh bash Anaconda3-5.2.0-Linux-x86_64.sh 一路enter mv /usr/bin/pyt
阅读全文
hadoop 官方配置文件解析
摘要:比如我的版本是2.8.4 官网文档是: 基本配置文件:包括一般的端口
阅读全文
Mysql 内部默认排序
摘要:mysql默认的排序: https://forums.mysql.com/read.php?21,239471,239688#msg-239688 Do not depend on order when ORDER BY is missing. Always specify ORDER BY if
阅读全文
Hadoop 集群的一些问题
摘要:1、创建用户hadoop adduser hadoop passwd hadoop usermod -a -G hadoop hadoop chown -R hadoop:hadoop /data 2、格式化hdfs hdfs namenode -format 3、sbin/start-all.sh
阅读全文
MySQL高可用架构之MHA
摘要:MySQL高可用架构之MHA 简介: MHA(Master High Availability)目前在MySQL高可用方面是一个相对成熟的解决方案,它由日本DeNA公司youshimaton(现就职于Facebook公司)开发,是一套优秀的作为MySQL高可用性环境下故障切换和主从提升的高可用软件。
阅读全文
XtraBackup 备份原理
摘要:来着淘宝技术: http://mysql.taobao.org/monthly/2016/03/07/ https://github.com/alibaba/AliSQL 前言 Percona XtraBackup(简称PXB)是 Percona 公司开发的一个用于 MySQL 数据库物理热备的备份
阅读全文
Mycat入门及简单规则
摘要:以下都来自网络; 官网: http://www.mycat.io/ 官网配置文件解析: https://github.com/MyCATApache/Mycat-Server/wiki/9.0-%E6%B3%A8%E8%A7%A3%E7%94%A8%E6%B3%95 建议先按文档: Mycat_V1
阅读全文
Python itertools/内置函数
摘要:https://docs.python.org/3.5/library/itertools.html#itertools.starmap // https://docs.python.org/3.5/library/functions.html#map
阅读全文
Python 列表表达式 ,迭代器(2) Yield
摘要:1、yield 暂存为list def max_generator(numbers): current_max = 0 for i in numbers: current_max = max(i, current_max) yield current_max; a = [3, 4, 6, 2, 1, 9, 0, 7, 5, 8] res...
阅读全文
Python 列表表达式 ,迭代器(1)
摘要:Return an iterator that applies function to every item of iterable, yielding the results. If additional iterable arguments are passed, function must t
阅读全文
Python 遍历文件夹 listdir walk 的区别
摘要:二、带有子目录的目录 import ospath = r'C:\Users\Administrator\Desktop\file'for dirpath,dirnames,filenames in os.walk(path):print(dirpath,dirnames,filenames)输出结果
阅读全文
Mysql Innodb 性能参数设置 https://www.rathishkumar.in/2017/01/how-to-allocate-innodb-buffer-pool-size-in-mysql.html
摘要:参考原文: https://www.rathishkumar.in/2017/01/how-to-allocate-innodb-buffer-pool-size-in-mysql.html 查看系统cpu,内存,硬盘使用情况 这里粘贴部分原文: 如何最优设置: 同时文中给出了其中的一个计算方式:
阅读全文
LinuxI/O 性能分析
摘要:1、I/O linux 命令: ostat 监视I/O子系统 iostat [参数][时间][次数] 通过iostat方便查看CPU、网卡、tty设备、磁盘、CD-ROM 等等设备的活动情况, 负载信息。 -C 显示CPU使用情况 -d 显示磁盘使用情况 -k 以 KB 为单位显示 -m 以 M 为单位显示 -N 显示磁盘阵列(LVM) 信息 -n 显示NFS 使用情况 -p[磁盘]...
阅读全文
jps command not found已解决
摘要:根据当前版本安装devel 包 eg: yum install java-1.8.0-openjdk-devel -yjdk小工具jps介绍 jps(Java Virtual Machine Process Status Tool)是JDK 1.5提供的一个显示当前所有java进程pid的命令,简单实用,非常适合在linux/unix平台上简单察看当前java进程的一些简单情况。 jps存放...
阅读全文
Haddop SHUTDOWN_MSG: Shutting down NameNode at java.net.UnknownHostException: process01: process01: unknown error
摘要:SHUTDOWN_MSG: Shutting down NameNode at java.net.UnknownHostException: process01: process01: unknown error意思是Host报错 /etc/hosts /etd/hostname 要修改对应的
阅读全文