You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@tez.apache.org by "Bikas Saha (JIRA)" <ji...@apache.org> on 2014/08/14 23:00:18 UTC

[jira] [Comment Edited] (TEZ-1065) DAGStatus.getVertexStatus and other vertex related API's should maintain vertex order

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

Bikas Saha edited comment on TEZ-1065 at 8/14/14 8:58 PM:
----------------------------------------------------------

This check should probably be that the size of topostack is equal to vertices.size() so we know we are not missing vertices.
{code}+    Preconditions.checkArgument(!topologicalVertexStack.isEmpty(), "topologicalVertexStack is empty," +
+         "vertices is not sorted, make sure verify is called");{code}

Also can you change the type of this to LinkedHashMap (to make this resilient to future change of map type) and add a comment on why it needs to be a linkedhashmap.
{code}
-        vertexProgress = new HashMap<String, Progress>(kvList.size());
+        vertexProgress = new LinkedHashMap<String, Progress>(kvList.size());
...............
-  Map<String, Vertex> vertexMap = new HashMap<String, Vertex>();
+  Map<String, Vertex> vertexMap = new LinkedHashMap<String, Vertex>(); {code}


was (Author: bikassaha):
This check should probably be that the size of topostack is equal to vertices.size() so we know we are not missing vertices.
{code}+    Preconditions.checkArgument(!topologicalVertexStack.isEmpty(), "topologicalVertexStack is empty," +
+         "vertices is not sorted, make sure verify is called");{code}

Also can you change the type of this to LinkedHashMap (to make this resilient to future change of map type) and add a comment on why it needs to be a linkedhashmap.
{code}
-        vertexProgress = new HashMap<String, Progress>(kvList.size());
+        vertexProgress = new LinkedHashMap<String, Progress>(kvList.size());
...............
-  Map<String, Vertex> vertexMap = new HashMap<String, Vertex>();
+  Map<String, Vertex> vertexMap = new LinkedHashMap<String, Vertex>();

> DAGStatus.getVertexStatus and other vertex related API's should maintain vertex order
> -------------------------------------------------------------------------------------
>
>                 Key: TEZ-1065
>                 URL: https://issues.apache.org/jira/browse/TEZ-1065
>             Project: Apache Tez
>          Issue Type: Bug
>    Affects Versions: 0.5.0
>            Reporter: Bikas Saha
>            Assignee: Jeff Zhang
>              Labels: newbie
>         Attachments: TEZ-1065.1.patch, Tez-1065-2.patch, Tez-1065-3.patch, Tez-1065.patch
>
>
> They should maintain the incoming vertex order. In VertexProgress e.g. lets use LinkedHashMap instead of HashMap.



--
This message was sent by Atlassian JIRA
(v6.2#6252)