问题标签 [lettuce]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
java - 如何在 Lettuce Redis 客户端中使用客户端一致性哈希
我正在尝试查找如何配置和使用具有客户端一致哈希的Lettuce Redis 客户端的参考资料。
这种分片方法是在 Jedis 客户端的 ShardedJedis 中实现的,并在Redis 分区文档中进行了描述。
方法的简短描述:我们有一个具有多个独立 Redis 进程/节点的环境,没有使用 Redis Cluster 或 Sentinel 的任何基于服务器的请求路由,客户端通过应用哈希函数(key -> node_id) 在客户端。
生菜是否支持这种开箱即用的集群/分片?如果是,如何将其配置为使用客户端散列?
java - 如何使用 lettuce 4.2 Cluster 客户端将复杂的 java 对象推送到 Redis
我有一个包含所有类型数据类型的复杂 java 对象。我们需要将该对象推送到 Redis 缓存中,以字符串为键,值就是该对象。我们有 6 台机器的 Redis 集群。
如何使用 lettuce 集群客户端通过 java 代码推送这个对象?
python-3.x - Python3 生菜抛出 SyntaxError
我正在尝试使用生菜编写一些简单的单元测试。
(更具体地说,我正在关注本教程:https ://semaphoreci.com/community/tutorials/bdd-testing-a-restful-web-application-in-python )
我刚刚安装了生菜:
当我跑步时
我得到:
生菜包装有误吗?我去纠正了一些事情(在一些打印语句中添加了括号,然后其他一些打印由于同样的原因而失败)。有任何想法吗?
java - How can i delete element in set Redis?
how can i delete element(s) from sorted set generated from adding location using GEOADD
for example:
i want to delete "Westminster Station" element , any ideas? and is there away to delete this element using Lettuce Api?
python - Django - 生菜 - 硒
我正在尝试使用上述堆栈运行默认项目,以便能够在我的大项目上运行前端测试。它使用更大的堆栈。(我一直在尝试为此集成它,但在多次失败后,我尝试在默认的 django 应用程序中重新创建它)
所以主要问题是 Firefox 抛出 Connection was reset 错误。我试过 Firefox 版本:45、46、47。使用 selenium 2.48 和 2.53.6。似乎没有什么能使它起作用。我真的不确定它是否与此有关。
零特征:
零.py
我有lettuce.django
INSTALLED_APPS。它似乎运行良好:
所以它确实运行生菜并通过了测试(好吧,没有什么可以失败的)。问题是打开的 Firefox 窗口根本没有加载任何带有该错误的内容。
我也尝试了 Splinter,它用更好的语法做了同样的事情。我知道上面的代码在很多层面上都很糟糕,但我必须减少可能导致该问题的错误。但那里没有运气。
有人通过解决方案遇到这个问题吗?
python - 如何在生菜中建立特征和步骤之间的关系?
我正在为 python 使用生菜 BDD 框架。在示例中,所有场景都使用仅来自一个 *.py 文件的方法 - steps.py 如何设置 *.feature 与其 *.py 文件之间的关系?
我需要这些功能文件:
和这些 py 文件
我需要这个:场景中的auth.feature
仅引用方法,而支付功能中auth.py
的场景仅引用中的方法pay.py
java - Redis client Lettuce Master/Slave configuration for AWS Elasticache
I have been using Lettuce as a Redis client to talk to AWS Elasticache. The specific configuration that I am currently using is the Static Master/Slave with predefined node addresses. Recently, the primary node took a tumble kicking off a failover process and eventually causing all application write requests to fail with the following error:
Since then, I have been doing some research and realized that Standalone Master/Slave is probably the configuration that fits the purpose of talking to Elasticache (in non-clustered mode) as according to the AWS docs, the client should always only talk to the primary endpoint - which gets updated to point to the new master in an event of a failover.
This has left me wondering, why does the author make the recommendation of using the Static Master/Slave with predefined node addresses method when using AWS Elasticache?
Any thoughts?
Configuration: 1 Master and 2 Slave nodes
java - 如何在 Java Lettuce 中运行 Redis 原始命令?
我正在使用 lettuce 作为 Redis 客户端构建 Java 应用程序。
要求之一是从应用程序内部运行 redis 命令,就像我从命令行 redis-cli 运行它们一样,而不是编写实现的 API 方法:
我输入实际的原始命令:
并且该命令将在服务器上运行。例如,生菜 api 中是否有与此类似的方法?
提前致谢
java - Lettuce:反应式 API 的共享连接
我正在将我当前的项目从 Jedis 移植到生菜。
可以为反应式 API 使用共享连接吗?只要我不调用阻塞和事务操作,例如 BLPOP 和 MULTI/EXEC?
我应该通过反应式 API 使用池连接进行事务处理吗?
是否可以通过反应式 API 流水线化命令?我应该为此使用专用连接吗?
python - 如何在另一种场景中使用全局变量。Python、Webdriver、生菜
我正在使用 WebDriver、生菜和 python 进行测试。在我验证的第一个场景中,该用户可以创建一个帐户。对于用户名,我使用带有时间戳的电子邮件生成器。生菜步骤是:
蟒蛇代码是:
在其他情况下,我使用相同的代码来验证用户是否可以登录。生菜步骤是:
和python代码是一样的(见上文)。但是它生成了带有新时间戳的新电子邮件,并且用户无法登录。我做错了什么?如何在另一种场景中使用全局变量?