[jira] [Commented] (GIRAPH-1203) Throw better exception when edge serialisation fails because of too many edges
[ https://issues.apache.org/jira/browse/GIRAPH-1203?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16802288#comment-16802288 ] Hudson commented on GIRAPH-1203: FAILURE: Integrated in Jenkins build Giraph-trunk-Commit #1776 (See [https://builds.apache.org/job/Giraph-trunk-Commit/1776/]) GIRAPH-1203 (dionysios: [http://gitbox.apache.org/repos/asf?p=giraph.git=commit=fff0d3404e53d9349184f5016d8a0848e1210957]) * (edit) giraph-core/src/main/java/org/apache/giraph/edge/ByteArrayEdges.java > 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)
[jira] [Commented] (GIRAPH-1203) Throw better exception when edge serialisation fails because of too many edges
[ https://issues.apache.org/jira/browse/GIRAPH-1203?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16653922#comment-16653922 ] 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_r226026086 --- Diff: giraph-core/src/main/java/org/apache/giraph/edge/ByteArrayEdges.java --- @@ -94,6 +94,9 @@ public void add(Edge 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, " + +edge.getTargetVertexId() + "hence failed to write to byte array"); --- End diff -- ```suggestion edge.getTargetVertexId() + " hence failed to write to byte array"); ``` > 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)
[jira] [Commented] (GIRAPH-1203) Throw better exception when edge serialisation fails because of too many edges
[ https://issues.apache.org/jira/browse/GIRAPH-1203?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=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 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)
[jira] [Commented] (GIRAPH-1203) Throw better exception when edge serialisation fails because of too many edges
[ https://issues.apache.org/jira/browse/GIRAPH-1203?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16650728#comment-16650728 ] ASF GitHub Bot commented on GIRAPH-1203: Github user dlogothetis commented on the issue: https://github.com/apache/giraph/pull/87 @aanchal204, did we try to reproduce this and verify the exception is caught? > 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)
[jira] [Commented] (GIRAPH-1203) Throw better exception when edge serialisation fails because of too many edges
[ https://issues.apache.org/jira/browse/GIRAPH-1203?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16640258#comment-16640258 ] ASF GitHub Bot commented on GIRAPH-1203: GitHub user aanchal204 opened a pull request: https://github.com/apache/giraph/pull/87 Better exception handling for large number of edges: GIRAPH-1203 Ran: mvn clean verify -P hadoop_facebook You can merge this pull request into a Git repository by running: $ git pull https://github.com/aanchal204/giraph negative-array-size-exception Alternatively you can review and apply these changes as the patch at: https://github.com/apache/giraph/pull/87.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #87 commit b0d9f4e6aa77bd0d23afa787d2ab2a8dcffbcb58 Author: Aanchal Dalmia Date: 2018-10-05T19:30:02Z Better exception handling for large number of edges: GIRAPH-1203 > 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)