From yarn-issues-return-165611-archive-asf-public=cust-asf.ponee.io@hadoop.apache.org Tue Mar 26 15:20:02 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 622F618075F for ; Tue, 26 Mar 2019 16:20:02 +0100 (CET) Received: (qmail 99730 invoked by uid 500); 26 Mar 2019 15:20:01 -0000 Mailing-List: contact yarn-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list yarn-issues@hadoop.apache.org Received: (qmail 99636 invoked by uid 99); 26 Mar 2019 15:20:01 -0000 Received: from mailrelay1-us-west.apache.org (HELO mailrelay1-us-west.apache.org) (209.188.14.139) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 26 Mar 2019 15:20:01 +0000 Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id C4BABE20CD for ; Tue, 26 Mar 2019 15:20:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 813792459A for ; Tue, 26 Mar 2019 15:20:00 +0000 (UTC) Date: Tue, 26 Mar 2019 15:20:00 +0000 (UTC) From: "Prabhu Joseph (JIRA)" To: yarn-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (YARN-9403) GET /apps/{appid}/entities/YARN_APPLICATION accesses application table instead of entity table MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/YARN-9403?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16801841#comment-16801841 ] Prabhu Joseph commented on YARN-9403: ------------------------------------- [~rohithsharma] [~vrushalic] Can you review the patch which fixes below ATSV2 Rest Api from accessing the application table instead of entity table. {code} /apps/{appid}/entities/YARN_APPLICATION {code} > GET /apps/{appid}/entities/YARN_APPLICATION accesses application table instead of entity table > ---------------------------------------------------------------------------------------------- > > Key: YARN-9403 > URL: https://issues.apache.org/jira/browse/YARN-9403 > Project: Hadoop YARN > Issue Type: Sub-task > Components: ATSv2 > Affects Versions: 3.2.0 > Reporter: Prabhu Joseph > Assignee: Prabhu Joseph > Priority: Major > Attachments: YARN-9403-001.patch, YARN-9403-002.patch, YARN-9403-003.patch, YARN-9403-004.patch > > > {noformat}"GET /apps/{appid}/entities/YARN_APPLICATION"{noformat} accesses application table instead of entity table. As per the doc, With this API, you can query generic entities identified by cluster ID, application ID and per-framework entity type. But it also provides all the apps when entityType is set to YARN_APPLICATION. It should only access Entity Table through {{GenericEntityReader}}. > Wrong Output: With YARN_APPLICATION entityType, all applications listed from application tables. > {code} > [hbase@yarn-ats-3 centos]$ curl -s "http://yarn-ats-3:8198/ws/v2/timeline/apps/application_1553258815132_0002/entities/YARN_APPLICATION?user.name=hbase&userid=hbase&flowname=word%20count" | jq . > [ > { > "metrics": [], > "events": [], > "createdtime": 1553258922721, > "idprefix": 0, > "isrelatedto": {}, > "relatesto": {}, > "info": { > "UID": "ats!application_1553258815132_0002", > "FROM_ID": "ats!hbase!word count!1553258922721!application_1553258815132_0002" > }, > "configs": {}, > "type": "YARN_APPLICATION", > "id": "application_1553258815132_0002" > }, > { > "metrics": [], > "events": [], > "createdtime": 1553258825918, > "idprefix": 0, > "isrelatedto": {}, > "relatesto": {}, > "info": { > "UID": "ats!application_1553258815132_0001", > "FROM_ID": "ats!hbase!word count!1553258825918!application_1553258815132_0001" > }, > "configs": {}, > "type": "YARN_APPLICATION", > "id": "application_1553258815132_0001" > } > ] > {code} > Right Output: With correct entity type (MAPREDUCE_JOB) it accesses entity table for given applicationId and entityType. > {code} > [hbase@yarn-ats-3 centos]$ curl -s "http://yarn-ats-3:8198/ws/v2/timeline/apps/application_1553258815132_0002/entities/MAPREDUCE_JOB?user.name=hbase&userid=hbase&flowname=word%20count" | jq . > [ > { > "metrics": [], > "events": [], > "createdtime": 1553258926667, > "idprefix": 0, > "isrelatedto": {}, > "relatesto": {}, > "info": { > "UID": "ats!application_1553258815132_0002!MAPREDUCE_JOB!0!job_1553258815132_0002", > "FROM_ID": "ats!hbase!word count!1553258922721!application_1553258815132_0002!MAPREDUCE_JOB!0!job_1553258815132_0002" > }, > "configs": {}, > "type": "MAPREDUCE_JOB", > "id": "job_1553258815132_0002" > } > ] > {code} > Flow Activity and Flow Run tables can also be accessed using similar way. > {code} > GET /apps/{appid}/entities/YARN_FLOW_ACTIVITY > GET /apps/{appid}/entities/YARN_FLOW_RUN > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: yarn-issues-unsubscribe@hadoop.apache.org For additional commands, e-mail: yarn-issues-help@hadoop.apache.org