- 博客(16)
- 资源 (11)
- 收藏
- 关注
原创 简易版的shell 监控hbase
#/bin/bashwhile truedo top -bn 1 -i -c >>./hbasemonitor/cpu.log free >> ./hbasemonitor/meomory.log HMasterPid=`pgrep -f HMaster` HRegrionServerPid=`pgre...
2018-11-27 16:45:43 238
原创 CRSF 的防御
(1)将cookie 设置为HttpOnlyCRSF攻击很大程度上是利用了浏览器的cookie,为了防止站内的XSS漏洞盗取cookie,需要在cookie中设置HttpOnly属性。这样通过程序就读取cookie信息。(2)增加token系统开发人员在HTTP请求中以参数的形式加入一个随机的token,并在服务端进行校验。如果没有token或者是token 不正确,则拒绝请求。...
2018-11-27 14:59:28 547
原创 Java httpClient 使用连接池支持多线程高并发
当采用HttpClient httpClient = HttpClients.createDefault() 实例化的时候。会导致Address already in use的异常。信息: I/O exception (java.net.BindException) caught when processing request to {}->http://**.**.**.** Add...
2018-11-22 17:20:46 13895 4
原创 maven打可执行的jar包
本来打算使用maven-assembly-plugin 打包,但是阿里云插件各种jar包找不到,google 到使用maven-shade-plugin打包jar包 <build> <plugins> <plugin> <groupId>org.apache.maven.plu...
2018-11-22 16:47:38 134
原创 java 单例模式,双锁检测,枚举
双锁检测public class Singleton { private static volatile Singleton singleton; private Singleton() {} public static Singleton getInstance() { if (singleton == null) { ...
2018-11-21 14:54:16 317
原创 java 读取property 配置文件
import java.io.IOException;import java.io.InputStreamReader;import java.util.Properties;/** * Property read tools */public class PropertyReader { private volatile static PropertyReader in...
2018-11-20 14:23:09 707
原创 java 读取yaml配置文件
maven&lt;dependency&gt; &lt;groupId&gt;org.yaml&lt;/groupId&gt; &lt;artifactId&gt;snakeyaml&lt;/artifactId&gt; &lt;version&
2018-11-20 10:27:17 9735
原创 java 单例模式 使用静态内部类实现
public class YamlReadUtils{ private YamlReadUtils() { if (SingletonHolder.instance != null) { throw new IllegalStateException(); } } /** * use static inner class achieve singleton ...
2018-11-20 09:59:25 342
原创 python 3.7 三:操作hdfs
pip3 install hdfshdfs_util.pyclass HdfsUtils: def __init__(self, config): name_node = config.get_prop(&quot;hdfs&quot;, &quot;name_node&quot;) user = config.get_prop(&quot;hdfs&quot;,
2018-11-19 17:31:59 827
原创 python 3.7 一: 操作config 配置文件
persistent.config[db]host = 127.0.0.1port = 3306user = rootpass = 123456schema = mytest[hdfs]name_node = http:/localhost:50070user = adread_config.pyimport configparserimport osclass ...
2018-11-19 17:28:28 4140
原创 python 3.7 二: 操作 mysql
pip3 install pymysqlmysql_utils.pyimport pymysqlfrom ..config.read_config import ConfigUtilclass MysqlUtils: host = '' port = 3306 user = '' password = '' schema = '' d...
2018-11-19 17:25:49 1240
转载 Percona XtraDB Cluster Limitations
The following limitations apply to Percona XtraDB Cluster: Replication works only with InnoDB storage engine. Any writes to tables of other types, including system (mysql.*) tables, are not replica...
2018-11-15 09:10:18 178
转载 About Percona XtraDB Cluster
Percona XtraDB Cluster is a fully open-source high-availability solution for MySQL. It integrates Percona Server and Percona XtraBackup with the Galera library to enable synchronous multi-master repli...
2018-11-14 17:35:16 138
原创 centos7 修改静态ip和修改主机名
修改静态地址modify /etc/sysconfig/network-scripts/ifcfg-ens33TYPE="Ethernet"PROXY_METHOD="none"BROWSER_ONLY="no"DEFROUTE="yes"IPV4_FAILURE_FATAL="no"IPV6INIT="yes"IPV6_AUTOCONF="yes"
2018-11-14 12:02:22 609
原创 centos7 mycat安装 ,分库分表测试
安装mycat安装JDK;下载jdk 解压 放到/opt/jdk目录下配置环境变量export JAVA_HOME=/opt/jdkexport PATH=$JAVA_HOME/bin:$PATHexport CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jarexport JRE_HOME=$JAVA_HOME/j...
2018-11-13 18:18:00 427
Garbage-First LSM 论文
2019-06-13
spring 5 , Spring Boot 2.0,Spring cloud
2018-12-05
Linux Shell脚本攻略(第2版)
2018-11-13
kafka-definitive-guide pdf
2018-11-13
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人