[geode] branch develop updated: GEODE-6065: Continue event processing when hostname lookup fails (#2883)

2018-11-20 Thread mcmellawatt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/develop by this push:
 new 7cd2f0c  GEODE-6065: Continue event processing when hostname lookup 
fails (#2883)
7cd2f0c is described below

commit 7cd2f0c5dfc982148352acbfbb303afaa1358c2a
Author: Ryan McMahon 
AuthorDate: Tue Nov 20 18:49:51 2018 -0800

GEODE-6065: Continue event processing when hostname lookup fails (#2883)

Co-authored-by: Ryan McMahon 
Co-authored-by: Bill Burcham 
---
 .../client/internal/pooling/PooledConnection.java  |   2 +-
 .../membership/InternalDistributedMember.java  |  22 ++-
 ...SenderEventRemoteDispatcherIntegrationTest.java | 189 +
 3 files changed, 208 insertions(+), 5 deletions(-)

diff --git 
a/geode-core/src/main/java/org/apache/geode/cache/client/internal/pooling/PooledConnection.java
 
b/geode-core/src/main/java/org/apache/geode/cache/client/internal/pooling/PooledConnection.java
index cb155e6..3cfbb31 100644
--- 
a/geode-core/src/main/java/org/apache/geode/cache/client/internal/pooling/PooledConnection.java
+++ 
b/geode-core/src/main/java/org/apache/geode/cache/client/internal/pooling/PooledConnection.java
@@ -37,7 +37,7 @@ import 
org.apache.geode.internal.cache.tier.sockets.ServerQueueStatus;
  * @since GemFire 5.7
  *
  */
-class PooledConnection implements Connection {
+public class PooledConnection implements Connection {
 
   /*
* connection is volatile because we may asynchronously destroy the pooled 
connection while
diff --git 
a/geode-core/src/main/java/org/apache/geode/distributed/internal/membership/InternalDistributedMember.java
 
b/geode-core/src/main/java/org/apache/geode/distributed/internal/membership/InternalDistributedMember.java
index 5aaf5c6..cb86b02 100755
--- 
a/geode-core/src/main/java/org/apache/geode/distributed/internal/membership/InternalDistributedMember.java
+++ 
b/geode-core/src/main/java/org/apache/geode/distributed/internal/membership/InternalDistributedMember.java
@@ -30,9 +30,9 @@ import java.util.List;
 import java.util.Set;
 
 import org.apache.geode.DataSerializer;
-import org.apache.geode.GemFireConfigException;
 import org.apache.geode.InternalGemFireError;
 import org.apache.geode.cache.UnsupportedVersionException;
+import org.apache.geode.cache.client.ServerConnectivityException;
 import org.apache.geode.distributed.DistributedMember;
 import org.apache.geode.distributed.DurableClientAttributes;
 import org.apache.geode.distributed.Role;
@@ -94,6 +94,19 @@ public class InternalDistributedMember implements 
DistributedMember, Externaliza
   /** product version bit flag */
   private static final int VERSION_BIT = 0x8;
 
+  @FunctionalInterface
+  public interface HostnameResolver {
+InetAddress getInetAddress(ServerLocation location) throws 
UnknownHostException;
+  }
+
+  public static void setHostnameResolver(final HostnameResolver 
hostnameResolver) {
+InternalDistributedMember.hostnameResolver = hostnameResolver;
+  }
+
+  /** Retrieves an InetAddress given the provided hostname */
+  private static HostnameResolver hostnameResolver =
+  (location) -> InetAddress.getByName(location.getHostName());
+
   /**
* Representing the host name of this member.
*/
@@ -213,12 +226,13 @@ public class InternalDistributedMember implements 
DistributedMember, Externaliza
 
   public InternalDistributedMember(ServerLocation location) {
 this.hostName = location.getHostName();
-InetAddress addr = null;
+final InetAddress addr;
 try {
-  addr = InetAddress.getByName(this.hostName);
+  addr = hostnameResolver.getInetAddress(location);
 } catch (UnknownHostException e) {
-  throw new GemFireConfigException("Unable to resolve server location " + 
location, e);
+  throw new ServerConnectivityException("Unable to resolve server location 
" + location, e);
 }
+
 netMbr = MemberFactory.newNetMember(addr, location.getPort());
 netMbr.setVmKind(ClusterDistributionManager.NORMAL_DM_TYPE);
 versionObj = Version.CURRENT;
diff --git 
a/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/GatewaySenderEventRemoteDispatcherIntegrationTest.java
 
b/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/GatewaySenderEventRemoteDispatcherIntegrationTest.java
new file mode 100644
index 000..a48c401
--- /dev/null
+++ 
b/geode-wan/src/test/java/org/apache/geode/internal/cache/wan/GatewaySenderEventRemoteDispatcherIntegrationTest.java
@@ -0,0 +1,189 @@
+/*
+ * 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 w

[geode] branch feature/GEODE-6061 updated (fa28a1f -> 0b82f6d)

2018-11-20 Thread eshu11
This is an automated email from the ASF dual-hosted git repository.

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


from fa28a1f  GEODE-6061: Add more test coverage on function with 
transaction.
 add 0b82f6d  fix review comments.

No new revisions were added by this update.

Summary of changes:
 ...ionExecutionWithTransactionDistributedTest.java | 117 ++---
 1 file changed, 57 insertions(+), 60 deletions(-)



[geode] branch feature/GEODE-5076 deleted (was f3f73c7)

2018-11-20 Thread bschuchardt
This is an automated email from the ASF dual-hosted git repository.

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


 was f3f73c7  GEODE-5076

The revisions that were on this branch are still contained in
other references; therefore, this change does not discard any commits
from the repository.



[geode] branch develop updated: GEODE-5076 jmx client should not access or modify internal regions

2018-11-20 Thread bschuchardt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/develop by this push:
 new ed28310  GEODE-5076 jmx client should not access or modify internal 
regions
ed28310 is described below

commit ed28310be814268fca72e92ebe5dd16e2f54da9a
Author: Bruce Schuchardt 
AuthorDate: Tue Nov 20 15:44:33 2018 -0800

GEODE-5076 jmx client should not access or modify internal regions

Modified the management packages to use a filtered cache that doesn't
allow users access to internal regions.

This closes #2866
---
 .../geode/internal/cache/GemFireCacheImpl.java |  6 --
 .../apache/geode/internal/cache/InternalCache.java |  2 +-
 .../cache/InternalCacheForClientAccess.java| 22 +++---
 .../internal/cache/xmlcache/CacheCreation.java |  3 ++-
 .../apache/geode/management/ManagementService.java |  3 ++-
 .../apache/geode/management/cli/GfshCommand.java   |  5 -
 .../management/internal/BaseManagementService.java |  5 +++--
 .../management/internal/FederatingManager.java |  9 +
 .../management/internal/JmxManagerAdvisee.java |  6 +++---
 .../management/internal/JmxManagerLocator.java | 12 ++--
 .../geode/management/internal/LocalManager.java|  4 ++--
 .../geode/management/internal/ManagementAgent.java | 13 +++--
 .../management/internal/ManagementFunction.java|  3 +--
 .../apache/geode/management/internal/Manager.java  |  5 +++--
 .../internal/SystemManagementService.java  |  8 +---
 .../management/internal/beans/BeanUtilFuncs.java   |  4 ++--
 .../internal/beans/CacheServerBridge.java  |  3 ---
 .../internal/beans/QueryDataFunction.java  | 18 ++
 .../cli/functions/DataCommandFunction.java |  3 ++-
 .../cli/functions/DestroyIndexFunction.java|  3 ++-
 .../internal/cli/functions/ExportDataFunction.java |  3 ++-
 .../internal/cli/functions/ExportLogsFunction.java | 10 +++---
 .../functions/GetRegionDescriptionFunction.java|  3 ++-
 .../internal/cli/functions/ImportDataFunction.java |  4 +++-
 .../cli/functions/RegionAlterFunction.java |  3 ++-
 .../cli/functions/RegionCreateFunction.java|  3 ++-
 .../cli/functions/RegionDestroyFunction.java   |  3 ++-
 .../cli/functions/UserFunctionExecution.java   |  2 +-
 .../internal/cli/modes/CommandModes.java   | 11 +--
 .../internal/configuration/domain/XmlEntity.java   |  3 ++-
 .../functions/GetRegionNamesFunction.java  |  3 +--
 .../cli/commands/ExportLogsCommandTest.java|  8 
 .../cli/functions/RegionDestroyFunctionTest.java   | 10 +++---
 .../security/GfshCommandsSecurityTestBase.java | 12 +++-
 .../web/controllers/CommonCrudController.java  |  6 ++
 35 files changed, 136 insertions(+), 85 deletions(-)

diff --git 
a/geode-core/src/main/java/org/apache/geode/internal/cache/GemFireCacheImpl.java
 
b/geode-core/src/main/java/org/apache/geode/internal/cache/GemFireCacheImpl.java
index ce0195e..311a92c 100755
--- 
a/geode-core/src/main/java/org/apache/geode/internal/cache/GemFireCacheImpl.java
+++ 
b/geode-core/src/main/java/org/apache/geode/internal/cache/GemFireCacheImpl.java
@@ -265,6 +265,7 @@ public class GemFireCacheImpl implements InternalCache, 
InternalClientCache, Has
   public static final boolean DEFAULT_COPY_ON_READ = false;
 
   /**
+   * getcachefor
* The default amount of time to wait for a {@code netSearch} to complete
*/
   public static final int DEFAULT_SEARCH_TIMEOUT =
@@ -921,7 +922,8 @@ public class GemFireCacheImpl implements InternalCache, 
InternalClientCache, Has
   this.resourceAdvisor = ResourceAdvisor.createResourceAdvisor(this);
 
   // Initialize the advisor here, but wait to exchange profiles until 
cache is fully built
-  this.jmxAdvisor = JmxManagerAdvisor.createJmxManagerAdvisor(new 
JmxManagerAdvisee(this));
+  this.jmxAdvisor = JmxManagerAdvisor
+  .createJmxManagerAdvisor(new 
JmxManagerAdvisee(getCacheForProcessingClientRequests()));
 
   this.resourceManager = 
InternalResourceManager.createResourceManager(this);
   this.serialNumber = DistributionAdvisor.createSerialNumber();
@@ -5329,7 +5331,7 @@ public class GemFireCacheImpl implements InternalCache, 
InternalClientCache, Has
   new InternalCacheForClientAccess(this);
 
   @Override
-  public InternalCache getCacheForProcessingClientRequests() {
+  public InternalCacheForClientAccess getCacheForProcessingClientRequests() {
 return cacheForClients;
   }
 
diff --git 
a/geode-core/src/main/java/org/apache/geode/internal/cache/InternalCache.java 
b/geode-core/src/main/java/org/apache/geode/internal/cache/InternalCache.java
index 0f97fbf..d44f7ca 100644
--- 
a/geode-core/src/main/java/org/apache/geode/internal/cache/Inte

[geode] branch feature/GEODE-6034 updated (3723336 -> 3244e48)

2018-11-20 Thread bschuchardt
This is an automated email from the ASF dual-hosted git repository.

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


from 3723336  GEODE-6034 Protobuf clients should not access or modify 
internal regions
 add 3244e48  empty commit to trigger another build

No new revisions were added by this update.

Summary of changes:



[geode-native] branch develop updated: GEODE-3036: Use correct name for EC2 drive letter config file

2018-11-20 Thread igodwin
This is an automated email from the ASF dual-hosted git repository.

igodwin 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 7521d2b  GEODE-3036: Use correct name for EC2 drive letter config file
7521d2b is described below

commit 7521d2bd180e69db527d3bd0fa547a7e29918add
Author: Blake Bender 
AuthorDate: Tue Nov 20 15:06:23 2018 -0800

GEODE-3036: Use correct name for EC2 drive letter config file

Co-authored-by: Ernest Burghardt 
---
 packer/windows/setup-ec2config.ps1 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/packer/windows/setup-ec2config.ps1 
b/packer/windows/setup-ec2config.ps1
index 423e2f7..0851e64 100644
--- a/packer/windows/setup-ec2config.ps1
+++ b/packer/windows/setup-ec2config.ps1
@@ -20,7 +20,7 @@ $ec2config = [xml] (get-content 'C:\Program 
Files\Amazon\Ec2ConfigService\Settin
 ($ec2config.ec2configurationsettings.plugins.plugin | where {$_.name -eq 
"Ec2SetComputerName"}).state = "Enabled"
 ($ec2config.ec2configurationsettings.plugins.plugin | where {$_.name -eq 
"Ec2EventLog"}).state = "Enabled"
 $ec2config.save("C:\Program Files\Amazon\Ec2ConfigService\Settings\config.xml")
-$ec2DiskConfig = [xml] (get-content 'C:\Program 
Files\Amazon\Ec2ConfigService\Settings\DiskConfig.xml')
+$ec2DiskConfig = [xml] (get-content 'C:\Program 
Files\Amazon\Ec2ConfigService\Settings\DriveLetterConfig.xml')
 ($ec2DiskConfig.DriveLetterMapping.Mapping.VolumeName).state = "Temporary 
Storage 0"
 ($ec2DiskConfig.DriveLetterMapping.Mapping.DriveLetter).state = "D:"
-$ec2DiskConfig.save("C:\Program 
Files\Amazon\Ec2ConfigService\Settings\DiskConfig.xml")
+$ec2DiskConfig.save("C:\Program 
Files\Amazon\Ec2ConfigService\Settings\DriveLetterConfig.xml")



[geode] branch feature/GEODE-5076 updated (739fd89 -> f3f73c7)

2018-11-20 Thread bschuchardt
This is an automated email from the ASF dual-hosted git repository.

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


from 739fd89  GEODE-5076 jmx client should not access or modify internal 
region
 add f3f73c7  GEODE-5076

No new revisions were added by this update.

Summary of changes:



[geode] 01/01: GEODE-6034 Protobuf clients should not access or modify internal regions

2018-11-20 Thread bschuchardt
This is an automated email from the ASF dual-hosted git repository.

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

commit 37233365ee11fb5042a9c57cf817ca0ff155056e
Author: Bruce Schuchardt 
AuthorDate: Tue Nov 20 08:51:19 2018 -0800

GEODE-6034 Protobuf clients should not access or modify internal regions

The Protobuf API now disallows access to internal cache regions
---
 .../experimental/driver/AuthenticationTest.java| 15 -
 ...henticationTest.java => AuthorizationTest.java} | 65 ++
 .../protobuf/v1/AuthenticationIntegrationTest.java |  2 +-
 .../protobuf/v1/AuthorizationIntegrationTest.java  |  2 +-
 .../protobuf/security/SecureCacheImpl.java |  2 +-
 .../protobuf/v1/ServerMessageExecutionContext.java |  4 +-
 .../OutputCapturingServerConnectionTest.java   |  4 +-
 .../tier/sockets/ProtobufServerConnectionTest.java |  4 +-
 .../protobuf/ProtobufStreamProcessorTest.java  |  5 +-
 .../protobuf/security/SecureCacheImplTest.java |  4 +-
 .../security/SecureFunctionServiceImplTest.java|  4 +-
 ...ionOnGroupRequestOperationHandlerJUnitTest.java |  4 +-
 ...onOnMemberRequestOperationHandlerJUnitTest.java |  4 +-
 ...onOnRegionRequestOperationHandlerJUnitTest.java |  4 +-
 ...egionNamesRequestOperationHandlerJUnitTest.java |  4 +-
 .../GetSizeRequestOperationHandlerJUnitTest.java   |  4 +-
 .../v1/operations/OperationHandlerJUnitTest.java   |  5 +-
 17 files changed, 97 insertions(+), 39 deletions(-)

diff --git 
a/geode-experimental-driver/src/integrationTest/java/org/apache/geode/experimental/driver/AuthenticationTest.java
 
b/geode-experimental-driver/src/integrationTest/java/org/apache/geode/experimental/driver/AuthenticationTest.java
index bcf72e6..f4d11e9 100644
--- 
a/geode-experimental-driver/src/integrationTest/java/org/apache/geode/experimental/driver/AuthenticationTest.java
+++ 
b/geode-experimental-driver/src/integrationTest/java/org/apache/geode/experimental/driver/AuthenticationTest.java
@@ -15,6 +15,7 @@
 package org.apache.geode.experimental.driver;
 
 import static org.apache.geode.internal.Assert.assertTrue;
+import static org.assertj.core.api.Assertions.assertThatThrownBy;
 
 import java.io.IOException;
 import java.util.Properties;
@@ -39,7 +40,7 @@ public class AuthenticationTest {
   @Rule
   public RestoreSystemProperties restoreSystemProperties = new 
RestoreSystemProperties();
 
-  private static final String TEST_USERNAME = "cluster";
+  private static final String TEST_USERNAME = "";
   private static final String TEST_PASSWORD = TEST_USERNAME;
   private Locator locator;
   private Cache cache;
@@ -89,4 +90,16 @@ public class AuthenticationTest {
 .setPassword(TEST_PASSWORD).create();
 assertTrue(driver.isConnected());
   }
+
+  @Test
+  public void driverWithBadPasswordIsRejected() throws Exception {
+CacheServer server = cache.addCacheServer();
+server.setPort(0);
+server.start();
+DriverFactory factory =
+new DriverFactory().addLocator("localhost", 
locatorPort).setUsername(TEST_USERNAME)
+.setPassword("my my my");
+assertThatThrownBy(() -> factory.create()).isInstanceOf(IOException.class);
+  }
+
 }
diff --git 
a/geode-experimental-driver/src/integrationTest/java/org/apache/geode/experimental/driver/AuthenticationTest.java
 
b/geode-experimental-driver/src/integrationTest/java/org/apache/geode/experimental/driver/AuthorizationTest.java
similarity index 50%
copy from 
geode-experimental-driver/src/integrationTest/java/org/apache/geode/experimental/driver/AuthenticationTest.java
copy to 
geode-experimental-driver/src/integrationTest/java/org/apache/geode/experimental/driver/AuthorizationTest.java
index bcf72e6..641c108 100644
--- 
a/geode-experimental-driver/src/integrationTest/java/org/apache/geode/experimental/driver/AuthenticationTest.java
+++ 
b/geode-experimental-driver/src/integrationTest/java/org/apache/geode/experimental/driver/AuthorizationTest.java
@@ -14,38 +14,42 @@
  */
 package org.apache.geode.experimental.driver;
 
-import static org.apache.geode.internal.Assert.assertTrue;
+import static org.assertj.core.api.Assertions.assertThat;
+import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
 
 import java.io.IOException;
+import java.util.Collections;
 import java.util.Properties;
 
+import org.assertj.core.api.ThrowableAssert;
 import org.junit.After;
 import org.junit.Before;
-import org.junit.Rule;
 import org.junit.Test;
-import org.junit.contrib.java.lang.system.RestoreSystemProperties;
 import org.junit.experimental.categories.Category;
 
 import org.apache.geode.cache.Cache;
 import org.apache.geode.cache.CacheFactory;
+import org.apache.geode.cache.RegionAttributes;
+import org.apache.geode.cache.RegionShortcut;
 import org.apache.geode.cache.server.CacheServer;
 import org.apache.geode.distributed.ConfigurationProperties;
 import org.apache.geode.distributed.

[geode] branch feature/GEODE-6034 created (now 3723336)

2018-11-20 Thread bschuchardt
This is an automated email from the ASF dual-hosted git repository.

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


  at 3723336  GEODE-6034 Protobuf clients should not access or modify 
internal regions

This branch includes the following new commits:

 new 3723336  GEODE-6034 Protobuf clients should not access or modify 
internal regions

The 1 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] branch develop updated: GEODE-6073: All files have lf endings (#2873)

2018-11-20 Thread mcmellawatt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/develop by this push:
 new be99d7b  GEODE-6073:  All files have lf endings (#2873)
be99d7b is described below

commit be99d7be0dd92159fc69856b8d26a046c3989e37
Author: M. Oleske 
AuthorDate: Tue Nov 20 12:41:41 2018 -0800

GEODE-6073:  All files have lf endings (#2873)

- Spotless no longer uses line endings check as it is not recommened
- 
https://github.com/diffplug/spotless/tree/master/plugin-gradle#line-endings-and-encodings-invisible-stuff
---
 .gitattributes | 2 +-
 ci/scripts/windows/test-run.sh | 2 +-
 gradle/spotless.gradle | 1 -
 3 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/.gitattributes b/.gitattributes
index 36dd437..fcadb2c 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -1 +1 @@
-*.java text=auto eol=lf
+* text eol=lf
diff --git a/ci/scripts/windows/test-run.sh b/ci/scripts/windows/test-run.sh
index 43c6cf3..99c6255 100755
--- a/ci/scripts/windows/test-run.sh
+++ b/ci/scripts/windows/test-run.sh
@@ -40,7 +40,7 @@ directories_file=${DEST_DIR}/artifact_directories
 echo "GRADLE_TASK = ${GRADLE_TASK}"
 echo "BASE_FILENAME = ${BASE_FILENAME}"
 
-DEFAULT_GRADLE_TASK_OPTIONS="--no-daemon -x javadoc -x spotlessCheck"
+DEFAULT_GRADLE_TASK_OPTIONS="--no-daemon -x javadoc"
 
 if [[ -n "${GRADLE_TEST_CATEGORY}" ]]; then
   GRADLE_TASK_OPTIONS="-PtestCategory=${GRADLE_TEST_CATEGORY}"
diff --git a/gradle/spotless.gradle b/gradle/spotless.gradle
index 9b40405..9910aaa 100644
--- a/gradle/spotless.gradle
+++ b/gradle/spotless.gradle
@@ -18,7 +18,6 @@
 subprojects {
   apply plugin: "com.diffplug.gradle.spotless"
   spotless {
-lineEndings = 'unix'
 java {
   target project.fileTree(project.projectDir) {
 include '**/*.java'



[geode] branch feature/GEODE-5076 updated (cce6da8 -> 739fd89)

2018-11-20 Thread bschuchardt
This is an automated email from the ASF dual-hosted git repository.

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


from cce6da8  GEODE-5076 jmx client should not access or modify internal 
region
 add 739fd89  GEODE-5076 jmx client should not access or modify internal 
region

No new revisions were added by this update.

Summary of changes:
 .../internal/cli/commands/ExportLogsCommandTest.java   |  8 
 .../internal/cli/functions/RegionDestroyFunctionTest.java  | 10 +++---
 2 files changed, 15 insertions(+), 3 deletions(-)



[geode-benchmarks] branch develop updated: Adding new class to evaluate a test run against a baseline

2018-11-20 Thread wirebaron
This is an automated email from the ASF dual-hosted git repository.

wirebaron 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 178ad74  Adding new class to evaluate a test run against a baseline
178ad74 is described below

commit 178ad74147914224ce8d61c7d9282a50908e1721
Author: Brian Rowe 
AuthorDate: Tue Nov 20 11:02:50 2018 -0800

Adding new class to evaluate a test run against a baseline

Adding new class to evaluate a test run against a baseline and output the 
relative performance.
---
 .../perftest/analysis/BenchmarkRunAnalyzer.java| 102 +++
 .../geode/perftest/analysis/ProbeResultParser.java |  34 +
 .../YardstickPercentileSensorParser.java   |  43 +--
 .../YardstickThroughputSensorParser.java   |  70 +++
 .../analysis/BenchmarkRunAnalyzerTest.java | 139 +
 .../YardstickPercentileSensorParserTest.java   |   4 +-
 .../YardstickThroughputSensorParserTest.java   |   4 +-
 7 files changed, 362 insertions(+), 34 deletions(-)

diff --git 
a/harness/src/main/java/org/apache/geode/perftest/analysis/BenchmarkRunAnalyzer.java
 
b/harness/src/main/java/org/apache/geode/perftest/analysis/BenchmarkRunAnalyzer.java
new file mode 100644
index 000..c095876
--- /dev/null
+++ 
b/harness/src/main/java/org/apache/geode/perftest/analysis/BenchmarkRunAnalyzer.java
@@ -0,0 +1,102 @@
+/*
+ * 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.perftest.analysis;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.io.Writer;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Analyzer that takes in benchmarks, probes, and result directories and 
produces
+ * a comparison of the results to a provided writer.
+ *
+ * This currently handles data in the format
+ * 
+ *   Result1
+ * /BenchmarkA
+ *   /client1
+ * /Probe1.csv
+ *   /client2
+ * /Probe2.csv
+ * /BenchmarkB
+ * ...
+ * 
+ */
+public class BenchmarkRunAnalyzer {
+  private final List benchmarks = new ArrayList<>();
+  private final List probes = new ArrayList<>();
+
+  /**
+   * Add a benchmark to be analyzed. The benchmark is expected to exist
+   * in both result directories passed to {@link #analyzeTestRun(File, File, 
Writer)}
+   */
+  public void addBenchmark(String name, String testResultDir, List 
nodeNames) {
+benchmarks.add(new SensorData(name, testResultDir, nodeNames));
+  }
+
+  /**
+   * Add a probe to produce a comparison for. The probe expects to find output 
files
+   * in the result directory for each node of each benchmark.
+   */
+  public void addProbe(ProbeResultParser probeResultParser) {
+probes.add(probeResultParser);
+  }
+
+  public void analyzeTestRun(File testResultDir, File baselineResultDir, 
Writer output)
+  throws IOException {
+PrintWriter stream = new PrintWriter(output);
+for (SensorData benchmark : benchmarks) {
+  stream.println("-- " + benchmark.benchmarkName + " --");
+  for (ProbeResultParser probe : probes) {
+stream.println(probe.getResultDescription());
+for (String node : benchmark.nodesToParse) {
+  probe.parseResults(new File(new File(testResultDir, 
benchmark.benchmarkSubdirectory), node));
+}
+double testResult = probe.getProbeResult();
+stream.println("Result: " + String.valueOf(testResult));
+probe.reset();
+for (String node : benchmark.nodesToParse) {
+  probe.parseResults(new File(new File(baselineResultDir, 
benchmark.benchmarkSubdirectory), node));
+}
+double baselineResult = probe.getProbeResult();
+stream.println("Baseline: " + String.valueOf(baselineResult));
+stream.println("Relative performance: " + String.valueOf(testResult / 
baselineResult));
+stream.println();
+  }
+}
+
+stream.flush();
+  }
+
+  // TODO: depending on how run output is stored, this data may be excessive 
or insufficient
+  // The present assumption is each benchmark contains an arbitrarily named 

[geode] branch feature/GEODE-5076 updated (51c72c9 -> cce6da8)

2018-11-20 Thread bschuchardt
This is an automated email from the ASF dual-hosted git repository.

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


from 51c72c9  GEODE-5076 jmx client should not access or modify internal 
region
 add cce6da8  GEODE-5076 jmx client should not access or modify internal 
region

No new revisions were added by this update.

Summary of changes:
 .../geode/management/internal/JmxManagerLocator.java  |  3 ++-
 .../geode/management/internal/ManagementFunction.java |  3 +--
 .../management/internal/beans/CacheServerBridge.java  |  3 ---
 .../management/internal/beans/QueryDataFunction.java  |  6 --
 .../internal/cli/functions/DataCommandFunction.java   |  3 ++-
 .../internal/cli/functions/DestroyIndexFunction.java  |  3 ++-
 .../internal/cli/functions/ExportDataFunction.java|  3 ++-
 .../internal/cli/functions/ExportLogsFunction.java| 10 +++---
 .../cli/functions/GetRegionDescriptionFunction.java   |  3 ++-
 .../internal/cli/functions/ImportDataFunction.java|  4 +++-
 .../internal/cli/functions/RegionAlterFunction.java   |  3 ++-
 .../internal/cli/functions/RegionCreateFunction.java  |  3 ++-
 .../internal/cli/functions/RegionDestroyFunction.java |  3 ++-
 .../internal/cli/functions/UserFunctionExecution.java |  2 +-
 .../geode/management/internal/cli/modes/CommandModes.java | 15 +--
 .../configuration/functions/GetRegionNamesFunction.java   |  3 +--
 16 files changed, 38 insertions(+), 32 deletions(-)



[geode] branch develop updated: GEODE-6059: PR pipeline gets merge-base from resource (#2877)

2018-11-20 Thread prhomberg
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/develop by this push:
 new 4c06ba4  GEODE-6059: PR pipeline gets merge-base from resource (#2877)
4c06ba4 is described below

commit 4c06ba4625e69d44a5165aa9f2fccddfc064de87
Author: Robert Houghton 
AuthorDate: Tue Nov 20 09:53:23 2018 -0800

GEODE-6059: PR pipeline gets merge-base from resource (#2877)

Keeps the PR from needing the entire repo for faster testing

Authored-by: Robert Houghton 
---
 ci/scripts/repeat-new-tests.sh | 21 +
 1 file changed, 13 insertions(+), 8 deletions(-)

diff --git a/ci/scripts/repeat-new-tests.sh b/ci/scripts/repeat-new-tests.sh
index 1aabf56..64c0ffc 100755
--- a/ci/scripts/repeat-new-tests.sh
+++ b/ci/scripts/repeat-new-tests.sh
@@ -28,16 +28,20 @@ done
 SCRIPTDIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
 
 function changes_for_path() {
-  cd geode
-  local path; path="$1" # only expand once in the line below
-  local merge_base; merge_base=$(git merge-base HEAD origin/develop) || exit $?
-  git diff --name-only HEAD $merge_base -- $path
+  pushd geode >> /dev/null
+local path="$1" # only expand once in the line below
+# .git/resource/metadata.json is provided by the github-pr-resource used 
in Concourse
+local mergeBase=$(cat .git/resource/metadata.json |
+  jq -r -c '.[]| select(.name == "base_sha") | .value') || 
exit $?
+
+if [[ "${mergeBase}" == "" ]]; then
+  echo "Could not determine merge base. Exiting..."
+  exit 1
+fi
+git diff --name-only ${mergeBase} -- $path
+  popd >> /dev/null
 }
 
-cd geode
-git fetch https://github.com/apache/geode.git develop:origin/develop
-cd ..
-
 UNIT_TEST_CHANGES=$(changes_for_path '*/src/test/java') || exit $?
 INTEGRATION_TEST_CHANGES=$(changes_for_path '*/src/integrationTest/java') || 
exit $?
 DISTRIBUTED_TEST_CHANGES=$(changes_for_path '*/src/distributedTest/java') || 
exit $?
@@ -90,6 +94,7 @@ export GRADLE_TASK="compileTestJava 
compileIntegrationTestJava compileDistribute
 export GRADLE_TASK_OPTIONS="--no-parallel -Prepeat=50 
-PfailOnNoMatchingTests=false"
 
 echo "GRADLE_TASK_OPTIONS=${GRADLE_TASK_OPTIONS}"
+echo "GRADLE_TASK=${GRADLE_TASK}"
 
 ${SCRIPTDIR}/execute_tests.sh
 



[geode] branch develop updated: GEODE-5971: Refactor Start/Status/Stop Locator commands to return ResultModel (#2869)

2018-11-20 Thread jensdeppe
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/develop by this push:
 new 5a8ef65  GEODE-5971: Refactor Start/Status/Stop Locator commands to 
return ResultModel (#2869)
5a8ef65 is described below

commit 5a8ef6562ecd52da0308f7014320ad0182360ce9
Author: Jens Deppe 
AuthorDate: Tue Nov 20 09:42:15 2018 -0800

GEODE-5971: Refactor Start/Status/Stop Locator commands to return 
ResultModel (#2869)
---
 .../internal/cli/commands/StartLocatorCommand.java | 54 +++---
 .../internal/cli/commands/StartServerCommand.java  | 23 +
 .../commands/lifecycle/StatusLocatorCommand.java   | 24 +-
 .../cli/commands/lifecycle/StopLocatorCommand.java | 13 +++---
 4 files changed, 56 insertions(+), 58 deletions(-)

diff --git 
a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/StartLocatorCommand.java
 
b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/StartLocatorCommand.java
index aa4680b..0874a04 100644
--- 
a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/StartLocatorCommand.java
+++ 
b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/StartLocatorCommand.java
@@ -43,12 +43,11 @@ import org.apache.geode.internal.process.ProcessType;
 import org.apache.geode.internal.util.IOUtils;
 import org.apache.geode.management.cli.CliMetaData;
 import org.apache.geode.management.cli.ConverterHint;
-import org.apache.geode.management.cli.Result;
 import org.apache.geode.management.internal.cli.GfshParser;
 import org.apache.geode.management.internal.cli.domain.ConnectToLocatorResult;
 import org.apache.geode.management.internal.cli.i18n.CliStrings;
-import org.apache.geode.management.internal.cli.result.InfoResultData;
-import org.apache.geode.management.internal.cli.result.ResultBuilder;
+import org.apache.geode.management.internal.cli.result.model.InfoResultModel;
+import org.apache.geode.management.internal.cli.result.model.ResultModel;
 import org.apache.geode.management.internal.cli.shell.Gfsh;
 import org.apache.geode.management.internal.cli.shell.JmxOperationInvoker;
 import org.apache.geode.management.internal.cli.util.CommandStringBuilder;
@@ -61,7 +60,7 @@ public class StartLocatorCommand extends InternalGfshCommand {
   @CliCommand(value = CliStrings.START_LOCATOR, help = 
CliStrings.START_LOCATOR__HELP)
   @CliMetaData(shellOnly = true,
   relatedTopic = {CliStrings.TOPIC_GEODE_LOCATOR, 
CliStrings.TOPIC_GEODE_LIFECYCLE})
-  public Result startLocator(
+  public ResultModel startLocator(
   @CliOption(key = CliStrings.START_LOCATOR__MEMBER_NAME,
   help = CliStrings.START_LOCATOR__MEMBER_NAME__HELP) String 
memberName,
   @CliOption(key = CliStrings.START_LOCATOR__BIND_ADDRESS,
@@ -141,7 +140,7 @@ public class StartLocatorCommand extends 
InternalGfshCommand {
 
   }
 
-  Result doStartLocator(
+  ResultModel doStartLocator(
   String memberName,
   String bindAddress,
   String classpath,
@@ -171,13 +170,13 @@ public class StartLocatorCommand extends 
InternalGfshCommand {
   throws MalformedObjectNameException, IOException, InterruptedException,
   ClassNotFoundException {
 if (gemfirePropertiesFile != null && !gemfirePropertiesFile.exists()) {
-  return ResultBuilder.createUserErrorResult(
+  return ResultModel.createError(
   CliStrings.format(CliStrings.GEODE_0_PROPERTIES_1_NOT_FOUND_MESSAGE, 
StringUtils.EMPTY,
   gemfirePropertiesFile.getAbsolutePath()));
 }
 
 if (gemfireSecurityPropertiesFile != null && 
!gemfireSecurityPropertiesFile.exists()) {
-  return ResultBuilder.createUserErrorResult(
+  return ResultModel.createError(
   CliStrings.format(CliStrings.GEODE_0_PROPERTIES_1_NOT_FOUND_MESSAGE, 
"Security ",
   gemfireSecurityPropertiesFile.getAbsolutePath()));
 }
@@ -285,7 +284,7 @@ public class StartLocatorCommand extends 
InternalGfshCommand {
 } else {
   final int exitValue = locatorProcess.exitValue();
 
-  return ResultBuilder.createShellClientErrorResult(
+  return ResultModel.createError(
   
String.format(CliStrings.START_LOCATOR__PROCESS_TERMINATED_ABNORMALLY_ERROR_MESSAGE,
   exitValue, locatorLauncher.getWorkingDirectory(), 
message.toString()));
 }
@@ -305,21 +304,22 @@ public class StartLocatorCommand extends 
InternalGfshCommand {
 (registeredLocatorSignalListener && locatorSignalListener.isSignaled()
 && 
ServerLauncher.ServerState.isStartingNotRespondingOrNull(locatorState));
 
-InfoResultData infoResultData = ResultBuilder.createInfoResultData();
+ResultModel result = new ResultModel();
+InfoResultModel infoResult = result.addInfo();
 
 if (loadSharedConfigurationFrom

[geode] branch 9aa83fedba created (now 222701a)

2018-11-20 Thread jinmeiliao
This is an automated email from the ASF dual-hosted git repository.

jinmeiliao pushed a change to branch 9aa83fedba
in repository https://gitbox.apache.org/repos/asf/geode.git.


  at 222701a  GEODE-4110: improve junit ClientCacheRule (#2872)

No new revisions were added by this update.



[geode-native] branch develop updated: GEODE-3036: Update packer script to add drive mapping

2018-11-20 Thread mmartell
This is an automated email from the ASF dual-hosted git repository.

mmartell 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 e456a0b  GEODE-3036: Update packer script to add drive mapping
e456a0b is described below

commit e456a0be1b87a09df04f10a1eff3673c7153e6f2
Author: Mike Martell 
AuthorDate: Tue Nov 20 08:11:39 2018 -0800

GEODE-3036: Update packer script to add drive mapping
---
 packer/windows/setup-ec2config.ps1 | 4 
 1 file changed, 4 insertions(+)

diff --git a/packer/windows/setup-ec2config.ps1 
b/packer/windows/setup-ec2config.ps1
index 4fefd66..423e2f7 100644
--- a/packer/windows/setup-ec2config.ps1
+++ b/packer/windows/setup-ec2config.ps1
@@ -20,3 +20,7 @@ $ec2config = [xml] (get-content 'C:\Program 
Files\Amazon\Ec2ConfigService\Settin
 ($ec2config.ec2configurationsettings.plugins.plugin | where {$_.name -eq 
"Ec2SetComputerName"}).state = "Enabled"
 ($ec2config.ec2configurationsettings.plugins.plugin | where {$_.name -eq 
"Ec2EventLog"}).state = "Enabled"
 $ec2config.save("C:\Program Files\Amazon\Ec2ConfigService\Settings\config.xml")
+$ec2DiskConfig = [xml] (get-content 'C:\Program 
Files\Amazon\Ec2ConfigService\Settings\DiskConfig.xml')
+($ec2DiskConfig.DriveLetterMapping.Mapping.VolumeName).state = "Temporary 
Storage 0"
+($ec2DiskConfig.DriveLetterMapping.Mapping.DriveLetter).state = "D:"
+$ec2DiskConfig.save("C:\Program 
Files\Amazon\Ec2ConfigService\Settings\DiskConfig.xml")



[geode] branch develop updated: GEODE-4110: improve junit ClientCacheRule (#2872)

2018-11-20 Thread jinmeiliao
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/develop by this push:
 new 222701a  GEODE-4110: improve junit ClientCacheRule (#2872)
222701a is described below

commit 222701ad7511841b1ba0033fc51c0ac6b044efe8
Author: jinmeiliao 
AuthorDate: Tue Nov 20 07:37:19 2018 -0800

GEODE-4110: improve junit ClientCacheRule (#2872)

* refactor some multiUser tests to use the ClientCacheRule
* add more convenience methods in ClientCacheRule
* clean up the ClusterStarterRule.startClient interface
* deprecate the SecurityTestUtils to favor using rules
---
 .../web/controllers/RestAPIsWithSSLDUnitTest.java  |   4 +-
 .../geode/connectors/jdbc/JdbcDistributedTest.java |   3 +-
 .../management/ClientHealthStatsDUnitTest.java |  19 +-
 .../internal/security/MultiClientDUnitTest.java|  20 +-
 .../security/MultiUserAuthenticationDUnitTest.java |  47 +--
 .../apache/geode/security/ClientAuthDUnitTest.java |  38 +-
 ...tAuthorizationLegacyConfigurationDUnitTest.java |  74 ++--
 ...aAuthorizationUsingLegacySecurityDUnitTest.java |  16 +-
 ...onUsingLegacySecurityWithFailoverDUnitTest.java |   8 +-
 .../ClientDestroyInvalidateAuthDUnitTest.java  |   9 +-
 .../ClientExecuteFunctionAuthDUnitTest.java|   9 +-
 .../cache/query/dunit/QueryMonitorDUnitTest.java   |  35 +-
 .../geode/security/ClientCQAuthDUnitTest.java  |  49 ++-
 .../geode/security/MultiUserAPIDUnitTest.java  | 407 ++---
 ...tartupRuleCanSpecifyOlderVersionsDUnitTest.java |   4 +-
 .../apache/geode/security/SecurityTestUtil.java|   7 +
 .../geode/test/dunit/rules/ClusterStartupRule.java |  56 +--
 .../apache/geode/test/dunit/rules/MemberVM.java|   2 +-
 .../geode/test/junit/rules/ClientCacheRule.java|  80 +++-
 .../geode/test/junit/rules/MemberStarterRule.java  |  39 ++
 .../geode/test/junit/rules/ServerStarterRule.java  |  33 --
 21 files changed, 425 insertions(+), 534 deletions(-)

diff --git 
a/geode-assembly/src/distributedTest/java/org/apache/geode/rest/internal/web/controllers/RestAPIsWithSSLDUnitTest.java
 
b/geode-assembly/src/distributedTest/java/org/apache/geode/rest/internal/web/controllers/RestAPIsWithSSLDUnitTest.java
index 8f813a4..e876f6c 100644
--- 
a/geode-assembly/src/distributedTest/java/org/apache/geode/rest/internal/web/controllers/RestAPIsWithSSLDUnitTest.java
+++ 
b/geode-assembly/src/distributedTest/java/org/apache/geode/rest/internal/web/controllers/RestAPIsWithSSLDUnitTest.java
@@ -128,8 +128,8 @@ public class RestAPIsWithSSLDUnitTest {
 .withProperties(sslProperties)
 .withConnectionToLocator(locatorPort)
 .withRegion(RegionShortcut.REPLICATE, PEOPLE_REGION_NAME));
-client = cluster.startClientVM(1,
-c -> c.addPoolLocator("localhost", 
locatorPort).setPdxReadSerialized(true));
+client = cluster.startClientVM(1, c -> c.withLocatorConnection(locatorPort)
+.withCacheSetup(cf -> cf.setPdxReadSerialized(true)));
 
 client.invoke(() -> {
   ClientCache clientCache = ClusterStartupRule.getClientCache();
diff --git 
a/geode-connectors/src/acceptanceTest/java/org/apache/geode/connectors/jdbc/JdbcDistributedTest.java
 
b/geode-connectors/src/acceptanceTest/java/org/apache/geode/connectors/jdbc/JdbcDistributedTest.java
index 94370e9..94fa59d 100644
--- 
a/geode-connectors/src/acceptanceTest/java/org/apache/geode/connectors/jdbc/JdbcDistributedTest.java
+++ 
b/geode-connectors/src/acceptanceTest/java/org/apache/geode/connectors/jdbc/JdbcDistributedTest.java
@@ -28,7 +28,6 @@ import java.sql.ResultSet;
 import java.sql.SQLException;
 import java.sql.Statement;
 import java.util.Date;
-import java.util.Properties;
 
 import org.junit.After;
 import org.junit.Before;
@@ -605,7 +604,7 @@ public abstract class JdbcDistributedTest implements 
Serializable {
   cf.setPdxSerializer(
   new 
ReflectionBasedAutoSerializer(ClassWithSupportedPdxFields.class.getName()));
 };
-return startupRule.startClientVM(2, new Properties(), cacheSetup);
+return startupRule.startClientVM(2, c -> c.withCacheSetup(cacheSetup));
   }
 
   private void createClientRegion(ClientVM client) {
diff --git 
a/geode-core/src/distributedTest/java/org/apache/geode/management/ClientHealthStatsDUnitTest.java
 
b/geode-core/src/distributedTest/java/org/apache/geode/management/ClientHealthStatsDUnitTest.java
index bf21c2a..ea7a642 100644
--- 
a/geode-core/src/distributedTest/java/org/apache/geode/management/ClientHealthStatsDUnitTest.java
+++ 
b/geode-core/src/distributedTest/java/org/apache/geode/management/ClientHealthStatsDUnitTest.java
@@ -21,6 +21,7 @@ import static 
org.apache.geode.test.awaitility.GeodeAwaitility.await;
 import static org.assertj.core.api.Assertions.assertThat;
 
 import java.io.Serializable;
+import java.util.Properties;
 
 import org.