You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@giraph.apache.org by "Paolo Castagna (JIRA)" <ji...@apache.org> on 2012/06/06 16:17:23 UTC
[jira] [Created] (GIRAPH-202) SimplePageRankVertex and divide by
zero
Paolo Castagna created GIRAPH-202:
-------------------------------------
Summary: SimplePageRankVertex and divide by zero
Key: GIRAPH-202
URL: https://issues.apache.org/jira/browse/GIRAPH-202
Project: Giraph
Issue Type: Bug
Reporter: Paolo Castagna
Priority: Trivial
Current SimplePageRankVertex implementation might have a problem if there are vertexes with not edges.
This should fix it (if you think it's a problem):
{code:java}
if (getSuperstep() < MAX_SUPERSTEPS) {
long edges = getNumOutEdges();
- sendMsgToAllEdges(
- new DoubleWritable(getVertexValue().get() / edges));
+ if ( edges > 0 ) {
+ sendMsgToAllEdges(
+ new DoubleWritable(getVertexValue().get() / edges));
+ }
} else {
voteToHalt();
}
{code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (GIRAPH-202) SimplePageRankVertex and divide by
zero
Posted by "Claudio Martella (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/GIRAPH-202?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13291100#comment-13291100 ]
Claudio Martella commented on GIRAPH-202:
-----------------------------------------
OH, please don't forget to get it to match the coding style.
> SimplePageRankVertex and divide by zero
> ---------------------------------------
>
> Key: GIRAPH-202
> URL: https://issues.apache.org/jira/browse/GIRAPH-202
> Project: Giraph
> Issue Type: Bug
> Reporter: Paolo Castagna
> Priority: Trivial
>
> Current SimplePageRankVertex implementation might have a problem if there are vertexes with not edges.
> This should fix it (if you think it's a problem):
> {code:java}
> if (getSuperstep() < MAX_SUPERSTEPS) {
> long edges = getNumOutEdges();
> - sendMsgToAllEdges(
> - new DoubleWritable(getVertexValue().get() / edges));
> + if ( edges > 0 ) {
> + sendMsgToAllEdges(
> + new DoubleWritable(getVertexValue().get() / edges));
> + }
> } else {
> voteToHalt();
> }
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (GIRAPH-202) SimplePageRankVertex and divide by
zero
Posted by "Claudio Martella (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/GIRAPH-202?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13291098#comment-13291098 ]
Claudio Martella commented on GIRAPH-202:
-----------------------------------------
what do you dislike of uploading a patch? :)
> SimplePageRankVertex and divide by zero
> ---------------------------------------
>
> Key: GIRAPH-202
> URL: https://issues.apache.org/jira/browse/GIRAPH-202
> Project: Giraph
> Issue Type: Bug
> Reporter: Paolo Castagna
> Priority: Trivial
>
> Current SimplePageRankVertex implementation might have a problem if there are vertexes with not edges.
> This should fix it (if you think it's a problem):
> {code:java}
> if (getSuperstep() < MAX_SUPERSTEPS) {
> long edges = getNumOutEdges();
> - sendMsgToAllEdges(
> - new DoubleWritable(getVertexValue().get() / edges));
> + if ( edges > 0 ) {
> + sendMsgToAllEdges(
> + new DoubleWritable(getVertexValue().get() / edges));
> + }
> } else {
> voteToHalt();
> }
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (GIRAPH-202) SimplePageRankVertex and divide by
zero
Posted by "Paolo Castagna (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/GIRAPH-202?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Paolo Castagna updated GIRAPH-202:
----------------------------------
Attachment: GIRAPH-202.patch
> SimplePageRankVertex and divide by zero
> ---------------------------------------
>
> Key: GIRAPH-202
> URL: https://issues.apache.org/jira/browse/GIRAPH-202
> Project: Giraph
> Issue Type: Bug
> Reporter: Paolo Castagna
> Priority: Trivial
> Attachments: GIRAPH-202.patch
>
>
> Current SimplePageRankVertex implementation might have a problem if there are vertexes with not edges.
> This should fix it (if you think it's a problem):
> {code:java}
> if (getSuperstep() < MAX_SUPERSTEPS) {
> long edges = getNumOutEdges();
> - sendMsgToAllEdges(
> - new DoubleWritable(getVertexValue().get() / edges));
> + if ( edges > 0 ) {
> + sendMsgToAllEdges(
> + new DoubleWritable(getVertexValue().get() / edges));
> + }
> } else {
> voteToHalt();
> }
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira