`
cloudeagle_bupt
  • 浏览: 541240 次
文章分类
社区版块
存档分类
最新评论

一个改进造成的血案

阅读更多
    while (it.hasNext()) {
      Entry<InetSocketAddress, BSPMessageBundle<M>> entry = it.next();
      final InetSocketAddress addr = entry.getKey();

      final BSPMessageBundle<M> bundle = entry.getValue();

      // remove this message during runtime to save a bit of memory
      it.remove();
      
     <span style="color:#ff0000;"> if(addr.getHostString().equals(peerAddress.getHostString())) {  //如果是本进程,无需发送,直接存入消息容器, 这个效果不明显,且由于非顶点消息和顶点消息都用于bundle,易造成agg值发送到同节点报错!
		  messenger.loopBackBundle(bundle) ;
		  continue ;
	  }</span>
      
      try {
        messenger.transfer(addr, bundle);
//        LOG.info("Bundle Length: " + bundle.getLength()) ;
      } catch (Exception e) {
        LOG.error("Error while sending messages", e);
      }
    }



本来想着同节点直接内存共享,结果忘了处理非顶点消息,到奇数超步时,报错

16/05/22 15:09:42 FATAL bsp.GroomServer: Error running child
java.lang.NullPointerException
at org.apache.hama.graph.AggregationRunner.masterReadAggregatedIncrementalValue(AggregationRunner.java:230)

!agg值被传到本节点了。。。。 本来该发送给master的........


记着了!

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics