Uploaded image for project: 'Apache Twill'
  1. Apache Twill
  2. TWILL-252

Not providing any feedback when size of the container requested can't be allocated

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      Looks like when YARN is configured with max memory per container (yarn.scheduler.maximum-allocation-mb) less then amount of memory end user allocates for their application and container is allocated with just yarn.scheduler.maximum-allocation-mb value there is no way to know about it until container is allocated.
      We try to divide memory into heap and off-heap and end up with setting up off heap to the value higher then allocated for the container, as application assumes it gets what it asked for or container is not allocated at all.
      Need either ability to fail application in this case or not allocate container with memory less then asked.
      As currently Twill adjusts memory and cpu with only INFO level messages in AppMaster log:
      from Hadoop21YarnAMClient.java

       protected Resource adjustCapability(Resource resource) {
          int cores = resource.getVirtualCores();
          int updatedCores = Math.min(resource.getVirtualCores(), maxCapability.getVirtualCores());
      
          if (cores != updatedCores) {
            resource.setVirtualCores(updatedCores);
            LOG.info("Adjust virtual cores requirement from {} to {}.", cores, updatedCores);
          }
      
          int updatedMemory = Math.min(resource.getMemory(), maxCapability.getMemory());
          if (resource.getMemory() != updatedMemory) {
            resource.setMemory(updatedMemory);
            LOG.info("Adjust memory requirement from {} to {} MB.", resource.getMemory(), updatedMemory);
          }
      
          return resource;
        }
      

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              yufeldman Yuliya Feldman
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: