hadoop-yarn-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jian He (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (YARN-5610) Initial code for native services REST API
Date Tue, 04 Oct 2016 05:22:20 GMT

    [ https://issues.apache.org/jira/browse/YARN-5610?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15544389#comment-15544389
] 

Jian He commented on YARN-5610:
-------------------------------

- The component name is used in the compNameArtifactIdMap but then the name is overridden
by the artifact Id, is the component name expected to be overridden? the API document says
this field is mandatory 
this
{code}
          compNameArtifactIdMap.put(comp.getName(), comp.getArtifact().getId());
          comp.setName(comp.getArtifact().getId());
        }
{code}

- comments seems not matching code
{code}
    // If artifact is of type APPLICATION, then in the POST JSON there will
    // be no component definition for that artifact. Hence it's corresponding id
    // field is added. Every external APPLICATION has a unique id field.
    List<String> convertedDeps = new ArrayList<>();
    for (String dep : component.getDependencies()) {
      if (compNameArtifactIdMap.containsKey(dep)) {
        convertedDeps.add(compNameArtifactIdMap.get(dep));
      } else {
        convertedDeps.add(dep);
      }
    }
{code}
bq. I have some TODOs on global config which I wanted to get back to. Let me check and remove
if not required.
I don't see the TODOs in this method, should it be removed ? similarly configPrefix
- why is queueName set to label_expression ? Also queueName is not being set anywhere
{code}
    if (queueName != null) {
      resCompOptTriples.addAll(Arrays.asList(compName,
          ResourceKeys.YARN_LABEL_EXPRESSION, queueName));
    }
{code}
- why is the PROPERTY_APP_RUNAS_USER variable needed? Usually we switch to the correct user
and then start the service. Also, it's not appropriate to run it as root if user is not set.
IIUC, I think setting "SLIDER_USER = UserGroupInformation.getCurrentUser();" is enough.  
{code} 
  private static String getUserToRunAs() {
    String user = System.getenv(PROPERTY_APP_RUNAS_USER);
    if (StringUtils.isEmpty(user)) {
      user = "root";
    }
    return user;
  }
{code}
- sorry, didn't get it. why you need to bind "help", when creating slider client ?
{code}
If you see ActionHelpArgs you will see that it overrides getHadoopServicesRequired and returns
false. Help is the safest action to bind since there are hardly any other action which does
not need any additional params
{code}
- why here in deleteApplication, it needs to wait for the appName to appear? I'm afraid such
short sleep interval with a getAllApplcations call will overwhelm RM if any bug appears and
the loop doesn't break. 
{code}
      while (getSliderList(appName) == 0) {
        Thread.sleep(100); // don't use thread sleep
      }
{code}

> Initial code for native services REST API
> -----------------------------------------
>
>                 Key: YARN-5610
>                 URL: https://issues.apache.org/jira/browse/YARN-5610
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>            Reporter: Gour Saha
>            Assignee: Gour Saha
>             Fix For: yarn-native-services
>
>         Attachments: YARN-4793-yarn-native-services.001.patch, YARN-5610-yarn-native-services.002.patch,
YARN-5610-yarn-native-services.003.patch
>
>
> This task will be used to submit and review patches for the initial code drop for the
native services REST API 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: yarn-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: yarn-issues-help@hadoop.apache.org


Mime
View raw message