[ https://issues.apache.org/jira/browse/TWILL-240?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16119021#comment-16119021 ]
ASF GitHub Bot commented on TWILL-240: -------------------------------------- Github user chtyim commented on a diff in the pull request: https://github.com/apache/twill/pull/58#discussion_r132029365 --- Diff: twill-yarn/src/test/java/org/apache/twill/yarn/EventHandlerTest.java --- @@ -0,0 +1,351 @@ +/* + * 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.twill.yarn; + +import com.google.common.base.Joiner; +import com.google.common.base.Stopwatch; +import com.google.common.base.Throwables; +import com.google.common.collect.ImmutableMap; +import org.apache.twill.api.AbstractTwillRunnable; +import org.apache.twill.api.EventHandler; +import org.apache.twill.api.EventHandlerContext; +import org.apache.twill.api.TwillApplication; +import org.apache.twill.api.TwillController; +import org.apache.twill.api.TwillSpecification; +import org.apache.twill.api.logging.PrinterLogHandler; +import org.junit.Assert; +import org.junit.ClassRule; +import org.junit.Test; +import org.junit.rules.TemporaryFolder; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.io.File; +import java.io.IOException; +import java.io.PrintWriter; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Map; +import java.util.Set; +import java.util.concurrent.CountDownLatch; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.TimeoutException; + +/** + * Tests {@link EventHandler} methods + */ +public final class EventHandlerTest extends BaseYarnTest { --- End diff -- Rename the test class to `EventHandlerTestRun` and add it to `YarnTestSuite`. > Improve EventHandler to handle more application lifecycle events > ---------------------------------------------------------------- > > Key: TWILL-240 > URL: https://issues.apache.org/jira/browse/TWILL-240 > Project: Apache Twill > Issue Type: New Feature > Reporter: Chengfeng Mao > Assignee: Chengfeng Mao > Fix For: 0.12.0 > > > Application Master should be able to run application specific code when > certain lifecycle events happen by calling methods from EventHandler. For > instance, when the app first starts, completes, aborts and etc. -- This message was sent by Atlassian JIRA (v6.4.14#64029)