Examples of RunnableProcessLauncher


Examples of org.apache.twill.internal.appmaster.RunnableProcessLauncher

    AllocationResponse response = amrmClient.allocate(progress);
    List<RunnableProcessLauncher> launchers
      = Lists.newArrayListWithCapacity(response.getAllocatedContainers().size());

    for (Container container : response.getAllocatedContainers()) {
      launchers.add(new RunnableProcessLauncher(new Hadoop20YarnContainerInfo(container), nmClient));
    }

    List<YarnContainerStatus> completed = ImmutableList.copyOf(
      Iterables.transform(response.getCompletedContainersStatuses(), STATUS_TRANSFORM));
View Full Code Here

Examples of org.apache.twill.internal.appmaster.RunnableProcessLauncher

    AllocateResponse allocateResponse = amrmClient.allocate(progress);
    List<RunnableProcessLauncher> launchers
      = Lists.newArrayListWithCapacity(allocateResponse.getAllocatedContainers().size());

    for (Container container : allocateResponse.getAllocatedContainers()) {
      launchers.add(new RunnableProcessLauncher(new Hadoop21YarnContainerInfo(container), nmClient));
    }

    List<YarnContainerStatus> completed = ImmutableList.copyOf(
      Iterables.transform(allocateResponse.getCompletedContainersStatuses(), STATUS_TRANSFORM));
View Full Code Here

Examples of org.apache.twill.internal.appmaster.RunnableProcessLauncher

      handler.acquired(launchers);

      // If no process has been launched through the given launcher, return the container.
      for (ProcessLauncher<YarnContainerInfo> l : launchers) {
        // This cast always works.
        RunnableProcessLauncher launcher = (RunnableProcessLauncher) l;
        if (!launcher.isLaunched()) {
          YarnContainerInfo containerInfo = launcher.getContainerInfo();
          LOG.info("Nothing to run in container, releasing it: {}", containerInfo.getContainer());
          releaseAssignedContainer(containerInfo);
        }
      }
    }
View Full Code Here

Examples of org.apache.twill.internal.appmaster.RunnableProcessLauncher

    AllocateResponse allocateResponse = amrmClient.allocate(progress);
    List<ProcessLauncher<YarnContainerInfo>> launchers
      = Lists.newArrayListWithCapacity(allocateResponse.getAllocatedContainers().size());

    for (Container container : allocateResponse.getAllocatedContainers()) {
      launchers.add(new RunnableProcessLauncher(new Hadoop21YarnContainerInfo(container), nmClient));
    }

    if (!launchers.isEmpty()) {
      handler.acquired(launchers);

      // If no process has been launched through the given launcher, return the container.
      for (ProcessLauncher<YarnContainerInfo> l : launchers) {
        // This cast always works.
        RunnableProcessLauncher launcher = (RunnableProcessLauncher) l;
        if (!launcher.isLaunched()) {
          Container container = launcher.getContainerInfo().getContainer();
          LOG.info("Nothing to run in container, releasing it: {}", container);
          amrmClient.releaseAssignedContainer(container.getId());
        }
      }
    }
View Full Code Here

Examples of org.apache.twill.internal.appmaster.RunnableProcessLauncher

    AllocationResponse response = amrmClient.allocate(progress);
    List<ProcessLauncher<YarnContainerInfo>> launchers
      = Lists.newArrayListWithCapacity(response.getAllocatedContainers().size());

    for (Container container : response.getAllocatedContainers()) {
      launchers.add(new RunnableProcessLauncher(new Hadoop20YarnContainerInfo(container), nmClient));
    }

    if (!launchers.isEmpty()) {
      handler.acquired(launchers);

      // If no process has been launched through the given launcher, return the container.
      for (ProcessLauncher<YarnContainerInfo> l : launchers) {
        // This cast always works.
        RunnableProcessLauncher launcher = (RunnableProcessLauncher) l;
        if (!launcher.isLaunched()) {
          Container container = launcher.getContainerInfo().getContainer();
          LOG.info("Nothing to run in container, releasing it: {}", container);
          amrmClient.releaseAssignedContainer(container.getId());
        }
      }
    }
View Full Code Here

Examples of org.apache.twill.internal.appmaster.RunnableProcessLauncher

    AllocationResponse response = amrmClient.allocate(progress);
    List<ProcessLauncher<YarnContainerInfo>> launchers
      = Lists.newArrayListWithCapacity(response.getAllocatedContainers().size());

    for (Container container : response.getAllocatedContainers()) {
      launchers.add(new RunnableProcessLauncher(new Hadoop20YarnContainerInfo(container), nmClient));
    }

    if (!launchers.isEmpty()) {
      handler.acquired(launchers);

      // If no process has been launched through the given launcher, return the container.
      for (ProcessLauncher<YarnContainerInfo> l : launchers) {
        // This cast always works.
        RunnableProcessLauncher launcher = (RunnableProcessLauncher) l;
        if (!launcher.isLaunched()) {
          Container container = launcher.getContainerInfo().getContainer();
          LOG.info("Nothing to run in container, releasing it: {}", container);
          amrmClient.releaseAssignedContainer(container.getId());
        }
      }
    }
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.