You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@tez.apache.org by "László Bodor (Jira)" <ji...@apache.org> on 2021/09/18 09:10:00 UTC

[jira] [Updated] (TEZ-4324) Counters object should have the same serialized format in vertex and task events proto

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

László Bodor updated TEZ-4324:
------------------------------
    Description: 
This is a follow-up of TEZ-4231, description will be written here later, but TEZ-4231's workaround is:
{code:java}
    JSONObject countersObj = otherInfoNode.optJSONObject(Constants.*_COUNTERS_*);
    if (countersObj == null) {
      /*
       * This is a workaround for formatting differences, where a TaskFinishedEvent's
       * counter is a correct json object shown as string, but VertexFinishedEvent's 
       * counter is an encoded json string, so the latter is interpreted as a String
       * while parsing. The issue might be somewhere while converting these event objects
       * to proto (HistoryEventProtoConverter). Even if should be fixed there,
       * already generated events should be parsed correctly, hence this workaround.
       */
      countersObj = new JSONObject(otherInfoNode.optString(Constants.*_COUNTERS_*));
    }
{code}

vertex:
{code}
"counters":"{\"counterGroups\":[{\"counterGroupName\":\"org.ap...
{code}

task:
{code}
"counters":{"counterGroups":[{"counterGroupName":"org.apache.tez.common.counters.
{code}

  was:
This is a follow-up of TEZ-4231, description will be written here later, but TEZ-4234's workaround is:
{code:java}
    JSONObject countersObj = otherInfoNode.optJSONObject(Constants.*_COUNTERS_*);
    if (countersObj == null) {
      /*
       * This is a workaround for formatting differences, where a TaskFinishedEvent's
       * counter is a correct json object shown as string, but VertexFinishedEvent's 
       * counter is an encoded json string, so the latter is interpreted as a String
       * while parsing. The issue might be somewhere while converting these event objects
       * to proto (HistoryEventProtoConverter). Even if should be fixed there,
       * already generated events should be parsed correctly, hence this workaround.
       */
      countersObj = new JSONObject(otherInfoNode.optString(Constants.*_COUNTERS_*));
    }
{code}

vertex:
{code}
"counters":"{\"counterGroups\":[{\"counterGroupName\":\"org.ap...
{code}

task:
{code}
"counters":{"counterGroups":[{"counterGroupName":"org.apache.tez.common.counters.
{code}


> Counters object should have the same serialized format in vertex and task events proto
> --------------------------------------------------------------------------------------
>
>                 Key: TEZ-4324
>                 URL: https://issues.apache.org/jira/browse/TEZ-4324
>             Project: Apache Tez
>          Issue Type: Bug
>            Reporter: László Bodor
>            Assignee: László Bodor
>            Priority: Major
>
> This is a follow-up of TEZ-4231, description will be written here later, but TEZ-4231's workaround is:
> {code:java}
>     JSONObject countersObj = otherInfoNode.optJSONObject(Constants.*_COUNTERS_*);
>     if (countersObj == null) {
>       /*
>        * This is a workaround for formatting differences, where a TaskFinishedEvent's
>        * counter is a correct json object shown as string, but VertexFinishedEvent's 
>        * counter is an encoded json string, so the latter is interpreted as a String
>        * while parsing. The issue might be somewhere while converting these event objects
>        * to proto (HistoryEventProtoConverter). Even if should be fixed there,
>        * already generated events should be parsed correctly, hence this workaround.
>        */
>       countersObj = new JSONObject(otherInfoNode.optString(Constants.*_COUNTERS_*));
>     }
> {code}
> vertex:
> {code}
> "counters":"{\"counterGroups\":[{\"counterGroupName\":\"org.ap...
> {code}
> task:
> {code}
> "counters":{"counterGroups":[{"counterGroupName":"org.apache.tez.common.counters.
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)