原创 kafka集羣的搭建

1、準備幾臺虛擬機,並配置host 10.10.10.xxx hadoop03 10.10.10.xxx hadoop04 10.10.10.xxx hadoop05 2、安裝zookeeper 在hadoop03、hadoop04、h

原创 線程池的拒絕策略(RejectedExecutionHandler)

1、AbortPolicy(線程池默認策略) public static class AbortPolicy implements RejectedExecutionHandler { /**

原创 項目啓動:Data source rejected establishment of connection, message from server: "Too many connections"

MySQLNonTransientConnectionException: Data source rejected establishment of connection, message from server: "Too many

原创 Centos 7不能上網,Job for iptables.service failed because the control process exited with error code.

1、service network restart/systemctl restart network命令是報如題中錯誤信息2、解決方法,運行如下命令重啓網絡管理裝置chkconfig network off chkconfig netw

原创 centos7安裝gitlab

1、更換阿里yum// 下載wget yum install -y wget // 備份默認的yum mv /etc/yum.repos.d /etc/yum.repos.d.backup // 設置新的yum目錄 mkdir /e

原创 spring(spring-boot) + mybatis多數據源

1、spring 多數據源一致性事務方案         http://www.cnblogs.com/ityouknow/p/4977136.html2、springboot+mybatis多數據源最簡解決方案      http://

原创 Java命令學習系列

 1、Java開發必須掌握的線上問題排查命令2、Java命令學習系列——javap3、Java命令學習系列——jinfo4、Java命令學習系列——jhat5、Java命令學習系列——jstat6、Java命令學習系列——Jmap7、Ja

原创 Copier實現Bean的拷貝

    選擇Cglib的BeanCopier進行Bean拷貝的理由是,其性能要比Spring的BeanUtils,Apache的BeanUtils和PropertyUtils要好很多,尤其是數據量比較大的情況下。1、簡單例子,pom.xm

原创 centos7安裝gitlab

1、更換阿里yum// 下載wget yum install -y wget // 備份默認的yum mv /etc/yum.repos.d /etc/yum.repos.d.backup // 設置新的yum目錄 mkdir /e

原创 Redis Sentinel——安裝部署

1、部署結構圖1.1、redis sentinel實例拓撲圖1.2、物理結構表2、redis的安裝2.1、配置修改redis.conf文件名稱爲redis-6379.conf port 6379 daemonize yes log

原创 Centos 7不能上網,Job for iptables.service failed because the control process exited with error code.

1、service network restart/systemctl restart network命令是報如題中錯誤信息2、解決方法,運行如下命令重啓網絡管理裝置chkconfig network off chkconfig netw

原创 keepalived+nginx的配置

1、需要2臺虛機,分別安裝上Java、Tomcat、Nginx、Ipvs和Keepalived2、規劃(關閉防火牆:systemctl stop firewalld.service): (1)虛擬ip用 192.168.109.110 (

原创 單例模式的各種寫法

1、線程不安全的public class Singleton { private static Singleton instance; private Singleton(){} public static Si

原创 CentOS7使用firewalld打開關閉防火牆與端口

1、firewalld的基本使用啓動: systemctl start firewalld查看狀態: systemctl status firewalld 停止: systemctl disable firewalld禁用: system

原创 Centos7.2安裝keepalived

1、安裝ipvsadm[root@node-01 ~]# yum install ipvsadm[root@node-01 ~]# ipvsadm -v2、安裝keepalived(其實7.2自帶了)[root@node-01 ~]# y