hadoop-yarn-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] (YARN-6061) Add a customized uncaughtexceptionhandler for critical threads in RM
Date Tue, 31 Jan 2017 20:42:51 GMT

    [ https://issues.apache.org/jira/browse/YARN-6061?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15847477#comment-15847477
] 

ASF GitHub Bot commented on YARN-6061:
--------------------------------------

Github user flyrain commented on a diff in the pull request:

    https://github.com/apache/hadoop/pull/182#discussion_r98765429
  
    --- Diff: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/TestRMCriticalThreadUncaughtExceptionHandler.java
---
    @@ -0,0 +1,75 @@
    +/**
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you under the Apache License, Version 2.0 (the
    + * "License"); you may not use this file except in compliance
    + * with the License.  You may obtain a copy of the License at
    + *
    + *     http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +
    +package org.apache.hadoop.yarn.server.resourcemanager;
    +
    +import org.apache.hadoop.util.ExitUtil;
    +import org.apache.hadoop.yarn.event.AsyncDispatcher;
    +import org.junit.Test;
    +
    +import static org.junit.Assert.assertSame;
    +import static org.mockito.Mockito.spy;
    +import static org.mockito.Mockito.verify;
    +
    +/**
    + * This class is to test {@link RMCriticalThreadUncaughtExceptionHandler}.
    + */
    +public class TestRMCriticalThreadUncaughtExceptionHandler {
    +  /**
    +   * Throw {@link RuntimeException} inside thread and
    +   * check {@link RMCriticalThreadUncaughtExceptionHandler} instance.
    +   *
    +   * Used {@link ExitUtil} class to avoid jvm exit through
    +   * {@code System.exit(-1)}.
    +   *
    +   * @throws InterruptedException if any
    +   */
    +  @Test
    +  public void testUncaughtExceptionHandlerWithError()
    +      throws InterruptedException {
    +    ExitUtil.disableSystemExit();
    +
    +    // Create a MockRM and start it
    +    ResourceManager resourceManager = new MockRM();
    --- End diff --
    
    Add one unit test to check if RM transition to standby.


> Add a customized uncaughtexceptionhandler for critical threads in RM
> --------------------------------------------------------------------
>
>                 Key: YARN-6061
>                 URL: https://issues.apache.org/jira/browse/YARN-6061
>             Project: Hadoop YARN
>          Issue Type: Improvement
>          Components: resourcemanager
>            Reporter: Yufei Gu
>            Assignee: Yufei Gu
>         Attachments: YARN-6061.001.patch, YARN-6061.002.patch, YARN-6061.003.patch
>
>
> There are several threads in fair scheduler. The thread will quit when there is a runtime
exception inside it. We should bring down the RM when that happens. Otherwise, there may be
some weird behavior in RM. 



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: yarn-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: yarn-issues-help@hadoop.apache.org


Mime
View raw message