当前位置:网站首页>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)
边栏推荐
- 【pytorch】softmax函数
- Shell脚本-case in 和正则表达式
- Interrupt sharing variables with other functions and protection of critical resources
- 如何一站式高效管理固定资产?
- 2.3 【pytorch】数据预处理 torchvision.datasets.ImageFolder
- Set the type of the input tag to number, and remove the up and down arrows
- Daily practice of C language - day 80: currency change
- TV size and viewing distance
- Jetson Nano 安装TensorFlow GPU及问题解决
- Shell script -read command: read data entered from the keyboard
猜你喜欢

Redis -- lattice connects to redis cluster

AVL树的理解和实现

Why is the Ltd independent station a Web3.0 website!

Nacos - Configuration Management

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

VSYNC+三重缓存机制+Choreographer

Principles of Microcomputer - internal and external structure of microprocessor

【电赛训练】红外光通信装置 2013年电赛真题

Principles of Microcomputer - Introduction

2.4 激活函数
随机推荐
嵌入式工程师面试-常问问题集
Football and basketball game score live broadcast platform source code /app development and construction project
How to manage fixed assets well? Easy to point and move to provide intelligent solutions
足球篮球体育比赛比分直播平台源码/app开发建设项目
Shell script - definition, assignment and deletion of variables
【pytorch学习】torch.device
【ESP 保姆级教程 预告】疯狂Node.js服务器篇 ——案例:ESP8266 + DS18B20温度传感器 +NodeJs本地服务+ MySQL数据库
Shell脚本-echo命令 转义符
Shell script -for loop and for int loop
pcl_ Viewer command
Pain points and solutions of fixed assets management of group companies
Shell脚本-select in循环
VSYNC+三重缓存机制+Choreographer
【pytorch】nn.AdaptiveMaxPool2d
Personal decoration notes
Principle and application of single chip microcomputer timer, serial communication and interrupt system
Shell脚本-数组定义以及获取数组元素
Databinding source code analysis
【ESP 保姆级教程 预告】疯狂Node.js服务器篇 ——案例:ESP8266 + MQ系列 + NodeJs本地服务 + MySql存储
Shell script - array definition and getting array elements