Uploaded image for project: 'Hadoop YARN'
  1. Hadoop YARN
  2. YARN-5065 Umbrella JIRA of SLS fixes / improvements
  3. YARN-7732

Support Generic AM Simulator from SynthGenerator

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • None
    • None
    • Reviewed

    Description

      Extract the MapReduce specific set-up in the SLSRunner into the MRAMSimulator, and enable support for pluggable AMSimulators.

      Previously, the AM set up in SLSRunner had the MRAMSimulator type hard coded, for example startAMFromSynthGenerator() calls this:

       

      runNewAM(SLSUtils.DEFAULT_JOB_TYPE, user, jobQueue, oldJobId,
      
                  jobStartTimeMS, jobFinishTimeMS, containerList, reservationId,
      
                  job.getDeadline(), getAMContainerResource(null));
      

      where SLSUtils.DEFAULT_JOB_TYPE = "mapreduce"

      The container set up was also only suitable for mapreduce: 

       

      Version:1.0 StartHTML:000000286 EndHTML:000012564 StartFragment:000003634 EndFragment:000012474 StartSelection:000003700 EndSelection:000012464 SourceURL:https://github.com/apache/hadoop/blob/trunk/hadoop-tools/hadoop-sls/src/main/java/org/apache/hadoop/yarn/sls/SLSRunner.java 
      // map tasks
      
      for (int i = 0; i < job.getNumberMaps(); i++) {
      	TaskAttemptInfo tai = job.getTaskAttemptInfo(TaskType.MAP, i, 0);
      	RMNode node =
      		nmMap.get(keyAsArray.get(rand.nextInt(keyAsArray.size())))
      			.getNode();
      	String hostname = "/" + node.getRackName() + "/" + node.getHostName();
      	long containerLifeTime = tai.getRuntime();
      	Resource containerResource =
      		Resource.newInstance((int) tai.getTaskInfo().getTaskMemory(),
      			(int) tai.getTaskInfo().getTaskVCores());
      	containerList.add(new ContainerSimulator(containerResource,
      		containerLifeTime, hostname, DEFAULT_MAPPER_PRIORITY, "map"));
      }
      
      
      
      // reduce tasks
      for (int i = 0; i < job.getNumberReduces(); i++) {
      	TaskAttemptInfo tai = job.getTaskAttemptInfo(TaskType.REDUCE, i, 0);
      	RMNode node =
      		nmMap.get(keyAsArray.get(rand.nextInt(keyAsArray.size())))
      			.getNode();
      	String hostname = "/" + node.getRackName() + "/" + node.getHostName();
      	long containerLifeTime = tai.getRuntime();
      	Resource containerResource =
      		Resource.newInstance((int) tai.getTaskInfo().getTaskMemory(),
      			(int) tai.getTaskInfo().getTaskVCores());
      	containerList.add(
      		new ContainerSimulator(containerResource, containerLifeTime,
      		hostname, DEFAULT_REDUCER_PRIORITY, "reduce"));
      }
      

       

      In addition, the syn.json format supported only mapreduce (the parameters were very specific: mtime, rtime, mtasks, rtasks, etc..).

      This patch aims to introduce a new syn.json format that can describe generic jobs, and the SLS setup required to support the synth generation of generic jobs.

      See syn_generic.json for an equivalent of the previous syn.json in the new format.

      Using the new generic format, we describe a StreamAMSimulator simulates a long running streaming service that maintains N number of containers for the lifetime of the AM. See syn_stream.json.

       

      Attachments

        1. YARN-7732.01.patch
          98 kB
          Young Chen
        2. YARN-7732.02.patch
          100 kB
          Young Chen
        3. YARN-7732.03.patch
          100 kB
          Young Chen
        4. YARN-7732-YARN-7798.01.patch
          88 kB
          Young Chen
        5. YARN-7732-YARN-7798.02.patch
          87 kB
          Young Chen
        6. YARN-7732.04.patch
          89 kB
          Young Chen
        7. YARN-7732.05.patch
          89 kB
          Young Chen
        8. YARN-7732.06.patch
          90 kB
          Young Chen

        Issue Links

          Activity

            People

              youchen Young Chen
              youchen Young Chen
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: