You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@uniffle.apache.org by "zhengchenyu (via GitHub)" <gi...@apache.org> on 2023/07/05 23:54:52 UTC
[GitHub] [incubator-uniffle] zhengchenyu commented on issue #986: [Improvement][tez] Optimize the method of obtain the vertex id.
zhengchenyu commented on issue #986:
URL: https://github.com/apache/incubator-uniffle/issues/986#issuecomment-1622700479
> It is great, if can obtain vertex id throuth:
>
> ```
> int sourceVertexId = dag.getVertex(edge.getSourceVertexName()).getVertexId().getId();
> int destinationVertexId = dag.getVertex(edge.getDestinationVertexName()).getVertexId().getId();
> ```
>
> The only one it modify lots of file, but it is ok.
>
> but when could not get vertexid, eg:
>
> ```
> int sourceVertexId = this.conf.getInt(RSS_SHUFFLE_SOURCE_VERTEX_ID, -1);
> ```
>
> could we throw exception, then we could know something wrong, instead get -1 and wrong result.
@lifeSo
assert is used to throw exception. You can see the below code.
```
assert sourceVertexId != -1;
assert destinationVertexId != -1;
```
And In fact, the vertex id must exists, so in general way, we will never throw exception.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@uniffle.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org