- 博客(135)
- 资源 (4)
- 收藏
- 关注
原创 fiddler提示“The system proxy was changed.Click to reenable capturing.”的原因及解决办法
Easy Connect影响的处理https://blog.youkuaiyun.com/zize_snail/article/details/138269941
2025-02-10 16:57:57
124
原创 应用的时区问题
周期:Freq关键字用来指定间隔的时间周期,可选参数有:YEARLY, MONTHLY, WEEKLY, DAILY, HOURLY, MINUTELY, SECONDLY,分别表示年、月、周、日、时、分、秒等单位。INTERVAL 关键字用来指定间隔的频繁,可指定的值的范围从1-99。
2023-06-05 16:20:41
441
原创 @Data注解的一个注意事项
Data注解,会重写当前的equals和hashcode方法。重写的方式是比较当前类里的所有字段,不包含父类中的字段。
2023-03-10 09:33:21
613
原创 泛型 小记
import java.lang.reflect.ParameterizedType;import java.lang.reflect.Type;public class Demo { public static void main(String[] args) { A a = new A(); }}/** * 1.对于一个类上定义的泛型,无法在类内部获取到对应的泛型内容 * 这里,没办法在B的具体对象中,获取到所对应的泛型类型 */class B<
2021-11-22 17:38:51
409
原创 隔离级别说明
读脏数据:事务之间读写操作互相可见不可重复读的场景:一个事务读数据时,另一个事务可以进行修改操作SQL标准中定义了四种隔离级别:READ UNCOMMITTED(未提交读):在READ UNCOMMITTED 级别,事务中的修改,即使没有提交,对其他事务也都是可见的。事务可以读取未提交的数据,这也被称为脏读(Dirty Read)。这个级别会导致很多问题,从性能上来说,READ UNCOMMITTED 不会比其他的级别好太多,但却缺乏其他级别的很多好处,除非真的有非常必要的理由,在实际应用中一般很.
2021-11-11 17:06:30
839
原创 String.format
对字符串补零,在字符串右侧String.format("%-6s", ‘4400’).replaceAll(" ", "0");
2021-10-25 09:54:32
347
原创 日期的一下操作
public static void main(String[] args) throws InterruptedException, ParseException { String str = "2021-10"; // 2021-06-03 10:23:32 SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM"); SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy-MM-dd HH.
2021-10-18 16:46:19
103
原创 Metric aggregation
https://www.elastic.co/guide/en/elasticsearch/reference/7.13/search-aggregations-metrics.html这个类型的聚合操作根据选择的document 的 值 计算 指标。这个值可以从document 的 fields中提取,也可以通过脚本生成。Numeric metrics aggregation 是一种特殊的metrics aggregation,它的输出为数值。一些metrics aggregation输出一个数值度
2021-09-13 18:37:33
569
原创 logstash:tracking_column not found in dataset
logstash同步时报错如上,以下为解决方案https://blog.youkuaiyun.com/linhaibing009/article/details/103008832
2021-09-02 09:54:32
278
原创 翻译文档-elasticsearch-7.13.*-search-aggregations
https://www.elastic.co/guide/en/elasticsearch/reference/7.13/search-aggregations.htmlaggregation将统计数据的metrics、statistics或其他纬度。aggregation帮助您回答以下问题:* 我的网站的平均加载时间是什么?* 基于交易量,谁是我最有价值的客户?* 在我的网络中,什么会被认为是一个大文件?* 每个产品类别有多少产品?Elasticsearch提供的聚合操作分为三个类别:* M
2021-08-14 17:50:46
176
1
原创 Null key for a Map not allowed in JSON (use a converting NullKeySerializer?)
springboot默认使用的json解析组件是jackson;然后将map转json时,如果其中map的key中含有null,会报标题所示的错误;这里将jackjson改为了fastjson,fastjson支持key为null;https://blog.youkuaiyun.com/u010953706/article/details/107907754...
2021-08-11 11:51:09
382
原创 springboot读取外部配置
打包的时候排除配置文件:https://blog.youkuaiyun.com/chen_blog/article/details/80017053 <build> <resources> <resource> <filtering>true</filtering> <directory>src/main/resources</d
2021-08-06 15:42:17
94
原创 elasticsearch-sql 支持分页查询
如题,ES的elasticsearch-sql插件支持分页查询,以下sql中,limit 0,10,从下表为0 的行开始返回,返回10行select t.id from t_table t order by id desc limit 0,10
2021-08-02 11:17:47
1429
原创 httpclient设置代理和转换编码
public static void main(String[] args) throws Exception { // System.setProperty("http.proxyHost", "localhost"); // System.setProperty("http.proxyPort", "8888"); // System.setProperty("proxySet", "true"); CloseableHttpClient client = HttpClients.c.
2021-07-30 15:01:24
585
原创 Illegal pattern character ‘T‘
日期格式化:Illegal pattern character ‘T’在这里插入代码片System.out.println(new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.000'Z'").format(new Date()));在T的两边加上单引号
2021-07-30 09:14:00
3210
原创 二叉树寻路
https://leetcode-cn.com/problems/path-in-zigzag-labelled-binary-tree/class Solution { public List<Integer> pathInZigZagTree(int label) { List<Integer> list = new ArrayList<>(); if (label == 1) { list.add
2021-07-29 10:47:36
129
原创 double转int方法为 去尾法
System.out.println((int) 3.0); System.out.println((int) 3.1); System.out.println((int) 3.4); System.out.println((int) 3.5); System.out.println((int) 3.6); System.out.println((int) 3.9);以上打印结果都是3
2021-07-29 09:53:09
368
原创 elasticsearch-sql7.13.2 {}{}{:9300} not part of the cluster Cluster [elasticsearch], ignoring...
如题,使用elasticsearch-sql7.13.2报错:not part of the cluster Cluster [elasticsearch], ignoring...这里应该是集群名称默认为elasticsearch,需要特别的指定:dds = (DruidDataSource) ElasticSearchDruidDataSourceFactory.createDataSource(properties);dds.addConnectionProperty("cluster.na
2021-07-28 10:34:37
826
原创 IDEA Cannot find declaration to go to
1.设置代码所谓的目录为sourcese目录:File --》project struction --》保证sources目录为代码目录
2021-07-21 11:14:24
138
原创 match/range [match] malformed query, expected [END_OBJECT] but found [FIELD_NAME]
在ES中,查询条件为{ "query": { "match": { "yqxs": 1 }, "range": { "id": { "gte": 3000000000, "lte": 4000000000 } } }, "size": 1}报错:[match] malformed
2021-07-15 10:11:05
8743
原创 Unknown key for a START_OBJECT in [range].
查询条件为:{ "range": { "id": { "gte": 3000000000, "lte": 4000000000 } }, "size": 1}range 是query中的元素,应该放在query中{ "query": { "range": { "id": { "gte": 3000000000,
2021-07-15 10:04:09
10027
原创 elasticsearch问题: SERVICE_UNAVAILABLE/1/state not recovered /initialized
1.重启无效2.将所有节点的配置#es7.x 之后新增的配置,初始化一个新的集群时需要此配置来选举 mastercluster.initial_master_nodes: ["node-1"]都指定为node-1后,报错误master_not_discovered_exception。#gateway.recover_after_nodes: 2将以上配置注释掉后,依旧报错master_not_discovered_exception将配置cluster.initial_master_n
2021-07-14 09:52:42
5250
3
原创 impala:Negotiation complete: Invalid argument: Client connection negotiation failed: client connect
现象:即使一个select 1 的查询语句也无法执行impala的报错日志:参考:https://www.cnblogs.com/sdhzdtwhm/p/9909570.htmlyum install gcc python-devel cyrus-sasl* -y可以解决问题
2021-07-08 09:24:22
560
原创 hive is not allowed to impersonate anonymous
2021-06-29T17:47:55,131 DEBUG [HiveServer2-Handler-Pool: Thread-52] retry.RetryInvocationHandler: Exception while invoking call #36 ClientNamenodeProtocolTranslatorPB.getFileInfo over null. Not retrying because try once and fail.org.apache.hadoop.ipc.Remo
2021-06-29 17:57:07
556
原创 org/apache/tez/dag/api/SessionNotRunning
hive --service hiveserver2 10000 &启动时报以下错误:2021-06-29T17:21:34,284 WARN [main] server.HiveServer2: Error starting HiveServer2 on attempt 1, will retry in 60000msjava.lang.NoClassDefFoundError: org/apache/tez/dag/api/SessionNotRunning at org.apache
2021-06-29 17:45:41
1086
原创 MetaStoreClient lost connection. Attempting to reconnect (1 of 1) after 1s. getCurrentNotificatio
2021-06-29T16:59:35,856 DEBUG [pool-7-thread-1] ipc.ProtobufRpcEngine: Call: mkdirs took 4ms2021-06-29T16:59:35,856 INFO [pool-7-thread-1] session.SessionState: Created HDFS directory: /tmp/hive/hive/9b2f06f4-3ed2-4f0d-8f73-c81ec7970bb8/_tmp_space.db202
2021-06-29 17:25:24
7381
2
原创 fiddle 出现“The system.......”问题的处理
在使用fiddle时,其他代理把fiddle设置的代理给顶掉了;我这里的具体原因还是银联的控件导致的。对应程序为:C:\Windows\SysWOW64\UPEditNew\UPSecurityInput.exeC:\Windows\SysWOW64\PBCCRCNew\PBCCRCPassGuardXInput.exe查询到的方式:参考这里https://zhuanlan.zhihu.com/p/96941812使用火绒1.进行自定义防护配置:2.配置规则3.具体规则内容:HKEY
2021-06-12 12:47:17
4781
1
原创 @SpringBootApplication注解的类要放在controller层的下层包里
如题目:如果@SpringBootApplication注解的类Application.java的包路径为com.test中;那么controller层的包路径要在com.test.controller或者之下的路径里
2021-05-05 14:59:38
764
原创 获取文件行数
time awk '{print NR}' a.sh|tail -n1time awk 'END{print NR}' a.shtime grep -n "" a.sh|awk -F: '{print $1}'|tail -n1time sed -n '$=' a.shtime wc -l a.sh找到集中获取文件行数的方式,有博客说time awk 'END{print NR}'这种方式最快;我测试了1个20G的文件4kw行;wc的速度是awk的1倍;可能是数据的性质问题...
2021-04-23 15:11:13
667
原创 删除排序链表中的重复元素
存在一个按升序排列的链表,给你这个链表的头节点 head ,请你删除链表中所有存在数字重复情况的节点,只保留原始链表中没有重复出现 的数字。返回同样按升序排列的结果链表。示例 1:输入:head = [1,2,3,3,4,4,5]输出:[1,2,5]示例 2:输入:head = [1,1,1,2,3]输出:[2,3]提示:链表中节点数目在范围 [0, 300] 内-100 <= Node.val <= 100题目数据保证链表已经按升序排列解法1:class Lis
2021-03-25 10:48:44
90
原创 不同的子序列
给定一个字符串 s 和一个字符串 t ,计算在 s 的子序列中 t 出现的个数。字符串的一个 子序列 是指,通过删除一些(也可以不删除)字符且不干扰剩余字符相对位置所组成的新字符串。(例如,“ACE” 是 “ABCDE” 的一个子序列,而 “AEC” 不是)示例 1:输入:s = "rabbbit", t = "rabbit"输出:3解释:如下图所示, 有 3 种可以从 s 中得到 "rabbit" 的方案。(上箭头符号 ^ 表示选取的字母)rabbbit^^^^ ^^rabbbit^
2021-03-18 22:40:44
117
原创 螺旋矩阵 II
描述:给你一个正整数 n ,生成一个包含 1 到 n2 所有元素,且元素按顺时针顺序螺旋排列的 n x n 正方形矩阵 matrix 。示例 1:输入:n = 3输出:[[1,2,3],[8,9,4],[7,6,5]]示例 2:输入:n = 1输出:[[1]]提示:1 <= n <= 20class Solution { public int[][] generateMatrix(int n) { int[][] arr = new int[n][n]; // 1
2021-03-16 14:47:08
82
原创 java.sql.SQLException: ORA-01427: 单行子查询返回多个行
oracle数据库报的一个错误,错误原因是:在一个有嵌套的查询里,用了 select * from A where a = (select b from B where b =1);查询条件里用了等号=,然后嵌套的查询结果里返回的不是1条数据,而是多条数据【select b from B where b =1 返回超过1条数据】...
2021-03-04 15:12:17
1806
1
原创 springboot 集成 mybatis
1.添加依赖spring boot依赖 <dependency> <groupId>org.mybatis.spring.boot</groupId> <artifactId>mybatis-spring-boot-starter</artifactId> <version>2.1.1</version> </de
2021-02-24 18:02:16
114
原创 idea Error:(465,18) java: 错误: 找不到符号
出现的原因:如上图,调用getStatisticType方法的位置,在编译时,会报"找不到符号";不知道什么原因但是可以看出差异;其他的get/set方法被idea转成了一行;而这个没有;将getStatisticType这个方法手工转换成一行,之后重新编译,就没有这个问题了!!!神奇!!!...
2021-02-24 16:27:04
394
原创 mybatis配置
1.springboot 和mybatis集成,打印sqllogging.level.com.chinatmg.common.mapper=DEBUG其中com.chinatmg.common.mapper为mapper文件的包路径
2021-02-07 15:23:18
92
原创 下载文件
下载文件,可以用以下形式实现:String fileName = URLEncoder.encode("XXX.xlsx", "UTF-8");headers.setContentType(MediaType.APPLICATION_OCTET_STREAM);headers.setContentDispositionFormData("attachment", new String(fileName.getBytes("utf-8"), "ISO8859-1"));return new Respo
2021-01-29 15:32:11
154
原创 flink NoSuchMethodException: org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.getProxy
{bootstrap.servers=192.168.30.167:29092, group.id=loadInfo_to_hive}Exception in thread "main" java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Nativ
2021-01-12 17:11:53
2541
3
winutils.exe/hadoop-common-2.2.0.rar
2020-12-04
Kerberos The Definitive Guide.zip
2020-12-03
redis in action 源码
2017-11-07
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人