Description
This issue is caused by calling thread.notify before thread.wait
TestTajoResourceManager.java
final Object monitor = new Object(); RpcCallback<WorkerResourceAllocationResponse> callBack = new RpcCallback<WorkerResourceAllocationResponse>() { @Override public void run(WorkerResourceAllocationResponse response) { TestTajoResourceManager.this.response = response; synchronized(monitor) { monitor.notifyAll(); } } }; tajoWorkerResourceManager.allocateWorkerResources(request, callBack); Thread.sleep(1000); // this is reproduced a bug synchronized(monitor) { monitor.wait(); }
2014-03-14 10:44:48,610 INFO rm.TajoWorkerResourceManager (TajoWorkerResourceManager.java:run(278)) - WorkerResourceAllocationThread start 2014-03-14 10:44:48,666 INFO rpc.RpcChannelFactory (RpcChannelFactory.java:createServerChannelFactory(81)) - Create TajoResourceTrackerProtocol-1 ServerSocketChannelFactory. Worker:3 2014-03-14 10:44:48,749 INFO rpc.NettyServerBase (NettyServerBase.java:start(105)) - Rpc (TajoResourceTrackerProtocol) listens on /127.0.0.1:15246 2014-03-14 10:44:48,751 INFO rm.TajoResourceTracker (TajoResourceTracker.java:serviceInit(97)) - TajoResourceTracker starts up (localhost/127.0.0.1:15246) 2014-03-14 10:44:48,780 INFO rm.Worker (Worker.java:transition(222)) - Worker with slots=m:5120,d:5.0,c:1, used=m:0,d:0.0,c:0 is joined to Tajo cluster 2014-03-14 10:44:48,780 INFO rm.Worker (Worker.java:handle(288)) - host1:21000:12345 Node Transitioned from NEW to RUNNING 2014-03-14 10:44:48,781 INFO rm.Worker (Worker.java:transition(222)) - Worker with slots=m:5120,d:5.0,c:1, used=m:0,d:0.0,c:0 is joined to Tajo cluster 2014-03-14 10:44:48,781 INFO rm.Worker (Worker.java:handle(288)) - host2:21000:12345 Node Transitioned from NEW to RUNNING 2014-03-14 10:44:48,782 INFO rm.Worker (Worker.java:transition(222)) - Worker with slots=m:5120,d:5.0,c:1, used=m:0,d:0.0,c:0 is joined to Tajo cluster 2014-03-14 10:44:48,782 INFO rm.Worker (Worker.java:handle(288)) - host3:21000:12345 Node Transitioned from NEW to RUNNING 2014-03-14 10:44:48,783 INFO rm.Worker (Worker.java:transition(222)) - Worker with slots=m:5120,d:5.0,c:1, used=m:0,d:0.0,c:0 is joined to Tajo cluster 2014-03-14 10:44:48,783 INFO rm.Worker (Worker.java:handle(288)) - host4:21000:12345 Node Transitioned from NEW to RUNNING 2014-03-14 10:44:48,784 INFO rm.Worker (Worker.java:transition(222)) - Worker with slots=m:5120,d:5.0,c:1, used=m:0,d:0.0,c:0 is joined to Tajo cluster 2014-03-14 10:44:48,784 INFO rm.Worker (Worker.java:handle(288)) - host5:21000:12345 Node Transitioned from NEW to RUNNING 2014-03-14 10:47:28,752 INFO rm.Worker (Worker.java:transition(257)) - Deactivating Node host1:21000:12345 as it is now LOST 2014-03-14 10:47:28,752 INFO rm.Worker (Worker.java:handle(288)) - host1:21000:12345 Node Transitioned from RUNNING to LOST 2014-03-14 10:47:28,755 INFO rm.Worker (Worker.java:transition(257)) - Deactivating Node host5:21000:12345 as it is now LOST 2014-03-14 10:47:28,755 INFO rm.Worker (Worker.java:handle(288)) - host5:21000:12345 Node Transitioned from RUNNING to LOST 2014-03-14 10:47:28,756 INFO rm.Worker (Worker.java:transition(257)) - Deactivating Node host4:21000:12345 as it is now LOST 2014-03-14 10:47:28,756 INFO rm.Worker (Worker.java:handle(288)) - host4:21000:12345 Node Transitioned from RUNNING to LOST 2014-03-14 10:47:28,756 INFO rm.Worker (Worker.java:transition(257)) - Deactivating Node host3:21000:12345 as it is now LOST 2014-03-14 10:47:28,757 INFO rm.Worker (Worker.java:handle(288)) - host3:21000:12345 Node Transitioned from RUNNING to LOST 2014-03-14 10:47:28,757 INFO rm.Worker (Worker.java:transition(257)) - Deactivating Node host2:21000:12345 as it is now LOST 2014-03-14 10:47:28,758 INFO rm.Worker (Worker.java:handle(288)) - host2:21000:12345 Node Transitioned from RUNNING to LOST