Tabnine Logo
RMAppKillByClientEvent
Code IndexAdd Tabnine to your IDE (free)

How to use
RMAppKillByClientEvent
in
org.apache.hadoop.yarn.server.resourcemanager.rmapp

Best Java code snippets using org.apache.hadoop.yarn.server.resourcemanager.rmapp.RMAppKillByClientEvent (Showing top 17 results out of 315)

origin: org.apache.hadoop/hadoop-yarn-server-resourcemanager

.handle(new RMAppKillByClientEvent(applicationId, message.toString(),
  callerUGI, remoteAddress));
origin: ch.cern.hadoop/hadoop-yarn-server-resourcemanager

/**
 * Log the audit event for kill by client.
 * @param event The {@link RMAppEvent} to be logged
 */
static void auditLogKillEvent(RMAppEvent event) {
 if (event instanceof RMAppKillByClientEvent) {
  RMAppKillByClientEvent killEvent = (RMAppKillByClientEvent) event;
  UserGroupInformation callerUGI = killEvent.getCallerUGI();
  String userName = null;
  if (callerUGI != null) {
   userName = callerUGI.getShortUserName();
  }
  InetAddress remoteIP = killEvent.getIp();
  RMAuditLogger.logSuccess(userName, AuditConstants.KILL_APP_REQUEST,
    "RMAppImpl", event.getApplicationId(), remoteIP);
 }
}
origin: ch.cern.hadoop/hadoop-yarn-server-resourcemanager

.handle(new RMAppKillByClientEvent(applicationId, message, callerUGI,
  remoteAddress));
origin: org.apache.hadoop/hadoop-yarn-server-resourcemanager

/**
 * Log the audit event for kill by client.
 *
 * @param event
 *          The {@link RMAppEvent} to be logged
 */
static void auditLogKillEvent(RMAppEvent event) {
 if (event instanceof RMAppKillByClientEvent) {
  RMAppKillByClientEvent killEvent = (RMAppKillByClientEvent) event;
  UserGroupInformation callerUGI = killEvent.getCallerUGI();
  String userName = null;
  if (callerUGI != null) {
   userName = callerUGI.getShortUserName();
  }
  InetAddress remoteIP = killEvent.getIp();
  RMAuditLogger.logSuccess(userName, AuditConstants.KILL_APP_REQUEST,
    "RMAppImpl", event.getApplicationId(), remoteIP);
 }
}
origin: ch.cern.hadoop/hadoop-yarn-server-resourcemanager

@Test (timeout = 30000)
public void testAppNewSavingKill() throws IOException {
 LOG.info("--- START: testAppNewSavingKill ---");
 UserGroupInformation fooUser = UserGroupInformation.createUserForTesting(
   "fooTestAppNewSavingKill", new String[] { "foo_group" });
 RMApp application = testCreateAppNewSaving(null);
 // NEW_SAVING => KILLED event RMAppEventType.KILL
 RMAppEvent event = new RMAppKillByClientEvent(
   application.getApplicationId(), "Application killed by user.", fooUser,
   Server.getRemoteIp());
 application.handle(event);
 rmDispatcher.await();
 sendAppUpdateSavedEvent(application);
 assertKilled(application);
 verifyApplicationFinished(RMAppState.KILLED);
 verifyAppRemovedSchedulerEvent(RMAppState.KILLED);
}
origin: org.apache.hadoop/hadoop-yarn-server-resourcemanager

@Test (timeout = 30000)
public void testAppNewSavingKill() throws IOException {
 LOG.info("--- START: testAppNewSavingKill ---");
 RMApp application = testCreateAppNewSaving(null);
 // NEW_SAVING => KILLED event RMAppEventType.KILL
 UserGroupInformation fooUser = UserGroupInformation.createUserForTesting(
   "fooTestAppNewSavingKill", new String[] {"foo_group"});
 RMAppEvent event = new RMAppKillByClientEvent(
   application.getApplicationId(), "Application killed by user.", fooUser,
   Server.getRemoteIp());
 application.handle(event);
 rmDispatcher.await();
 sendAppUpdateSavedEvent(application);
 assertKilled(application);
 verifyApplicationFinished(RMAppState.KILLED);
 verifyAppRemovedSchedulerEvent(RMAppState.KILLED);
 verifyRMAppFieldsForFinalTransitions(application);
}
origin: ch.cern.hadoop/hadoop-yarn-server-resourcemanager

@Test (timeout = 30000)
public void testAppNewKill() throws IOException {
 LOG.info("--- START: testAppNewKill ---");
 UserGroupInformation fooUser = UserGroupInformation.createUserForTesting(
   "fooTestAppNewKill", new String[] { "foo_group" });
 RMApp application = createNewTestApp(null);
 // NEW => KILLED event RMAppEventType.KILL
 RMAppEvent event = new RMAppKillByClientEvent(
   application.getApplicationId(), "Application killed by user.", fooUser,
   Server.getRemoteIp());
 application.handle(event);
 rmDispatcher.await();
 sendAppUpdateSavedEvent(application);
 assertKilled(application);
 assertAppFinalStateNotSaved(application);
 verifyApplicationFinished(RMAppState.KILLED);
 verifyAppRemovedSchedulerEvent(RMAppState.KILLED);
}
origin: ch.cern.hadoop/hadoop-yarn-server-resourcemanager

@Test
public void testAppSubmittedKill() throws IOException, InterruptedException {
 LOG.info("--- START: testAppSubmittedKill---");
 UserGroupInformation fooUser = UserGroupInformation.createUserForTesting(
   "fooTestAppSubmittedKill", new String[] { "foo_group" });
 RMApp application = testCreateAppSubmittedNoRecovery(null);
 // SUBMITTED => KILLED event RMAppEventType.KILL
 RMAppEvent event = new RMAppKillByClientEvent(
   application.getApplicationId(), "Application killed by user.", fooUser,
   Server.getRemoteIp());
 application.handle(event);
 rmDispatcher.await();
 sendAppUpdateSavedEvent(application);
 assertKilled(application);
 assertAppFinalStateSaved(application);
 verifyApplicationFinished(RMAppState.KILLED);
 verifyAppRemovedSchedulerEvent(RMAppState.KILLED);
}
origin: ch.cern.hadoop/hadoop-yarn-server-resourcemanager

@Test
public void testAppRunningKill() throws IOException {
 LOG.info("--- START: testAppRunningKill ---");
 UserGroupInformation fooUser = UserGroupInformation.createUserForTesting(
   "fooTestAppRunningKill", new String[] { "foo_group" });
 RMApp application = testCreateAppRunning(null);
 // RUNNING => KILLED event RMAppEventType.KILL
 RMAppEvent event = new RMAppKillByClientEvent(
   application.getApplicationId(), "Application killed by user.", fooUser,
   Server.getRemoteIp());
 application.handle(event);
 rmDispatcher.await();
 sendAttemptUpdateSavedEvent(application);
 sendAppUpdateSavedEvent(application);
 assertKilled(application);
 verifyApplicationFinished(RMAppState.KILLED);
 verifyAppRemovedSchedulerEvent(RMAppState.KILLED);
}
origin: org.apache.hadoop/hadoop-yarn-server-resourcemanager

@Test
public void testAppSubmittedKill() throws IOException, InterruptedException {
 LOG.info("--- START: testAppSubmittedKill---");
 RMApp application = testCreateAppSubmittedNoRecovery(null);
 UserGroupInformation fooUser = UserGroupInformation.createUserForTesting(
   "fooTestAppSubmittedKill", new String[] {"foo_group"});
 // SUBMITTED => KILLED event RMAppEventType.KILL
 RMAppEvent event = new RMAppKillByClientEvent(
   application.getApplicationId(), "Application killed by user.", fooUser,
   Server.getRemoteIp());
 application.handle(event);
 rmDispatcher.await();
 sendAppUpdateSavedEvent(application);
 assertKilled(application);
 assertAppFinalStateSaved(application);
 verifyApplicationFinished(RMAppState.KILLED);
 verifyAppRemovedSchedulerEvent(RMAppState.KILLED);
 verifyRMAppFieldsForFinalTransitions(application);
}
origin: org.apache.hadoop/hadoop-yarn-server-resourcemanager

@Test
public void testAppRunningKill() throws IOException {
 LOG.info("--- START: testAppRunningKill ---");
 RMApp application = testCreateAppRunning(null);
 // RUNNING => KILLED event RMAppEventType.KILL
 UserGroupInformation fooUser = UserGroupInformation.createUserForTesting(
   "fooTestAppRunningKill", new String[] {"foo_group"});
 // SUBMITTED => KILLED event RMAppEventType.KILL
 RMAppEvent event = new RMAppKillByClientEvent(
   application.getApplicationId(), "Application killed by user.", fooUser,
   Server.getRemoteIp());
 application.handle(event);
 rmDispatcher.await();
 sendAttemptUpdateSavedEvent(application);
 sendAppUpdateSavedEvent(application);
 assertKilled(application);
 verifyApplicationFinished(RMAppState.KILLED);
 verifyAppRemovedSchedulerEvent(RMAppState.KILLED);
 verifyRMAppFieldsForFinalTransitions(application);
}
origin: org.apache.hadoop/hadoop-yarn-server-resourcemanager

@Test (timeout = 30000)
public void testAppNewKill() throws IOException {
 LOG.info("--- START: testAppNewKill ---");
 UserGroupInformation fooUser = UserGroupInformation.createUserForTesting(
   "fooTestAppNewKill", new String[] {"foo_group"});
 RMApp application = createNewTestApp(null);
 // NEW => KILLED event RMAppEventType.KILL
 RMAppEvent event = new RMAppKillByClientEvent(
   application.getApplicationId(), "Application killed by user.", fooUser,
   Server.getRemoteIp());
 application.handle(event);
 rmDispatcher.await();
 sendAppUpdateSavedEvent(application);
 assertKilled(application);
 assertAppFinalStateNotSaved(application);
 verifyApplicationFinished(RMAppState.KILLED);
 verifyAppRemovedSchedulerEvent(RMAppState.KILLED);
 verifyRMAppFieldsForFinalTransitions(application);
}
origin: org.apache.hadoop/hadoop-yarn-server-resourcemanager

RMAppEvent event = new RMAppKillByClientEvent(
     applicationId, "Application killed by user.",
     fooUser, Server.getRemoteIp());
origin: ch.cern.hadoop/hadoop-yarn-server-resourcemanager

@Test
public void testAppAcceptedKill() throws IOException, InterruptedException {
 LOG.info("--- START: testAppAcceptedKill ---");
 UserGroupInformation fooUser = UserGroupInformation.createUserForTesting(
   "fooTestAppAcceptedKill", new String[] { "foo_group" });
 RMApp application = testCreateAppAccepted(null);
 // ACCEPTED => KILLED event RMAppEventType.KILL
 RMAppEvent event = new RMAppKillByClientEvent(
   application.getApplicationId(), "Application killed by user.", fooUser,
   Server.getRemoteIp());
 application.handle(event);
 rmDispatcher.await();
 assertAppState(RMAppState.KILLING, application);
 RMAppEvent appAttemptKilled =
   new RMAppEvent(application.getApplicationId(),
    RMAppEventType.ATTEMPT_KILLED, "Application killed by user.");
 application.handle(appAttemptKilled);
 assertAppState(RMAppState.FINAL_SAVING, application);
 sendAppUpdateSavedEvent(application);
 assertKilled(application);
 assertAppFinalStateSaved(application);
 verifyApplicationFinished(RMAppState.KILLED);
 verifyAppRemovedSchedulerEvent(RMAppState.KILLED);
}

origin: org.apache.hadoop/hadoop-yarn-server-resourcemanager

@Test
public void testAppAcceptedKill() throws IOException, InterruptedException {
 LOG.info("--- START: testAppAcceptedKill ---");
 RMApp application = testCreateAppAccepted(null);
 // ACCEPTED => KILLED event RMAppEventType.KILL
 UserGroupInformation fooUser = UserGroupInformation.createUserForTesting(
   "fooTestAppAcceptedKill", new String[] {"foo_group"});
 RMAppEvent event = new RMAppKillByClientEvent(
   application.getApplicationId(), "Application killed by user.", fooUser,
   Server.getRemoteIp());
 application.handle(event);
 rmDispatcher.await();
 assertAppState(RMAppState.KILLING, application);
 RMAppEvent appAttemptKilled =
   new RMAppEvent(application.getApplicationId(),
    RMAppEventType.ATTEMPT_KILLED, "Application killed by user.");
 application.handle(appAttemptKilled);
 assertAppState(RMAppState.FINAL_SAVING, application);
 sendAppUpdateSavedEvent(application);
 assertKilled(application);
 assertAppFinalStateSaved(application);
 verifyApplicationFinished(RMAppState.KILLED);
 verifyAppRemovedSchedulerEvent(RMAppState.KILLED);
 verifyRMAppFieldsForFinalTransitions(application);
}
origin: ch.cern.hadoop/hadoop-yarn-server-resourcemanager

RMAppEvent event = new RMAppKillByClientEvent(
  application.getApplicationId(), "Application killed by user.", fooUser,
  Server.getRemoteIp());
origin: org.apache.hadoop/hadoop-yarn-server-resourcemanager

RMAppEvent event = new RMAppKillByClientEvent(
  application.getApplicationId(), "Application killed by user.", fooUser,
  Server.getRemoteIp());
org.apache.hadoop.yarn.server.resourcemanager.rmappRMAppKillByClientEvent

Javadoc

An event class that is used to help with logging information when an application KILL event is needed.

Most used methods

  • <init>
    constructor to create an event used for logging during user driven kill invocations.
  • getCallerUGI
    returns the UserGroupInformation information.
  • getIp
    returns the ip address stored in this event.

Popular in Java

  • Making http requests using okhttp
  • getSupportFragmentManager (FragmentActivity)
  • notifyDataSetChanged (ArrayAdapter)
  • putExtra (Intent)
  • VirtualMachine (com.sun.tools.attach)
    A Java virtual machine. A VirtualMachine represents a Java virtual machine to which this Java vir
  • NoSuchElementException (java.util)
    Thrown when trying to retrieve an element past the end of an Enumeration or Iterator.
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • Handler (java.util.logging)
    A Handler object accepts a logging request and exports the desired messages to a target, for example
  • Annotation (javassist.bytecode.annotation)
    The annotation structure.An instance of this class is returned bygetAnnotations() in AnnotationsAttr
  • ServletException (javax.servlet)
    Defines a general exception a servlet can throw when it encounters difficulty.
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now