[geode-native] branch develop updated: GEODE-6007: Fix missing servers_ variable (#519)

2019-09-12 Thread bbender
This is an automated email from the ASF dual-hosted git repository.

bbender pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/geode-native.git


The following commit(s) were added to refs/heads/develop by this push:
 new f1ae95c  GEODE-6007: Fix missing servers_ variable (#519)
f1ae95c is described below

commit f1ae95cf997588855f4adaeb7140b04b43e45ebb
Author: M. Oleske 
AuthorDate: Thu Sep 12 13:50:27 2019 -0700

GEODE-6007: Fix missing servers_ variable (#519)

Authored-by Michael Oleske 
---
 clicache/integration-test2/Cluster.cs | 1 +
 1 file changed, 1 insertion(+)

diff --git a/clicache/integration-test2/Cluster.cs 
b/clicache/integration-test2/Cluster.cs
index 8ccfe00..8ceb219 100644
--- a/clicache/integration-test2/Cluster.cs
+++ b/clicache/integration-test2/Cluster.cs
@@ -32,6 +32,7 @@ namespace Apache.Geode.Client.IntegrationTests
 private int serverCount_;
 private bool started_;
 private List locators_;
+private List servers_;
 private string name_;
 internal int jmxManagerPort = Framework.FreeTcpPort();
 internal string keyStore_ = Environment.CurrentDirectory + 
"/ServerSslKeys/server_keystore.jks";



[geode] branch feature/GEODE-7196 created (now ca27333)

2019-09-12 Thread bschuchardt
This is an automated email from the ASF dual-hosted git repository.

bschuchardt pushed a change to branch feature/GEODE-7196
in repository https://gitbox.apache.org/repos/asf/geode.git.


  at ca27333  remove membership collections from ClusterDistributionManager

This branch includes the following new commits:

 new 8e5130a  GEODE-7196 Simplify ClusterDistributionManage
 new ca27333  remove membership collections from ClusterDistributionManager

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.




[geode-native] branch develop updated: GEODE-6007: Fix LGTM issues (#517)

2019-09-12 Thread bbender
This is an automated email from the ASF dual-hosted git repository.

bbender pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/geode-native.git


The following commit(s) were added to refs/heads/develop by this push:
 new 104bda4  GEODE-6007: Fix LGTM issues (#517)
104bda4 is described below

commit 104bda4c872b0eda73bc70b70a51abd7e4a11381
Author: Blake Bender 
AuthorDate: Thu Sep 12 12:13:16 2019 -0700

GEODE-6007: Fix LGTM issues (#517)

* Fix most of the LGTM issues.  There are a few stragglers, but it's 
difficult to find them in the LGTM web UI among the 80+ others, so we'll fix 
these and reassess.
---
 clicache/integration-test/PutGetTestsN.cs  |  4 +--
 clicache/integration-test/ThinClientPdxTests1.cs   | 15 +--
 clicache/integration-test/ThinClientPdxTests3.cs   |  2 --
 clicache/integration-test/UnitTestsN.cs|  2 +-
 clicache/integration-test2/Cluster.cs  |  1 -
 cppcache/include/geode/RegionAttributesFactory.hpp |  2 ++
 cppcache/src/CacheImpl.cpp |  4 +--
 cppcache/src/CacheImpl.hpp |  4 +--
 cppcache/src/CacheXmlParser.cpp|  3 ++-
 cppcache/src/ClientMetadata.cpp|  7 ++---
 cppcache/src/ClientMetadataService.cpp | 26 ++-
 cppcache/src/CqQueryImpl.cpp   |  2 +-
 cppcache/src/DataOutput.cpp|  2 +-
 cppcache/src/EntryExpiryHandler.cpp|  4 +--
 cppcache/src/FairQueue.hpp |  2 +-
 cppcache/src/LocalRegion.cpp   | 23 +
 cppcache/src/MapEntry.hpp  |  2 +-
 cppcache/src/PdxLocalReader.cpp|  2 +-
 cppcache/src/PdxType.cpp   |  4 +--
 cppcache/src/PreservedDataExpiryHandler.cpp|  2 +-
 cppcache/src/RegionExpiryHandler.cpp   |  2 +-
 cppcache/src/TcpConn.cpp   |  2 +-
 cppcache/src/TcpSslConn.cpp|  2 +-
 cppcache/src/TcrConnection.cpp |  6 ++---
 cppcache/src/TcrConnection.hpp |  4 +--
 cppcache/src/TcrConnectionManager.cpp  |  4 +--
 cppcache/src/TcrEndpoint.cpp   |  2 +-
 cppcache/src/TcrEndpoint.hpp   |  4 +--
 cppcache/src/TcrMessage.cpp|  8 +++---
 cppcache/src/ThinClientPoolDM.cpp  |  4 +--
 cppcache/src/ThinClientRedundancyManager.cpp   | 22 
 cppcache/src/ThinClientRegion.cpp  | 30 --
 examples/dotnet/functionexecution/Program.cs   |  2 +-
 33 files changed, 100 insertions(+), 105 deletions(-)

diff --git a/clicache/integration-test/PutGetTestsN.cs 
b/clicache/integration-test/PutGetTestsN.cs
index bb6add6..74a7f40 100644
--- a/clicache/integration-test/PutGetTestsN.cs
+++ b/clicache/integration-test/PutGetTestsN.cs
@@ -240,8 +240,8 @@ namespace Apache.Geode.Client.UnitTests
 catch (Exception ex)
 {
   Util.Log("Exception: Put caused networkhop ");
-  Util.Log("Got Exception (0} {1} {2} ", ex.Message, ex.StackTrace, 
ex.Source);
-  Assert.Fail("Got Exception (0} {1} {2} ", ex.Message, ex.StackTrace, 
ex.Source);
+  Util.Log("Got Exception {0} {1} {2} ", ex.Message, ex.StackTrace, 
ex.Source);
+  Assert.Fail("Got Exception {0} {1} {2} ", ex.Message, ex.StackTrace, 
ex.Source);
 }
   }
 
diff --git a/clicache/integration-test/ThinClientPdxTests1.cs 
b/clicache/integration-test/ThinClientPdxTests1.cs
index 5982b55..d00cb24 100755
--- a/clicache/integration-test/ThinClientPdxTests1.cs
+++ b/clicache/integration-test/ThinClientPdxTests1.cs
@@ -1258,10 +1258,6 @@ namespace Apache.Geode.Client.UnitTests
 
 private Hashtable _hashTable;
 
-//private int arrayCountS3= 10;
-private List _addressListObj;
-//private Address[] _arrayOfAddress;
-
 public SerializePdx3()
   : base()
 {
@@ -1281,23 +1277,14 @@ namespace Apache.Geode.Client.UnitTests
 
 _addressList = new ArrayList();
 _hashTable = new Hashtable();
-_addressListObj = new List();
 
 for (var i = 0; i < 10; i++)
 {
   _addressList.Add(new Address(i));
   _hashTable.Add(i, new SerializePdx2(true));
-  _addressListObj.Add(new Address(i));
 }
 
 _address = new Address(nAddress);
-
-//_arrayOfAddress = new Address[3];
-
-//for (int i = 0; i < 3; i++)
-//{
-//  _arrayOfAddress[i] = new Address(i);
-//}
   }
 }
 
@@ -1885,7 +1872,7 @@ namespace Apache.Geode.Client.UnitTests
 {
   Key = key.ToString();
   SecKey = key;
-  ShareQuantity = key * 9278;
+  ShareQuantity = (double)((long)key * 9278L);
   Cost = ShareQuantity * 100;
   Price = Cost * 10;
   

[geode] branch develop updated (3c2a906 -> b0f2407)

2019-09-12 Thread zhouxj
This is an automated email from the ASF dual-hosted git repository.

zhouxj pushed a change to branch develop
in repository https://gitbox.apache.org/repos/asf/geode.git.


from 3c2a906  Merge pull request #4046 from 
BenjaminPerryRoss/feature/GEODE-7179
 new 575c6ba  GEODE-7128: APIs and GFSH commands to resume AEQ processing
 new 688b308  Renamed resume AEQ command to be more specific
 new 374bb53  Spotless
 new 922ecfb  Fixed Unit and Integration Test issues
 new 7ca5cc1  Spotless
 new 0903ec7  Removed ConverterHint from resume AEQ command
 new f019dd9  Added test logic for unpaused AEQ to DUnit test
 new d611072  Trigger pre-checkin
 new 240dfe7  Spotless
 new fd828f1  Trigger Pre-checkin
 new b0f2407  Merge pull request #4034 from 
BenjaminPerryRoss/feature/GEODE-7128

The 8362 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../ResumeAsyncEventQueueDispatcherDUnitTest.java  | 91 ++
 .../cli/commands/CommandAvailabilityIndicator.java |  3 +-
 ...=> ResumeAsyncEventQueueDispatcherCommand.java} | 52 +++--
 .../ResumeAsyncEventQueueDispatcherFunction.java   | 54 +
 .../management/internal/cli/i18n/CliStrings.java   | 11 +++
 .../sanctioned-geode-core-serializables.txt|  1 +
 ...ResumeAsyncEventQueueDispatcherCommandTest.java | 71 +
 7 files changed, 257 insertions(+), 26 deletions(-)
 create mode 100644 
geode-core/src/distributedTest/java/org/apache/geode/management/internal/cli/commands/ResumeAsyncEventQueueDispatcherDUnitTest.java
 copy 
geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/{CloseDurableClientCommand.java
 => ResumeAsyncEventQueueDispatcherCommand.java} (54%)
 create mode 100644 
geode-core/src/main/java/org/apache/geode/management/internal/cli/functions/ResumeAsyncEventQueueDispatcherFunction.java
 create mode 100644 
geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/ResumeAsyncEventQueueDispatcherCommandTest.java



[geode-native] branch develop updated: GEODE-7180: Disable IPv6 support by default (#518)

2019-09-12 Thread bbender
This is an automated email from the ASF dual-hosted git repository.

bbender pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/geode-native.git


The following commit(s) were added to refs/heads/develop by this push:
 new 55e0a76  GEODE-7180: Disable IPv6 support by default (#518)
55e0a76 is described below

commit 55e0a7659427fb72f3b312cd226035edf8f5cc1a
Author: Blake Bender 
AuthorDate: Thu Sep 12 11:03:19 2019 -0700

GEODE-7180: Disable IPv6 support by default (#518)

* GEODE-7180: Disable IPv6 support in ACE via ifdef
* Fix cmake option name to agree with ifdef
* Change define from WITH_IPV6 to USE_IPV6, for consistency with others
* Also use cmakedefine in ACE config file
* verified WITH_IPV6 can be switched to turn support on/off

Co-authored-by: Vince Ford 
---
 CMakeLists.txt   | 1 +
 cppcache/src/PoolFactory.cpp | 4 
 cppcache/src/TcpConn.cpp | 4 
 cppcache/src/config.h.in | 2 ++
 dependencies/ACE/config.h.in | 3 +++
 5 files changed, 14 insertions(+)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index f3dd50c..8a0b33f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -19,6 +19,7 @@ project(nativeclient LANGUAGES C CXX)
 option(USE_PCH "Use precompiled headers (PCH)." OFF)
 option(USE_CPP_COVERAGE "Enable profiling and coverage report analysis for 
apache-geode cpp library." OFF)
 option(USE_RAT "Enable Apache Rat checking." OFF)
+option(WITH_IPV6 "Enable IPv6 support." OFF)
 
 list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
 
diff --git a/cppcache/src/PoolFactory.cpp b/cppcache/src/PoolFactory.cpp
index 1f42345..9a5908f 100644
--- a/cppcache/src/PoolFactory.cpp
+++ b/cppcache/src/PoolFactory.cpp
@@ -308,6 +308,7 @@ PoolFactory& PoolFactory::addCheck(const std::string& host, 
int port) {
   }
 
   ACE_INET_Addr addr(port, host.c_str());
+#ifdef WITH_IPV6
   // check unknown host
   const int maxlength = 256;
   const int maxhostlength = 256;
@@ -319,6 +320,9 @@ PoolFactory& PoolFactory::addCheck(const std::string& host, 
int port) {
 
   if ((strcmp(char_localhost, host.c_str()) != 0) &&
   (strcmp(char_localhost, char_array) == 0)) {
+#else
+  if (!(addr.get_ip_address())) {
+#endif
 throw IllegalArgumentException("Unknown host " + host);
   }
   return *this;
diff --git a/cppcache/src/TcpConn.cpp b/cppcache/src/TcpConn.cpp
index 7cee9ab..95d101f 100644
--- a/cppcache/src/TcpConn.cpp
+++ b/cppcache/src/TcpConn.cpp
@@ -94,7 +94,11 @@ void TcpConn::createSocket(ACE_HANDLE sock) {
 }
 
 void TcpConn::init() {
+#ifdef WITH_IPV6
   ACE_HANDLE sock = ACE_OS::socket(m_addr.get_type(), SOCK_STREAM, 0);
+#else
+  ACE_HANDLE sock = ACE_OS::socket(AF_INET, SOCK_STREAM, 0);
+#endif
   if (sock == ACE_INVALID_HANDLE) {
 int32_t lastError = ACE_OS::last_error();
 LOGERROR("Failed to create socket. Errno: %d: %s", lastError,
diff --git a/cppcache/src/config.h.in b/cppcache/src/config.h.in
index c2a283f..e511793 100644
--- a/cppcache/src/config.h.in
+++ b/cppcache/src/config.h.in
@@ -55,4 +55,6 @@
 #define ACE_Thread_NULL 0
 #endif
 
+#cmakedefine WITH_IPV6
+
 #endif  // GEODE_CONFIG_H_
diff --git a/dependencies/ACE/config.h.in b/dependencies/ACE/config.h.in
index 46d56ae..b6ee2e8 100755
--- a/dependencies/ACE/config.h.in
+++ b/dependencies/ACE/config.h.in
@@ -27,7 +27,10 @@
 
 #endif // __cplusplus >= 201103L
 
+#cmakedefine WITH_IPV6
+#ifdef WITH_IPV6
 #define ACE_HAS_IPV6 1
+#endif
 
 #include "ace/config-@ACE_CONFIG@.h"
 



[geode-benchmarks] branch develop updated: Prevent too many keys being offered to ssh server (#103)

2019-09-12 Thread jbarrett
This is an automated email from the ASF dual-hosted git repository.

jbarrett pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/geode-benchmarks.git


The following commit(s) were added to refs/heads/develop by this push:
 new 5062dcc  Prevent too many keys being offered to ssh server (#103)
5062dcc is described below

commit 5062dccfa91cb6acebb18cd396810932bce1163a
Author: Donal Evans 
AuthorDate: Thu Sep 12 11:01:03 2019 -0700

Prevent too many keys being offered to ssh server (#103)
---
 infrastructure/scripts/aws/copy_to_cluster.sh | 2 +-
 infrastructure/scripts/aws/run_on_cluster.sh  | 2 +-
 infrastructure/scripts/aws/run_tests.sh   | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/infrastructure/scripts/aws/copy_to_cluster.sh 
b/infrastructure/scripts/aws/copy_to_cluster.sh
index 9b9a95c..9ae5fdc 100755
--- a/infrastructure/scripts/aws/copy_to_cluster.sh
+++ b/infrastructure/scripts/aws/copy_to_cluster.sh
@@ -60,7 +60,7 @@ if [[ -z "${AWS_ACCESS_KEY_ID}" ]]; then
   export AWS_PROFILE="geode-benchmarks"
 fi
 
-SSH_OPTIONS="-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i 
~/.geode-benchmarks/${TAG}-privkey.pem"
+SSH_OPTIONS="-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o 
IdentitiesOnly=yes -i ~/.geode-benchmarks/${TAG}-privkey.pem"
 HOSTS=`aws ec2 describe-instances --query 
'Reservations[*].Instances[*].PublicIpAddress' --filter 
"Name=tag:geode-benchmarks,Values=${TAG}" --output text`
 
 for host in ${HOSTS}; do
diff --git a/infrastructure/scripts/aws/run_on_cluster.sh 
b/infrastructure/scripts/aws/run_on_cluster.sh
index b959221..bcc218b 100755
--- a/infrastructure/scripts/aws/run_on_cluster.sh
+++ b/infrastructure/scripts/aws/run_on_cluster.sh
@@ -60,7 +60,7 @@ if [[ -z "${AWS_ACCESS_KEY_ID}" ]]; then
   export AWS_PROFILE="geode-benchmarks"
 fi
 
-SSH_OPTIONS="-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i 
~/.geode-benchmarks/${TAG}-privkey.pem"
+SSH_OPTIONS="-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o 
IdentitiesOnly=yes -i ~/.geode-benchmarks/${TAG}-privkey.pem"
 HOSTS=`aws ec2 describe-instances --query 
'Reservations[*].Instances[*].PublicIpAddress' --filter 
"Name=tag:geode-benchmarks,Values=${TAG}" --output text`
 
 for host in ${HOSTS}; do
diff --git a/infrastructure/scripts/aws/run_tests.sh 
b/infrastructure/scripts/aws/run_tests.sh
index 3dd4d0d..39d3590 100755
--- a/infrastructure/scripts/aws/run_tests.sh
+++ b/infrastructure/scripts/aws/run_tests.sh
@@ -141,7 +141,7 @@ fixRepoName() {
 BENCHMARK_REPO=$(fixRepoName ${BENCHMARK_REPO})
 REPO=$(fixRepoName ${REPO})
 
-SSH_OPTIONS="-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i 
~/.geode-benchmarks/${TAG}-privkey.pem"
+SSH_OPTIONS="-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o 
IdentitiesOnly=yes -i ~/.geode-benchmarks/${TAG}-privkey.pem"
 HOSTS=`aws ec2 describe-instances --query 
'Reservations[*].Instances[*].PrivateIpAddress' --filter 
"Name=tag:geode-benchmarks,Values=${TAG}" --output text`
 HOSTS=$(echo ${HOSTS} | tr ' ' ',')
 FIRST_INSTANCE=`aws ec2 describe-instances --query 
'Reservations[*].Instances[*].PublicIpAddress' --filter 
"Name=tag:geode-benchmarks,Values=${TAG}" --output text | cut -f 1`



[geode-benchmarks] branch develop updated: Check that security group exists (#107)

2019-09-12 Thread heybales
This is an automated email from the ASF dual-hosted git repository.

heybales pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/geode-benchmarks.git


The following commit(s) were added to refs/heads/develop by this push:
 new be2ab2f  Check that security group exists (#107)
be2ab2f is described below

commit be2ab2f60e765b09c71a4bcc961b709468b30384
Author: Kamilla Aslami 
AuthorDate: Thu Sep 12 10:57:44 2019 -0700

Check that security group exists (#107)

* Check that security group exists
* Throw an exception after max retries + refactoring
---
 .../geode/infrastructure/aws/LaunchCluster.java| 54 --
 1 file changed, 51 insertions(+), 3 deletions(-)

diff --git 
a/infrastructure/src/main/java/org/apache/geode/infrastructure/aws/LaunchCluster.java
 
b/infrastructure/src/main/java/org/apache/geode/infrastructure/aws/LaunchCluster.java
index 5401a1c..339fbd0 100644
--- 
a/infrastructure/src/main/java/org/apache/geode/infrastructure/aws/LaunchCluster.java
+++ 
b/infrastructure/src/main/java/org/apache/geode/infrastructure/aws/LaunchCluster.java
@@ -47,6 +47,9 @@ import 
software.amazon.awssdk.services.ec2.model.CreateTagsRequest;
 import software.amazon.awssdk.services.ec2.model.DescribeImagesRequest;
 import software.amazon.awssdk.services.ec2.model.DescribeInstancesRequest;
 import software.amazon.awssdk.services.ec2.model.DescribeInstancesResponse;
+import software.amazon.awssdk.services.ec2.model.DescribeSecurityGroupsRequest;
+import 
software.amazon.awssdk.services.ec2.model.DescribeSecurityGroupsResponse;
+import software.amazon.awssdk.services.ec2.model.Ec2Exception;
 import software.amazon.awssdk.services.ec2.model.Filter;
 import software.amazon.awssdk.services.ec2.model.Image;
 import software.amazon.awssdk.services.ec2.model.Instance;
@@ -65,6 +68,8 @@ import software.amazon.awssdk.services.ec2.model.VolumeType;
 import org.apache.geode.infrastructure.BenchmarkMetadata;
 
 public class LaunchCluster {
+  private static final long MAX_WAIT_INTERVAL = 2000;
+  private static final int MAX_RETRIES = 5;
   static Ec2Client ec2 = Ec2Client.create();
 
   public static void main(String[] args) throws IOException, 
InterruptedException {
@@ -85,6 +90,7 @@ public class LaunchCluster {
 
 createPlacementGroup(benchmarkTag);
 createSecurityGroup(benchmarkTag, tags);
+authorizeSecurityGroup(benchmarkTag);
 createLaunchTemplate(benchmarkTag, newestImage);
 
 List instanceIds = launchInstances(benchmarkTag, tags, count);
@@ -235,21 +241,55 @@ public class LaunchCluster {
 System.out.println("Launch Template for cluster '" + benchmarkTag + "' 
created.");
   }
 
-  private static void createSecurityGroup(String benchmarkTag, List tags) 
{
-// Make a security group for the launch template
+  /*
+   * Create the security group and wait until it is visible to subsequent 
commands.
+   * This avoids issues caused by Amazon EC2 API eventual consistency model.
+   */
+  private static void createSecurityGroup(String benchmarkTag, List tags)
+  throws InterruptedException {
 CreateSecurityGroupResponse csgr = 
ec2.createSecurityGroup(CreateSecurityGroupRequest.builder()
 .groupName(AwsBenchmarkMetadata.securityGroup(benchmarkTag))
 .description(AwsBenchmarkMetadata.securityGroup(benchmarkTag))
 .build());
+
 String groupId = csgr.groupId();
+int retries = 0;
+DescribeSecurityGroupsRequest describeSecurityGroupsRequest =
+DescribeSecurityGroupsRequest.builder().groupIds(groupId).build();
+DescribeSecurityGroupsResponse describeSecurityGroupsResponse;
+
+while (true) {
+  try {
+describeSecurityGroupsResponse = 
ec2.describeSecurityGroups(describeSecurityGroupsRequest);
+
+if (!describeSecurityGroupsResponse.securityGroups().isEmpty()) {
+  System.out.println("SecurityGroup with id '" + groupId
+  + "' is created and visible to subsequent commands.");
+  break;
+}
+  } catch (Ec2Exception e) {
+System.out.println(e.getMessage());
+// will retry or return from the method
+  }
+  if (++retries >= MAX_RETRIES) {
+throw new RuntimeException("Security Group with id '" + groupId
++ "' was not created or is invisible to subsequent commands.");
+  }
+  Thread.sleep(Math.min(getWaitTimeExp(retries), MAX_WAIT_INTERVAL));
+}
 
ec2.createTags(CreateTagsRequest.builder().resources(groupId).tags(tags).build());
 System.out.println("Security Group for cluster '" + benchmarkTag + "' 
created.");
+  }
 
-// Allow all members of the security group to freely talk to each other
+  /*
+   * Allow all members of the security group to freely talk to each other.
+   */
+  private static void authorizeSecurityGroup(String benchmarkTag) {
 
ec2.authorizeSecurityGroupIngress(AuthorizeSecurityGroupIngressRequest.builder()
 

[geode-benchmarks] branch develop updated: Add *LongBenchmark (#110)

2019-09-12 Thread heybales
This is an automated email from the ASF dual-hosted git repository.

heybales pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/geode-benchmarks.git


The following commit(s) were added to refs/heads/develop by this push:
 new bffbb22  Add *LongBenchmark (#110)
bffbb22 is described below

commit bffbb225038e838413b4a7218668d249f0404c55
Author: Kamilla Aslami 
AuthorDate: Thu Sep 12 10:52:13 2019 -0700

Add *LongBenchmark (#110)

Add prefill and benchmarks using Longs
---
 .../benchmark/tasks/PrePopulateRegionLong.java | 114 +
 .../tests/PartitionedGetLongBenchmark.java |  65 
 .../tests/PartitionedPutAllLongBenchmark.java  |  66 
 .../tests/PartitionedPutLongBenchmark.java |  64 
 .../tests/ReplicatedGetLongBenchmark.java  |  65 
 .../tests/ReplicatedPutAllLongBenchmark.java   |  66 
 .../tests/ReplicatedPutLongBenchmark.java  |  64 
 .../benchmark/tasks/PrePopulateRegionLongTest.java |  66 
 .../tests/PartitionedGetLongBenchmarkTest.java |  47 +
 .../tests/PartitionedPutAllBenchmarkTest.java  |  51 +
 .../tests/PartitionedPutAllLongBenchmarkTest.java  |  51 +
 .../tests/PartitionedPutLongBenchmarkTest.java |  51 +
 .../tests/ReplicatedGetLongBenchmarkTest.java  |  47 +
 .../tests/ReplicatedPutLongBenchmarkTest.java  |  49 +
 14 files changed, 866 insertions(+)

diff --git 
a/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tasks/PrePopulateRegionLong.java
 
b/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tasks/PrePopulateRegionLong.java
new file mode 100644
index 000..7d6564b
--- /dev/null
+++ 
b/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tasks/PrePopulateRegionLong.java
@@ -0,0 +1,114 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.geode.benchmark.tasks;
+
+import static 
org.apache.geode.benchmark.topology.ClientServerTopology.Roles.CLIENT;
+import static 
org.apache.geode.benchmark.topology.ClientServerTopology.Roles.LOCATOR;
+import static 
org.apache.geode.benchmark.topology.ClientServerTopology.Roles.SERVER;
+
+import java.time.Duration;
+import java.time.Instant;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.CompletableFuture;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.TimeUnit;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import org.apache.geode.benchmark.LongRange;
+import org.apache.geode.cache.Region;
+import org.apache.geode.cache.client.ClientCache;
+import org.apache.geode.cache.client.ClientCacheFactory;
+import org.apache.geode.perftest.Task;
+import org.apache.geode.perftest.TestContext;
+
+
+public class PrePopulateRegionLong implements Task {
+  private static final Logger logger = 
LoggerFactory.getLogger(PrePopulateRegionLong.class);
+
+  private LongRange keyRangeToPrepopulate = new LongRange(0, 1);
+  private int batchSize = 1000;
+
+  public PrePopulateRegionLong() {}
+
+  public PrePopulateRegionLong(LongRange keyRangeToPrepopulate) {
+this.keyRangeToPrepopulate = keyRangeToPrepopulate;
+  }
+
+  /**
+   * This method prepopulates the region before the actual benchmark starts.
+   */
+  @Override
+  public void run(TestContext context) throws InterruptedException {
+final ClientCache cache = ClientCacheFactory.getAnyInstance();
+final Region region = cache.getRegion("region");
+final int numLocators = context.getHostsIDsForRole(LOCATOR).size();
+final int numServers = context.getHostsIDsForRole(SERVER).size();
+final int numClient = context.getHostsIDsForRole(CLIENT).size();
+final int jvmID = context.getJvmID();
+final int clientIndex = jvmID - numLocators - numServers;
+
+run(region, keyRangeToPrepopulate.sliceFor(numClient, clientIndex));
+  }
+
+  void run(final Map region, final LongRange range) throws 
InterruptedException {
+logger.info("***");

[geode] branch develop updated (91176d6 -> 3c2a906)

2019-09-12 Thread zhouxj
This is an automated email from the ASF dual-hosted git repository.

zhouxj pushed a change to branch develop
in repository https://gitbox.apache.org/repos/asf/geode.git.


from 91176d6  GEODE-7178: Check operation if instance of Byte and Destroy 
for older… (#4041)
 new d91bf15  GEODE-7179: alter async queue command to change state of 
event processor during creation.
 new 6ccf66e  Replaced junit.Assert usage with assertj
 new 80976b6  Replace magic numbers with references to fields
 new 3c2a906  Merge pull request #4046 from 
BenjaminPerryRoss/feature/GEODE-7179

The 8351 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../AlterAsyncEventQueueCommandDUnitTest.java  | 147 +++--
 .../cli/commands/AlterAsyncEventQueueCommand.java  |  12 +-
 2 files changed, 147 insertions(+), 12 deletions(-)



[geode] branch develop updated (21ae51e -> 91176d6)

2019-09-12 Thread moleske
This is an automated email from the ASF dual-hosted git repository.

moleske pushed a change to branch develop
in repository https://gitbox.apache.org/repos/asf/geode.git.


from 21ae51e  GEODE-7193: add entry-idle-time and entry-time-to-live to 
region attributes
 add 91176d6  GEODE-7178: Check operation if instance of Byte and Destroy 
for older… (#4041)

No new revisions were added by this update.

Summary of changes:
 .../internal/cache/tier/sockets/BaseCommand.java   | 23 ---
 .../cache/tier/sockets/command/Destroy65.java  | 27 -
 .../internal/cache/tier/sockets/command/Put65.java | 21 ++-
 .../cache/tier/sockets/BaseCommandJUnitTest.java   |  1 -
 .../cache/tier/sockets/command/Destroy65Test.java  | 70 +-
 5 files changed, 115 insertions(+), 27 deletions(-)