自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(15)
  • 收藏
  • 关注

原创 KAFKA消息一致性处理

KAFKA消息一致性处理 KAFKA丢失数据: 一.topic设置replication.factor参数:这个值必须大于1,要求每个partition必须有至少2个副本 二.kafka-server设置min.insync.replicas参数:这个值必须大于1,这个是要求一个leader至少感知到有至少一个follower还跟自己保持联系 三.producer设置acks=all:这个是要求每条数据,必须是写入所有replica之后,才能认为是写成功了 四.在producer端设置retries=MAX

2021-09-04 16:34:57 241

转载 99%的人都理解错了HTTP中GET与POST的区别

GET和POST是HTTP请求的两种基本方法,要说它们的区别,接触过WEB开发的人都能说出一二。 最直观的区别就是GET把参数包含在URL中,POST通过request body传递参数。 你可能自己写过无数个GET和POST请求,或者已经看过很多权威网站总结出的他们的区别,你非常清楚知道什么时候该用什么。 当你在面试中被问到这个问题,你的内心充满了自信和喜悦。 你轻轻松松的给出了一个“标准答案”...

2019-11-26 13:43:38 132

转载 PostgreSQL 数据库开发规范

PostgreSQL 数据库开发规范 TAG 27 作者 digoal 日期 2016-09-26 标签 PostgreSQL , 数据库开发规范 , PostgreSQL开发规范 背景 PostgreSQL的功能非常强大,但是要把PostgreSQL用好,开发人员是非常关键的。 下面将针对PostgreSQL数据库原理与特性,输出一份开发规范,希望可以减少大家在使用PostgreSQL数据库过程...

2019-11-24 21:05:33 1022

原创 GreenPlum常见参数查看及调优

–清理表垃圾 vacuum table_name; 在表经过多次的delete之后会产生未清理的垃圾,导致该表存储空间占用过多、查询速度变慢等。通过vacuum table_name;释放表的碎片空间 –查看gp的segment分布情况 select gp_segment_id,count(*) from table_name group by gp_segment_id order by gp_...

2019-11-21 22:31:13 1759

转载 postgresql解决锁表

–查询是否锁表了 select oid from pg_class where relname=‘可能锁表了的表’ select pid from pg_locks where relation=‘上面查出的oid’ –如果查询到了结果,表示该表被锁 则需要释放锁定 select pg_cancel_backend(上面查到的pid) ...

2019-11-21 21:43:38 347

原创 org.apache.commons.lang3.StringEscapeUtils的使用

StringEscapeUtils在org.apache.commons.lang3包下,可以方便的对html等东西进行转义 StringEscapeUtils.unescapeHtml3与StringEscapeUtils.unescapeHtml4的区别在于unescapeHtml4可对更多位的html进行转义,如以下例子: String a = " (>^&omeg...

2019-11-21 21:37:36 3771

原创 ElasticSearch去重问题

es提供了一个简单的计算distinct count的去重计数api,java代码调用如下 AggregationBuilders.cardinality("columnTypeName").field("column_name") 最后生成的查询数据结构为如下 "aggs": { "columnTypeName" : { "cardinality" : { "field...

2019-08-02 17:49:14 1665

原创 4. Median of Two Sorted Arrays

There are two sorted arrays nums1 and nums2 of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity should be O(log (m+n)). You may assume nums1 and num...

2019-07-25 15:59:54 100

原创 3. Longest Substring Without Repeating Characters

Given a string, find the length of the longest substring without repeating characters. Example 1: Input: “abcabcbb” Output: 3 Explanation: The answer is “abc”, with the length of 3. Example 2: Input: ...

2019-07-25 15:50:11 139

原创 2. Add Two Numbers

You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return i...

2019-07-21 19:25:28 116

原创 1. Two Sum

Given an array of integers, return indices of the two numbers such that they add up to a specific target. You may assume that each input would have exactly one solution, and you may not use the same e...

2019-07-21 18:30:22 113

原创 a++及finally返回值问题

public static void main(String[] args) { System.out.println(Test.test()); } public static int test() { int a = 1; try { System.out.println(a++); return ++a; } catch (Except...

2018-12-04 11:38:41 331 1

原创 hadoop命令

–本地提交hadoop脚本 hadoop jar [jarName].jar [className] [hdfsPath] –提交yarn集群 yarn jar [jarName].jar [className] [hdfsPath] –查看hdfs文件列表 hdfs dfs -ls [hdfsPath] –复制hdfs文件 hdfs dfs -put [sourcepath] [targetpa...

2018-12-03 16:34:59 169

原创 linux常用命令

mac连接ssh ssh [ip] -l [username] -p [port] 运行jar包 java -cp [jarName].jar [javaClassName] 删除jar包内扩展信息 zip -d [jarName].jar META-INF/.RSA META-INF/.DSA META-INF/*.SF

2018-12-03 16:20:26 140

原创 linux常用命令安装

–ftp服务 yum -y install ftp –文本编辑 yum -y install vim –下载及上传命令 yum -y install lrzsz –打包 yum -y install zip unzip

2018-12-03 16:06:00 958 1

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除