Exemple #1
0
        // Test Kill an app while the app is failing
        /// <exception cref="System.Exception"/>
        public virtual void TestKillFailingApp()
        {
            // this dispatcher ignores RMAppAttemptEventType.KILL event
            Dispatcher dispatcher = new _AsyncDispatcher_708();
            MockRM     rm1        = new _MockRM_731(dispatcher, conf);

            rm1.Start();
            MockNM nm1 = new MockNM("127.0.0.1:1234", 8192, rm1.GetResourceTrackerService());

            nm1.RegisterNode();
            RMApp  app1 = rm1.SubmitApp(200);
            MockAM am1  = MockRM.LaunchAndRegisterAM(app1, rm1, nm1);

            rm1.KillApp(app1.GetApplicationId());
            // fail the app by sending container_finished event.
            nm1.NodeHeartbeat(am1.GetApplicationAttemptId(), 1, ContainerState.Complete);
            rm1.WaitForState(am1.GetApplicationAttemptId(), RMAppAttemptState.Failed);
            // app is killed, not launching a new attempt
            rm1.WaitForState(app1.GetApplicationId(), RMAppState.Killed);
        }
Exemple #2
0
 internal _T866489717(_AsyncDispatcher_708 _enclosing)
 {
     this._enclosing = _enclosing;
 }