Redis 读写分离 使用redisTemplate执行lua脚本时,报错处理

项目框架说明

  1. 项目配置
    <parent><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-parent</artifactId><version>2.5.4</version></parent>....<dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-data-redis</artifactId>
<!--            <version>2.5.4</version>--></dependency><dependency><groupId>org.apache.commons</groupId><artifactId>commons-pool2</artifactId></dependency>
  1. redis架构
  • 1主2从3哨兵模式
  • 采用了读写分离模式
  • springboot使用luttuce
  • 项目使用redisTemplate执行lua脚本

关键代码

    @Bean@Primarypublic LettuceConnectionFactory lettuceConnectionFactory(@Qualifier("sentinelConfiguration") RedisSentinelConfiguration sentinelConfiguration) {GenericObjectPoolConfig poolConfig = new GenericObjectPoolConfig();poolConfig.setMaxIdle(redisProperties.getLettuce().getPool().getMaxIdle());poolConfig.setMinIdle(redisProperties.getLettuce().getPool().getMinIdle());poolConfig.setMaxTotal(redisProperties.getLettuce().getPool().getMaxActive());poolConfig.setMaxWaitMillis(redisProperties.getLettuce().getPool().getMaxWait().toMillis());LettuceClientConfiguration clientConfig = LettucePoolingClientConfiguration.builder().readFrom(ReadFrom.REPLICA) // 只在从节点读取.poolConfig(poolConfig).build();// 从节点读取LettuceConnectionFactory factory = new LettuceConnectionFactory(sentinelConfiguration, clientConfig);factory.setValidateConnection(true);return factory;}

测试代码

	@AutowiredredisTemplate redisTemplate@Testpublic void testLuaSet() throws InterruptedException {redisTemplate.setKeySerializer(new StringRedisSerializer());redisTemplate.setValueSerializer(new StringRedisSerializer()); //需要序列化,否侧不显示RedisScript<String> script = new DefaultRedisScript<>("return redis.call('SET', KEYS[1], ARGV[1])", String.class);String value = redisTemplate.execute(script, Collections.singletonList("name"),"name1");System.out.println(value);}

问题1:-READONLY You can‘t write against a read only slave

大致意思是说 在从节点上执行 写操作(实际上写操作是在lua脚本里面的)

org.springframework.data.redis.RedisSystemException: Error in execution; nested exception is io.lettuce.core.RedisCommandExecutionException: ERR Error running script (call to f_d8f2fad9f8e86a53d2a6ebd960b33c4972cacc37): @user_script:1: @user_script: 1: -READONLY You can't write against a read only slave.   at org.springframework.data.redis.connection.lettuce.LettuceExceptionConverter.convert(LettuceExceptionConverter.java:54)at org.springframework.data.redis.connection.lettuce.LettuceExceptionConverter.convert(LettuceExceptionConverter.java:52)at org.springframework.data.redis.connection.lettuce.LettuceExceptionConverter.convert(LettuceExceptionConverter.java:41)at org.springframework.data.redis.PassThroughExceptionTranslationStrategy.translate(PassThroughExceptionTranslationStrategy.java:44)at org.springframework.data.redis.FallbackExceptionTranslationStrategy.translate(FallbackExceptionTranslationStrategy.java:42)at org.springframework.data.redis.connection.lettuce.LettuceConnection.convertLettuceAccessException(LettuceConnection.java:271)at org.springframework.data.redis.connection.lettuce.LettuceConnection.await(LettuceConnection.java:1062)at org.springframework.data.redis.connection.lettuce.LettuceConnection.lambda$doInvoke$4(LettuceConnection.java:919)at org.springframework.data.redis.connection.lettuce.LettuceInvoker$Synchronizer.invoke(LettuceInvoker.java:673)at org.springframework.data.redis.connection.lettuce.LettuceInvoker$DefaultSingleInvocationSpec.get(LettuceInvoker.java:589)at org.springframework.data.redis.connection.lettuce.LettuceScriptingCommands.evalSha(LettuceScriptingCommands.java:122)at org.springframework.data.redis.connection.DefaultedRedisConnection.evalSha(DefaultedRedisConnection.java:1551)at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)at java.lang.reflect.Method.invoke(Method.java:498)at org.springframework.data.redis.core.CloseSuppressingInvocationHandler.invoke(CloseSuppressingInvocationHandler.java:61)at com.sun.proxy.$Proxy91.evalSha(Unknown Source)at org.springframework.data.redis.core.script.DefaultScriptExecutor.eval(DefaultScriptExecutor.java:77)at org.springframework.data.redis.core.script.DefaultScriptExecutor.lambda$execute$0(DefaultScriptExecutor.java:68)at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:222)at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:189)at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:176)at org.springframework.data.redis.core.script.DefaultScriptExecutor.execute(DefaultScriptExecutor.java:58)at org.springframework.data.redis.core.script.DefaultScriptExecutor.execute(DefaultScriptExecutor.java:52)at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:343)

思路

  1. 为什么执行lua脚本会只走从节点?
    在主从模式下,框架自身应该是可以区分读和写的命令的。可能是执行lua脚本的命令的默认规定为读命令了。

  2. 定位问题:

    • 定位到这行(从最低层看到现在,发现没有问题,这一行的上面一行就是调用get命令来获取返回值了。)
      at org.springframework.data.redis.connection.lettuce.LettuceScriptingCommands.evalSha(LettuceScriptingCommands.java:122)
      

    1.1 定位到代码位置:
    在这里插入图片描述
    1.2 点进去,到了下图,开发送命令了,点到evalsha,在这里插入图片描述
    1.3 在点进去,发现在这里给执行lua脚本的命令定义为 evlasha
    在这里插入图片描述
    1.4 执行完返回到1.3中,继续到dispatch里面,具体哪个可以debug看一下。
    在这里插入图片描述
    1.5 之后就一直debug,一直点到这里。发现是根据intent值来获取connect类型。
    在这里插入图片描述
    1.6 点到 getIntent里面 看到是从ReadOnlyCommands中类判断当前命令类型是走读的connect还是写的connect.
    在这里插入图片描述
    在这里插入图片描述
    至此,问题找到了,正如刚开始猜想。

  3. 解决问题
    重写 ReadOnlyCommands 类,让所有lua命令都走主节点。

  4. 另外的办法
    单独注入一个redisMasterTemplate类,这个类只连接主节点。
    但是存在问题,当发生故障转移后,需要从新注入这个类(涉及到监听故障转移的消息队列)。

问题2:ERR value is not an integer or out of range

执行命令时,传入的参数有问题。

  1. 仔细检查参数类型是否错误
  2. 检查redisTemplate是否执行了key和value的序列化方式

关键代码

    void test(){
//        redisTemplate.setKeySerializer(new StringRedisSerializer());
//        redisTemplate.setValueSerializer(new StringRedisSerializer());String luaScript = "return redis.call('SET', KEYS[1], ARGV[1], 'NX', 'EX', ARGV[2])";String lockKey = "aa";String lockValue = "aa";int lockTimeout = 10;RedisScript<Boolean> script = new DefaultRedisScript<>(luaScript, Boolean.class);Boolean lockAcquired = redisTemplate.execute(script, Collections.singletonList(lockKey), lockValue, String.valueOf(lockTimeout));System.out.println(lockAcquired);
//        if (lockAcquired != null && lockAcquired) {
//            // 成功获取到锁
//            System.out.println("成功获取到锁");
//        } else {
//            // 未能获取到锁
//            System.out.println("未能获取到锁");
//        }}	// 报错信息org.springframework.data.redis.RedisSystemException: Error in execution; nested exception is io.lettuce.core.RedisCommandExecutionException: ERR Error running script (call to f_ed50129a03a8ecae5f7bb06f56511f7318b722d3): @user_script:1: ERR value is not an integer or out of range at org.springframework.data.redis.connection.lettuce.LettuceExceptionConverter.convert(LettuceExceptionConverter.java:54)at org.springframework.data.redis.connection.lettuce.LettuceExceptionConverter.convert(LettuceExceptionConverter.java:52)at org.springframework.data.redis.connection.lettuce.LettuceExceptionConverter.convert(LettuceExceptionConverter.java:41)at org.springframework.data.redis.PassThroughExceptionTranslationStrategy.translate(PassThroughExceptionTranslationStrategy.java:44)at org.springframework.data.redis.FallbackExceptionTranslationStrategy.translate(FallbackExceptionTranslationStrategy.java:42)at org.springframework.data.redis.connection.lettuce.LettuceConnection.convertLettuceAccessException(LettuceConnection.java:271)at org.springframework.data.redis.connection.lettuce.LettuceConnection.await(LettuceConnection.java:1062)at org.springframework.data.redis.connection.lettuce.LettuceConnection.lambda$doInvoke$4(LettuceConnection.java:919)at org.springframework.data.redis.connection.lettuce.LettuceInvoker$Synchronizer.invoke(LettuceInvoker.java:673)at org.springframework.data.redis.connection.lettuce.LettuceInvoker$DefaultSingleInvocationSpec.get(LettuceInvoker.java:589)at org.springframework.data.redis.connection.lettuce.LettuceScriptingCommands.evalSha(LettuceScriptingCommands.java:122)at org.springframework.data.redis.connection.DefaultedRedisConnection.evalSha(DefaultedRedisConnection.java:1551)at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)at java.lang.reflect.Method.invoke(Method.java:498)at org.springframework.data.redis.core.CloseSuppressingInvocationHandler.invoke(CloseSuppressingInvocationHandler.java:61)at com.sun.proxy.$Proxy90.evalSha(Unknown Source)at org.springframework.data.redis.core.script.DefaultScriptExecutor.eval(DefaultScriptExecutor.java:77)at org.springframework.data.redis.core.script.DefaultScriptExecutor.lambda$execute$0(DefaultScriptExecutor.java:68)at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:222)at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:189)at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:176)at org.springframework.data.redis.core.script.DefaultScriptExecutor.execute(DefaultScriptExecutor.java:58)at org.springframework.data.redis.core.script.DefaultScriptExecutor.execute(DefaultScriptExecutor.java:52)at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:343)at RedisLockPerformanceTester.test(RedisLockPerformanceTester.java:176)at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)at java.lang.reflect.Method.invoke(Method.java:498)at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:688)at org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60)at org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:131)at org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:149)at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestableMethod(TimeoutExtension.java:140)at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestMethod(TimeoutExtension.java:84)at org.junit.jupiter.engine.execution.ExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(ExecutableInvoker.java:115)at org.junit.jupiter.engine.execution.ExecutableInvoker.lambda$invoke$0(ExecutableInvoker.java:105)at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:106)at org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:64)at org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:45)at org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:37)at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:104)at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:98)at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeTestMethod$6(TestMethodTestDescriptor.java:210)at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeTestMethod(TestMethodTestDescriptor.java:206)at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:131)at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:65)at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:139)at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:129)at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:127)at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:126)at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:84)at java.util.ArrayList.forEach(ArrayList.java:1257)at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:38)at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:143)at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:129)at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:127)at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:126)at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:84)at java.util.ArrayList.forEach(ArrayList.java:1257)at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:38)at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:143)at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:129)at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:127)at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:126)at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:84)at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:32)at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57)at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:51)at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:108)at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:88)at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:54)at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:67)at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:52)at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:96)at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:75)at com.intellij.junit5.JUnit5IdeaTestRunner.startRunnerWithArgs(JUnit5IdeaTestRunner.java:71)at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:33)at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:220)at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:53)

添加完:

        redisTemplate.setKeySerializer(new StringRedisSerializer());redisTemplate.setValueSerializer(new StringRedisSerializer());

执行就没有问题了。

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/3205.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

(学习笔记-TCP基础知识)TCP与UDP区别

UDP UDP不提供复杂的控制机制&#xff0c;利用IP提供面向[无连接]的通信服务。 UDP协议非常简单&#xff0c;头部只有8个字节(位)&#xff0c;UDP的头部格式如下&#xff1a; 目标和源端口&#xff1a;主要是告诉UDP协议应该把报文发给哪个进程包长度&#xff1a;该字段保存了…

TinyKv流程梳理三

split流程 处理协程启动 func (bs *Raftstore) startWorkers(peers []*peer) {ctx : bs.ctxworkers : bs.workersrouter : bs.routerbs.wg.Add(2) // raftWorker, storeWorkerrw : newRaftWorker(ctx, router)go rw.run(bs.closeCh, bs.wg)sw : newStoreWorker(ctx, bs.store…

基于Web API drap事件的简单拖拽功能

基于Web API drap事件的简单拖拽功能 效果示例图代码示例 效果示例图 代码示例 <!DOCTYPE html> <html><head><meta charset"utf-8"><title></title><style type"text/css">* {padding: 0px;margin: 0px;box-s…

uniapp动态获取列表中每个下标的高度赋值给另一个数组(完整代码附效果图)

uniapp实现动态获取列表中每个下标的高度&#xff0c;赋值给另一个数组。 先看效果图&#xff1a; 完整代码&#xff1a; <template><div class""><div class"">我是A列表&#xff0c;我的高度不是固定的</div><div class&qu…

300-700题红题第六题

336. 回文对 336. 回文对 **class Solution:def palindromePairs(self, words: List[str]) -> List[List[int]]:dic {w: i for i,w in enumerate(words)}res []for index, s in enumerate(words):for j in range(len(s)1):if s[j:] s[j:][::-1]: if s[:j][::-1] in dic…

MySQL 坐标批量计算及优化

文章目录 1、坐标计算2、优化 现在有一个需求&#xff0c;就是找出距离某用户最近的一些点&#xff0c;一种实现方法就是调用地图的api来计算筛选&#xff0c;另外一种就是在数据库中计算&#xff0c;考虑到地图api有并发量限制&#xff0c;所以选用数据库计算的方式。 1、坐标…

ThunderScope开源示波器

简介 4CH&#xff0c;1GSa/S 开源示波器。前端很简洁&#xff0c;BUF802LMH6518&#xff0c;ADC是HMCAD1511&#xff0c;用Xilinx A7 FPGA进行控制&#xff0c;数据通过PCIE总线传输到上位机处理。目前这个项目已经被挂到了Xilinx官网&#xff0c;强。 设计日志&#xff1a;h…

vue3 defineEmits的使用 和vue2对比

在Vue 3中&#xff0c;可以使用defineEmits来定义组件的自定义事件。defineEmits函数接受一个参数&#xff0c;该参数是一个数组或对象&#xff0c;用于指定需要定义的自定义事件。 使用数组定义自定义事件&#xff1a; import { defineComponent, defineEmits } from vue;co…

Unity自定义后处理——Vignette暗角

大家好&#xff0c;我是阿赵。   继续说一下屏幕后处理的做法&#xff0c;这一期讲的是Vignette暗角效果。 一、Vignette效果介绍 Vignette暗角的效果可以给画面提供一个氛围&#xff0c;或者模拟一些特殊的效果。 还是拿这个角色作为底图 添加了Vignette效果后&#xff0…

一篇全新视角的剖析:用Python编写的一组针对心电图数据的心跳检测算法的实现和探讨

一篇全新视角的深度剖析:用Python编写的一组针对心电图数据的心跳检测算法的实现和探讨 在医学领域,心电图(Electrocardiogram,ECG)是一种常见且重要的检查手段,主要用于了解心脏的电活动。通过心电图数据,我们可以掌握心脏的工作状况,例如心跳是否规律、心室和心房是…

模板模式(上):剖析模板模式在JDK、Servlet、JUnit等中的应用

今天&#xff0c;我们再学习另外一种行为型设计模式&#xff0c;模板模式。我们多次强调&#xff0c;绝大部分设计模式的原理和实现&#xff0c;都非常简单&#xff0c;难的是掌握应用场景&#xff0c;搞清楚能解决什么问题。模板模式也不例外。模板模式主要是用来解决复用和扩…

软件测试银行项目面试过程

今天参加了一场比较正式的面试&#xff0c;汇丰银行的视频面试。在这里把面试的流程记录一下&#xff0c;结果还不确定&#xff0c;但是面试也是自我学习和成长的过程&#xff0c;所以记录下来大家也可以互相探讨一下。 请你做一下自我介绍&#xff1f;&#xff08;汇丰要求英…

第108天:免杀对抗-Python混淆算法反序列化打包生成器Py2exeNuitka

知识点 #知识点&#xff1a; 1、Python-对执行代码做文章 2、Python-对shellcode做文章 3、Python-对代码打包器做文章#章节点&#xff1a; 编译代码面-ShellCode-混淆 编译代码面-编辑执行器-编写 编译代码面-分离加载器-编写 程序文件面-特征码定位-修改 程序文件面-加壳花指…

webpack打包之 copy-webpack-plugin

copy-webpack-plugin 打包复制文件插件。 1、什么时候要使用&#xff1f; 在离线应用中&#xff0c;前端所有文件都需在在本地&#xff0c;有些文件&#xff08;比如iconFont以及一些静态img)需要转为离线文件&#xff0c;这些文件可以直接引用更方便些&#xff0c;这就需要在打…

6.6Jmeter远程调度Linux机器Jmeter测试

1、配置Agent和启动 1.1、打开jmeter/bin目录下的jmeter.properties 1、server_port1099取消注释 2、remote_hosts127.0.0.1 改为remote_hosts127.0.0.1:1099 或者是remote_hostsAgent机的ip:1099 3、server.rmi.localport1099 4、server.rmi.ssl.disablefalse改为true&#x…

matlab 一维数组拼接,多个一维数组合并成一个一维数组

目录 matlab 一维数组拼接,多个一维数组合并成一个一维数组 1、一维数组直接合并 直接将两个矩阵合并&#xff1a; 2、一维数组交叉合并&#xff1a; 方法一&#xff1a; 方法二&#xff1a; 方法三&#xff1a; 方法四&#xff1a; 其他操作&#xff1a; matlab 一维…

店招新品之创意LED显示屏之LED魔方屏的特点

LED魔方屏也被称之为立方体LED显示屏、六面体LED显示屏等&#xff0c;每个显示面之间实现了无缝拼接&#xff0c;运用技术前沿的箱体设计工艺&#xff0c;通过跟实际安装场景相结合&#xff0c;打造出更具创意的LED显示屏产品&#xff0c;LED魔方屏以独特的造型吸引用户&#x…

OceanBase 4.1上云,OB Cloud助力企业降本增效

近日&#xff0c;OB Cloud 正式上线 OceanBase 4.1 新版本&#xff0c;支持企业在云上使用最新的 OceanBase 单机分布式一体化架构能力。去年8月OceanBase 宣布公有云服务全球开服&#xff0c;伴随4.1版本推出&#xff0c;OceanBase公有云正式命名为OB Cloud云数据库。 在本次…

基于springboot+Redis的前后端分离项目之分布式锁(四)-【黑马点评】

&#x1f381;&#x1f381;资源文件分享 链接&#xff1a;https://pan.baidu.com/s/1189u6u4icQYHg_9_7ovWmA?pwdeh11 提取码&#xff1a;eh11 分布式锁 分布式锁1 、基本原理和实现方式对比2 、Redis分布式锁的实现核心思路3 、实现分布式锁版本一4 、Redis分布式锁误删情况…

Ubuntu 22.04 配置 QGIS二次开发环境

源码地址&#xff0c;以及官方指导文档地址 源码地址&#xff1a;https://github.com/qgis/QGIS/releases QGIS 官方指导文档地址&#xff1a;https://github.com/qgis/QGIS/blob/release-3_26/INSTALL.md&#xff08;此处为3.26的指导文档&#xff0c;可以自行修改查看&#…