自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 sonar7.8+pdf导出

sonarqube:7.8-community 是 sonar 对 jdk8 的最后一个版本,从 7.9 以后 sonar 最低支持版本为 jdk11。博主项目是jdk8,一开始拉的9.9,启动不起来,所以查了一下支持jdk8的7.8。如果访问失败,或者用curl命令,提示Connection refused,,java项目maven构建,扫描命令直接copy就好了,注意token。重点:重启容器,并且,不能同时存在不同版本的插件不然容器都启动不了。可以查看sonar日志,定位报错,并进行修改。

2023-03-11 17:11:52 772 1

原创 @Transactional事务处理解决方案的看法

本文就是了解一下声明式事务和编程式事务的优缺点和事务一致性的一些方案提示:以下是本篇文章正文内容,下面案例可供参考1.在修改数据库数据前,需要先删除一次redis:此时是为了保证在数据库数据修改和redis数据被删除的间隔时间内,如有命中,保证此数据也不存在redis中。如果没有这一次删除,当数据库数据已经被修改了,但是还是可以从redis中读出旧数据,导致数据不一致。

2023-01-04 16:54:30 355

原创 docker-compose部署kafka并用kafka-tools

docker-kafka.ymlversion: '2'services: zookeeper: container_name: "zookeeper" image: wurstmeister/zookeeper volumes: # zk数据文件路径。 宿主机路径:容器路径 - /Users/jathamchen/docker/zk-data:/data ports: - "2181:2181" kafka: image:

2022-01-04 14:59:08 1414

原创 java中JSON转含泛型对象

json使用的是fastjson,json转换对象的时候,如果对象中存在泛型对象,则需要特殊处理下才能正常转换。使用的是fastjson中的TypeReference A<B<C>> resultObj =JSON.parseObject("转换json",new TypeReference<A<B<C>>>(){});*A为接收类型,B为A的泛型类,C为B的泛型类参考文档博主公众号求关注...

2021-12-21 17:16:37 3226

原创 java动态加入属性

pom <!-- https://mvnrepository.com/artifact/cglib/cglib --> <dependency> <groupId>cglib</groupId> <artifactId>cglib</artifactId> <version>3.2.9</version> </dependency> <!-- https://

2021-12-21 12:53:17 1659

原创 解决FastJson中“$ref 循环引用”的问题

转string的时候加上SerializerFeature.DisableCircularReferenceDetectJSONObject.toJSONString(new String("1"), SerializerFeature.DisableCircularReferenceDetect)

2021-12-03 10:29:27 275

原创 elasticsearch外网访问设置+密码登录

检查服务器是否开放端口修改文件elasticsearch.yml博主报错ERROR: [1] bootstrap checks failed[1]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]接下来照着参考文档改就可以参考文档https://www.cnblogs.com/binbinyouni/p/8360926.html结果博主公众号求关注

2021-11-17 15:37:13 1612

原创 ORA-00001 unique constraint violated

博主是主键序列问题,下一个新增的值已经存在解决方法:查看下一个新增的值然后运行sqlselect "HALM"."ISEQ$$_79771".nextval from dual然后发现重复,多点几下超过最大值就行

2021-09-29 15:22:47 296

原创 oracle 用户名/密码口令无效

Could not get a databaseId from dataSource java.sql.SQLException: Listener refused the connectio博主原因是因为用了system用户记录一下,mybatis里使用insert all的问题,不适合需要主键递增的单表批量插入参考链接

2021-09-28 17:32:03 1117

原创 java报错Lock wait timeout exceeded; try restarting transaction

问题博主问题是mysql表锁导致无法提交事务临时处理可以先kill卡住的线程show processlist;SELECT * FROM information_schema.INNODB_TRX;这一列有值就执行。kill 值(pid)场景1.模拟事务提交2.产生死锁第二条sql一直在等待锁,无法执行原理在执行更新操作的时候,存在慢sql,未执行完成就提交新事务,导致代码报错,定位问题为查询列没有索引,行锁升级到表锁解决方案给查询列增加普通索引结果不

2021-08-22 18:43:19 1304

原创 报错:Cannot deserialize instance of `java.util.ArrayList` out of START_OBJECT token

参考链接博主需要的参数@RequestBody List<DraftsDto> list错误传参{ "list":[ { ... } }, { ... } }, { ... } } ] }正确传参[ { ... } }, { ... } }, { ... } } ]

2021-08-11 14:15:49 1101

转载 java遍历Map效率最高的方式

public static void main(String[] args){ HashMap<String, String> hm = new HashMap<String, String>(); hm.put("111", "222"); Set<Map.Entry<String, String>> entrySet = hm.entrySet(); Iterator<Map.Entry<String, St

2021-07-20 11:34:05 1182

原创 @PropertySource存入map属性 并解决乱序问题

sr.properties格式文件路径src/main/resources/config/sr.propertiessr.mapest.key1=map1sr.mapest.key2=map2sr.mapest.key3=map3sr.mapest.key4=map4@PropertySource用法@Component@ConfigurationProperties(prefix = "sr")@PropertySource(value = "classpath:/config/sr.

2021-07-16 15:27:54 670

原创 mapper不执行sql原因

场景同一个mapper方法,传入参数相同,结果确不同。原理可能在查询后,操作了源数据,在下一次查询的时候,因为传入参数相同,mybatis存在一级缓存,不会去查询数据库,会从缓存里拿数据。mybatis一级缓存 默认开启Mybatis的一级缓存是指SQLSession,一级缓存的作用域是SQlSession, Mabits默认开启一级缓存。 在同一个SqlSession中,执行相同的SQL查询时;第一次会去查询数据库,并写在缓存中,第二次会直接从缓存中取。 当执行SQL时候两次查询中间发生了增删改

2021-06-29 17:03:52 1925 1

原创 自定义切面注解没生效的原因

博主的问题是 用this无法生效切面public class ServiceImpl implements Service {@Override public T getAssetDetail() { xxxxxx; } @Override @TranslateRemoteField public T selectConcreteRecordDetail(Long id) { //正确写法 Service serviceT

2021-06-01 11:00:52 3174

原创 初识oracle 标识符无效“ID“

创建表的时候,列名一定要大写因为 select 列名 from 表名 的时候 会自动转列名为大写,如果你是小写那么就会报错

2021-05-25 10:46:58 413

原创 使用postman进行并发测试

原文链接:https://www.cnblogs.com/stm32stm32/p/10434399.html使用postman进行并发测试1、打开postman软件左侧栏点击+号键,创建一个并发测试文件夹2、主面板点击+号键,输入一个测试地址,点击save按钮保存到并发测试文件夹3、点击三角箭头,再点击Run,弹出Collection Runner插件4、设置并发数和延时时间,点击Run5、运行结果会依次排序,显示结果状态和耗时从图中可以看到百度的响应速度还是非常快的。点击R

2021-05-11 15:58:52 8736 3

原创 技术记录

list根据字段转map//(key1, key2) -> key1 表示重复key的话 用旧的keyList<Field> list = new ArrayList<>();Map<String,Field> map= Arrays.stream(list).collect(Collectors.toMap(Field::getName, Function.identity(),(key1, key2) -> key1));list根据分隔符转s

2021-04-23 15:21:12 88

转载 2021最全正则表达式

一、校验数字的表达式1. 数字:^[0-9]*$2. n位的数字:^\d{n}$3. 至少n位的数字:^\d{n,}$4. m-n位的数字:^\d{m,n}$5. 零和非零开头的数字:^(0|[1-9][0-9]*)$6. 非零开头的最多带两位小数的数字:^([1-9][0-9]*)+(.[0-9]{1,2})?$7. 带1-2位小数的正数或负数:^(\-)?\d+(\.\d{1,2})?$8. 正数、负数、和小数:^(\-|\+)?\d+(\.\d+)?$9. 有两位小数

2021-04-15 10:36:36 1517

原创 踩坑日记-jatham

mybatis的注释必须<!-- xxxxxxxxxxxxxxxxxxx ->mysql的default值 只有在传入对象没有该字段,不是字段为null。字段为null 会存null

2021-03-30 14:27:55 148

转载 spring中mapper.xml文件中注释规范

在xml的注释上面有几个问题,切记只能用<!-- 只能这样子注释代码-->-- 报错/** 报错**/原文链接

2021-03-23 17:17:30 529

原创 ip2region解析ip获取地区

pom<dependency> <groupId>org.lionsoul</groupId> <artifactId>ip2region</artifactId> <version>1.7.2</version> </dependency>javaimport org.lionsoul.ip2region.DataB

2021-03-01 17:13:56 910 7

原创 sprinboot获取http请求的ip(nginx代理)

nginx配置location / { proxy_redirect off; proxy_pass http://127.0.0.1:10020/; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header

2021-03-01 14:06:26 612 4

原创 navicat连接oracle19c

安装下载参考链接配置navicat参考链接遇到问题:ORA-28040:没有匹配的验证协议ORA-01017:用户名/口令无效;登陆被拒绝解决方案:1.修改角色2.修改navicat的orcl工具->选项->环境->OCI环境修改为自己的 #{oracle安装目录}/bin/oci.dll3.配置默认用户名,密码,服务号密码是自己安装设置的密码新建表空间和用户参考文档流程简单,注意用户名一定要大写!...

2021-02-24 17:49:13 2757

原创 hive Caused by: MetaException(message:Version information not found in metastore. )解决方法

到 hive-site.xml中修改: hive.metastore.schema.verification设置成false就可以了 hive.metastore.schema.verification 设置为 false

2021-02-05 18:39:10 1159 1

原创 控制台显示application占用大,Sparkthriftserver启用及优化

./start-thriftserver.sh --executor-memory 6g --total-executor-cores 6查看控制台发现 没有资源,修改 spark-defaults.confspark.deploy.defaultCores 2https://www.cnblogs.com/cuishuai/p/7693417.htmlDynamic allocation of executors requires the external shuffle service.

2021-02-05 18:38:32 394

原创 springboot jdbc方式连接hive

准备工作查看${HIVE_HOME}/conf/hive-site.xml <property> <name>hive.server2.thrift.bind.host</name> <value>master</value> <description>Bind host on which to run the HiveServer2 Thrift service.</description>

2020-12-19 17:30:19 633 1

原创 报错Permission denied: user=root, access=EXECUTE, inode=“/tmp/hadoop-root“解决办法

方法1修改文件权限给roothadoop fs -chown -R root:root /tmp方法2开放文件权限给所有人hadoop fs -chmod -r 777 /tmp

2020-12-11 10:05:57 3881

原创 spark-sql常见问题网站记录

https://www.cnblogs.com/arachis/p/Spark_Exception.html添加链接描述

2020-12-08 11:24:53 78

原创 hive常见问题

hive查询异常:Cannot create directory /tmp/hive-root/。。。Name node is in safe mode.解决办法:关闭安全模式hadoop dfsadmin -safemode leave Hive中运行任务报错:Error during job, obtaining debugging information…错误原因:namenode内存空间不够,JVM剩余内存空间不够新job运行所致解决办法:将hive设置成本地模式来执行任务

2020-11-26 11:53:14 258

原创 centos7部署kylin-4.0.0

环境hadoop-2.10hive-2.3.7spark-2.4.5mysql-8.0.17安装部署官方文档http://kylin.apache.org/cn/docs/install/index.htmlwget https://mirrors.tuna.tsinghua.edu.cn/apache/kylin/apache-kylin-4.0.0-alpha/apache-kylin-4.0.0-alpha-bin-hadoop2.tar.gzvi /etc/profileex

2020-11-24 18:16:34 1061 4

原创 java.io.IOException: Failed to create local dir in /tmp/blockmgr-adb70127-0a28-4256-a205-c575acc74f9

权限设置1.thrift server 端口占用netstat -antp|grep {port}2.log权限设置新建 /tmp/blockmgr-adb70127-0a28-4256-a205-c575acc74f9 目录chmod 777 /tmp/blockmgr-adb70127-0a28-4256-a205-c575acc74f9赋予用户chown -R hadoop /tmp/blockmgr-adb70127-0a28-4256-a205-c575acc74f9chgrp

2020-11-23 16:23:12 1890

原创 spark-sql 卡在TaskSchedulerImpl: Initial job has not accepted any resources; check your cluster UI to

参考文档引发的原因很多,博主的问题是端口占用vi ${SPARK_HOME}/conf/spark-env.sh# 提交Application的端口,默认就是这个,万一要改呢,改这里#export SPARK_MASTER_PORT=7077netstat -antp|grep 7077然后重启spark就可以了...

2020-11-18 16:18:36 220

原创 dolphinscheduler-1.3 worker分组管理配置

博主的UI界面没有创建worker组,官方文档也没有找到,做个记录vi /${dolphinscheduler}/conf/worker.properties# default worker group,if this worker belongs different groups,you can config the following like that `worker.groups=default,test`worker.groups=default,slave1重启${dolphin

2020-11-16 15:22:25 2644 1

原创 flinksql客户端消费 kafka

建议整合hive,这样创建的表可以保存参考个人博客:https://blog.jathamcloud.top/blog/8添加jar依赖仓库地址https://mvnrepository.com/artifact/org.apache.flink/flink-clientshttps://mvnrepository.com/artifact/org.apache.flink/flink-streaming-javahttps://mvnrepository.com/artifact/or

2020-11-11 11:20:10 1406

原创 kafka+zookeeper集群部署

zookeeper集群部署上一篇博客kafka集群部署配置下载kafka官网http://kafka.apache.org/wget https://archive.apache.org/dist/kafka/2.4.0/kafka_2.11-2.4.0.tgz修改配置文件vi ${kafka_home}/config/server.properties (1)、配置 broker 的ID,每一台服务器的地址依次不同,其他两台为2,3broker.id=1(2)、打开监听端

2020-11-05 14:40:19 218

原创 centos7 部署python2

下载python官网 https://www.python.org/downloads/release/python-2718/wget https://www.python.org/ftp/python/2.7.18/Python-2.7.18.tgztar -zxvf Python-2.7.18.tgz -C /app/python2cd /app/python2./configure prefix=/usr/local/python2makemake install#测试pyth

2020-11-02 18:06:32 106

原创 zookeeper集群安装部署

官网下载官网wget https://mirrors.tuna.tsinghua.edu.cn/apache/zookeeper/zookeeper-3.6.2/apache-zookeeper-3.6.2-bin.tar.gz配置修改${zookeeperhome}/conf/zoo.cfg# The number of milliseconds of each ticktickTime=2000# The number of ticks that the initial# synchr

2020-10-30 18:01:43 82

原创 windows查找端口占用并杀死进程

netstat –ano|findstr <端口号>wmic process get name,executablepath,processid|findstr <查出来的PID>taskkill -PID <查出来的PID> -F

2020-10-30 14:35:14 108 1

原创 hue整合sparksql和presto

常见问题参考文档整合spark先开启${spark_home}/sbin/start-thriftserver.sh [spark]# Host of the Spark Thrift Server# https://spark.apache.org/docs/latest/sql-distributed-sql-engine.htmlsql_server_host=localhost# Port of the Spark Thrift Serversql_server_port=1

2020-10-29 15:18:47 1749

空空如也

空空如也

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

TA关注的人

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