- android - RelativeLayout 背景可绘制重叠内容
- android - 如何链接 cpufeatures lib 以获取 native android 库?
- java - OnItemClickListener 不起作用,但 OnLongItemClickListener 在自定义 ListView 中起作用
- java - Android 文件转字符串
我正在尝试使用 apache geode 复制一个非常大的值。我基本上做的是使用 redis 的 setbit 功能。当我不断增加 setbit 函数的偏移量时,geode 服务器崩溃了。我正在使用 geode 的 redis 适配器作为客户端。
import redis.clients.jedis.*;
import redis.clients.jedis.exceptions.JedisException;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;
import redis.clients.jedis.exceptions.JedisException;
public class Test {
//address of your redis server
private static final String redisHost = "10.0.0.10";
private static final Integer redisPort = 11211;
//remember to increase sensder queue size
public void addSets() {
JedisPoolConfig poolConfig = new JedisPoolConfig();
poolConfig.setMaxIdle(50);
poolConfig.setMaxTotal(1000);
poolConfig.setTestOnBorrow(true);
poolConfig.setTestOnReturn(true);
JedisPool pool = new JedisPool(poolConfig,redisHost, redisPort,10000000);
Jedis jedis= null;
String key = "shivd";
long [] bits = {1464236631,12373513,1488983657,1329373495,147236649,1623846793,1194510359,282099785,1758709929,1059647223,416962921,1893573065,924784087,551826057,2028436201};
//get a jedis connection jedis connection pool
try {
jedis = pool.getResource();
Pipeline pipeline = jedis.pipelined();
for (long b : bits) {
pipeline.setbit(key, b, true);
}
pipeline.multi();
pipeline.exec();
} finally {
if (jedis != null) {
jedis.close();
}
}
pool.destroy();
}
public static void main(String[] args){
Test main = new Test();
main.addSets();
//main.cal();
//main.addHash();
}
}
如果我将偏移量减少到某个限制,它就会起作用。这是使用 redis 适配器的两个缓存服务器的日志:
dc1.log(10.0.0.10) - 我插入 key 的地方
dc2.log(复制发生的地方)
最佳答案
您的 Geode 服务器内存不足。您的最后一个值是 2028436201
,它需要大约 253MB 才能存储在内存中。
你可以给 Geode 服务器更多的内存,比如:
gfsh>start server --name=serv1 --max-heap=2G
如果您的偏移量那么大,您也可以尝试将您的位集设置为最低偏移量。 (即存储前每个偏移量减去最低偏移量,然后在外部保持最低偏移量)。
关于caching - 无法使用 apache geode wan 复制复制大值,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46897990/
无线广域网(WWAN)领域的发展让企业重新开始考虑该技术。展望未来,WWAN(特别是WWAN中的5G)有望成为软件定义WAN或SD-WAN领域改变游戏规则的选项。 企业部署WWAN以改善站点故障恢
这是我的脚本: #include "gwan.h" // G-WAN exported functions #include // strstr() int init(int argc, char
我遇到了 PDF 文件在从一个 WAN 位置复制到下一个位置时损坏的问题。 我有一个 PowerShell 脚本(下面的代码),它每晚运行以通过 Windows 任务计划程序(有时是两个)从佛罗里达州
我用java语言创建了一个客户端服务器程序,其中包含serversocket和socket类,以及用于发送和接收数据的datainputstream和dataoutputstream。 但问题是,当我
如何阻止 WAN 访问 SQLyog 中的特定数据库?我能够授予对特定数据库的完全访问权限,但无法阻止它们。我有一个在内部服务器上运行并访问同一服务器上的 MySQL 的 Web 应用程序。我已经使用
我正在寻找一种通过网络(某种恶魔)提供日志文件的有效方法。每个数据包都是来自日志文件的多行,以便它们可以从另一端进行处理。服务器独立于客户端很重要,这意味着它应该能够“保存”客户端连接时要发送的数据包
在Ubuntu 12.04 LTS下使用gwan_linux64-bit.tar.bz2解压运行gwan 然后将 wrk 指向它(使用空文件 null.html) wrk --timeout 10 -
简单来说,我有一个应用程序,其中的数据旨在通过互联网在两台服务器之间流动。理想情况下,我想测试软件在什么时候停止运行。在什么下限(带宽、延迟、丢包)下停止工作以测试软件的可靠性。 我想我会做的是: 设
解决方案: int session = (int)get_env(argv, SESSION_ID); 获取连接的唯一标识符US_VHOST_DATA (vhost) or US_HANDLER_DA
WAN 优化中使用了哪些技术/算法?我正在寻找可以提供代码示例支持的良好理论的引用,我查看了 Steelhead来自 Riverbed 的手册,我发现以下主要技术用于: SDR(可扩展数据引用):将
关闭。这个问题是off-topic .它目前不接受答案。 想改进这个问题? Update the question所以它是on-topic对于堆栈溢出。 9年前关闭。 Improve this que
我正在尝试为 RabbitMQ 的两个数据中心之间提供灾难恢复。在主 DC 出现故障之前,辅助数据中心处于被动状态。 队列联合是不合适的,因为在辅助 DC 中的使用者激活之前它不会移动消息。除非主 D
我正在使用 Shibby FW 的 Tomato 配置我的家庭路由器 ASUS N18U。我想在上面设置一个家庭网络服务器 NGINX。我知道,这并不理想。我遇到的唯一问题是我无法从 Wan 访问服务
关闭。此题需要details or clarity 。目前不接受答案。 想要改进这个问题吗?通过 editing this post 添加详细信息并澄清问题. 已关闭 9 年前。 Improve th
我正在使用 Shibby FW 的 Tomato 配置我的家庭路由器 ASUS N18U。我想在上面设置一个家庭网络服务器 NGINX。我知道,这并不理想。我遇到的唯一问题是我无法从 Wan 访问服务
我正在考虑托管一些小型静态网站,并且一直在寻找一些替代方案,包括 G-WAN。目前,我只是想在选择服务器之前了解每台服务器是否适合我的需求。 G-WAN 似乎完全符合我的要求,尽管我在服务器启动后更新
我的 Hazelcast WAN 设置包含三个 WAN - 伦敦、纽约和澳大利亚 哪里, 伦敦有 1.1.1.1 和 1.1.1.2 纽约有 1.1.1.3 和 1.1.1.4 澳大利亚有 1.1.1
我想将两部手机连接在一起以实现某种 P2P 风格的连接,当然要这样做,我需要手机能够相互传达其 IP 地址。我一直在想很多关于如何做到这一点的想法,我意识到的一件事是电话号码是电话的唯一标识符,因此我
不久前,我 [在 Google 的帮助下] 写了一个小的 WOL 脚本来打开我网络中的计算机。这是脚本: exec /usr/bin/python -x "$0" "$@" # node_lst =
默认情况下,G-WAN 从 HTML 中去除空格文件以最小化文件。允许 定义的预格式化文本的最佳方式是什么?标签才能通过? @理查德希思有趣——我正在使用带有 的 G-Wan 的原始安装。像这样开
我是一名优秀的程序员,十分优秀!