java.lang.Object
org.apache.hadoop.yarn.server.nodemanager.containermanager.localizer.ContainerLocalizer

public class ContainerLocalizer extends Object
  • Field Details

  • Constructor Details

    • ContainerLocalizer

      public ContainerLocalizer(org.apache.hadoop.fs.FileContext lfs, String user, String appId, String localizerId, String tokenFileName, List<org.apache.hadoop.fs.Path> localDirs, org.apache.hadoop.yarn.factories.RecordFactory recordFactory) throws IOException
      Throws:
      IOException
  • Method Details

    • getProxy

      @Private @VisibleForTesting public LocalizationProtocol getProxy(InetSocketAddress nmAddr)
    • runLocalization

      public void runLocalization(InetSocketAddress nmAddr) throws IOException, InterruptedException
      Throws:
      IOException
      InterruptedException
    • closeFileSystems

      protected void closeFileSystems(org.apache.hadoop.security.UserGroupInformation ugi)
    • localizeFiles

      protected void localizeFiles(LocalizationProtocol nodemanager, CompletionService<org.apache.hadoop.fs.Path> cs, org.apache.hadoop.security.UserGroupInformation ugi) throws IOException, org.apache.hadoop.yarn.exceptions.YarnException
      Throws:
      IOException
      org.apache.hadoop.yarn.exceptions.YarnException
    • getJavaOpts

      public static List<String> getJavaOpts(org.apache.hadoop.conf.Configuration conf)
      Returns the JVM options to to launch the resource localizer.
      Parameters:
      conf - the configuration properties to launch the resource localizer.
    • buildMainArgs

      public static void buildMainArgs(List<String> command, String user, String appId, String locId, InetSocketAddress nmAddr, String tokenFileName, List<String> localDirs, org.apache.hadoop.conf.Configuration conf)
      Adds the ContainerLocalizer arguments for a @{link ShellCommandExecutor}, as expected by ContainerLocalizer.main
      Parameters:
      command - the current ShellCommandExecutor command line
      user - localization user
      appId - localized app id
      locId - localizer id
      nmAddr - nodemanager address
      localDirs - list of local dirs
    • main

      public static void main(String[] argv) throws Throwable
      Throws:
      Throwable