Details

    • Type: Test
    • Status: Resolved
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: 0.8.0, 0.9.0
    • Fix Version/s: 0.8.0, 0.9.0
    • Component/s: Build
    • Labels:
      None

      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
      

        Activity

        Hide
        jhkim Jinho Kim added a comment -

        I've attached the patch. please review this.

        Show
        jhkim Jinho Kim added a comment - I've attached the patch. please review this.
        Hide
        blrunner Jaehwa Jung added a comment -

        +1.

        Awesome!
        It was very tedious to us, thanks Jinho.

        Show
        blrunner Jaehwa Jung added a comment - +1. Awesome! It was very tedious to us, thanks Jinho.
        Hide
        jhkim Jinho Kim added a comment -

        Thank you for the fast review.

        Show
        jhkim Jinho Kim added a comment - Thank you for the fast review.
        Hide
        hudson Hudson added a comment -

        SUCCESS: Integrated in Tajo-master-build #120 (See https://builds.apache.org/job/Tajo-master-build/120/)
        TAJO-686: Integration test aborted. (jinho) (jinossy: https://git-wip-us.apache.org/repos/asf/?p=incubator-tajo.git&a=commit&h=bd063cd4d37685674b2c08808ca6ae5402ab2230)

        • CHANGES.txt
        • tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/master/rm/TestTajoResourceManager.java
        Show
        hudson Hudson added a comment - SUCCESS: Integrated in Tajo-master-build #120 (See https://builds.apache.org/job/Tajo-master-build/120/ ) TAJO-686 : Integration test aborted. (jinho) (jinossy: https://git-wip-us.apache.org/repos/asf/?p=incubator-tajo.git&a=commit&h=bd063cd4d37685674b2c08808ca6ae5402ab2230 ) CHANGES.txt tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/master/rm/TestTajoResourceManager.java
        Hide
        hudson Hudson added a comment -

        SUCCESS: Integrated in Tajo-0.8.0-build #24 (See https://builds.apache.org/job/Tajo-0.8.0-build/24/)
        TAJO-686: Integration test aborted. (jinho) (jinossy: https://git-wip-us.apache.org/repos/asf/?p=incubator-tajo.git&a=commit&h=7d9d42c38e909f520307fbe6a5531a546e764428)

        • tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/master/TestTajoResourceManager.java
        • CHANGES.txt
        Show
        hudson Hudson added a comment - SUCCESS: Integrated in Tajo-0.8.0-build #24 (See https://builds.apache.org/job/Tajo-0.8.0-build/24/ ) TAJO-686 : Integration test aborted. (jinho) (jinossy: https://git-wip-us.apache.org/repos/asf/?p=incubator-tajo.git&a=commit&h=7d9d42c38e909f520307fbe6a5531a546e764428 ) tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/master/TestTajoResourceManager.java CHANGES.txt

          People

          • Assignee:
            jhkim Jinho Kim
            Reporter:
            jhkim Jinho Kim
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development