giraph-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (GIRAPH-1203) Throw better exception when edge serialisation fails because of too many edges
Date Mon, 15 Oct 2018 20:19:00 GMT

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

ASF GitHub Bot commented on GIRAPH-1203:
----------------------------------------

Github user dlogothetis commented on a diff in the pull request:

    https://github.com/apache/giraph/pull/87#discussion_r225302450
  
    --- Diff: giraph-core/src/main/java/org/apache/giraph/edge/ByteArrayEdges.java ---
    @@ -94,6 +94,9 @@ public void add(Edge<I, E> edge) {
         } catch (IOException e) {
           throw new IllegalStateException("add: Failed to write to the new " +
               "byte array");
    +    } catch (NegativeArraySizeException negativeArraySizeException) {
    +      throw new IllegalStateException("add: Too many edges for a vertex, " +
    --- End diff --
    
    Could we add the ID of the vertex in the exception message? It may be useful for debugging
purposes.


> Throw better exception when edge serialisation fails because of too many edges
> ------------------------------------------------------------------------------
>
>                 Key: GIRAPH-1203
>                 URL: https://issues.apache.org/jira/browse/GIRAPH-1203
>             Project: Giraph
>          Issue Type: Improvement
>            Reporter: Aanchal Dalmia
>            Priority: Minor
>
> When a vertex has a large number of edges, during serialization, the edges would not
fit into the byte array. The upper limit on the size of the array is the maximum integer value.
When this is crossed, the size of the byte array becomes negative, since the integer overflows.
> Throw a better exception when this happens.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message