对Hama进行改进,引用了一个类A(A继承了线程类),当该类实现如下时,:
GraphJobRunner 中
@Override
public final void setup(
BSPPeer<Writable, Writable, Writable, Writable, GraphJobMessage> peer)
throws IOException, SyncException, InterruptedException {
setupFields(peer);
loadVertices(peer);
countGlobalVertexCount(peer);
doInitialSuperstep(peer);
}
private void setupFields(
.....
A a = new A;
a.start() ;
vertices.init(this, conf, peer.getTaskId());
}
运行时就IPC就开始不稳定了,mu02就会持续掉线再连上,子节点的日志则无此问题。。。。 不知道是咋回事。
日志显示如下:
15/03/05 21:52:49 DEBUG ipc.Server: IPC Server listener on 61005: disconnecting client 192.168.0.100:37703. Number of active connections: 20
15/03/05 21:52:49 DEBUG ipc.Server: IPC Server listener on 61005: disconnecting client 192.168.0.100:37710. Number of active connections: 19
15/03/05 21:52:49 DEBUG ipc.Server: IPC Server listener on 61005: disconnecting client 192.168.0.100:37718. Number of active connections: 18
15/03/05 21:52:49 DEBUG ipc.Server: IPC Server listener on 61005: disconnecting client 192.168.0.100:37724. Number of active connections: 17
15/03/05 21:52:49 DEBUG ipc.Client: IPC Client (47) connection to c02b01/192.168.0.21:61001 from liuqiang2: closed
15/03/05 21:52:49 DEBUG ipc.Client: IPC Client (47) connection to c02b01/192.168.0.21:61001 from liuqiang2: stopped, remaining connections 15
15/03/05 21:52:49 DEBUG ipc.Server: IPC Server listener on 61005: disconnecting client 192.168.0.30:41874. Number of active connections: 16
15/03/05 21:52:49 DEBUG ipc.Server: IPC Server listener on 61005: disconnecting client 192.168.0.21:42530. Number of active connections: 15
15/03/05 21:52:49 DEBUG ipc.Server: IPC Server listener on 61005: disconnecting client 192.168.0.100:37733. Number of active connections: 14
15/03/05 21:52:49 DEBUG ipc.Client: IPC Client (47) connection to c02b01/192.168.0.21:61002 from liuqiang2: closed
15/03/05 21:52:49 DEBUG ipc.Client: IPC Client (47) connection to c02b01/192.168.0.21:61002 from liuqiang2: stopped, remaining connections 14
15/03/05 21:52:49 DEBUG ipc.Client: IPC Client (47) connection to mu02/192.168.0.100:61006 from liuqiang2: closed
15/03/05 21:52:49 DEBUG ipc.Client: IPC Client (47) connection to mu02/192.168.0.100:61006 from liuqiang2: stopped, remaining connections 13
15/03/05 21:52:49 DEBUG ipc.Client: IPC Client (47) connection to mu02/192.168.0.100:61005 from liuqiang2: closed
15/03/05 21:52:49 DEBUG ipc.Client: IPC Client (47) connection to mu02/192.168.0.100:61005 from liuqiang2: stopped, remaining connections 12
15/03/05 21:52:49 DEBUG ipc.Server: IPC Server listener on 61005: disconnecting client 192.168.0.100:37738. Number of active connections: 13
非常奇怪!
后来尝试将
a.start() ; 放到loadVertices中
loadVertices{
a.start() ;
...
}
就好了。。。。 这尼玛能差几行代码啊?????? 哪位知道是咋回事啊。。。。