Hama0.7.1的同步问题
来源:互联网 发布:广东联合数据科技服务 编辑:程序博客网 时间:2024/06/06 10:36
读Hama代码发现的同步问题,
实际使用IncomingVertexMessageManager类作为消息管理类,
开始我看到AbstractMessageManager中init函数
this.localQueueForNextIteration = getSynchronizedReceiverQueue();
还以为加了同步,后来发现真没有。。。。
这样会存在IncomingVertexMessageManager中的
public void add(GraphJobMessage item) {
if (item.isVertexMessage()) { //没有执行singeLockQueue的同步代码,存在同步问题!
if (!storage.containsKey(item.getVertexId())) {
storage.putIfAbsent(item.getVertexId(), item);
} else {
storage.get(item.getVertexId()).addValuesBytes(item.getValuesBytes(),
item.size());
}
} else {
mapMessages.add(item);
}
}
不知道为何这样写呢?
真是坑爹啊!
0 0
- Hama0.7.1的同步问题
- Hama0.7.1 的坑
- Hama0.7.1 执行
- Hashtable的同步问题
- Spring 的同步问题
- 线程的同步问题
- 有关同步的问题
- 同步synchronized的问题
- BGP的同步问题
- 多线程的同步问题
- ntp同步的问题
- IRP的同步问题
- 线程同步的问题
- 数据同步的问题
- 同步ajax的问题
- 线程的同步问题
- 网络游戏的同步问题
- DWR的同步问题
- 学习中遇到的问题
- Tomcat 系统架构与设计模式,第 2 部分: 设计模式分析
- UISegmentedControl的所有操作总结
- 跨平台自动构建工具:xmake
- 下拉刷新控件---使用第三方提供的源码
- Hama0.7.1的同步问题
- 图像边缘处理
- ubuntu查看系统资源占用(内存,cpu和进程)
- 7、Spring AOP使用
- JSON解析与 XML解析的区别比较
- maven搭建ssm分模块框架 (myeclipse版) (一)
- UITextField的总结
- 350. Intersection of Two Arrays II
- javascript 关于“类”