当前位置:网站首页>Record a redis timeout
Record a redis timeout
2022-07-01 09:06:00 【The south wind knows what I mean】
Project scenario :
Spark Streaming Task consumption kafka, hold offsets Deposit in redis
Problem description
The main bug:
ERROR yarn.ApplicationMaster: User class threw exception: redis.clients.jedis.exceptions.JedisConnectionException: java.net.SocketTimeoutException: Read timed out
redis.clients.jedis.exceptions.JedisConnectionException: java.net.SocketTimeoutException: Read timed out
at redis.clients.jedis.util.RedisInputStream.ensureFill(RedisInputStream.java:204)
at redis.clients.jedis.util.RedisInputStream.readByte(RedisInputStream.java:42)
at redis.clients.jedis.Protocol.process(Protocol.java:126)
at redis.clients.jedis.Protocol.read(Protocol.java:192)
at redis.clients.jedis.Connection.readProtocolWithCheckingBroken(Connection.java:316)
at redis.clients.jedis.Connection.getOne(Connection.java:298)
at redis.clients.jedis.Connection.executeCommand(Connection.java:123)
at redis.clients.jedis.Jedis.set(Jedis.java:4725)
at cn.huorong.utils.RedisUtils$.$anonfun$writeOffset$3(RedisUtils.scala:45)
at scala.collection.immutable.Map$Map1.foreach(Map.scala:128)
at cn.huorong.utils.RedisUtils$.writeOffset(RedisUtils.scala:40)
at cn.huorong.run.SampleTaskSinkHbaseMapping.$anonfun$sink$1(SampleTaskSinkHbaseMapping.scala:51)
at cn.huorong.run.SampleTaskSinkHbaseMapping.$anonfun$sink$1$adapted(SampleTaskSinkHbaseMapping.scala:17)
at org.apache.spark.streaming.dstream.DStream.$anonfun$foreachRDD$2(DStream.scala:629)
at org.apache.spark.streaming.dstream.DStream.$anonfun$foreachRDD$2$adapted(DStream.scala:629)
at org.apache.spark.streaming.dstream.ForEachDStream.$anonfun$generateJob$2(ForEachDStream.scala:51)
at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:23)
at org.apache.spark.streaming.dstream.DStream.createRDDWithLocalProperties(DStream.scala:417)
at org.apache.spark.streaming.dstream.ForEachDStream.$anonfun$generateJob$1(ForEachDStream.scala:51)
at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:23)
at scala.util.Try$.apply(Try.scala:213)
at org.apache.spark.streaming.scheduler.Job.run(Job.scala:39)
at org.apache.spark.streaming.scheduler.JobScheduler$JobHandler.$anonfun$run$1(JobScheduler.scala:256)
at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:23)
at scala.util.DynamicVariable.withValue(DynamicVariable.scala:62)
at org.apache.spark.streaming.scheduler.JobScheduler$JobHandler.run(JobScheduler.scala:256)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.net.SocketTimeoutException: Read timed out
Cause analysis :
redis colony Caused by excessive load redis Connection timeout , The program is down
Solution :
increase redis Time is enough
//connectionTimeout Connection timeout ( Default 2000ms)
private val redis: Jedis = new Jedis(HOST, PORT,100000)
边栏推荐
- Key points of NFT supervision and overseas policies
- 猿人学第20题(题目会不定时更新)
- Vsync+ triple cache mechanism +choreographer
- VSYNC+三重缓存机制+Choreographer
- Which method is good for the management of fixed assets of small and medium-sized enterprises?
- 【pytorch】nn.CrossEntropyLoss() 与 nn.NLLLoss()
- 2.3 【kaggle数据集 - dog breed 举例】数据预处理、重写Dataset、DataLoader读取数据
- pcl_viewer命令
- 如何高效拉齐团队认知
- FAQ | FAQ for building applications for large screen devices
猜你喜欢

Which method is good for the management of fixed assets of small and medium-sized enterprises?

FreeRTOS学习简易笔记

2.2 【pytorch】torchvision.transforms

足球篮球体育比赛比分直播平台源码/app开发建设项目

Pain points and solutions of fixed assets management of group companies

How to manage fixed assets efficiently in one stop?

安装Oracle EE

Principles of Microcomputer - Introduction

Vsync+ triple cache mechanism +choreographer

Nacos - 配置管理
随机推荐
Principles of Microcomputer - Introduction
Shell脚本-数组定义以及获取数组元素
Shell script -for loop and for int loop
【ESP 保姆级教程】疯狂毕设篇 —— 案例:基于阿里云、小程序、Arduino的温湿度监控系统
Jetson nano installs tensorflow GPU and problem solving
中断与其他函数共享变量、临界资源的保护
Pain points and solutions of equipment management in large factories
jeecg 重启报40001
【电赛训练】红外光通信装置 2013年电赛真题
【pytorch学习】torch.device
如何高效拉齐团队认知
如何解决固定资产管理和盘点的难题?
Input标签的type设置为number,去掉上下箭头
How to effectively align team cognition
【pytorch】2.4 卷积函数 nn.conv2d
Full mark standard for sports items in the high school entrance examination (Shenzhen, Anhui and Hubei)
Computer tips
JCL and slf4j
Shell脚本-if else语句
I would like to know the process of stock registration and account opening by mobile phone? In addition, is it safe to open a mobile account?