[28/49] incubator-geode git commit: GEODE-1393 locator returns incorrect server information when starting up

2016-05-20 Thread klund
GEODE-1393 locator returns incorrect server information when starting up

When a locator auto-reconnects its ServerLocator needs to initialize its
ControllerAdvisor so that it has server information to give to clients.
The ServerLocator was creating a new ControllerAdvisor but didn't ask it
to perform a handshake to fill in its profiles.

ReconnectDUnitTest had an existing testReconnectWithQuorum test that
wasn't doing what it was supposed to.  I've removed the TODO from that
test and modified it to force-disconnect the tests Locator.  The
locator must restart its TcpServer component before it can start
a DistributedSystem, so this exercises the path in
InternalLocator.attemptReconnect() that boots the TcpServer prior to
connecting the DistributedSystem.  After the DistributedSystem
finishes reconnecting the ServerLocator's distribution advisor
should have been initialized by performing the handshake.


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/6523c97c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/6523c97c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/6523c97c

Branch: refs/heads/feature/GEODE-835-test
Commit: 6523c97c92f607746d80b11c7cb5315b1137f5a2
Parents: 92805bb
Author: Bruce Schuchardt 
Authored: Mon May 16 08:05:00 2016 -0700
Committer: Bruce Schuchardt 
Committed: Mon May 16 08:06:49 2016 -0700

--
 .../distributed/internal/InternalLocator.java   |  1 +
 .../distributed/internal/LocatorStats.java  | 31 ---
 .../distributed/internal/ServerLocator.java | 44 +++
 .../gemfire/cache30/ReconnectDUnitTest.java | 57 ++--
 .../internal/ServerLocatorJUnitTest.java|  0
 5 files changed, 53 insertions(+), 80 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6523c97c/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/InternalLocator.java
--
diff --git 
a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/InternalLocator.java
 
b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/InternalLocator.java
index 7effa3d..7ad57ad 100755
--- 
a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/InternalLocator.java
+++ 
b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/InternalLocator.java
@@ -1350,6 +1350,7 @@ public class InternalLocator extends Locator implements 
ConnectListener {
 return response;
   }
 }
+
 private JmxManagerLocatorResponse findJmxManager(JmxManagerLocatorRequest 
request) {
   JmxManagerLocatorResponse result = null;
   // NYI

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6523c97c/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/LocatorStats.java
--
diff --git 
a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/LocatorStats.java
 
b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/LocatorStats.java
old mode 100644
new mode 100755
index d42a2b4..1140b1f
--- 
a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/LocatorStats.java
+++ 
b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/LocatorStats.java
@@ -117,13 +117,6 @@ public class LocatorStats {
   }
   
   
-  /**
-   * Used by tests to create an instance given its already existings stats.
-   */
-  public LocatorStats(Statistics stats) {
-this._stats = stats;
-  }
-
   public final void setServerCount(int sc) {
 if(this._stats==null) {
   this.endpoints_known.set(sc);
@@ -140,14 +133,6 @@ public class LocatorStats {
 }
   }
   
-  public final void incLocatorRequests() {
-if(this._stats==null) {
-  this.requests_to_locator.incrementAndGet();
-} else {
-  this._stats.incLong(_REQUESTS_TO_LOCATOR, 1);
-}
-  }  
-  
   public final void endLocatorRequest(long startTime) {
 long took = DistributionStats.getStatTime()-startTime;
 if(this._stats==null) {
@@ -180,14 +165,6 @@ public class LocatorStats {
   
   
   
-  public final void incLocatorResponses() {
-if(this._stats==null) {
-  this.responses_from_locator.incrementAndGet();
-} else {
-  this._stats.incLong(_RESPONSES_FROM_LOCATOR, 1);
-}
-  }  
-  
   public final void setLocatorRequests(long rl) {
 if(this._stats==null) {
   this.requests_to_locator.set(rl);
@@ -218,14 +195,6 @@ public class LocatorStats {
 } else {
   this._stats.incLong(_SERVER_LOAD_UPDATES, 1);
 }
-  }  
-  
-  public void setRequestInProgress(int threads) {
-if(this._stats!=null) {
-  

[08/19] incubator-geode git commit: GEODE-1393 locator returns incorrect server information when starting up

2016-05-18 Thread klund
GEODE-1393 locator returns incorrect server information when starting up

When a locator auto-reconnects its ServerLocator needs to initialize its
ControllerAdvisor so that it has server information to give to clients.
The ServerLocator was creating a new ControllerAdvisor but didn't ask it
to perform a handshake to fill in its profiles.

ReconnectDUnitTest had an existing testReconnectWithQuorum test that
wasn't doing what it was supposed to.  I've removed the TODO from that
test and modified it to force-disconnect the tests Locator.  The
locator must restart its TcpServer component before it can start
a DistributedSystem, so this exercises the path in
InternalLocator.attemptReconnect() that boots the TcpServer prior to
connecting the DistributedSystem.  After the DistributedSystem
finishes reconnecting the ServerLocator's distribution advisor
should have been initialized by performing the handshake.


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/d08a047c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/d08a047c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/d08a047c

Branch: refs/heads/feature/GEODE-1392
Commit: d08a047c231d7f2820b4c9d41789caf1b1167be2
Parents: 8beb8af
Author: Bruce Schuchardt 
Authored: Mon May 16 08:05:00 2016 -0700
Committer: Kirk Lund 
Committed: Wed May 18 10:04:24 2016 -0700

--
 .../distributed/internal/InternalLocator.java   |  1 +
 .../distributed/internal/LocatorStats.java  | 31 ---
 .../distributed/internal/ServerLocator.java | 44 +++
 .../gemfire/cache30/ReconnectDUnitTest.java | 57 ++--
 .../internal/ServerLocatorJUnitTest.java|  0
 5 files changed, 53 insertions(+), 80 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/d08a047c/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/InternalLocator.java
--
diff --git 
a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/InternalLocator.java
 
b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/InternalLocator.java
index 7effa3d..7ad57ad 100755
--- 
a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/InternalLocator.java
+++ 
b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/InternalLocator.java
@@ -1350,6 +1350,7 @@ public class InternalLocator extends Locator implements 
ConnectListener {
 return response;
   }
 }
+
 private JmxManagerLocatorResponse findJmxManager(JmxManagerLocatorRequest 
request) {
   JmxManagerLocatorResponse result = null;
   // NYI

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/d08a047c/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/LocatorStats.java
--
diff --git 
a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/LocatorStats.java
 
b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/LocatorStats.java
old mode 100644
new mode 100755
index d42a2b4..1140b1f
--- 
a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/LocatorStats.java
+++ 
b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/LocatorStats.java
@@ -117,13 +117,6 @@ public class LocatorStats {
   }
   
   
-  /**
-   * Used by tests to create an instance given its already existings stats.
-   */
-  public LocatorStats(Statistics stats) {
-this._stats = stats;
-  }
-
   public final void setServerCount(int sc) {
 if(this._stats==null) {
   this.endpoints_known.set(sc);
@@ -140,14 +133,6 @@ public class LocatorStats {
 }
   }
   
-  public final void incLocatorRequests() {
-if(this._stats==null) {
-  this.requests_to_locator.incrementAndGet();
-} else {
-  this._stats.incLong(_REQUESTS_TO_LOCATOR, 1);
-}
-  }  
-  
   public final void endLocatorRequest(long startTime) {
 long took = DistributionStats.getStatTime()-startTime;
 if(this._stats==null) {
@@ -180,14 +165,6 @@ public class LocatorStats {
   
   
   
-  public final void incLocatorResponses() {
-if(this._stats==null) {
-  this.responses_from_locator.incrementAndGet();
-} else {
-  this._stats.incLong(_RESPONSES_FROM_LOCATOR, 1);
-}
-  }  
-  
   public final void setLocatorRequests(long rl) {
 if(this._stats==null) {
   this.requests_to_locator.set(rl);
@@ -218,14 +195,6 @@ public class LocatorStats {
 } else {
   this._stats.incLong(_SERVER_LOAD_UPDATES, 1);
 }
-  }  
-  
-  public void setRequestInProgress(int threads) {
-if(this._stats!=null) {
-  

incubator-geode git commit: GEODE-1393 locator returns incorrect server information when starting up

2016-05-16 Thread bschuchardt
Repository: incubator-geode
Updated Branches:
  refs/heads/develop 92805bbb9 -> 6523c97c9


GEODE-1393 locator returns incorrect server information when starting up

When a locator auto-reconnects its ServerLocator needs to initialize its
ControllerAdvisor so that it has server information to give to clients.
The ServerLocator was creating a new ControllerAdvisor but didn't ask it
to perform a handshake to fill in its profiles.

ReconnectDUnitTest had an existing testReconnectWithQuorum test that
wasn't doing what it was supposed to.  I've removed the TODO from that
test and modified it to force-disconnect the tests Locator.  The
locator must restart its TcpServer component before it can start
a DistributedSystem, so this exercises the path in
InternalLocator.attemptReconnect() that boots the TcpServer prior to
connecting the DistributedSystem.  After the DistributedSystem
finishes reconnecting the ServerLocator's distribution advisor
should have been initialized by performing the handshake.


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/6523c97c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/6523c97c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/6523c97c

Branch: refs/heads/develop
Commit: 6523c97c92f607746d80b11c7cb5315b1137f5a2
Parents: 92805bb
Author: Bruce Schuchardt 
Authored: Mon May 16 08:05:00 2016 -0700
Committer: Bruce Schuchardt 
Committed: Mon May 16 08:06:49 2016 -0700

--
 .../distributed/internal/InternalLocator.java   |  1 +
 .../distributed/internal/LocatorStats.java  | 31 ---
 .../distributed/internal/ServerLocator.java | 44 +++
 .../gemfire/cache30/ReconnectDUnitTest.java | 57 ++--
 .../internal/ServerLocatorJUnitTest.java|  0
 5 files changed, 53 insertions(+), 80 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6523c97c/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/InternalLocator.java
--
diff --git 
a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/InternalLocator.java
 
b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/InternalLocator.java
index 7effa3d..7ad57ad 100755
--- 
a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/InternalLocator.java
+++ 
b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/InternalLocator.java
@@ -1350,6 +1350,7 @@ public class InternalLocator extends Locator implements 
ConnectListener {
 return response;
   }
 }
+
 private JmxManagerLocatorResponse findJmxManager(JmxManagerLocatorRequest 
request) {
   JmxManagerLocatorResponse result = null;
   // NYI

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6523c97c/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/LocatorStats.java
--
diff --git 
a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/LocatorStats.java
 
b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/LocatorStats.java
old mode 100644
new mode 100755
index d42a2b4..1140b1f
--- 
a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/LocatorStats.java
+++ 
b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/LocatorStats.java
@@ -117,13 +117,6 @@ public class LocatorStats {
   }
   
   
-  /**
-   * Used by tests to create an instance given its already existings stats.
-   */
-  public LocatorStats(Statistics stats) {
-this._stats = stats;
-  }
-
   public final void setServerCount(int sc) {
 if(this._stats==null) {
   this.endpoints_known.set(sc);
@@ -140,14 +133,6 @@ public class LocatorStats {
 }
   }
   
-  public final void incLocatorRequests() {
-if(this._stats==null) {
-  this.requests_to_locator.incrementAndGet();
-} else {
-  this._stats.incLong(_REQUESTS_TO_LOCATOR, 1);
-}
-  }  
-  
   public final void endLocatorRequest(long startTime) {
 long took = DistributionStats.getStatTime()-startTime;
 if(this._stats==null) {
@@ -180,14 +165,6 @@ public class LocatorStats {
   
   
   
-  public final void incLocatorResponses() {
-if(this._stats==null) {
-  this.responses_from_locator.incrementAndGet();
-} else {
-  this._stats.incLong(_RESPONSES_FROM_LOCATOR, 1);
-}
-  }  
-  
   public final void setLocatorRequests(long rl) {
 if(this._stats==null) {
   this.requests_to_locator.set(rl);
@@ -218,14 +195,6 @@ public class LocatorStats {
 } else {
   this._stats.incLong(_SERVER_LOAD_UPDATES, 1);
 }
-  }  
-  
-  public