[ https://issues.apache.org/jira/browse/YARN-7826?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17297825#comment-17297825 ]
Qi Zhu commented on YARN-7826: ------------------------------ {code:java} public synchronized ApplicationId getAppId(String serviceName) throws IOException, YarnException { if (cachedAppInfo.containsKey(serviceName)) { return cachedAppInfo.get(serviceName).appId; } Service persistedService = ServiceApiUtil.loadService(fs, serviceName); if (persistedService == null) { throw new YarnException("Service " + serviceName + " doesn't exist on hdfs. Please check if the app exists in RM"); } if (persistedService.getId() == null) { return null; } ApplicationId currentAppId = ApplicationId.fromString(persistedService .getId()); cachedAppInfo.put(serviceName, new AppInfo(currentAppId, persistedService .getKerberosPrincipal().getPrincipalName())); return currentAppId; } {code} [~yeshavora] If you update your appid, but he appname use the cached old appid? > Yarn service status cli does not update lifetime if its updated with -appId > --------------------------------------------------------------------------- > > Key: YARN-7826 > URL: https://issues.apache.org/jira/browse/YARN-7826 > Project: Hadoop YARN > Issue Type: Bug > Components: yarn-native-services > Reporter: Yesha Vora > Assignee: Qi Zhu > Priority: Critical > > 1) Create Httpd yarn service with lifetime = 3600 sec. > 2) Run yarn application -status <appName>, The lifetime field has 3600 sec. > 3) Update lifetime of service using applicationId > {code} > yarn application -appId application_1516919074719_0001 -updateLifetime > 48000{code} > 4) Verify Application status using ApplicationId. Lifetime detail is updated > correctly > 5) Verify Lifetime using application name > {code} > [hrt_qa@xxx hadoopqe]$ yarn application -status httpd-hrt-qa-n > { > "uri" : null, > "name" : "httpd-hrt-qa-n", > "id" : "application_1516919074719_0001", > "artifact" : null, > "resource" : null, > "launch_time" : null, > "number_of_running_containers" : null, > "lifetime" : 3600, > "placement_policy" : null, > "components" : [ { > "name" : "httpd", > "dependencies" : [ ], > "readiness_check" : null, > "artifact" : { > "id" : "centos/httpd-24-centos7:latest", > "type" : "DOCKER", > "uri" : null > }, > "launch_command" : "/usr/bin/run-httpd", > "resource" : { > "uri" : null, > "profile" : null, > "cpus" : 1, > "memory" : "1024", > "additional" : null > }, > "number_of_containers" : 2, > "run_privileged_container" : false, > "placement_policy" : null, > "state" : "STABLE", > "configuration" : { > "properties" : { }, > "env" : { }, > "files" : [ { > "type" : "TEMPLATE", > "dest_file" : "/var/www/html/index.html", > "src_file" : null, > "properties" : { > "content" : "<html><header><title>Title</title></header><body>Hello > from ${COMPONENT_INSTANCE_NAME}!</body></html>" > } > } ] > }, > "quicklinks" : [ ], > "containers" : [ { > "uri" : null, > "id" : "container_e07_1516919074719_0001_01_000002", > "launch_time" : 1516919372633, > "ip" : "xxx.xxx.xxx.xxx", > "hostname" : "httpd-0.httpd-hrt-qa-n.hrt_qa.test.com", > "bare_host" : "xxx", > "state" : "READY", > "component_instance_name" : "httpd-0", > "resource" : null, > "artifact" : null, > "privileged_container" : null > }, { > "uri" : null, > "id" : "container_e07_1516919074719_0001_01_000003", > "launch_time" : 1516919372637, > "ip" : "xxx.xxx.xxx.xxx", > "hostname" : "httpd-1.httpd-hrt-qa-n.hrt_qa.test.com", > "bare_host" : "xxx", > "state" : "READY", > "component_instance_name" : "httpd-1", > "resource" : null, > "artifact" : null, > "privileged_container" : null > } ] > }, { > "name" : "httpd-proxy", > "dependencies" : [ ], > "readiness_check" : null, > "artifact" : { > "id" : "centos/httpd-24-centos7:latest", > "type" : "DOCKER", > "uri" : null > }, > "launch_command" : "/usr/bin/run-httpd", > "resource" : { > "uri" : null, > "profile" : null, > "cpus" : 1, > "memory" : "1024", > "additional" : null > }, > "number_of_containers" : 1, > "run_privileged_container" : false, > "placement_policy" : null, > "state" : "STABLE", > "configuration" : { > "properties" : { }, > "env" : { }, > "files" : [ { > "type" : "TEMPLATE", > "dest_file" : "/etc/httpd/conf.d/httpd-proxy.conf", > "src_file" : "httpd-proxy.conf", > "properties" : { } > } ] > }, > "quicklinks" : [ ], > "containers" : [ { > "uri" : null, > "id" : "container_e07_1516919074719_0001_01_000004", > "launch_time" : 1516919372638, > "ip" : "xxx.xxx.xxx.xxx", > "hostname" : "httpd-proxy-0.httpd-hrt-qa-n.hrt_qa.test.com", > "bare_host" : "xxx", > "state" : "READY", > "component_instance_name" : "httpd-proxy-0", > "resource" : null, > "artifact" : null, > "privileged_container" : null > } ] > } ], > "configuration" : { > "properties" : { }, > "env" : { }, > "files" : [ ] > }, > "state" : "STABLE", > "quicklinks" : { > "Apache HTTP Server" : > "http://httpd-proxy-0.httpd-hrt-qa-n.hrt_qa.test.com:8080" > }, > "queue" : null, > "kerberos_principal" : { > "principal_name" : null, > "keytab" : null > } > } > {code} > Here, App status with app-name did not have new lifetime. The application > status with app name should also reflect the new lifetime. -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: yarn-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: yarn-issues-h...@hadoop.apache.org