Examples of ContainerRemoteLaunchEvent


Examples of org.apache.hadoop.mapreduce.v2.app.launcher.ContainerRemoteLaunchEvent

      ContainerLaunchContext launchContext = createContainerLaunchContext(
          cEvent.getApplicationACLs(), taskAttempt.conf, taskAttempt.jobToken,
          taskAttempt.remoteTask, taskAttempt.oldJobId, taskAttempt.jvmID,
          taskAttempt.taskAttemptListener, taskAttempt.credentials);
      taskAttempt.eventHandler
        .handle(new ContainerRemoteLaunchEvent(taskAttempt.attemptId,
          launchContext, container, taskAttempt.remoteTask));

      // send event to speculator that our container needs are satisfied
      taskAttempt.eventHandler.handle
          (new SpeculatorEvent(taskAttempt.getID().getTaskId(), -1));
View Full Code Here

Examples of org.apache.hadoop.mapreduce.v2.app.launcher.ContainerRemoteLaunchEvent

    protected ContainerLauncher createContainerLauncher(AppContext context) {
      return new MockContainerLauncher() {
        @Override
        public void handle(ContainerLauncherEvent event) {
          if (event.getType() == EventType.CONTAINER_REMOTE_LAUNCH) {
            ContainerRemoteLaunchEvent launchEvent = (ContainerRemoteLaunchEvent) event;
            ContainerLaunchContext launchContext =
                launchEvent.getContainerLaunchContext();
            String cmdString = launchContext.getCommands().toString();
            LOG.info("launchContext " + cmdString);
            myCommandLine = cmdString;
            cmdEnvironment = launchContext.getEnvironment();
          }
View Full Code Here

Examples of org.apache.hadoop.mapreduce.v2.app.launcher.ContainerRemoteLaunchEvent

        LOG.info("Processing the event " + event.toString());

        if (event.getType() == EventType.CONTAINER_REMOTE_LAUNCH) {

          final ContainerRemoteLaunchEvent launchEv =
              (ContainerRemoteLaunchEvent)event;
         
          // execute the task on a separate thread
          Future<?> future = taskRunner.submit(new Runnable() {
            public void run() {
View Full Code Here

Examples of org.apache.hadoop.mapreduce.v2.app.launcher.ContainerRemoteLaunchEvent

      }
    }).when(mapTask).run(isA(JobConf.class), isA(TaskUmbilicalProtocol.class));

    // pump in a task attempt launch event
    ContainerLauncherEvent launchEvent =
        new ContainerRemoteLaunchEvent(taId, null, createMockContainer(), mapTask);
    launcher.handle(launchEvent);

    Thread.sleep(200);
    // now pump in a container clean-up event
    ContainerLauncherEvent cleanupEvent =
View Full Code Here

Examples of org.apache.hadoop.mapreduce.v2.app.launcher.ContainerRemoteLaunchEvent

          cEvent.getApplicationACLs(), taskAttempt.containerID,
          taskAttempt.conf, taskAttempt.jobToken, taskAttempt.remoteTask,
          taskAttempt.oldJobId, taskAttempt.assignedCapability,
          taskAttempt.jvmID, taskAttempt.taskAttemptListener,
          taskAttempt.fsTokens);
      taskAttempt.eventHandler.handle(new ContainerRemoteLaunchEvent(
          taskAttempt.attemptId, taskAttempt.containerID,
          taskAttempt.containerMgrAddress, taskAttempt.containerToken,
          launchContext, taskAttempt.remoteTask));

      // send event to speculator that our container needs are satisfied
View Full Code Here

Examples of org.apache.hadoop.mapreduce.v2.app.launcher.ContainerRemoteLaunchEvent

          cEvent.getApplicationACLs(), taskAttempt.containerID,
          taskAttempt.conf, taskAttempt.jobToken, taskAttempt.remoteTask,
          taskAttempt.oldJobId, taskAttempt.assignedCapability,
          taskAttempt.jvmID, taskAttempt.taskAttemptListener,
          taskAttempt.credentials);
      taskAttempt.eventHandler.handle(new ContainerRemoteLaunchEvent(
          taskAttempt.attemptId, taskAttempt.containerID,
          taskAttempt.containerMgrAddress, taskAttempt.containerToken,
          launchContext, taskAttempt.remoteTask));

      // send event to speculator that our container needs are satisfied
View Full Code Here

Examples of org.apache.hadoop.mapreduce.v2.app.launcher.ContainerRemoteLaunchEvent

          cEvent.getApplicationACLs(), taskAttempt.containerID,
          taskAttempt.conf, taskAttempt.jobToken, taskAttempt.remoteTask,
          taskAttempt.oldJobId, taskAttempt.assignedCapability,
          taskAttempt.jvmID, taskAttempt.taskAttemptListener,
          taskAttempt.credentials);
      taskAttempt.eventHandler.handle(new ContainerRemoteLaunchEvent(
          taskAttempt.attemptId, taskAttempt.containerID,
          taskAttempt.containerMgrAddress, taskAttempt.containerToken,
          launchContext, taskAttempt.remoteTask));

      // send event to speculator that our container needs are satisfied
View Full Code Here

Examples of org.apache.hadoop.mapreduce.v2.app.launcher.ContainerRemoteLaunchEvent

          cEvent.getApplicationACLs(), taskAttempt.containerID,
          taskAttempt.conf, taskAttempt.jobToken, taskAttempt.remoteTask,
          taskAttempt.oldJobId, taskAttempt.assignedCapability,
          taskAttempt.jvmID, taskAttempt.taskAttemptListener,
          taskAttempt.credentials);
      taskAttempt.eventHandler.handle(new ContainerRemoteLaunchEvent(
          taskAttempt.attemptId, taskAttempt.containerID,
          taskAttempt.containerMgrAddress, taskAttempt.containerToken,
          launchContext, taskAttempt.remoteTask));

      // send event to speculator that our container needs are satisfied
View Full Code Here

Examples of org.apache.hadoop.mapreduce.v2.app.launcher.ContainerRemoteLaunchEvent

        LOG.info("Processing the event " + event.toString());

        if (event.getType() == EventType.CONTAINER_REMOTE_LAUNCH) {

          ContainerRemoteLaunchEvent launchEv =
              (ContainerRemoteLaunchEvent)event;
          TaskAttemptId attemptID = launchEv.getTaskAttemptID();

          Job job = context.getAllJobs().get(attemptID.getTaskId().getJobId());
          int numMapTasks = job.getTotalMaps();
          int numReduceTasks = job.getTotalReduces();

          // YARN (tracking) Task:
          org.apache.hadoop.mapreduce.v2.app.job.Task ytask =
              job.getTask(attemptID.getTaskId());
          // classic mapred Task:
          org.apache.hadoop.mapred.Task remoteTask = launchEv.getRemoteTask();

          // after "launching," send launched event to task attempt to move
          // state from ASSIGNED to RUNNING (also nukes "remoteTask", so must
          // do getRemoteTask() call first)
         
View Full Code Here

Examples of org.apache.hadoop.mapreduce.v2.app.launcher.ContainerRemoteLaunchEvent

      ContainerLaunchContext launchContext = createContainerLaunchContext(
          cEvent.getApplicationACLs(), taskAttempt.conf, taskAttempt.jobToken,
          taskAttempt.remoteTask, taskAttempt.oldJobId, taskAttempt.jvmID,
          taskAttempt.taskAttemptListener, taskAttempt.credentials);
      taskAttempt.eventHandler
        .handle(new ContainerRemoteLaunchEvent(taskAttempt.attemptId,
          launchContext, container, taskAttempt.remoteTask));

      // send event to speculator that our container needs are satisfied
      taskAttempt.eventHandler.handle
          (new SpeculatorEvent(taskAttempt.getID().getTaskId(), -1));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.