Uploaded image for project: 'Tajo'
  1. Tajo
  2. TAJO-738

NPE occur when failed in QueryMaster's GlobalPlanner.build().

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.8.0, 0.9.0
    • Component/s: None
    • Labels:
      None

      Description

      If making plan in the QueryMaster, the bellow error message is shown in QueryMaster's log.

      2014-04-07 10:11:33,090 INFO  [QueryMasterClientProtocol-1 Server Worker #2] worker.TajoWorkerClientService (TajoWorkerClientService.java:closeQuery(211)) - Stop Query:q_1396833048200_0002
      java.lang.NullPointerException
              at org.apache.tajo.master.querymaster.QueryMaster.buildTajoHeartBeat(QueryMaster.java:364)
              at org.apache.tajo.master.querymaster.QueryMaster.access$800(QueryMaster.java:60)
              at org.apache.tajo.master.querymaster.QueryMaster$QueryHeartbeatThread.run(QueryMaster.java:408)
      

      Also similar message shown in CLI.

      2014-04-07 10:11:33,087 ERROR [TajoClient-1 Worker #0] rpc.RpcProtos (BlockingRpcClient.java:exceptionCaught(215)) - RPC Exception:Exception [org.apache.tajo.ipc.QueryMasterClientProtocol(192.168.0.159:28092)]: java.lang.NullPointerException
      	at org.apache.tajo.worker.TajoWorkerClientService$TajoWorkerClientProtocolServiceHandler.getQueryStatus(TajoWorkerClientService.java:190)
      	at org.apache.tajo.ipc.QueryMasterClientProtocol$QueryMasterClientProtocolService$2.callBlockingMethod(QueryMasterClientProtocol.java:115)
      	at org.apache.tajo.rpc.BlockingRpcServer$ServerHandler.messageReceived(BlockingRpcServer.java:103)
      	at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:296)
      	at org.jboss.netty.handler.codec.oneone.OneToOneDecoder.handleUpstream(OneToOneDecoder.java:70)
      	at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:296)
      	at org.jboss.netty.handler.codec.frame.FrameDecoder.unfoldAndFireMessageReceived(FrameDecoder.java:462)
      	at org.jboss.netty.handler.codec.frame.FrameDecoder.callDecode(FrameDecoder.java:443)
      	at org.jboss.netty.handler.codec.frame.FrameDecoder.messageReceived(FrameDecoder.java:303)
      	at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:268)
      	at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:255)
      	at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:88)
      	at org.jboss.netty.channel.socket.nio.AbstractNioWorker.process(AbstractNioWorker.java:107)
      	at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:312)
      	at org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:88)
      	at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      	at java.lang.Thread.run(Thread.java:744)
      
      1. TAJO-738.patch
        18 kB
        Hyoungjun Kim

        Activity

        Hide
        hjkim Hyoungjun Kim added a comment - - edited

        Created a review request against branch master in reviewboard
        https://reviews.apache.org/r/20074/

        Show
        hjkim Hyoungjun Kim added a comment - - edited Created a review request against branch master in reviewboard https://reviews.apache.org/r/20074/
        Hide
        hyunsik Hyunsik Choi added a comment -

        I discussed the reproduction condition of this issue to Hyoungjun in offline. I add more description of this issue.

        When a query is issued to TajoMaster, the query is checked if the query is forwarded to a query master or can be directly executed in TajoMaster. This bug is caused when the query is forwarded to the query master and the global planning is failed in the query master. The current implementation does not handle such a case. It causes NPE in QueryMaster.

        Show
        hyunsik Hyunsik Choi added a comment - I discussed the reproduction condition of this issue to Hyoungjun in offline. I add more description of this issue. When a query is issued to TajoMaster, the query is checked if the query is forwarded to a query master or can be directly executed in TajoMaster. This bug is caused when the query is forwarded to the query master and the global planning is failed in the query master. The current implementation does not handle such a case. It causes NPE in QueryMaster.
        Hide
        hyunsik Hyunsik Choi added a comment -

        +1

        Thank you for your contribution. The patch looks nice to me.

        Show
        hyunsik Hyunsik Choi added a comment - +1 Thank you for your contribution. The patch looks nice to me.
        Hide
        hyunsik Hyunsik Choi added a comment -

        committed it to master branch and 0.8.0 branch.

        Show
        hyunsik Hyunsik Choi added a comment - committed it to master branch and 0.8.0 branch.
        Hide
        hudson Hudson added a comment -

        SUCCESS: Integrated in Tajo-master-build #160 (See https://builds.apache.org/job/Tajo-master-build/160/)
        TAJO-738: NPE occurs when failed in QueryMaster's GlobalPlanner.build(). (hyoungjunkim via hyunsik) (hyunsik: rev 8824ba5590003be7feb1fac72558d73e870ecdb7)

        • tajo-core/tajo-core-backend/src/main/resources/webapps/worker/index.jsp
        • tajo-client/src/main/java/org/apache/tajo/cli/TajoCli.java
        • tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/worker/TajoWorkerClientService.java
        • tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/master/querymaster/QueryMaster.java
        • tajo-core/tajo-core-backend/src/main/resources/webapps/worker/querydetail.jsp
        • tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/master/querymaster/QueryMasterTask.java
        • CHANGES.txt
        • tajo-core/tajo-core-backend/src/main/resources/webapps/admin/query.jsp
        Show
        hudson Hudson added a comment - SUCCESS: Integrated in Tajo-master-build #160 (See https://builds.apache.org/job/Tajo-master-build/160/ ) TAJO-738 : NPE occurs when failed in QueryMaster's GlobalPlanner.build(). (hyoungjunkim via hyunsik) (hyunsik: rev 8824ba5590003be7feb1fac72558d73e870ecdb7) tajo-core/tajo-core-backend/src/main/resources/webapps/worker/index.jsp tajo-client/src/main/java/org/apache/tajo/cli/TajoCli.java tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/worker/TajoWorkerClientService.java tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/master/querymaster/QueryMaster.java tajo-core/tajo-core-backend/src/main/resources/webapps/worker/querydetail.jsp tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/master/querymaster/QueryMasterTask.java CHANGES.txt tajo-core/tajo-core-backend/src/main/resources/webapps/admin/query.jsp
        Hide
        hudson Hudson added a comment -

        SUCCESS: Integrated in Tajo-0.8.0-build #60 (See https://builds.apache.org/job/Tajo-0.8.0-build/60/)
        TAJO-738: NPE occurs when failed in QueryMaster's GlobalPlanner.build(). (hyoungjunkim via hyunsik) (hyunsik: rev 6e50b57c4f8feac8ec72fad0dc39fe3886461f64)

        • tajo-core/tajo-core-backend/src/main/resources/webapps/admin/query.jsp
        • tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/master/querymaster/QueryMasterTask.java
        • CHANGES.txt
        • tajo-client/src/main/java/org/apache/tajo/cli/TajoCli.java
        • tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/worker/TajoWorkerClientService.java
        • tajo-core/tajo-core-backend/src/main/resources/webapps/worker/index.jsp
        • tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/master/querymaster/QueryMaster.java
        • tajo-core/tajo-core-backend/src/main/resources/webapps/worker/querydetail.jsp
        Show
        hudson Hudson added a comment - SUCCESS: Integrated in Tajo-0.8.0-build #60 (See https://builds.apache.org/job/Tajo-0.8.0-build/60/ ) TAJO-738 : NPE occurs when failed in QueryMaster's GlobalPlanner.build(). (hyoungjunkim via hyunsik) (hyunsik: rev 6e50b57c4f8feac8ec72fad0dc39fe3886461f64) tajo-core/tajo-core-backend/src/main/resources/webapps/admin/query.jsp tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/master/querymaster/QueryMasterTask.java CHANGES.txt tajo-client/src/main/java/org/apache/tajo/cli/TajoCli.java tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/worker/TajoWorkerClientService.java tajo-core/tajo-core-backend/src/main/resources/webapps/worker/index.jsp tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/master/querymaster/QueryMaster.java tajo-core/tajo-core-backend/src/main/resources/webapps/worker/querydetail.jsp

          People

          • Assignee:
            hjkim Hyoungjun Kim
            Reporter:
            hjkim Hyoungjun Kim
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development