Uploaded image for project: 'Hadoop YARN'
  1. Hadoop YARN
  2. YARN-6683

Invalid event: COLLECTOR_UPDATE at KILLED

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 3.0.0-alpha4
    • None
    • None

    Description

      2017-06-01 20:01:22,686 ERROR rmapp.RMAppImpl (RMAppImpl.java:handle(905)) - Can't handle this event at current state
      org.apache.hadoop.yarn.state.InvalidStateTransitionException: Invalid event: COLLECTOR_UPDATE at KILLED
              at org.apache.hadoop.yarn.state.StateMachineFactory.doTransition(StateMachineFactory.java:305)
              at org.apache.hadoop.yarn.state.StateMachineFactory.access$300(StateMachineFactory.java:46)
              at org.apache.hadoop.yarn.state.StateMachineFactory$InternalStateMachine.doTransition(StateMachineFactory.java:448)
              at org.apache.hadoop.yarn.server.resourcemanager.rmapp.RMAppImpl.handle(RMAppImpl.java:903)
              at org.apache.hadoop.yarn.server.resourcemanager.rmapp.RMAppImpl.handle(RMAppImpl.java:118)
              at org.apache.hadoop.yarn.server.resourcemanager.ResourceManager$ApplicationEventDispatcher.handle(ResourceManager.java:904)
              at org.apache.hadoop.yarn.server.resourcemanager.ResourceManager$ApplicationEventDispatcher.handle(ResourceManager.java:888)
              at org.apache.hadoop.yarn.event.AsyncDispatcher.dispatch(AsyncDispatcher.java:201)
              at org.apache.hadoop.yarn.event.AsyncDispatcher$1.run(AsyncDispatcher.java:127)
      

      Below code already gets the RMApp instance and then send an event to RMApp to update the collector address. Instead of updating via event, it could just update via a method of RMApp. This also avoids state-machine changes.
      Also, is there any implications that COLLECTOR_UPDATE happened at KILLED state ?

                } else {
                  String previousCollectorAddr = rmApp.getCollectorAddr();
                  if (previousCollectorAddr == null
                      || !previousCollectorAddr.equals(collectorAddr)) {
                    // sending collector update event.
                    RMAppCollectorUpdateEvent event =
                        new RMAppCollectorUpdateEvent(appId, collectorAddr);
                    rmContext.getDispatcher().getEventHandler().handle(event);
                  }
                }
      

      Attachments

        1. YARN-6683.001.patch
          10 kB
          Rohith Sharma K S
        2. YARN-6683.001.patch
          10 kB
          Rohith Sharma K S

        Activity

          People

            rohithsharma Rohith Sharma K S
            jianhe Jian He
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: