You are viewing a plain text version of this content. The canonical link for it is here.
Posted to yarn-issues@hadoop.apache.org by "Prabhu Joseph (JIRA)" <ji...@apache.org> on 2019/03/22 13:48:00 UTC

[jira] [Updated] (YARN-9403) GET /apps/{appid}/entities/YARN_APPLICATION accesses application table instead of entity table

     [ https://issues.apache.org/jira/browse/YARN-9403?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Prabhu Joseph updated YARN-9403:
--------------------------------
    Description: 
"GET /apps/{appid}/entities/YARN_APPLICATION" 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}

  was:
GET /apps/{appid}/entities/YARN_APPLICATION 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}


> 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: Bug
>          Components: ATSv2
>    Affects Versions: 3.2.0
>            Reporter: Prabhu Joseph
>            Assignee: Prabhu Joseph
>            Priority: Major
>
> "GET /apps/{appid}/entities/YARN_APPLICATION" 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}



--
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