Uploaded image for project: 'Hadoop YARN'
  1. Hadoop YARN
  2. YARN-8694

app flex with relative changes does not work

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 3.1.1
    • None
    • yarn-native-services
    • None

    Description

      I'd like to increase 2 containers as belows.

      yarn app -flex my-sleeper -component sleeper +2

      but, It did not work. it seems to request 2, not +2.

       

      ApiServiceClient.actionFlex

      @Override
      public int actionFlex(String appName, Map<String, String> componentCounts)
          throws IOException, YarnException {
        int result = EXIT_SUCCESS;
        try {
          Service service = new Service();
          service.setName(appName);
          service.setState(ServiceState.FLEX);
          for (Map.Entry<String, String> entry : componentCounts.entrySet()) {
            Component component = new Component();
            component.setName(entry.getKey());
      
            Long numberOfContainers = Long.parseLong(entry.getValue());
            component.setNumberOfContainers(numberOfContainers);
            service.addComponent(component);
          }
          String buffer = jsonSerDeser.toJson(service);
          ClientResponse response = getApiClient(getServicePath(appName))
              .put(ClientResponse.class, buffer);

      It looks like there is no code, which handle “+”, “-“ in ApiServiceClient.actionFlex

      Attachments

        1. YARN-8694.002.patch
          6 kB
          kyungwan nam
        2. YARN-8694.001.patch
          2 kB
          kyungwan nam

        Activity

          People

            Unassigned Unassigned
            kyungwan nam kyungwan nam
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: