`
gaojingsong
  • 浏览: 1155959 次
  • 性别: Icon_minigender_1
  • 来自: 深圳
文章分类
社区版块
存档分类
最新评论
文章列表
1、工厂方法区分不同类型数据库 /** * get current db performance * @return MonitorRecord */ public MonitorRecord getCurrentDbPerformance(){ MonitorRecord monitorRecord = null; Connection conn = null; try{ conn = dataSource.getConnection(); String driverClassName = dataSource ...
public static String format2Duration(long ms) { long days = MILLISECONDS.toDays(ms); long hours = MILLISECONDS.toDurationHours(ms); long minutes = MILLISECONDS.toDurationMinutes(ms); long seconds = MILLISECONDS.toDurationSeconds(ms); } static final long C0 = 1L; stat ...
最近在研究源码的时候,碰到了一个自己没有见到的注解,经过研究发现是Java自己的注解,具体代码如下: public class MasterServer implements IStoppable {     /**      * master server startup, not use web service      *      * @param args arguments      */     public static void main(String[] args) {         Thread.currentThread().setName(Const ...
  package cn.com.demo.test4j;   import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; import java.util.Map;   /**  * fastjson JSON字符串自动转换  *  */ public class JsonToMapTest01 {       public static void main(String[] args){           /** { "rowkey": " ...
[root@node1 ~]# cd /home/gaojs/ [root@node1 gaojs]# ls apache-dolphinscheduler-1.3.6-bin.tar.gz  docker_mysql  Documents  grafana-8.0.5                     hadoop2.8.1  hive239  nacos     Public    spark-3.0.3-bin-hadoop2.7  Templates Desktop                                   docker_redis  Downlo ...
  1、自定义分页 请求参数: @PathVariable Integer pageNo,@PathVariable Integer pageSize   int totalSize = queryList.size(); int totalPage = totalSize % pageSize ==0 ? totalSize /pageSize:(totalSize % pageSize) +1; if(totalPage > 1 ){ // 0,10  11,20 int fromIndex = 0; // 开始索引 int toIndex = 0; // 结束索 ...
LVS十种调度算法 1)RR、2)WRR、3)LC、4)WLC、5)SH、6)DH、7)LBLC、8)LBLCR、9)SED、10)NQ   1.轮询(Round Robin)RR: 将客户端请求平均分发到Real Server。   2.加权轮询(Weighted Round Robin)WRR:根据Real Server 权重值进行轮询的调度。   3.最少连接(Least Connections)LC:选择连接最少的服务器。   4.加权最少连接(Weighted Least Connections)WLC:根据Real Server 权重值,选择连接数最少服务器。 ...
JDK动态代理:利用反射机制生成一个实现代理接口的匿名类,在调用具体方法前调用InvokeHandler来处理。 CGlib动态代理:利用ASM(开源的Java字节码编辑库,操作字节码)开源包,将代理对象类的class文件加载进来,通过修改其字节码生成子类来处理。   区别:JDK代理只能对实现接口的类生成代理;CGlib是针对类实现代理,对指定的类生成一个子类,并覆盖其中的方法,这种通过继承类的实现方式,不能代理final修饰的类     1、JDK代理使用的是反射机制实现aop的动态代理,CGLIB代理使用字节码处理框架asm,通过修改字节码生成子类。     所以jdk动态 ...
What is Hazelcast Hazelcast is a distributed computation and storage platform for consistently low-latency querying, aggregation and stateful computation against event streams and traditional data sources. It allows you to quickly build resource-efficient, real-time applications. You can deploy it ...
Flink修改Web应用的端口号   StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment(); if(env instanceof LocalStreamEnvironment){ Field field =env.getClass().getSuperclass().getDeclaredField("configuration");   field.setAccessible(true); Configuration configuration ...
Prometheus 是由 SoundCloud 开源监控告警解决方案。 prometheus prometheus存储的是时序数据,即按相同时序(相同名称和标签),以时间维度存储连续的数据的集合。 时序(time series)是由名字(Metric)以及一组key/value标签定义的,具有相同的名字以及标签属于相同时序。 metric名字:表示metric的功能,如http_request_total。时序的名字由 ASCII 字符,数字,下划线,以及冒号组成,它必须满足正则表达式 [a-zA-Z_:][a-zA-Z0-9_:]*, 其名字应该具有语义化,一般表示一个可 ...
对象存储服务(Object Storage Service,OBS)是一个基于对象的海量存储服务,为客户提供海量、安全、高可靠、低成本的数据存储能力。 OBS系统和单个桶都没有总数据容量和对象/文件数量的限制,为用户提供了超大存储容量的能 ...
codis 是一个分布式 Redis 解决方案, 对于上层的应用来说, 连接到 Codis Proxy 和连接原生的 Redis Server 没有明显的区别 (不支持的命令列表), 上层应用可以像使用单机的 Redis 一样使用, Codis 底层会处理请求的转发, 不停机的数据迁移等工作, 所有后边的一切事情, 对于前面的客户端来说是透明的, 可以简单的认为后边连接的是一个内存无限大的 Redis 服务.     组成部分 Codis Proxy (codis-proxy) Codis Manager (codis-config) Codis Redis (codis-serv ...
  Jumpserver 是全球首款完全开源的堡垒机, 使用 GNU GPL v2.0 开源协议, 是符合 4A 的专业运维审计系统。 Jumpserver 使用 Python / Django 进行开发, 遵循 Web 2.0 规范, 配备了业界领先的 Web Terminal 解决方案, 交互界面美观、用户体验好。 Jumpserver 采纳分布式架构, 支持多机房跨区域部署, 中心节点提供 API, 各机房部署登录节点, 可横向扩展、无并发访问限制。 Jumpserver 现已支持管理 SSH、 Telnet、 RDP、 VNC 协议资产。   特色优势 开源: 零门槛, ...
Sentry is a service that helps you monitor and fix crashes in realtime. The server is in Python, but it contains a full API for sending events from any language, in any application.   Sentry's Java SDK enables capturing sessions for Release Health as well as reporting messages and errors. Se ...
Global site tag (gtag.js) - Google Analytics