[jira] [Commented] (GIRAPH-132) Simplify boolean expression in GraphMapper::map()

2012-02-24 Thread Eli Reisman (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/GIRAPH-132?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13215809#comment-13215809
 ] 

Eli Reisman commented on GIRAPH-132:


This seems to have been fixed already but is still on this list. Don't know who 
did it. Looking at GraphMapper::map() I see this:

@Override
  public void map(Object key, Object value, Context context)
throws IOException, InterruptedException {
// map() only does computation
// 1) Run checkpoint per frequency policy.
// 2) For every vertex on this mapper, run the compute() function
// 3) Wait until all messaging is done.
// 4) Check if all vertices are done.  If not goto 2).
// 5) Dump output.
if (done) {
  return;
}
...more code...

just letting everyone know, this might be resolved already?


 Simplify boolean expression in GraphMapper::map()
 -

 Key: GIRAPH-132
 URL: https://issues.apache.org/jira/browse/GIRAPH-132
 Project: Giraph
  Issue Type: Improvement
Reporter: Jakob Homan
Priority: Trivial
  Labels: newbie

 The boolean expression in:
 {noformat}@Override
 public void map(Object key, Object value, Context context)
 throws IOException, InterruptedException {
 // map() only does computation
 // 1) Run checkpoint per frequency policy.
 // 2) For every vertex on this mapper, run the compute() function
 // 3) Wait until all messaging is done.
 // 4) Check if all vertices are done.  If not goto 2).
 // 5) Dump output.
 if (done == true) {
 return;
 }{noformat}
 can be simplified.

--
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] [Resolved] (GIRAPH-132) Simplify boolean expression in GraphMapper::map()

2012-02-24 Thread Avery Ching (Resolved) (JIRA)

 [ 
https://issues.apache.org/jira/browse/GIRAPH-132?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Avery Ching resolved GIRAPH-132.


Resolution: Not A Problem

Thanks Eli, this was resolved in the massive checkstyle fix (GIRAPH-40).

 Simplify boolean expression in GraphMapper::map()
 -

 Key: GIRAPH-132
 URL: https://issues.apache.org/jira/browse/GIRAPH-132
 Project: Giraph
  Issue Type: Improvement
Reporter: Jakob Homan
Priority: Trivial
  Labels: newbie

 The boolean expression in:
 {noformat}@Override
 public void map(Object key, Object value, Context context)
 throws IOException, InterruptedException {
 // map() only does computation
 // 1) Run checkpoint per frequency policy.
 // 2) For every vertex on this mapper, run the compute() function
 // 3) Wait until all messaging is done.
 // 4) Check if all vertices are done.  If not goto 2).
 // 5) Dump output.
 if (done == true) {
 return;
 }{noformat}
 can be simplified.

--
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] [Assigned] (GIRAPH-87) Simplify boolean expression in BspService::checkpointFrequencyMet

2012-02-24 Thread Jakob Homan (Assigned) (JIRA)

 [ 
https://issues.apache.org/jira/browse/GIRAPH-87?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jakob Homan reassigned GIRAPH-87:
-

Assignee: Eli Reisman

 Simplify boolean expression in BspService::checkpointFrequencyMet
 -

 Key: GIRAPH-87
 URL: https://issues.apache.org/jira/browse/GIRAPH-87
 Project: Giraph
  Issue Type: Improvement
Affects Versions: 0.2.0
Reporter: Jakob Homan
Assignee: Eli Reisman
  Labels: newbie

 {noformat}if (superstep  firstCheckpoint) {
 return false;
 } else if (((superstep - firstCheckpoint) % checkpointFrequency) == 
 0) {
 return true;
 } else {
 return false;
 }{noformat}
 can be simplified to just return the result of the else if evaluation.

--
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-87) Simplify boolean expression in BspService::checkpointFrequencyMet

2012-02-24 Thread Eli Reisman (Updated) (JIRA)

 [ 
https://issues.apache.org/jira/browse/GIRAPH-87?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Eli Reisman updated GIRAPH-87:
--

Attachment: GIRAPH-87.patch

This is the patch for GIRAPH-87 JIRA newbie issue. Passed mvn test, not 
tested on cluster.

 Simplify boolean expression in BspService::checkpointFrequencyMet
 -

 Key: GIRAPH-87
 URL: https://issues.apache.org/jira/browse/GIRAPH-87
 Project: Giraph
  Issue Type: Improvement
Affects Versions: 0.2.0
Reporter: Jakob Homan
Assignee: Eli Reisman
  Labels: newbie
 Attachments: GIRAPH-87.patch


 {noformat}if (superstep  firstCheckpoint) {
 return false;
 } else if (((superstep - firstCheckpoint) % checkpointFrequency) == 
 0) {
 return true;
 } else {
 return false;
 }{noformat}
 can be simplified to just return the result of the else if evaluation.

--
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-87) Simplify boolean expression in BspService::checkpointFrequencyMet

2012-02-24 Thread Jakob Homan (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/GIRAPH-87?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13215955#comment-13215955
 ] 

Jakob Homan commented on GIRAPH-87:
---

Looks good except it fails checkstyle:
{noformat}file 
name=/Users/jhoman/repos/giraph/src/main/java/org/apache/giraph/graph/BspService.java
error line=587 severity=error message=Line matches the illegal pattern 
apos;Trailing whitespaceapos;. 
source=com.puppycrawl.tools.checkstyle.checks.RegexpCheck/
error line=587 column=5 severity=error message=apos;}apos; should be 
on the same line. 
source=com.puppycrawl.tools.checkstyle.checks.blocks.RightCurlyCheck/
error line=588 severity=error message=Line matches the illegal pattern 
apos;Trailing whitespaceapos;. 
source=com.puppycrawl.tools.checkstyle.checks.RegexpCheck/
/file{noformat}
Kill the trailing spaces and move the else to the same line and we're good to 
go.

 Simplify boolean expression in BspService::checkpointFrequencyMet
 -

 Key: GIRAPH-87
 URL: https://issues.apache.org/jira/browse/GIRAPH-87
 Project: Giraph
  Issue Type: Improvement
Affects Versions: 0.2.0
Reporter: Jakob Homan
Assignee: Eli Reisman
  Labels: newbie
 Attachments: GIRAPH-87.patch


 {noformat}if (superstep  firstCheckpoint) {
 return false;
 } else if (((superstep - firstCheckpoint) % checkpointFrequency) == 
 0) {
 return true;
 } else {
 return false;
 }{noformat}
 can be simplified to just return the result of the else if evaluation.

--
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-85) Simplify return expression in RPCCommunications::getRPCProxy

2012-02-24 Thread Eli Reisman (Updated) (JIRA)

 [ 
https://issues.apache.org/jira/browse/GIRAPH-85?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Eli Reisman updated GIRAPH-85:
--

Attachment: GIRAPH-85.patch

Simplifies 2 return statements without changing program logic or flow. Passes 
mvn test but not tested on cluster.

 Simplify return expression in RPCCommunications::getRPCProxy
 

 Key: GIRAPH-85
 URL: https://issues.apache.org/jira/browse/GIRAPH-85
 Project: Giraph
  Issue Type: Improvement
Affects Versions: 0.2.0
Reporter: Jakob Homan
  Labels: newbie
 Fix For: 0.2.0

 Attachments: GIRAPH-85.patch


 Twice in RPCCommunications::getRPCProxy a local variable, proxy, is created 
 and immediately returned.  We can simplify this to just return the value.

--
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-85) Simplify return expression in RPCCommunications::getRPCProxy

2012-02-24 Thread Avery Ching (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/GIRAPH-85?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13216047#comment-13216047
 ] 

Avery Ching commented on GIRAPH-85:
---

please make sure it passes 'mvn verify' as well.  That will check rat and 
checkstyle.

 Simplify return expression in RPCCommunications::getRPCProxy
 

 Key: GIRAPH-85
 URL: https://issues.apache.org/jira/browse/GIRAPH-85
 Project: Giraph
  Issue Type: Improvement
Affects Versions: 0.2.0
Reporter: Jakob Homan
  Labels: newbie
 Fix For: 0.2.0

 Attachments: GIRAPH-85.patch


 Twice in RPCCommunications::getRPCProxy a local variable, proxy, is created 
 and immediately returned.  We can simplify this to just return the value.

--
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-87) Simplify boolean expression in BspService::checkpointFrequencyMet

2012-02-24 Thread Eli Reisman (Updated) (JIRA)

 [ 
https://issues.apache.org/jira/browse/GIRAPH-87?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Eli Reisman updated GIRAPH-87:
--

Attachment: GIRAPH-87.patch

This is an improved version of GIRAPH-87.patch that passes mvn 
checkstyle:check and of course also mvn test. Not tested on a cluster.

 Simplify boolean expression in BspService::checkpointFrequencyMet
 -

 Key: GIRAPH-87
 URL: https://issues.apache.org/jira/browse/GIRAPH-87
 Project: Giraph
  Issue Type: Improvement
Affects Versions: 0.2.0
Reporter: Jakob Homan
Assignee: Eli Reisman
  Labels: newbie
 Attachments: GIRAPH-87.patch, GIRAPH-87.patch


 {noformat}if (superstep  firstCheckpoint) {
 return false;
 } else if (((superstep - firstCheckpoint) % checkpointFrequency) == 
 0) {
 return true;
 } else {
 return false;
 }{noformat}
 can be simplified to just return the result of the else if evaluation.

--
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-85) Simplify return expression in RPCCommunications::getRPCProxy

2012-02-24 Thread Eli Reisman (Updated) (JIRA)

 [ 
https://issues.apache.org/jira/browse/GIRAPH-85?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Eli Reisman updated GIRAPH-85:
--

Attachment: GIRAPH-85.patch

This is an improved version of GIRAPH-85.patch done in redone in git and 
meeting the mvn test and mvn checkstyle:check guidelines. Not tested on 
cluster setup.

 Simplify return expression in RPCCommunications::getRPCProxy
 

 Key: GIRAPH-85
 URL: https://issues.apache.org/jira/browse/GIRAPH-85
 Project: Giraph
  Issue Type: Improvement
Affects Versions: 0.2.0
Reporter: Jakob Homan
  Labels: newbie
 Fix For: 0.2.0

 Attachments: GIRAPH-85.patch, GIRAPH-85.patch


 Twice in RPCCommunications::getRPCProxy a local variable, proxy, is created 
 and immediately returned.  We can simplify this to just return the value.

--
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-85) Simplify return expression in RPCCommunications::getRPCProxy

2012-02-24 Thread Eli Reisman (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/GIRAPH-85?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13216292#comment-13216292
 ] 

Eli Reisman commented on GIRAPH-85:
---

Hi Avery,

It passed mvn verify also, just ran it. Thanks!

 Simplify return expression in RPCCommunications::getRPCProxy
 

 Key: GIRAPH-85
 URL: https://issues.apache.org/jira/browse/GIRAPH-85
 Project: Giraph
  Issue Type: Improvement
Affects Versions: 0.2.0
Reporter: Jakob Homan
  Labels: newbie
 Fix For: 0.2.0

 Attachments: GIRAPH-85.patch, GIRAPH-85.patch


 Twice in RPCCommunications::getRPCProxy a local variable, proxy, is created 
 and immediately returned.  We can simplify this to just return the value.

--
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