[GitHub] storm pull request #2839: STORM-3228 allow refernce counting of differing Po...

2018-09-18 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/storm/pull/2839


---


[GitHub] storm pull request #2839: STORM-3228 allow refernce counting of differing Po...

2018-09-18 Thread revans2
Github user revans2 commented on a diff in the pull request:

https://github.com/apache/storm/pull/2839#discussion_r218564458
  
--- Diff: 
storm-server/src/main/java/org/apache/storm/localizer/TimePortAndAssignment.java
 ---
@@ -48,4 +48,29 @@ public LocalAssignment getAssignment() {
 public void complete() {
 stopTiming();
 }
+
+@Override
+public String toString() {
+return "TimePortAndAssignment{" + 
getAssignment().get_topology_id() + " on " + getPort() + "}";
+}
+
+/**
+ * All implementations of PortAndAssignment should implement the same 
hashCode() method
+ */
+@Override
+public int hashCode() {
+return (17 * getPort()) + getAssignment().hashCode();
+}
+
+/**
+ * All implementations of PortAndAssignment should implement the same 
equals() method
--- End diff --

Checkstyle: missing period here too.


---


[GitHub] storm pull request #2839: STORM-3228 allow refernce counting of differing Po...

2018-09-18 Thread revans2
Github user revans2 commented on a diff in the pull request:

https://github.com/apache/storm/pull/2839#discussion_r218564297
  
--- Diff: 
storm-server/src/main/java/org/apache/storm/localizer/PortAndAssignmentImpl.java
 ---
@@ -45,14 +48,17 @@ public String getOwner() {
 return assignment.get_owner();
 }
 
+/**
+ * All implementations of PortAndAssignment should implement the same 
hashCode() method
--- End diff --

checkstyle: missing period at the end of this.


---


[GitHub] storm pull request #2839: STORM-3228 allow refernce counting of differing Po...

2018-09-18 Thread revans2
Github user revans2 commented on a diff in the pull request:

https://github.com/apache/storm/pull/2839#discussion_r218564194
  
--- Diff: 
storm-server/src/main/java/org/apache/storm/localizer/PortAndAssignmentImpl.java
 ---
@@ -26,13 +26,16 @@ public PortAndAssignmentImpl(int port, LocalAssignment 
assignment) {
 this.assignment = assignment;
 }
 
+/**
+ * All implementations of PortAndAssignment should implement the same 
equals() method
--- End diff --

checkstyle: missing period at the end of this.


---


[GitHub] storm pull request #2839: STORM-3228 allow refernce counting of differing Po...

2018-09-18 Thread revans2
Github user revans2 commented on a diff in the pull request:

https://github.com/apache/storm/pull/2839#discussion_r218564410
  
--- Diff: 
storm-server/src/main/java/org/apache/storm/localizer/TimePortAndAssignment.java
 ---
@@ -48,4 +48,29 @@ public LocalAssignment getAssignment() {
 public void complete() {
 stopTiming();
 }
+
+@Override
+public String toString() {
+return "TimePortAndAssignment{" + 
getAssignment().get_topology_id() + " on " + getPort() + "}";
+}
+
+/**
+ * All implementations of PortAndAssignment should implement the same 
hashCode() method
--- End diff --

checkstyle: missing period here too.


---


[GitHub] storm pull request #2839: STORM-3228 allow refernce counting of differing Po...

2018-09-17 Thread agresch
GitHub user agresch opened a pull request:

https://github.com/apache/storm/pull/2839

STORM-3228 allow refernce counting of differing PortAndAssignment obj…

…ects to work properly

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/agresch/storm agresch_storm-3228

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/storm/pull/2839.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 #2839


commit 5c47b2d7c1f3628c892e16b4d0f2dc78beddbb28
Author: Aaron Gresch 
Date:   2018-09-17T17:58:31Z

STORM-3228 allow refernce counting of differing PortAndAssignment objects 
to work properly




---