[geode] branch develop updated (088e682 -> 51a0c65)

2020-02-27 Thread mivanac
This is an automated email from the ASF dual-hosted git repository.

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


from 088e682  GEODE-7823: eliminate org.junit unavailable compile error in 
IntelliJ (#4742)
 add 51a0c65  GEODE-7771: change getting cache in getLuceneIndex (#4702)

No new revisions were added by this update.

Summary of changes:
 .../cache/lucene/internal/distributed/LuceneQueryFunction.java   | 9 +
 .../internal/distributed/LuceneQueryFunctionJUnitTest.java   | 2 +-
 2 files changed, 6 insertions(+), 5 deletions(-)



[geode] branch feature/GEODE-7682 updated (a6d8d69 -> 658afb3)

2020-02-27 Thread zhouxj
This is an automated email from the ASF dual-hosted git repository.

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


 discard a6d8d69  fix-5
 discard f6516a7  fix-4
 discard 2994ed8  add a dunit test
 discard 7e46a97  GEODE-7682: add clear API for PR
 new 658afb3  GEODE-7682: add clear API for PR

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (a6d8d69)
\
 N -- N -- N   refs/heads/feature/GEODE-7682 (658afb3)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

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.


Summary of changes:
 .../cache/PartitionedRegionClearDUnitTest.java | 26 --
 .../codeAnalysis/sanctionedDataSerializables.txt   |  6 ++---
 .../geode/internal/cache/PartitionedRegion.java|  5 -
 .../geode/internal/cache/RegionEventImpl.java  |  7 +++---
 .../internal/cache/partitioned/ClearPRMessage.java | 21 +
 .../cache/partitioned/ClearPRMessageTest.java  |  1 -
 6 files changed, 30 insertions(+), 36 deletions(-)



[geode] 01/01: GEODE-7682: add clear API for PR

2020-02-27 Thread zhouxj
This is an automated email from the ASF dual-hosted git repository.

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

commit 658afb35d4ac4f04db8e69f59762112f746e1751
Author: zhouxh 
AuthorDate: Fri Feb 14 17:44:47 2020 -0800

GEODE-7682: add clear API for PR
---
 .../cache/PartitionedRegionClearDUnitTest.java | 133 +
 .../codeAnalysis/sanctionedDataSerializables.txt   |   6 +-
 .../org/apache/geode/internal/DSFIDFactory.java|   3 +
 .../geode/internal/cache/DistributedRegion.java|   9 -
 .../apache/geode/internal/cache/LocalRegion.java   |  10 +
 .../geode/internal/cache/PartitionedRegion.java| 207 +++--
 .../geode/internal/cache/RegionEventImpl.java  |   5 +
 .../internal/cache/partitioned/ClearPRMessage.java |  76 +++-
 .../cache/partitioned/ClearPRMessageTest.java  |  60 ++
 9 files changed, 394 insertions(+), 115 deletions(-)

diff --git 
a/geode-core/src/distributedTest/java/org/apache/geode/internal/cache/PartitionedRegionClearDUnitTest.java
 
b/geode-core/src/distributedTest/java/org/apache/geode/internal/cache/PartitionedRegionClearDUnitTest.java
new file mode 100644
index 000..fd1a10b
--- /dev/null
+++ 
b/geode-core/src/distributedTest/java/org/apache/geode/internal/cache/PartitionedRegionClearDUnitTest.java
@@ -0,0 +1,133 @@
+/*
+ * 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.internal.cache;
+
+import static org.assertj.core.api.Assertions.assertThat;
+
+import java.io.Serializable;
+import java.util.stream.IntStream;
+
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+
+import org.apache.geode.cache.Cache;
+import org.apache.geode.cache.PartitionAttributesFactory;
+import org.apache.geode.cache.Region;
+import org.apache.geode.cache.RegionShortcut;
+import org.apache.geode.test.dunit.rules.ClientVM;
+import org.apache.geode.test.dunit.rules.ClusterStartupRule;
+import org.apache.geode.test.dunit.rules.MemberVM;
+
+
+public class PartitionedRegionClearDUnitTest implements Serializable {
+  protected static final String REGION_NAME = "testPR";
+  protected static final int NUM_ENTRIES = 1000;
+
+  protected int locatorPort;
+  protected MemberVM locator;
+  protected MemberVM dataStore1, dataStore2, accessor;
+  protected ClientVM client1, client2;
+
+  @Rule
+  public ClusterStartupRule cluster = new ClusterStartupRule(6);
+
+  @Before
+  public void setUp() throws Exception {
+locator = cluster.startLocatorVM(0);
+locatorPort = locator.getPort();
+dataStore1 = cluster.startServerVM(1, locatorPort);
+dataStore2 = cluster.startServerVM(2, locatorPort);
+accessor = cluster.startServerVM(3, locatorPort);
+client1 = cluster.startClientVM(4, c -> 
c.withLocatorConnection((locatorPort)));
+client2 = cluster.startClientVM(5, c -> 
c.withLocatorConnection((locatorPort)));
+
+prepare();
+  }
+
+  private void prepare() {
+dataStore1.invoke(this::initDataStore);
+dataStore2.invoke(this::initDataStore);
+accessor.invoke(this::initAccessor);
+
+accessor.invoke(this::insertEntries);
+dataStore1.invoke(this::verifyDataIsLoaded);
+dataStore2.invoke(this::verifyDataIsLoaded);
+  }
+
+  private void verifyDataIsLoaded() {
+Region region = getCache().getRegion(REGION_NAME);
+assertThat(region.size()).isEqualTo(NUM_ENTRIES);
+  }
+
+  public Cache getCache() {
+Cache cache = ClusterStartupRule.getCache();
+assertThat(cache).isNotNull();
+
+return cache;
+  }
+
+  private void initDataStore() {
+Cache cache = getCache();
+cache.createRegionFactory(RegionShortcut.PARTITION_REDUNDANT)
+.setPartitionAttributes(new 
PartitionAttributesFactory().setTotalNumBuckets(10).create())
+.create(REGION_NAME);
+  }
+
+  private void initAccessor() {
+Cache cache = getCache();
+cache.createRegionFactory(RegionShortcut.PARTITION_REDUNDANT)
+.setPartitionAttributes(
+new 
PartitionAttributesFactory().setTotalNumBuckets(10).setLocalMaxMemory(0).create())
+.create(REGION_NAME);
+  }
+
+  private void insertEntries() {
+Cache cache = getCache();
+Region region = cache.get

[geode] branch feature/GEODE-7682 updated: fix-5

2020-02-27 Thread zhouxj
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/feature/GEODE-7682 by this 
push:
 new a6d8d69  fix-5
a6d8d69 is described below

commit a6d8d6950e8541966567c124a27173d5b0bd519c
Author: zhouxh 
AuthorDate: Thu Feb 27 16:59:40 2020 -0800

fix-5
---
 .../apache/geode/internal/cache/partitioned/ClearPRMessageTest.java | 6 ++
 1 file changed, 6 insertions(+)

diff --git 
a/geode-core/src/test/java/org/apache/geode/internal/cache/partitioned/ClearPRMessageTest.java
 
b/geode-core/src/test/java/org/apache/geode/internal/cache/partitioned/ClearPRMessageTest.java
index 2778993..c17c6f6 100644
--- 
a/geode-core/src/test/java/org/apache/geode/internal/cache/partitioned/ClearPRMessageTest.java
+++ 
b/geode-core/src/test/java/org/apache/geode/internal/cache/partitioned/ClearPRMessageTest.java
@@ -48,6 +48,7 @@ import 
org.apache.geode.internal.cache.ForceReattemptException;
 import org.apache.geode.internal.cache.PartitionedRegion;
 import org.apache.geode.internal.cache.PartitionedRegionDataStore;
 import org.apache.geode.internal.cache.PartitionedRegionStats;
+import org.apache.geode.internal.cache.RegionEventImpl;
 
 public class ClearPRMessageTest {
 
@@ -59,11 +60,16 @@ public class ClearPRMessageTest {
   @Before
   public void setup() throws ForceReattemptException {
 message = spy(new ClearPRMessage());
+InternalDistributedMember member = mock(InternalDistributedMember.class);
 region = mock(PartitionedRegion.class, RETURNS_DEEP_STUBS);
 dataStore = mock(PartitionedRegionDataStore.class);
 when(region.getDataStore()).thenReturn(dataStore);
+when(region.getFullPath()).thenReturn("/test");
 bucketRegion = mock(BucketRegion.class);
 when(dataStore.getInitializedBucketForId(any(), 
any())).thenReturn(bucketRegion);
+RegionEventImpl bucketRegionEventImpl = mock(RegionEventImpl.class);
+// RegionEventImpl(bucketRegion, Operation.REGION_CLEAR, null, false, 
member, true);
+message.setRegionEvent(bucketRegionEventImpl);
   }
 
   @Test



[geode] branch feature/GEODE-7808b updated (50ddb4d -> 5add269)

2020-02-27 Thread bschuchardt
This is an automated email from the ASF dual-hosted git repository.

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


 discard 50ddb4d  refactored socket-creators to separate concerns
 discard ef36cb4  GEODE-7808 - standardize on use of HostAndPort for connection 
formation
 discard 38341c1  Squashed merge of feature/GEODE-7808
 add 8498329  GEODE-7815: Document setting a GEODE_HOME env variable (#4732)
 add 088e682  GEODE-7823: eliminate org.junit unavailable compile error in 
IntelliJ (#4742)
 add 2f7a825  Squashed merge of feature/GEODE-7808
 add ccab59d  GEODE-7808 - standardize on use of HostAndPort for connection 
formation
 add 5add269  refactored socket-creators to separate concerns

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (50ddb4d)
\
 N -- N -- N   refs/heads/feature/GEODE-7808b (5add269)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

No new revisions were added by this update.

Summary of changes:
 geode-core/build.gradle| 1 +
 geode-docs/getting_started/setup_classpath.html.md.erb | 5 -
 geode-docs/rest_apps/setup_config.html.md.erb  | 4 
 3 files changed, 9 insertions(+), 1 deletion(-)



[geode] branch feature/GEODE-7808b updated (50ddb4d -> 5add269)

2020-02-27 Thread bschuchardt
This is an automated email from the ASF dual-hosted git repository.

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


 discard 50ddb4d  refactored socket-creators to separate concerns
 discard ef36cb4  GEODE-7808 - standardize on use of HostAndPort for connection 
formation
 discard 38341c1  Squashed merge of feature/GEODE-7808
 add 8498329  GEODE-7815: Document setting a GEODE_HOME env variable (#4732)
 add 088e682  GEODE-7823: eliminate org.junit unavailable compile error in 
IntelliJ (#4742)
 add 2f7a825  Squashed merge of feature/GEODE-7808
 add ccab59d  GEODE-7808 - standardize on use of HostAndPort for connection 
formation
 add 5add269  refactored socket-creators to separate concerns

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (50ddb4d)
\
 N -- N -- N   refs/heads/feature/GEODE-7808b (5add269)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

No new revisions were added by this update.

Summary of changes:
 geode-core/build.gradle| 1 +
 geode-docs/getting_started/setup_classpath.html.md.erb | 5 -
 geode-docs/rest_apps/setup_config.html.md.erb  | 4 
 3 files changed, 9 insertions(+), 1 deletion(-)



[geode] branch feature/GEODE-7682 updated (471d8b4 -> f6516a7)

2020-02-27 Thread zhouxj
This is an automated email from the ASF dual-hosted git repository.

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


 discard 471d8b4  fix-2
 discard 21dacaf  fix-3
 discard 17e2887  fix-2
 new f6516a7  fix-4

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (471d8b4)
\
 N -- N -- N   refs/heads/feature/GEODE-7682 (f6516a7)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

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.


Summary of changes:
 .../cache/PartitionedRegionClearDUnitTest.java  | 18 ++
 .../internal/cache/DistributedCacheOperation.java   |  2 --
 .../geode/internal/cache/PartitionedRegion.java | 21 +++--
 .../geode/internal/cache/RegionEventImpl.java   |  6 ++
 .../internal/cache/partitioned/ClearPRMessage.java  | 21 +
 5 files changed, 32 insertions(+), 36 deletions(-)



[geode] 01/01: fix-4

2020-02-27 Thread zhouxj
This is an automated email from the ASF dual-hosted git repository.

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

commit f6516a71cb69650cf6373d8809e121e526682a5d
Author: zhouxh 
AuthorDate: Thu Feb 27 16:43:45 2020 -0800

fix-4
---
 .../apache/geode/internal/cache/PartitionedRegion.java |  8 
 .../apache/geode/internal/cache/RegionEventImpl.java   |  6 ++
 .../internal/cache/partitioned/ClearPRMessage.java | 18 +-
 3 files changed, 27 insertions(+), 5 deletions(-)

diff --git 
a/geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegion.java
 
b/geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegion.java
index 2f30cf8..2a58cb6 100755
--- 
a/geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegion.java
+++ 
b/geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegion.java
@@ -2280,6 +2280,9 @@ public class PartitionedRegion extends LocalRegion
 result = response.waitForResult();
   }
 }
+if (result) {
+  return;
+}
   } catch (ForceReattemptException prce) {
 checkReadiness();
 InternalDistributedMember lastTarget = currentTarget;
@@ -2329,6 +2332,11 @@ public class PartitionedRegion extends LocalRegion
 ArrayList clearMsgList = new ArrayList<>();
 for (int bucketId = 0; bucketId < this.totalNumberOfBuckets; bucketId++) {
   ClearPRMessage clearPRMessage = new ClearPRMessage(bucketId);
+  BucketRegion bucketRegion = 
this.getDataStore().getLocalBucketById(bucketId);
+  RegionEventImpl bucketRegionEventImpl =
+  new RegionEventImpl(bucketRegion, Operation.REGION_CLEAR, null, 
false,
+  getMyId(), generateEventID());
+  clearPRMessage.setRegionEvent(bucketRegionEventImpl);
   clearMsgList.add(clearPRMessage);
 }
 return clearMsgList;
diff --git 
a/geode-core/src/main/java/org/apache/geode/internal/cache/RegionEventImpl.java 
b/geode-core/src/main/java/org/apache/geode/internal/cache/RegionEventImpl.java
index 402b7f2..6110636 100644
--- 
a/geode-core/src/main/java/org/apache/geode/internal/cache/RegionEventImpl.java
+++ 
b/geode-core/src/main/java/org/apache/geode/internal/cache/RegionEventImpl.java
@@ -119,6 +119,12 @@ public class RegionEventImpl
 return region;
   }
 
+  public void setRegionIfAbsent(LocalRegion region) {
+if (this.region == null) {
+  this.region = region;
+}
+  }
+
   @Override
   public Operation getOperation() {
 return this.op;
diff --git 
a/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/ClearPRMessage.java
 
b/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/ClearPRMessage.java
index 07bb311..fb2b5fb 100644
--- 
a/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/ClearPRMessage.java
+++ 
b/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/ClearPRMessage.java
@@ -58,7 +58,9 @@ public class ClearPRMessage extends 
PartitionMessageWithDirectReply {
 
   private Integer bucketId;
 
-  /** The time in ms to wait for a lock to be obtained during doLocalClear() */
+  /**
+   * The time in ms to wait for a lock to be obtained during doLocalClear()
+   */
   public static final int LOCK_WAIT_TIMEOUT_MS = 1000;
   public static final String BUCKET_NON_PRIMARY_MESSAGE =
   "The bucket region on target member is no longer primary";
@@ -115,8 +117,7 @@ public class ClearPRMessage extends 
PartitionMessageWithDirectReply {
 
   public ClearResponse send(DistributedMember recipient, PartitionedRegion 
region)
   throws ForceReattemptException {
-Set recipients =
-Collections.singleton((InternalDistributedMember) recipient);
+Set recipients = Collections.singleton(recipient);
 ClearResponse clearResponse = new ClearResponse(region.getSystem(), 
recipients);
 initMessage(region, recipients, clearResponse);
 if (logger.isDebugEnabled()) {
@@ -195,6 +196,7 @@ public class ClearPRMessage extends 
PartitionMessageWithDirectReply {
   throw new ForceReattemptException(BUCKET_NON_PRIMARY_MESSAGE);
 }
 try {
+  regionEvent.setRegionIfAbsent(bucketRegion);
   bucketRegion.cmnClearRegion(regionEvent, true, true);
 } catch (Exception ex) {
   throw new ForceReattemptException(
@@ -261,12 +263,16 @@ public class ClearPRMessage extends 
PartitionMessageWithDirectReply {
 appendFields(buff);
 buff.append(" ,distTx=");
 buff.append(this.isTransactionDistributed);
+buff.append(",event=");
+buff.append(regionEvent);
 buff.append(")");
 return buff.toString();
   }
 
   public static class ClearReplyMessage extends ReplyMessage {
-/** Result of the Clear operation */
+/**
+ * Result of the Clear operation
+ */
 boolean result;
 
 @Override
@@ -287,7 +293,9 @@ public class ClearPRMessage extends 
PartitionMess

[geode] 03/03: refactored socket-creators to separate concerns

2020-02-27 Thread bschuchardt
This is an automated email from the ASF dual-hosted git repository.

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

commit 50ddb4d58ede2cb1370fdcdb5a663ed4f18a0f16
Author: Bruce Schuchardt 
AuthorDate: Thu Feb 27 16:39:52 2020 -0800

refactored socket-creators to separate concerns

ServerSocketCreator holds methods for non-client comms
ClientSocketCreator holds methods that clients should use for comms
AdvancedSocketCreator holds methods for people who need to get around
the limitations of the other two interfaces
---
 .../distributed/LauncherIntegrationTestCase.java   |   3 +-
 .../net/ClientSocketFactoryIntegrationTest.java|   2 +-
 .../internal/net/SSLSocketIntegrationTest.java |   8 +-
 ...SSLSocketParameterExtensionIntegrationTest.java |   9 +-
 .../jmx/internal/MX4JServerSocketFactory.java  |  10 +-
 .../cache/client/internal/ConnectionImpl.java  |   7 +-
 .../internal/cache/tier/sockets/AcceptorImpl.java  |   5 +-
 .../cache/tier/sockets/CacheClientUpdater.java |   2 +-
 .../apache/geode/internal/net/SocketCreator.java   | 329 +
 .../org/apache/geode/internal/tcp/TCPConduit.java  |   7 +-
 .../ContextAwareSSLRMIClientSocketFactory.java |   4 +-
 .../geode/management/internal/ManagementAgent.java |   8 +-
 .../geode/internal/cache/CacheServerImplTest.java  |   5 +
 .../tier/sockets/CacheClientUpdaterJUnitTest.java  |   5 +-
 .../geode/internal/net/SocketCreatorJUnitTest.java |   8 +-
 .../apache/geode/internal/tcp/TCPConduitTest.java  |   3 +-
 .../membership/gms/fd/GMSHealthMonitor.java|   4 +-
 .../acceptance/CacheConnectionIntegrationTest.java |   3 +-
 .../v1/acceptance/CacheOperationsJUnitTest.java|   3 +-
 .../internal/tcpserver/ClientSocketCreator.java|  44 +++
 ...SocketCreator.java => ServerSocketCreator.java} |  39 +-
 .../distributed/internal/tcpserver/TcpClient.java  |   6 +-
 .../distributed/internal/tcpserver/TcpServer.java  |   6 +-
 .../internal/tcpserver/TcpSocketCreator.java   |  68 +---
 .../internal/tcpserver/TcpSocketCreatorImpl.java   | 391 -
 25 files changed, 520 insertions(+), 459 deletions(-)

diff --git 
a/geode-core/src/integrationTest/java/org/apache/geode/distributed/LauncherIntegrationTestCase.java
 
b/geode-core/src/integrationTest/java/org/apache/geode/distributed/LauncherIntegrationTestCase.java
index 99d28f3..4abe252 100755
--- 
a/geode-core/src/integrationTest/java/org/apache/geode/distributed/LauncherIntegrationTestCase.java
+++ 
b/geode-core/src/integrationTest/java/org/apache/geode/distributed/LauncherIntegrationTestCase.java
@@ -293,7 +293,8 @@ public abstract class LauncherIntegrationTestCase {
 try {
   socket = SocketCreatorFactory
   .createNonDefaultInstance(false, false, null, null, 
System.getProperties())
-  .createServerSocket(port, 50, bindAddress, -1);
+  .forServer()
+  .createServerSocket(port, 50, bindAddress);
   assertThat(socket.isBound()).isTrue();
   assertThat(socket.isClosed()).isFalse();
   assertThat(isPortAvailable(port, SOCKET)).isFalse();
diff --git 
a/geode-core/src/integrationTest/java/org/apache/geode/internal/net/ClientSocketFactoryIntegrationTest.java
 
b/geode-core/src/integrationTest/java/org/apache/geode/internal/net/ClientSocketFactoryIntegrationTest.java
index f5bbb5b..fee0190 100644
--- 
a/geode-core/src/integrationTest/java/org/apache/geode/internal/net/ClientSocketFactoryIntegrationTest.java
+++ 
b/geode-core/src/integrationTest/java/org/apache/geode/internal/net/ClientSocketFactoryIntegrationTest.java
@@ -83,7 +83,7 @@ public class ClientSocketFactoryIntegrationTest {
   @Test
   public void testClientSocketFactory() throws Exception {
 assertThatThrownBy(() -> this.socket = SocketCreatorFactory
-.getSocketCreatorForComponent(CLUSTER)
+.getSocketCreatorForComponent(CLUSTER).forClient()
 .connectForClient(new HostAndPort("localhost", 12345), 0))
 
.isExactlyInstanceOf(IOException.class).hasMessage(EXCEPTION_MESSAGE);
 
diff --git 
a/geode-core/src/integrationTest/java/org/apache/geode/internal/net/SSLSocketIntegrationTest.java
 
b/geode-core/src/integrationTest/java/org/apache/geode/internal/net/SSLSocketIntegrationTest.java
index efbd5d5..7594a93 100755
--- 
a/geode-core/src/integrationTest/java/org/apache/geode/internal/net/SSLSocketIntegrationTest.java
+++ 
b/geode-core/src/integrationTest/java/org/apache/geode/internal/net/SSLSocketIntegrationTest.java
@@ -177,11 +177,11 @@ public class SSLSocketIntegrationTest {
 
   @Test
   public void securedSocketTransmissionShouldWork() throws Exception {
-this.serverSocket = this.socketCreator.createServerSocket(0, 0, 
this.localHost);
+this.serverSocket = this.socketCreator.forServer().createServerSocket(0, 
0, this.localHost);
 this.serverThread = startServer(this.serverSocket, 15000);
 
 int serve

[geode] branch feature/GEODE-7808b created (now 50ddb4d)

2020-02-27 Thread bschuchardt
This is an automated email from the ASF dual-hosted git repository.

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


  at 50ddb4d  refactored socket-creators to separate concerns

This branch includes the following new commits:

 new 38341c1  Squashed merge of feature/GEODE-7808
 new ef36cb4  GEODE-7808 - standardize on use of HostAndPort for connection 
formation
 new 50ddb4d  refactored socket-creators to separate concerns

The 3 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] 02/03: GEODE-7808 - standardize on use of HostAndPort for connection formation

2020-02-27 Thread bschuchardt
This is an automated email from the ASF dual-hosted git repository.

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

commit ef36cb44890af6d0655c2bef2d516c8538d514cb
Author: Bruce Schuchardt 
AuthorDate: Thu Feb 27 13:48:39 2020 -0800

GEODE-7808 - standardize on use of HostAndPort for connection formation

This continues a previous PR that passed and was approved for merge.
This commit raises up several methods from SocketCreator into the
TcpSocketCreator interface.  This is an intermediate commit.  A
subsequent commit will refactor TcpSocketCreator to separate the client
and server methods for creating server-sockets and client connections to
server-sockets.
---
 geode-core/build.gradle|  3 +
 .../internal/net/SSLSocketIntegrationTest.java |  2 +-
 .../apache/geode/internal/net/SocketCreator.java   | 79 +++---
 .../org/apache/geode/test/dunit/NetworkUtils.java  |  4 +-
 .../TcpServerProductVersionDUnitTest.java  |  6 +-
 .../distributed/internal/tcpserver/TcpClient.java  |  4 +-
 .../internal/tcpserver/TcpSocketCreator.java   | 59 ++--
 .../internal/tcpserver/TcpSocketCreatorImpl.java   | 46 ++---
 8 files changed, 111 insertions(+), 92 deletions(-)

diff --git a/geode-core/build.gradle b/geode-core/build.gradle
index 0bf0fff..7cf5dfe 100755
--- a/geode-core/build.gradle
+++ b/geode-core/build.gradle
@@ -143,6 +143,9 @@ configurations {
 extendsFrom api
 description 'a dependency that exposes the compiled classes'
   }
+  jmh {
+extendsFrom testImplementation
+  }
 }
 
 dependencies {
diff --git 
a/geode-core/src/integrationTest/java/org/apache/geode/internal/net/SSLSocketIntegrationTest.java
 
b/geode-core/src/integrationTest/java/org/apache/geode/internal/net/SSLSocketIntegrationTest.java
index 7be234f..efbd5d5 100755
--- 
a/geode-core/src/integrationTest/java/org/apache/geode/internal/net/SSLSocketIntegrationTest.java
+++ 
b/geode-core/src/integrationTest/java/org/apache/geode/internal/net/SSLSocketIntegrationTest.java
@@ -182,7 +182,7 @@ public class SSLSocketIntegrationTest {
 
 int serverPort = this.serverSocket.getLocalPort();
 this.clientSocket = this.socketCreator
-.connectForServer(new HostAndPort(this.localHost.getHostAddress(), 
serverPort));
+.connectForServer(new HostAndPort(this.localHost.getHostAddress(), 
serverPort), 0, null);
 
 // transmit expected string from Client to Server
 ObjectOutputStream output = new 
ObjectOutputStream(this.clientSocket.getOutputStream());
diff --git 
a/geode-core/src/main/java/org/apache/geode/internal/net/SocketCreator.java 
b/geode-core/src/main/java/org/apache/geode/internal/net/SocketCreator.java
index 538f79d..122f458 100755
--- a/geode-core/src/main/java/org/apache/geode/internal/net/SocketCreator.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/net/SocketCreator.java
@@ -25,7 +25,6 @@ import java.net.ServerSocket;
 import java.net.Socket;
 import java.net.SocketException;
 import java.net.SocketTimeoutException;
-import java.net.UnknownHostException;
 import java.nio.ByteBuffer;
 import java.nio.channels.SocketChannel;
 import java.security.GeneralSecurityException;
@@ -77,7 +76,6 @@ import org.apache.geode.internal.ClassPathLoader;
 import org.apache.geode.internal.admin.SSLConfig;
 import org.apache.geode.internal.cache.wan.TransportFilterServerSocket;
 import org.apache.geode.internal.cache.wan.TransportFilterSocketFactory;
-import org.apache.geode.internal.inet.LocalHostUtil;
 import org.apache.geode.internal.util.ArgumentRedactor;
 import org.apache.geode.internal.util.PasswordUtil;
 import org.apache.geode.logging.internal.log4j.api.LogService;
@@ -87,23 +85,10 @@ import org.apache.geode.util.internal.GeodeGlossary;
 
 
 /**
- * Analyze configuration data (gemfire.properties) and configure sockets 
accordingly for SSL.
- * 
- * gemfire.useSSL = (true|false) default false.
- * gemfire.ssl.debug = (true|false) default false.
- * gemfire.ssl.needClientAuth = (true|false) default true.
- * gemfire.ssl.protocols = list of protocols
- * gemfire.ssl.ciphers = list of cipher suites
- * 
- * The following may be included to configure the certificates used by the Sun 
Provider.
- * 
- * javax.net.ssl.trustStore = pathname
- * javax.net.ssl.trustStorePassword = password
- * javax.net.ssl.keyStore = pathname
- * javax.net.ssl.keyStorePassword = password
- * 
- * Additional properties will be set as System properties to be available as 
needed by other
- * provider implementations.
+ * SocketCreators are built using a SocketCreatorFactory using Geode 
distributed-system properties.
+ * They know how to properly configure sockets for TLS (SSL) communications 
and perform
+ * handshakes. Connection-initiation uses a HostAndPort instance that is 
similar to an
+ * InetSocketAddress.
  */
 public class SocketCreator extends Tc

[geode] branch feature/GEODE-7681 updated: gradlew spotlessApply

2020-02-27 Thread jchen21
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/feature/GEODE-7681 by this 
push:
 new ee823f5  gradlew spotlessApply
ee823f5 is described below

commit ee823f52b6735858090373b01dd8882876c6f8d9
Author: Jianxia Chen 
AuthorDate: Thu Feb 27 16:04:37 2020 -0800

gradlew spotlessApply

Authored-by: Jianxia Chen 
---
 .../internal/cache/PartitionedRegionClearPerformanceDUnitTest.java  | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git 
a/geode-core/src/distributedTest/java/org/apache/geode/internal/cache/PartitionedRegionClearPerformanceDUnitTest.java
 
b/geode-core/src/distributedTest/java/org/apache/geode/internal/cache/PartitionedRegionClearPerformanceDUnitTest.java
index b7caa8b..a3eb15d 100644
--- 
a/geode-core/src/distributedTest/java/org/apache/geode/internal/cache/PartitionedRegionClearPerformanceDUnitTest.java
+++ 
b/geode-core/src/distributedTest/java/org/apache/geode/internal/cache/PartitionedRegionClearPerformanceDUnitTest.java
@@ -165,7 +165,8 @@ public class PartitionedRegionClearPerformanceDUnitTest 
implements Serializable
   Cache cache = ClusterStartupRule.getCache();
   cache.createRegionFactory(RegionShortcut.PARTITION_REDUNDANT_PERSISTENT)
   .setPartitionAttributes(
-  new 
PartitionAttributesFactory().setRedundantCopies(1).create()).create(regionName);
+  new PartitionAttributesFactory().setRedundantCopies(1).create())
+  .create(regionName);
 
   int numEntries = 100;
   Map entries = new HashMap<>();
@@ -194,7 +195,8 @@ public class PartitionedRegionClearPerformanceDUnitTest 
implements Serializable
   Cache cache = ClusterStartupRule.getCache();
   cache.createRegionFactory(RegionShortcut.PARTITION_REDUNDANT_PERSISTENT)
   .setPartitionAttributes(
-  new 
PartitionAttributesFactory().setRedundantCopies(2).create()).create(regionName);
+  new PartitionAttributesFactory().setRedundantCopies(2).create())
+  .create(regionName);
 
   int numEntries = 100;
   Map entries = new HashMap<>();



[geode] branch feature/GEODE-7681 created (now 5ccefac)

2020-02-27 Thread jchen21
This is an automated email from the ASF dual-hosted git repository.

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


  at 5ccefac  GEODE-7681: Initial draft of performance dunit

This branch includes the following new commits:

 new 5ccefac  GEODE-7681: Initial draft of performance dunit

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] 01/01: GEODE-7681: Initial draft of performance dunit

2020-02-27 Thread jchen21
This is an automated email from the ASF dual-hosted git repository.

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

commit 5ccefac5f69df41375e6762ddf47ed0c3a729b65
Author: Jianxia Chen 
AuthorDate: Thu Feb 27 15:57:39 2020 -0800

GEODE-7681: Initial draft of performance dunit

Authored-by: Jianxia Chen 
---
 ...PartitionedRegionClearPerformanceDUnitTest.java | 226 +
 1 file changed, 226 insertions(+)

diff --git 
a/geode-core/src/distributedTest/java/org/apache/geode/internal/cache/PartitionedRegionClearPerformanceDUnitTest.java
 
b/geode-core/src/distributedTest/java/org/apache/geode/internal/cache/PartitionedRegionClearPerformanceDUnitTest.java
new file mode 100644
index 000..b7caa8b
--- /dev/null
+++ 
b/geode-core/src/distributedTest/java/org/apache/geode/internal/cache/PartitionedRegionClearPerformanceDUnitTest.java
@@ -0,0 +1,226 @@
+/*
+ * 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.internal.cache;
+
+import static org.assertj.core.api.Assertions.assertThat;
+
+import java.io.Serializable;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.stream.IntStream;
+
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+
+import org.apache.geode.cache.Cache;
+import org.apache.geode.cache.PartitionAttributesFactory;
+import org.apache.geode.cache.Region;
+import org.apache.geode.cache.RegionShortcut;
+import org.apache.geode.test.dunit.rules.ClusterStartupRule;
+import org.apache.geode.test.dunit.rules.MemberVM;
+
+public class PartitionedRegionClearPerformanceDUnitTest implements 
Serializable {
+
+  @Rule
+  public ClusterStartupRule clusterStartupRule = new ClusterStartupRule();
+
+  private MemberVM locator, server1;
+
+  private String regionName = "testRegion";
+
+  @Before
+  public void setup() throws Exception {
+locator = clusterStartupRule.startLocatorVM(0, 0);
+server1 = clusterStartupRule.startServerVM(1, locator.getPort());
+clusterStartupRule.startServerVM(2, locator.getPort());
+clusterStartupRule.startServerVM(3, locator.getPort());
+  }
+
+  @Test
+  public void testNonPersistentNonRedundant() {
+server1.invoke(() -> {
+  Cache cache = ClusterStartupRule.getCache();
+  cache.createRegionFactory(RegionShortcut.PARTITION).create(regionName);
+
+  int numEntries = 100;
+  Map entries = new HashMap<>();
+  IntStream.range(0, numEntries).forEach(i -> entries.put("key-" + i, 
"value-" + i));
+  populateRegion(regionName, entries);
+
+  Region region = ClusterStartupRule.getCache().getRegion(regionName);
+
+  assertThat(region.size()).isEqualTo(numEntries);
+  
assertThat(region.getAttributes().getDataPolicy().withPersistence()).isFalse();
+  
assertThat(region.getAttributes().getPartitionAttributes().getRedundantCopies()).isEqualTo(0);
+
+  long startTime = System.currentTimeMillis();
+  region.removeAll(entries.keySet()); // should be region.clear();
+  long endTime = System.currentTimeMillis();
+  System.out.println(
+  "Partitioned region with " + numEntries + " entries takes " + 
(endTime - startTime)
+  + " milliseconds to clear.");
+  assertThat(region.size()).isEqualTo(0);
+});
+  }
+
+  @Test
+  public void testRedundancyOneNonPersistent() {
+server1.invoke(() -> {
+  Cache cache = ClusterStartupRule.getCache();
+  
cache.createRegionFactory(RegionShortcut.PARTITION_REDUNDANT).setPartitionAttributes(
+  new 
PartitionAttributesFactory().setRedundantCopies(1).create()).create(regionName);
+
+  int numEntries = 100;
+  Map entries = new HashMap<>();
+  IntStream.range(0, numEntries).forEach(i -> entries.put("key-" + i, 
"value-" + i));
+  populateRegion(regionName, entries);
+
+  Region region = ClusterStartupRule.getCache().getRegion(regionName);
+
+  assertThat(region.size()).isEqualTo(numEntries);
+  
assertThat(region.getAttributes().getDataPolicy().withPersistence()).isFalse();
+  
assertThat(region.getAttributes().getPartitionAttributes().getRedundantCopies()).isEqualTo(1);
+
+  long startTime = System.currentTimeMillis

[geode-examples] branch develop updated: GEODE-6532: Dependency changes to examples related to the Geode fix. (#92)

2020-02-27 Thread rhoughton
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/develop by this push:
 new 6add395  GEODE-6532: Dependency changes to examples related to the 
Geode fix. (#92)
6add395 is described below

commit 6add39598aa6dbf1180d2d77acf807715db56e43
Author: Robert Houghton 
AuthorDate: Mon Feb 24 14:02:27 2020 -0800

GEODE-6532: Dependency changes to examples related to the Geode fix. (#92)

Several transitive dependencies will be marked 'runtime' not 'compile'
in the POM from geode, causing examples to not miss symbols. Declare
those dependencies outright.

(cherry picked from commit e974408674428770c35be3b444e022d2b9f1973e)
---
 build.gradle  | 30 +-
 gradle.properties | 10 ++
 2 files changed, 19 insertions(+), 21 deletions(-)

diff --git a/build.gradle b/build.gradle
index 073ea65..604243b 100644
--- a/build.gradle
+++ b/build.gradle
@@ -58,21 +58,25 @@ task installGeode(type: Copy) {
 }
 
 subprojects {
-apply plugin: 'java'
+apply plugin: 'java-library'
 
 dependencies {
-compile "org.apache.geode:geode-core:$geodeVersion"
-compile "org.apache.geode:geode-cq:$geodeVersion"
-compile "org.apache.geode:geode-logging:$geodeVersion"
-compile 'com.google.guava:guava:25.1-jre'
-
-testCompile "com.jayway.awaitility:awaitility:$awaitilityVersion"
-testCompile "junit:junit:$junitVersion"
-testCompile "org.mockito:mockito-core:$mockitocoreVersion"
-testCompile "com.github.stefanbirkner:system-rules:$systemrulesVersion"
-testCompile "org.assertj:assertj-core:$assertjVersion"
-compile "org.apache.logging.log4j:log4j-core:$log4jVersion"
-runtime "org.apache.logging.log4j:log4j-slf4j-impl:$log4jVersion"
+api(platform("org.apache.geode:geode-all-bom:$geodeVersion"))
+implementation("org.apache.geode:geode-core")
+implementation("org.apache.geode:geode-cq")
+implementation("org.apache.geode:geode-logging")
+implementation('com.google.guava:guava')
+implementation('org.apache.commons:commons-lang3')
+implementation("org.apache.logging.log4j:log4j-core")
+
+testImplementation("org.awaitility:awaitility")
+testImplementation("junit:junit")
+testImplementation("org.mockito:mockito-core")
+testImplementation("com.github.stefanbirkner:system-rules")
+testImplementation("org.assertj:assertj-core")
+testImplementation('org.apache.httpcomponents:httpcore')
+testImplementation('org.apache.httpcomponents:httpclient')
+runtimeOnly "org.apache.logging.log4j:log4j-slf4j-impl"
 }
 
 jar {
diff --git a/gradle.properties b/gradle.properties
index 4328334..34efdd7 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -22,11 +22,5 @@ geodeVersion = 1.11.0-SNAPSHOT
 geodeRepositoryUrl =
 geodeReleaseUrl =
 
-# dependency versions
-assertjVersion = 3.6.2
-awaitilityVersion = 1.7.0
-junitVersion = 4.12
-mockitocoreVersion = 2.19.1
-log4jVersion = 2.11.0
-systemrulesVersion = 1.16.1
-micrometerVersion = 1.2.0
+# dependency versions not found in geode-all-bom
+micrometerVersion = 1.2.1



[geode-kafka-connector] branch master updated: Removing gradle artifacts.

2020-02-27 Thread nnag
This is an automated email from the ASF dual-hosted git repository.

nnag pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/geode-kafka-connector.git


The following commit(s) were added to refs/heads/master by this push:
 new 084a9ac  Removing gradle artifacts.
084a9ac is described below

commit 084a9ac6f21c1c044d9e0deb1c8606aeed2a0d5e
Author: nabarunnag 
AuthorDate: Thu Feb 27 14:29:39 2020 -0800

Removing gradle artifacts.
---
 build.gradle |  93 -
 gradle.properties|  26 -
 gradle/rat.gradle|  93 -
 gradle/spotless.gradle   | 163 -
 gradle/wrapper/gradle-wrapper.jar| Bin 55190 -> 0 bytes
 gradle/wrapper/gradle-wrapper.properties |   5 -
 gradlew  | 172 ---
 gradlew.bat  |  84 ---
 settings.gradle  |  15 ---
 9 files changed, 651 deletions(-)

diff --git a/build.gradle b/build.gradle
deleted file mode 100644
index add42c7..000
--- a/build.gradle
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- * 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.
- */
-buildscript {
-repositories {
-maven { url "https://plugins.gradle.org/m2/"; }
-maven { url "https://dl.bintray.com/palantir/releases"; }
-jcenter()
-}
-dependencies {
-classpath 'com.diffplug.spotless:spotless-plugin-gradle:3.21.1'
-classpath 'com.github.ben-manes:gradle-versions-plugin:0.21.0'
-classpath 'com.netflix.nebula:gradle-lint-plugin:11.4.4'
-classpath 'com.netflix.nebula:nebula-project-plugin:6.0.2'
-classpath 
'gradle.plugin.com.palantir.gradle.docker:gradle-docker:0.22.1'
-classpath 'io.spring.gradle:dependency-management-plugin:1.0.7.RELEASE'
-classpath 'org.ajoberstar.grgit:grgit-gradle:3.1.1'
-classpath 'org.nosphere.apache:creadur-rat-gradle:0.4.0'
-classpath 'org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:2.7'
-}
-}
-plugins {
-id 'java'
-id 'com.github.johnrengelman.shadow' version '2.0.4'
-}
-
-apply plugin: 'wrapper'
-apply plugin: 'nebula.facet'
-apply plugin: 'java-library'
-apply plugin: 'idea'
-apply plugin: 'eclipse'
-
-tasks.register('devBuild') {
-description "A convenience target for a typical developer workflow: apply 
spotless and assemble all classes."
-dependsOn tasks.named('assemble')
-// Each subproject injects its SpotlessApply as a dependency to this task 
in the standard config
-}
-
-
-apply from: "${rootDir}/${scriptDir}/spotless.gradle"
-apply from: "${scriptDir}/rat.gradle"
-
-
-sourceCompatibility = 1.8
-
-repositories {
-mavenCentral()
-}
-
-dependencies {
-compile('org.apache.geode:geode-core:1.9.0')
-compile('org.apache.geode:geode-cq:1.9.0')
-compile(group: 'org.apache.kafka', name: 'connect-api', version: '2.3.1')
-compile(group: 'org.apache.logging.log4j', name: 'log4j-api', version: 
'2.13.0')
-compile(group: 'org.apache.logging.log4j', name: 'log4j-core', version: 
'2.13.0')
-
-testCompile(group: 'org.apache.kafka', name: 'kafka_2.12', version: 
'2.3.1')
-testCompile(group: 'org.apache.kafka', name: 'kafka-streams-test-utils', 
version: '1.1.0')
-testCompile(group: 'org.apache.curator', name: 'curator-framework', 
version: '4.2.0')
-testCompile(group: 'org.apache.kafka', name: 'connect-runtime', version: 
'2.3.1')
-
-testCompile(group: 'junit', name: 'junit', version: '4.12')
-//testCompile("org.junit.jupiter:junit-jupiter-params:5.4.2")
-testCompile('org.mockito:mockito-core:3.2.4')
-testCompile('pl.pragmatists:JUnitParams:1.1.1')
-testCompile(group: 'org.apache.geode', name: 'geode-dunit', version: 
'1.9.0')
-testImplementation 'org.awaitility:awaitility:3.1.6'
-}
-
-shadowJar {
-dependencies {
-// exclude dependencies provided in the kafka connect classpath
-exclude dependency("org.apache.kafka:connect-api:.*")
-exclude dependency("org.apache.kafka:kafka-clients:.*")
-exclude dependency('net.jpountz.lz4:.*:.*')
-

[geode] branch develop updated (8498329 -> 088e682)

2020-02-27 Thread burcham
This is an automated email from the ASF dual-hosted git repository.

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


from 8498329  GEODE-7815: Document setting a GEODE_HOME env variable (#4732)
 add 088e682  GEODE-7823: eliminate org.junit unavailable compile error in 
IntelliJ (#4742)

No new revisions were added by this update.

Summary of changes:
 geode-core/build.gradle | 4 
 1 file changed, 4 insertions(+)



[geode] branch release/1.12.0 updated: GEODE-7814: Avoid Messaging Unnecessary Allocations (#4731)

2020-02-27 Thread echobravo
This is an automated email from the ASF dual-hosted git repository.

echobravo pushed a commit to branch release/1.12.0
in repository https://gitbox.apache.org/repos/asf/geode.git


The following commit(s) were added to refs/heads/release/1.12.0 by this push:
 new 5a325f4  GEODE-7814: Avoid Messaging Unnecessary Allocations (#4731)
5a325f4 is described below

commit 5a325f4fe59b6203ef93801ee185d2fb79a8f4c8
Author: Juan José Ramos 
AuthorDate: Thu Feb 27 09:40:13 2020 +

GEODE-7814: Avoid Messaging Unnecessary Allocations (#4731)

Avoid unnecessary object allocations by making the attributes static.

(cherry picked from commit db86faec699aca67c02325bca22dcd5b913ddfed)
---
 .../distributed/internal/DistributionMessage.java  | 26 --
 1 file changed, 14 insertions(+), 12 deletions(-)

diff --git 
a/geode-core/src/main/java/org/apache/geode/distributed/internal/DistributionMessage.java
 
b/geode-core/src/main/java/org/apache/geode/distributed/internal/DistributionMessage.java
index f955015..bf5bfab 100644
--- 
a/geode-core/src/main/java/org/apache/geode/distributed/internal/DistributionMessage.java
+++ 
b/geode-core/src/main/java/org/apache/geode/distributed/internal/DistributionMessage.java
@@ -71,6 +71,20 @@ public abstract class DistributionMessage
 
   private static final Logger logger = LogService.getLogger();
 
+  @Immutable
+  protected static final InternalDistributedMember ALL_RECIPIENTS = null;
+
+  @Immutable
+  private static final InternalDistributedMember[] ALL_RECIPIENTS_ARRAY = 
{null};
+
+  @Immutable
+  private static final InternalDistributedMember[] EMPTY_RECIPIENTS_ARRAY =
+  new InternalDistributedMember[0];
+
+  @Immutable
+  private static final List ALL_RECIPIENTS_LIST =
+  Collections.singletonList(null);
+
   // common flags used by operation messages
   /** Keep this compatible with the other GFE layer PROCESSOR_ID flags. */
   protected static final short HAS_PROCESSOR_ID = 0x1;
@@ -88,18 +102,6 @@ public abstract class DistributionMessage
   /** the unreserved flags start for child classes */
   protected static final short UNRESERVED_FLAGS_START = (HAS_PROCESSOR_TYPE << 
1);
 
-  private final InternalDistributedMember[] EMPTY_RECIPIENTS_ARRAY =
-  new InternalDistributedMember[0];
-
-  private final List ALL_RECIPIENTS_LIST =
-  Collections.singletonList(null);
-
-  private final InternalDistributedMember[] ALL_RECIPIENTS_ARRAY =
-  {null};
-
-  @Immutable
-  protected static final InternalDistributedMember ALL_RECIPIENTS = null;
-
    Instance Fields 
 
   /** The sender of this message */



[geode] branch develop updated (db86fae -> 8498329)

2020-02-27 Thread rhoughton
This is an automated email from the ASF dual-hosted git repository.

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


from db86fae  GEODE-7814: Avoid Messaging Unnecessary Allocations (#4731)
 add 8498329  GEODE-7815: Document setting a GEODE_HOME env variable (#4732)

No new revisions were added by this update.

Summary of changes:
 geode-docs/getting_started/setup_classpath.html.md.erb | 5 -
 geode-docs/rest_apps/setup_config.html.md.erb  | 4 
 2 files changed, 8 insertions(+), 1 deletion(-)



[geode] branch develop updated: GEODE-7814: Avoid Messaging Unnecessary Allocations (#4731)

2020-02-27 Thread jjramos
This is an automated email from the ASF dual-hosted git repository.

jjramos 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 db86fae  GEODE-7814: Avoid Messaging Unnecessary Allocations (#4731)
db86fae is described below

commit db86faec699aca67c02325bca22dcd5b913ddfed
Author: Juan José Ramos 
AuthorDate: Thu Feb 27 09:40:13 2020 +

GEODE-7814: Avoid Messaging Unnecessary Allocations (#4731)

Avoid unnecessary object allocations by making the attributes static.
---
 .../distributed/internal/DistributionMessage.java  | 26 --
 1 file changed, 14 insertions(+), 12 deletions(-)

diff --git 
a/geode-core/src/main/java/org/apache/geode/distributed/internal/DistributionMessage.java
 
b/geode-core/src/main/java/org/apache/geode/distributed/internal/DistributionMessage.java
index f955015..bf5bfab 100644
--- 
a/geode-core/src/main/java/org/apache/geode/distributed/internal/DistributionMessage.java
+++ 
b/geode-core/src/main/java/org/apache/geode/distributed/internal/DistributionMessage.java
@@ -71,6 +71,20 @@ public abstract class DistributionMessage
 
   private static final Logger logger = LogService.getLogger();
 
+  @Immutable
+  protected static final InternalDistributedMember ALL_RECIPIENTS = null;
+
+  @Immutable
+  private static final InternalDistributedMember[] ALL_RECIPIENTS_ARRAY = 
{null};
+
+  @Immutable
+  private static final InternalDistributedMember[] EMPTY_RECIPIENTS_ARRAY =
+  new InternalDistributedMember[0];
+
+  @Immutable
+  private static final List ALL_RECIPIENTS_LIST =
+  Collections.singletonList(null);
+
   // common flags used by operation messages
   /** Keep this compatible with the other GFE layer PROCESSOR_ID flags. */
   protected static final short HAS_PROCESSOR_ID = 0x1;
@@ -88,18 +102,6 @@ public abstract class DistributionMessage
   /** the unreserved flags start for child classes */
   protected static final short UNRESERVED_FLAGS_START = (HAS_PROCESSOR_TYPE << 
1);
 
-  private final InternalDistributedMember[] EMPTY_RECIPIENTS_ARRAY =
-  new InternalDistributedMember[0];
-
-  private final List ALL_RECIPIENTS_LIST =
-  Collections.singletonList(null);
-
-  private final InternalDistributedMember[] ALL_RECIPIENTS_ARRAY =
-  {null};
-
-  @Immutable
-  protected static final InternalDistributedMember ALL_RECIPIENTS = null;
-
    Instance Fields 
 
   /** The sender of this message */



[geode] branch feature/GEODE-7682 updated: fix-2

2020-02-27 Thread zhouxj
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/feature/GEODE-7682 by this 
push:
 new 471d8b4  fix-2
471d8b4 is described below

commit 471d8b4b793b0f618b7d05366e651bcba3153ba3
Author: zhouxh 
AuthorDate: Thu Feb 27 00:43:47 2020 -0800

fix-2
---
 .../internal/cache/DistributedCacheOperation.java  |  2 ++
 .../geode/internal/cache/PartitionedRegion.java| 23 --
 .../internal/cache/partitioned/ClearPRMessage.java |  6 +++---
 3 files changed, 22 insertions(+), 9 deletions(-)

diff --git 
a/geode-core/src/main/java/org/apache/geode/internal/cache/DistributedCacheOperation.java
 
b/geode-core/src/main/java/org/apache/geode/internal/cache/DistributedCacheOperation.java
index 70f6328..f3be900 100644
--- 
a/geode-core/src/main/java/org/apache/geode/internal/cache/DistributedCacheOperation.java
+++ 
b/geode-core/src/main/java/org/apache/geode/internal/cache/DistributedCacheOperation.java
@@ -267,6 +267,8 @@ public abstract class DistributedCacheOperation {
 long viewVersion = -1;
 try {
   if (this.containsRegionContentChange()) {
+logger.info("GGG31:" + region);
+logger.info("GGG32:" + region.getDistributionAdvisor());
 viewVersion = region.getDistributionAdvisor().startOperation();
   }
   if (logger.isTraceEnabled(LogMarker.STATE_FLUSH_OP_VERBOSE)) {
diff --git 
a/geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegion.java
 
b/geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegion.java
index 425a0d9..744af9d 100755
--- 
a/geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegion.java
+++ 
b/geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegion.java
@@ -2160,7 +2160,8 @@ public class PartitionedRegion extends LocalRegion
 }
 
 // create ClearPRMessage per bucket
-ArrayList clearMsgList = (ArrayList) 
createClearPRMessages();
+ArrayList clearMsgList = (ArrayList) 
createClearPRMessages(
+regionEvent);
 for (ClearPRMessage clearPRMessage : clearMsgList) {
   int bucketId = clearPRMessage.getBucketId();
   checkReadiness();
@@ -2272,18 +2273,19 @@ public class PartitionedRegion extends LocalRegion
   try {
 final boolean isLocal = (this.localMaxMemory > 0) && 
currentTarget.equals(getMyId());
 if (isLocal) {
-  System.out.println("GGG:before local:" + result);
   result = clearPRMessage.doLocalClear(this, bucketId);
-  System.out.println("GGG:local:" + result);
+  System.out.println("GGG:after local:" + result + ":bucketId=" + 
bucketId);
 } else {
   ClearPRMessage.ClearResponse response = 
clearPRMessage.send(currentTarget, this);
   if (response != null) {
 this.prStats.incPartitionMessagesSent();
-System.out.println("GGG:before remote:" + result);
 result = response.waitForResult();
-System.out.println("GGG:remote:" + result);
+System.out.println("GGG:after remote:" + result + ":bucketId=" + 
bucketId);
   }
 }
+if (result) {
+  return;
+}
   } catch (ForceReattemptException prce) {
 checkReadiness();
 InternalDistributedMember lastTarget = currentTarget;
@@ -2325,14 +2327,23 @@ public class PartitionedRegion extends LocalRegion
 }
   }
 
-  List createClearPRMessages() {
+  List createClearPRMessages(
+  RegionEventImpl regionEvent) {
 if (cache.isCacheAtShutdownAll()) {
   throw cache.getCacheClosedException("Cache is shutting down");
 }
 
 ArrayList clearMsgList = new ArrayList<>();
 for (int bucketId = 0; bucketId < this.totalNumberOfBuckets; bucketId++) {
+  BucketRegion bucketRegion = 
this.getDataStore().getLocalBucketById(bucketId);
+  if (bucketRegion == null) {
+System.out.println("GGG4");
+  }
+  RegionEventImpl bucketRegionEvent =
+  new RegionEventImpl(bucketRegion, Operation.REGION_LOCAL_CLEAR, 
null, false,
+  getMyId(), generateEventID()/* generate EventID */);
   ClearPRMessage clearPRMessage = new ClearPRMessage(bucketId);
+  clearPRMessage.setRegionEvent(bucketRegionEvent);
   clearMsgList.add(clearPRMessage);
 }
 return clearMsgList;
diff --git 
a/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/ClearPRMessage.java
 
b/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/ClearPRMessage.java
index a6a6600..0085404 100644
--- 
a/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/ClearPRMessage.java
+++ 
b/geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/ClearPRMessage.java
@@ -189,17 +189,17 @@ public class ClearPRMessage extends 
Partitio