You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by ma...@apache.org on 2015/11/23 21:48:31 UTC

[01/50] [abbrv] incubator-geode git commit: GEODE-77: clarifying the meaning of max-wait-time-reconnect

Repository: incubator-geode
Updated Branches:
  refs/heads/feature/GEODE-53 d0b593c98 -> b66c47946


GEODE-77: clarifying the meaning of max-wait-time-reconnect


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

Branch: refs/heads/feature/GEODE-53
Commit: 14417892b0c60e809ceafb816391e5050f3373f9
Parents: 6f661a7
Author: Bruce Schuchardt <bs...@pivotal.io>
Authored: Mon Nov 9 08:09:52 2015 -0800
Committer: Bruce Schuchardt <bs...@pivotal.io>
Committed: Mon Nov 9 08:09:52 2015 -0800

----------------------------------------------------------------------
 .../gemfire/distributed/DistributedSystem.java  | 20 ++++++++++++++++----
 1 file changed, 16 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/14417892/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/DistributedSystem.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/DistributedSystem.java b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/DistributedSystem.java
index 69c8311..e2fccd9 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/DistributedSystem.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/DistributedSystem.java
@@ -623,6 +623,18 @@ import com.gemstone.gemfire.security.GemFireSecurityException;
  *   <dd><U>Default</U>: "false"</dd>
  * </dl>
  * 
+ * <dl>
+ *   <a name="max-wait-time-reconnect"><dt>max-wait-time-reconnect</dt></a>
+ *   <dd><U>Description</U>: Specifies the time in milliseconds to wait before each reconnect attempt when
+ *   a member of the distributed system is forced out of the system and auto-reconnect
+ *   is enabled (see <a href="#disable-auto-reconnect"><code>disable-auto-reconnect</code></a>) or if the deprecated required-roles
+ *   feature is being used and a role-loss has triggered a shutdown and reconnect.
+ *   </dd>
+ *   <dd><U>Default</U>: "60000"</dd>
+ *   <dd><U>Since</U>: 5.0</dd>
+ * </dl>
+ *
+ *
  * <b>Redundancy Management</b>
  * 
  * <dl>
@@ -772,10 +784,10 @@ import com.gemstone.gemfire.security.GemFireSecurityException;
  *
  * <dl>
  *   <a name="max-wait-time-reconnect"><dt>max-wait-time-reconnect</dt></a>
- *   <dd><U>Description</U>: Specifies the maximum number of milliseconds
- *   to wait for the distributed system to reconnect in case of required role
- *   loss or forced disconnect. The system will attempt to <a href="#max-num-reconnect-tries">reconnect
- *   more than once</a>, and this timeout period applies to each reconnection attempt.
+ *   <dd><U>Description</U>: Specifies the time in milliseconds to wait before each reconnect attempt when
+ *   a member of the distributed system is forced out of the system and auto-reconnect
+ *   is enabled (see <a href="#disable-auto-reconnect"><code>disable-auto-reconnect</code></a>) or if the deprecated required-roles
+ *   feature is being used and a role-loss has triggered a shutdown and reconnect.
  *   </dd>
  *   <dd><U>Default</U>: "60000"</dd>
  *   <dd><U>Since</U>: 5.0</dd>


[09/50] [abbrv] incubator-geode git commit: GEODE-77: reduce jgroups log level to FATAL

Posted by ma...@apache.org.
GEODE-77: reduce jgroups log level to FATAL

JGroups spits out many ERROR level log messages when there is a network
failure

JGRP000029: 10.138.44.124<v3>:1026: failed sending message to 10.138.44.171<v3>:1026 (284 bytes): java.io.IOException: Operation not permitted, ...


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

Branch: refs/heads/feature/GEODE-53
Commit: 0ee416f99c4730a928c159ae4aeae43e097ec7dd
Parents: 28d273c
Author: Bruce Schuchardt <bs...@pivotal.io>
Authored: Mon Nov 9 13:51:23 2015 -0800
Committer: Bruce Schuchardt <bs...@pivotal.io>
Committed: Mon Nov 9 13:51:23 2015 -0800

----------------------------------------------------------------------
 .../gms/messenger/JGroupsQuorumChecker.java     | 319 -------------------
 gemfire-core/src/main/resources/log4j2.xml      |   2 +-
 2 files changed, 1 insertion(+), 320 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/0ee416f9/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/JGroupsQuorumChecker.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/JGroupsQuorumChecker.java b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/JGroupsQuorumChecker.java
deleted file mode 100755
index eec82c4..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/JGroupsQuorumChecker.java
+++ /dev/null
@@ -1,319 +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.
- */
-
-package com.gemstone.gemfire.distributed.internal.membership.gms.messenger;
-
-import java.io.IOException;
-import java.net.DatagramPacket;
-import java.net.DatagramSocket;
-import java.net.InetSocketAddress;
-import java.net.SocketAddress;
-import java.util.Collection;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.atomic.AtomicBoolean;
-
-import org.apache.logging.log4j.Logger;
-import org.jgroups.Message;
-
-import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
-import com.gemstone.gemfire.distributed.internal.membership.NetView;
-import com.gemstone.gemfire.distributed.internal.membership.QuorumChecker;
-import com.gemstone.gemfire.distributed.internal.membership.gms.GMSMember;
-import com.gemstone.gemfire.internal.concurrent.ConcurrentHashSet;
-import com.gemstone.gemfire.internal.logging.LogService;
-
-/*
- * Implementation of QuorumChecker interface using JGroups artifacts
- * @author Bruce Schuchardt
- * @since 8.1 11/2014
- */
-public class JGroupsQuorumChecker implements QuorumChecker {
-  private static final Logger logger = LogService.getLogger();
-  
-  /**
-   * the last view before a Forced Disconnect
-   */
-  private NetView lastView;
-  /**
-   * The old system's membership socket
-   */
-  private volatile DatagramSocket sock;
-  /**
-   * A boolean to stop the pingResponder thread
-   */
-  private AtomicBoolean stopper = new AtomicBoolean();
-  /**
-   * The thread that responds to ping requests from other members
-   */
-  private Thread pingResponder;
-  /**
-   * The jgroups network partition threshold percentage
-   */
-  private int partitionThreshold;
-  
-  /**
-   * ping-pong responses received
-   */
-  private Set<InternalDistributedMember> receivedAcks;
-  
-  /**
-   * map converting from SocketAddresses to member IDs
-   */
-  private Map<SocketAddress, InternalDistributedMember> addressConversionMap;
-  
-  /**
-   * Whether the quorum checker is currently suspended
-   */
-  private volatile boolean suspended;
-  
-  /**
-   * Whether a quorum has been reached
-   * guardedby this
-   */
-  private boolean quorumAchieved;
-  
-  
-  @Override
-  public void suspend() {
-    this.suspended = true;
-  }
-  
-  @Override
-  public void resume() {
-    this.suspended = false;
-  }
-  
-
-  @Override
-  public synchronized boolean checkForQuorum(long timeout)
-    throws InterruptedException {
-    
-    if (this.quorumAchieved) {
-      return true;
-    }
-    
-    final boolean isDebugEnabled = logger.isDebugEnabled();
-    if (this.sock == null || this.sock.isClosed()) {
-      if (isDebugEnabled) {
-        logger.debug("quorum check: UDP socket is closed.  Unable to perform a quorum check");
-      }
-      return false;
-    }
-    
-    boolean wasSuspended = this.suspended;
-    if (this.suspended) {
-      this.suspended = false;
-    }
-    
-    
-    byte[] buffer = new byte[] { 'p', 'i', 'n', 'g' };
-    
-    
-    if (isDebugEnabled) {
-      logger.debug("beginning quorum check with {}", this);
-    }
-    try {
-      // send a ping message to each member and read pong responses
-      List<InternalDistributedMember> members = this.lastView.getMembers();
-      for (InternalDistributedMember addr: members) {
-        if (!receivedAcks.contains(addr)) {
-          SocketAddress sockaddr = new InetSocketAddress(addr.getNetMember().getInetAddress(), addr.getPort());
-          if (isDebugEnabled) {
-            logger.debug("quorum check: sending request to {}", addr);
-          }
-          try {
-            Message msg = new Message();
-//            msg.setDest(new JGAddress((GMSMember)addr.getNetMember()));
-//            msg.setObject(obj)
-            DatagramPacket packet = new DatagramPacket(buffer, 0, buffer.length, sockaddr);
-            this.sock.send(packet);
-          } catch (IOException io) {
-            // continue to the next member
-          }
-        }
-      }
-      
-      
-      long endTime = System.currentTimeMillis() + timeout;
-      for ( ;; ) {
-        long time = System.currentTimeMillis();
-        long remaining = (endTime - time);
-        if (remaining <= 0) {
-          if (isDebugEnabled) {
-            logger.debug("quorum check: timeout waiting for responses.  {} responses received", receivedAcks.size());
-          }
-          break;
-        }
-        if (isDebugEnabled) {
-          logger.debug("quorum check: waiting up to {}ms to receive a quorum of responses", remaining);
-        }
-        Thread.sleep(500);
-        if (receivedAcks.size() == members.size()) {
-          // we've heard from everyone now so we've got a quorum
-          if (isDebugEnabled) {
-            logger.debug("quorum check: received responses from all members that were in the old distributed system");
-          }
-          this.quorumAchieved = true;
-          return true;
-        }
-      }
-      
-      // quorum check
-      int weight = getWeight(this.lastView.getMembers(), this.lastView.getLeadMember());
-      int ackedWeight = getWeight(receivedAcks, this.lastView.getLeadMember());
-      int lossThreshold = (int)Math.round((weight * this.partitionThreshold) / 100.0); 
-      if (isDebugEnabled) {
-        logger.debug("quorum check: contacted {} processes with {} member weight units.  Threshold for a quorum is {}", receivedAcks.size(), ackedWeight, lossThreshold);
-      }
-      this.quorumAchieved = (ackedWeight >= lossThreshold);
-      return this.quorumAchieved;
-
-    } finally {
-      if (wasSuspended) {
-        this.suspended = true;
-      }
-    }
-  }
-
-
-  private int getWeight(Collection<InternalDistributedMember> idms, InternalDistributedMember leader) {
-    int weight = 0;
-    for (InternalDistributedMember mbr: idms) {
-      int thisWeight = mbr.getNetMember().getMemberWeight();
-      if (mbr.getVmKind() == 10 /* NORMAL_DM_KIND */) {
-        thisWeight += 10;
-        if (leader != null && mbr.equals(leader)) {
-          thisWeight += 5;
-        }
-      } else if (mbr.getNetMember().preferredForCoordinator()) {
-        thisWeight += 3;
-      }
-      weight += thisWeight;
-    }
-    return weight;
-  }
-
-  @Override
-  public Object getMembershipInfo() {
-    if (this.sock == null || this.sock.isClosed()) {
-      return null;
-    }
-    return this.sock;
-  }
-  
-  /**
-   * Create a new QuorumCheckerImpl.  It must be initialized with initialize() before
-   * it can be used for quorum checks
-   */
-  public JGroupsQuorumChecker(NetView jgView, int partitionThreshold, DatagramSocket jgSock) {
-    this.sock = jgSock;
-    this.lastView = jgView;
-    this.partitionThreshold = partitionThreshold;
-  }
-
-  
-  public void initialize() {
-    if (this.sock == null  ||  this.sock.isClosed()) {
-      return;
-    }
-    receivedAcks = new ConcurrentHashSet<InternalDistributedMember>(this.lastView.size());
-    addressConversionMap = new ConcurrentHashMap<SocketAddress, InternalDistributedMember>(this.lastView.size());
-    List<InternalDistributedMember> members = this.lastView.getMembers();
-    for (InternalDistributedMember addr: members) {
-      SocketAddress sockaddr = new InetSocketAddress(addr.getNetMember().getInetAddress(), addr.getPort());
-      addressConversionMap.put(sockaddr, addr);
-    }
-    startPingResponder();
-  }
-  
-  
-  // start a background thread to respond to "ping" requests
-  private void startPingResponder() {
-    this.stopper.set(false);
-    this.pingResponder = new Thread("GemFire Auto-reconnect responder") {
-      public void run() {
-        byte[] pongBuffer = new byte[] {'p', 'o', 'n', 'g'};
-        byte[] buffer = new byte[100];
-
-        while (!stopper.get()) {
-          DatagramPacket packet = new DatagramPacket(buffer, buffer.length);
-          try {
-            boolean sleep = JGroupsQuorumChecker.this.suspended;
-            if (sleep) {
-              try {
-                Thread.sleep(2000);
-              } catch (InterruptedException e) {
-                return;
-              }
-              continue;
-            }
-            sock.receive(packet);
-            SocketAddress senderSockAddr = packet.getSocketAddress();
-            logger.info("received {} bytes from {}", packet.getLength(), senderSockAddr);
-            if (packet.getLength() == 4) {
-              if (buffer[0] == 'p' && buffer[1] == 'i' && buffer[2] == 'n' && buffer[3] == 'g') {
-                logger.info("received ping-pong request from {} - sending response", senderSockAddr);
-                DatagramPacket response = new DatagramPacket(pongBuffer, pongBuffer.length, senderSockAddr);
-                sock.send(response);
-              } else if (buffer[0] == 'p' && buffer[1] == 'o' && buffer[2] == 'n' && buffer[3] == 'g') {
-                pongReceived(senderSockAddr);
-              }
-            }
-          } catch (IOException e) {
-            try {
-              // if the network is down sleep a bit to keep from running hot
-              Thread.sleep(500);
-            } catch (InterruptedException ie) {
-              return;
-            }
-          }
-        }
-      }
-    };
-    this.pingResponder.setDaemon(true);
-    this.pingResponder.start();
-  }
-  
-  public void pongReceived(SocketAddress senderSockAddr) {
-    logger.info("received ping-pong response from {}", senderSockAddr);
-    
-    InternalDistributedMember memberAddr = addressConversionMap.get(senderSockAddr);
-    if (memberAddr != null) {
-      logger.info("quorum check: mapped address to member ID {}", memberAddr);
-      receivedAcks.add(memberAddr);
-    }
-  }
-  
-  public void teardown() {
-    if (this.sock != null) {
-      stopper.set(true);
-    }
-  }
-  
-  @Override
-  public String toString() {
-    if (this.sock != null) {
-      return "QuorumChecker(port="+this.sock.getLocalPort()+"; view="+this.lastView+")";
-    } else {
-      return "QuorumChecker(disabled; view="+this.lastView+")";
-    }
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/0ee416f9/gemfire-core/src/main/resources/log4j2.xml
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/resources/log4j2.xml b/gemfire-core/src/main/resources/log4j2.xml
index 00a1d91..670c0f1 100755
--- a/gemfire-core/src/main/resources/log4j2.xml
+++ b/gemfire-core/src/main/resources/log4j2.xml
@@ -15,7 +15,7 @@
       <MarkerFilter marker="GEMFIRE_VERBOSE" onMatch="DENY" onMismatch="NEUTRAL"/>
     </filters>
     </Logger>
-    <Logger name="org.jgroups" level="WARN" additivity="true"/>
+    <Logger name="org.jgroups" level="FATAL" additivity="true"/>
     <Root level="INFO">
       <AppenderRef ref="STDOUT"/>
     </Root>


[28/50] [abbrv] incubator-geode git commit: GEODE-542: Send a function response after a CancelException

Posted by ma...@apache.org.
GEODE-542: Send a function response after a CancelException

There was a catch clause of a CancelException that was causing us not to
reply to a function call if a CacheClosedException was thrown from the
function. That caused as hang waiting for replies.


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

Branch: refs/heads/feature/GEODE-53
Commit: 88da702593157d8a0c014295cab16149fc088dfc
Parents: 5a0d43e
Author: Dan Smith <up...@apache.org>
Authored: Wed Nov 11 12:24:16 2015 -0800
Committer: Dan Smith <up...@apache.org>
Committed: Fri Nov 13 15:22:42 2015 -0800

----------------------------------------------------------------------
 .../cache/MemberFunctionStreamingMessage.java   |  9 ++--
 .../MemberFunctionExecutionDUnitTest.java       | 49 ++++++++++++++++++++
 2 files changed, 54 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/88da7025/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/MemberFunctionStreamingMessage.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/MemberFunctionStreamingMessage.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/MemberFunctionStreamingMessage.java
index 9ea6f28..b3bdc85 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/MemberFunctionStreamingMessage.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/MemberFunctionStreamingMessage.java
@@ -32,6 +32,7 @@ import com.gemstone.gemfire.cache.CacheException;
 import com.gemstone.gemfire.cache.Region;
 import com.gemstone.gemfire.cache.execute.Function;
 import com.gemstone.gemfire.cache.execute.FunctionException;
+import com.gemstone.gemfire.cache.execute.FunctionInvocationTargetException;
 import com.gemstone.gemfire.cache.execute.FunctionService;
 import com.gemstone.gemfire.cache.execute.ResultSender;
 import com.gemstone.gemfire.cache.query.QueryException;
@@ -213,10 +214,10 @@ public class MemberFunctionStreamingMessage extends DistributionMessage implemen
       // bug 37026: this is too noisy...
       // throw new CacheClosedException("remote system shutting down");
       // thr = se; cache is closed, no point trying to send a reply
-      thr = null;
-      if (logger.isDebugEnabled()) {
-        logger.debug("shutdown caught, abandoning message: {}",exception.getMessage(), exception);
-      }
+      thr = new FunctionInvocationTargetException(exception);
+      stats.endFunctionExecutionWithException(this.functionObject.hasResult());
+      rex = new ReplyException(thr);
+      replyWithException(dm, rex);
     }
     catch (Exception exception) {
       if (logger.isDebugEnabled()) {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/88da7025/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/MemberFunctionExecutionDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/MemberFunctionExecutionDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/MemberFunctionExecutionDUnitTest.java
index 129cd18..4b8f009 100755
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/MemberFunctionExecutionDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/MemberFunctionExecutionDUnitTest.java
@@ -25,12 +25,16 @@ import java.util.List;
 import java.util.Map;
 import java.util.Properties;
 import java.util.Set;
+import java.util.concurrent.TimeUnit;
 
+import com.gemstone.gemfire.cache.CacheClosedException;
+import com.gemstone.gemfire.cache.CacheFactory;
 import com.gemstone.gemfire.cache.execute.Execution;
 import com.gemstone.gemfire.cache.execute.Function;
 import com.gemstone.gemfire.cache.execute.FunctionAdapter;
 import com.gemstone.gemfire.cache.execute.FunctionContext;
 import com.gemstone.gemfire.cache.execute.FunctionException;
+import com.gemstone.gemfire.cache.execute.FunctionInvocationTargetException;
 import com.gemstone.gemfire.cache.execute.FunctionService;
 import com.gemstone.gemfire.cache.execute.ResultCollector;
 import com.gemstone.gemfire.cache30.CacheTestCase;
@@ -46,6 +50,8 @@ import com.gemstone.gemfire.internal.cache.functions.TestFunction;
 import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
 
 import dunit.Host;
+import dunit.SerializableCallable;
+import dunit.SerializableRunnable;
 import dunit.VM;
 
 public class MemberFunctionExecutionDUnitTest extends CacheTestCase {
@@ -300,6 +306,49 @@ public class MemberFunctionExecutionDUnitTest extends CacheTestCase {
     member1.invoke(MemberFunctionExecutionDUnitTest.class, "bug41118");
   }
   
+  public void testOnMembersWithoutCache()
+      throws Exception {
+    DistributedMember member1Id = (DistributedMember) member1.invoke(new SerializableCallable() {
+      
+      @Override
+      public Object call() {
+        disconnectFromDS();
+        return getSystem().getDistributedMember();
+      }
+    });
+    
+    member2.invoke(new SerializableRunnable() {
+      
+      @Override
+      public void run() {
+        getSystem();
+        ResultCollector<?, ?> rc = FunctionService.onMember(member1Id).execute(new FunctionAdapter() {
+          
+          @Override
+          public String getId() {
+            return getClass().getName();
+          }
+          
+          @Override
+          public void execute(FunctionContext context) {
+            //This will throw an exception because the cache is not yet created.
+            CacheFactory.getAnyInstance();
+          }
+        });
+        
+        try {
+          rc.getResult(30, TimeUnit.SECONDS);
+          fail("Should have seen an exception");
+        } catch (Exception e) {
+          if(!(e.getCause() instanceof FunctionInvocationTargetException)) {
+            fail("failed", e);
+          }
+        }
+        
+      }
+    });
+  }
+  
   public static void bug41118(){
     ds = new MemberFunctionExecutionDUnitTest("temp").getSystem();
     assertNotNull(ds);


[47/50] [abbrv] incubator-geode git commit: Reconciled Greg's and Dave's changes to the homepage from PRs #36 and #38

Posted by ma...@apache.org.
Reconciled Greg's and Dave's changes to the homepage from PRs #36 and #38


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

Branch: refs/heads/feature/GEODE-53
Commit: 831ce70960980b0c961a198266005fd9d62f8d4a
Parents: d0b593c
Author: Dave Barnes <db...@pivotal.io>
Authored: Fri Nov 20 16:01:20 2015 -0800
Committer: Dave Barnes <db...@pivotal.io>
Committed: Fri Nov 20 16:01:20 2015 -0800

----------------------------------------------------------------------
 gemfire-site/content/index.html | 36 +++++++++++++++++++++---------------
 1 file changed, 21 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/831ce709/gemfire-site/content/index.html
----------------------------------------------------------------------
diff --git a/gemfire-site/content/index.html b/gemfire-site/content/index.html
index e8c8776..097fa86 100644
--- a/gemfire-site/content/index.html
+++ b/gemfire-site/content/index.html
@@ -71,11 +71,12 @@
             <img class="logo-title img-responsive hidden-xs" src="img/apache_geode_logo.png" />
             <div class="text-container">
                 <h2 class="tagline"><em>Performance</em> is key. <em>Consistency</em> is a must.</h2>
-                <p class="description">Solving the hardest data management problems since 2002.<br/>
-                  <br/>Build elastic modern <em>in-memory</em> data intensive applications and <em>scale</em>.<br/>
-                  <br/>Deliver high-performance at cloud scale blending advanced techniques for data replication, partitioning and distributed processing.<br/>
+                <p class="description">Solving low latency data management problems at very high concurrency since 2002.<br/>
+                  <br/>Build high-speed, data-intensive applications that elastically meet performance requirements at any scale.<br/>
+                  Take advantage of Apache Geode's unique technology that blends advanced techniques for data replication, partitioning and distributed processing.
 
-                  <br/>Implement a database-like consistency model, reliable transaction processing and shared-nothing architecture with ease.<br/></p>
+                  <br/><br/>
+                  Apache Geode provides a database-like consistency model, reliable transaction processing and a shared-nothing architecture to maintain very low latency performance with high concurrency processing.<br/></p>
             </div>
 
             <div class="btn-wrapper">
@@ -94,42 +95,42 @@
             <div class="col-md-4">
                 <div class="bf-icon-wrap"><i style="font-size:65px; vertical-align: -5px;" aria-hidden="true" class="icon-sitemap""></i></div>
                 <h3>Replication and Partitioning</h3>
-                <p>Data can easily be partitioned (sharded) or replicated and resilience is ensured through redundant copies or disk-persistence allowing data to scale to fit any need.</p>
+                <p>Data can easily be partitioned (sharded) or replicated between nodes allowing performance to scale as needed. Durability is ensured through redundant in-memory copies and disk-based persistence.</p>
             </div>
             <div class="col-md-4">
                 <div class="bf-icon-wrap"><i style="font-size:65px; vertical-align: -5px;" aria-hidden="true" class="icon-hdd"></i></div>
                 <h3>Persistence</h3>
-                <p>Super fast WAL persistence mechanism with shared-nothing architecture optimized for fast parallel recovery of a cluster or a single node.</p>
+                <p>Super fast write-ahead-logging (WAL) persistence with a shared-nothing architecture that is optimized for fast parallel recovery of nodes or an entire cluster.</p>
             </div>
             <div class="col-md-4">
                 <div class="bf-icon-wrap"><i aria-hidden="true" class="icon-rocket"></i></div>
                 <h3>Performance</h3>
-                <p>Predictable low latency for transactions, reads, writes and query processing over indexed and non-indexed data.</p>
+                <p>Linear-scaling low latency for transactions, reads, writes and query processing of indexed or unindexed data.</p>
             </div>
         </div>
         <div class="row">
             <div class="col-md-4">
                 <div class="bf-icon-wrap" style="font-size:40px; vertical-align: 15px;"><i aria-hidden="true" class="icon-fast-forward"></i><i aria-hidden="true" class="icon-dashboard"></i></div>
                 <h3>In-Memory Storage</h3>
-                <p>Blazing fast in-memory storage optimized for large heaps, with the option of using off-heap storage, compression and features such as disk-overflow, eviction and expiration.</p>
+                <p>Blazing fast in-memory storage optimized for large heaps, with the option of using off-heap storage, compression and features such as disk-overflow, eviction and expiration of data.</p>
             </div>
             <div class="col-md-4">
                 <div class="bf-icon-wrap"><span style="font-size:60px" aria-hidden="true" class="icon-cogs"></span></div>
                 <h3>Functions</h3>
-                <p>Distributed data-aware processing can be deployed and executed in parallel on a cluster. Failed operations can be retried on different nodes.</p>
+                <p>Distributed location-aware user functions can be deployed and executed by the same nodes storing relevant sharded data for fast parallel processing. Failed operations can be retried on replicant nodes.</p>
             </div>
             <div class="col-md-4">
                 <div class="bf-icon-wrap"><i style="font-size:65px; vertical-align: -5px;" aria-hidden="true" class="icon-credit-card"></i></div>
                 <h3>Transactions</h3>
-                <p>ACID distributed transactions support for efficient and safe coordinated operations on colocated data. Transactions can be  initiated from a client or a server and can be suspended.</p>
+                <p>ACID distributed transactions support efficient and safe coordinated operations on colocated data. Transactions can be initiated or suspended by either a client or a server.</p>
             </div>
         </div>
         <div class="row">
           <div class="col-md-4">
               <div class="bf-icon-wrap"><i style="font-size:65px; vertical-align: -5px;" aria-hidden="true" class="icon-table"></i></div>
               <h3>OQL and Indexes</h3>
-              <p>Object Query Language supports distributed query execution on hot and cold data, with SQL-like capabilities, including joins.<br/>
-              Multiple indexes can be created and consistently maintained across the cluster.</p>
+              <p>Object Query Language allows distributed query execution on hot and cold data, with SQL-like capabilities, including joins.<br/>
+              Multiple kinds of indexes can be defined and consistently maintained across the cluster.</p>
           </div>
           <div class="col-md-4">
               <div class="bf-icon-wrap"><i style="font-size:65px; vertical-align: -5px;" aria-hidden="true" class="icon-bolt"></i></div>
@@ -139,7 +140,7 @@
           <div class="col-md-4">
               <div class="bf-icon-wrap"><i style="font-size:65px; vertical-align: -5px;" aria-hidden="true" class="icon-cloud"></i></div>
               <h3>Clustering</h3>
-              <p>Highly scalable, robust, advanced clustering technology with failure detection, dynamic scale, and network-partition detection algorithms.</p>
+              <p>Highly scalable, robust advanced clustering technology with failure detection, dynamic scaling, and network-partition detection algorithms.</p>
           </div>
         </div>
     </div>
@@ -162,8 +163,13 @@
             <div class="col-md-12 text-left">
                 <h2>About the Project</h2>
                 <p>Apache Geode is a data management platform that provides real-time, consistent access to data-intensive applications throughout widely distributed cloud architectures.</p>
-                <p>By pooling memory, CPU, network resources, and optionally local disk across multiple processes to manage application objects and behavior, it uses dynamic replication and data partitioning techniques to implement high availability, improved performance, scalability, and fault tolerance. In addition to being a distributed data container, Geode is an in-memory data management system that provides reliable asynchronous event notifications and guaranteed message delivery.</p>
-                <p>Apache Geode is a mature mature and robust product that can trace its legacy all the way back to GemStone, one of the first Object Databases for Smalltalk. Geode (as GemFire™) was first deployed in the financial sector as the transactional, low-latency data engine used by multiple Wall Street trading platforms. Today Geode is used by over 600 enterprise customers for high-scale, 24x7 business critical applications.</p>
+
+                <p>By pooling memory, CPU, network resources, and optionally local disk across multiple processes to manage application objects and behavior, it uses dynamic replication and data partitioning techniques to implement high availability, improved performance, scalability, and fault tolerance. In addition to being a distributed data container, Apache Geode is an in-memory data management system that provides reliable asynchronous event notifications and guaranteed message delivery.</p>
+
+                <p>Apache Geode is a mature, robust technology originally developed by GemStone Systems in Beaverton, Oregon.
+Commercially available as GemFire™, the technology was first widely deployed in the financial sector as the transactional, low-latency data engine used
+in Wall Street trading platforms. 
+Today Apache Geode is used by over 600 enterprise customers for high-scale business applications that must meet low latency and 24x7 availability requirements.</p>
             </div>
             <!--
             <div class="col-md-4 text-left">


[19/50] [abbrv] incubator-geode git commit: GEODE-427: add more test logging

Posted by ma...@apache.org.
GEODE-427: add more test logging


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

Branch: refs/heads/feature/GEODE-53
Commit: 5118ad08ea5882c46fd2238aa08183db84c6f880
Parents: 355a2d3
Author: Darrel Schneider <ds...@pivotal.io>
Authored: Thu Nov 12 16:18:06 2015 -0800
Committer: Darrel Schneider <ds...@pivotal.io>
Committed: Thu Nov 12 16:18:06 2015 -0800

----------------------------------------------------------------------
 .../cache/management/MemoryThresholdsDUnitTest.java     | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/5118ad08/gemfire-core/src/test/java/com/gemstone/gemfire/cache/management/MemoryThresholdsDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/management/MemoryThresholdsDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/management/MemoryThresholdsDUnitTest.java
index 1d1ada3..4edab28 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/management/MemoryThresholdsDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/management/MemoryThresholdsDUnitTest.java
@@ -409,7 +409,7 @@ public class MemoryThresholdsDUnitTest extends ClientServerTestCase {
     registerTestMemoryThresholdListener(server2);
 
     //NORMAL -> CRITICAL
-    server2.invoke(new SerializableCallable() {
+    server2.invoke(new SerializableCallable("NORMAL->CRITICAL") {
       public Object call() throws Exception {
         GemFireCacheImpl gfCache = (GemFireCacheImpl)getCache();
         getCache().getLoggerI18n().fine(addExpectedExString);
@@ -428,7 +428,7 @@ public class MemoryThresholdsDUnitTest extends ClientServerTestCase {
     verifyListenerValue(server1, MemoryState.NORMAL, 0, true);;
 
     //CRITICAL -> EVICTION
-    server2.invoke(new SerializableCallable() {
+    server2.invoke(new SerializableCallable("CRITICAL->EVICTION") {
       public Object call() throws Exception {
         GemFireCacheImpl gfCache = (GemFireCacheImpl)getCache();
         getCache().getLoggerI18n().fine(addExpectedBelow);
@@ -445,7 +445,7 @@ public class MemoryThresholdsDUnitTest extends ClientServerTestCase {
     verifyListenerValue(server1, MemoryState.NORMAL, 0, true);;
     
     //EVICTION -> EVICTION
-    server2.invoke(new SerializableCallable() {
+    server2.invoke(new SerializableCallable("EVICTION->EVICTION") {
       public Object call() throws Exception {
         GemFireCacheImpl gfCache = (GemFireCacheImpl)getCache();
         gfCache.getResourceManager().getHeapMonitor().updateStateAndSendEvent(840);
@@ -460,7 +460,7 @@ public class MemoryThresholdsDUnitTest extends ClientServerTestCase {
     verifyListenerValue(server1, MemoryState.NORMAL, 0, true);
 
     //EVICTION -> NORMAL
-    server2.invoke(new SerializableCallable() {
+    server2.invoke(new SerializableCallable("EVICTION->NORMAL") {
       public Object call() throws Exception {
         GemFireCacheImpl gfCache = (GemFireCacheImpl)getCache();
         gfCache.getResourceManager().getHeapMonitor().updateStateAndSendEvent(750);
@@ -477,7 +477,7 @@ public class MemoryThresholdsDUnitTest extends ClientServerTestCase {
     
     this.getLogWriter().info("before NORMAL->CRITICAL->NORMAL");
     //NORMAL -> EVICTION -> NORMAL
-    server2.invoke(new SerializableCallable() {
+    server2.invoke(new SerializableCallable("NORMAL->CRITICAL->NORMAL") {
       public Object call() throws Exception {
         GemFireCacheImpl gfCache = (GemFireCacheImpl)getCache();
         gfCache.getResourceManager().getHeapMonitor().updateStateAndSendEvent(950);
@@ -495,7 +495,7 @@ public class MemoryThresholdsDUnitTest extends ClientServerTestCase {
     verifyListenerValue(server1, MemoryState.NORMAL, 2, true);
     
     //NORMAL -> EVICTION
-    server2.invoke(new SerializableCallable() {
+    server2.invoke(new SerializableCallable("NORMAL->EVICTION") {
       public Object call() throws Exception {
         GemFireCacheImpl gfCache = (GemFireCacheImpl)getCache();
         gfCache.getResourceManager().getHeapMonitor().updateStateAndSendEvent(850);


[24/50] [abbrv] incubator-geode git commit: GEODE-402: MembershipListener callbacks are not always invoked

Posted by ma...@apache.org.
GEODE-402: MembershipListener callbacks are not always invoked


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

Branch: refs/heads/feature/GEODE-53
Commit: 8703abc4a7578d2667a800f47f9e771946ef82e4
Parents: 9438c8b
Author: Barry Oglesby <bo...@pivotal.io>
Authored: Tue Nov 10 18:55:22 2015 -0800
Committer: Barry Oglesby <bo...@pivotal.io>
Committed: Fri Nov 13 09:10:56 2015 -0800

----------------------------------------------------------------------
 .../internal/DistributionManager.java           | 322 ++++---------------
 1 file changed, 66 insertions(+), 256 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8703abc4/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionManager.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionManager.java b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionManager.java
index f32f408..9c06fa1 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionManager.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionManager.java
@@ -2478,43 +2478,6 @@ public class DistributionManager
     }
   }
 
-  private void handleJoinEvent(MemberJoinedEvent ev) {
-    InternalDistributedMember id = ev.getId();
-    for (Iterator iter = membershipListeners.keySet().iterator();
-         iter.hasNext(); ) {
-      MembershipListener listener = (MembershipListener) iter.next();
-      try {
-        listener.memberJoined(id);
-      } catch (CancelException e) {
-        if (isCloseInProgress()) {
-          if (logger.isTraceEnabled()) {
-            logger.trace("MemberEventInvoker: cancelled");
-          }
-        }
-        else {
-          logger.warn(LocalizedMessage.create(LocalizedStrings.DistributionManager_UNEXPECTED_CANCELLATION), e);
-        }
-        break;
-      }
-    }
-    for (Iterator iter = allMembershipListeners.iterator();
-         iter.hasNext(); ) {
-      MembershipListener listener = (MembershipListener) iter.next();
-      try  {
-        listener.memberJoined(id);
-      } catch (CancelException e) {
-        if (isCloseInProgress()) {
-          if (logger.isTraceEnabled()) {
-            logger.trace("MemberEventInvoker: cancelled");
-          }
-        }
-        else {
-          logger.warn(LocalizedMessage.create(LocalizedStrings.DistributionManager_UNEXPECTED_CANCELLATION), e);
-        }
-        break;
-      }
-    }
-  }
   /**
    * Returns true if this DM or the DistributedSystem owned by
    * it is closing or is closed.
@@ -2529,120 +2492,6 @@ public class DistributionManager
     }
     return false;
   }
-  private void handleCrashEvent(MemberCrashedEvent ev) {
-    InternalDistributedMember id = ev.getId();
-    for (Iterator iter = membershipListeners.keySet().iterator();
-         iter.hasNext(); ) {
-      MembershipListener listener = (MembershipListener) iter.next();
-      try {
-        listener.memberDeparted(id, true/*crashed*/);
-      } catch (CancelException e) {
-        if (isCloseInProgress()) {
-          if (logger.isTraceEnabled()) {
-            logger.trace("MemberEventInvoker: cancelled");
-          }
-        }
-        else {
-          logger.warn(LocalizedMessage.create(LocalizedStrings.DistributionManager_UNEXPECTED_CANCELLATION), e);
-        }
-        break;
-      }
-    }
-    for (Iterator iter = allMembershipListeners.iterator();
-         iter.hasNext(); ) {
-      MembershipListener listener = (MembershipListener) iter.next();
-      try {
-        listener.memberDeparted(id, true/*crashed*/);
-      } catch (CancelException e) {
-        if (isCloseInProgress()) {
-          if (logger.isTraceEnabled()) {
-            logger.trace("MemberEventInvoker: cancelled");
-          }
-        }
-        else {
-          logger.warn(LocalizedMessage.create(LocalizedStrings.DistributionManager_UNEXPECTED_CANCELLATION), e);
-        }
-        break;
-      }
-    }
-    
-    MembershipLogger.logCrash(id);
-  }
-  private void handleDepartEvent(MemberDepartedEvent ev) {
-    InternalDistributedMember id = ev.getId();
-    for (Iterator iter = membershipListeners.keySet().iterator();
-         iter.hasNext(); ) {
-      MembershipListener listener = (MembershipListener) iter.next();
-      try {
-        listener.memberDeparted(id, false);
-      } catch (CancelException e) {
-        if (isCloseInProgress()) {
-          if (logger.isTraceEnabled()) {
-            logger.trace("MemberEventInvoker: cancelled");
-          }
-        }
-        else {
-          logger.warn(LocalizedMessage.create(LocalizedStrings.DistributionManager_UNEXPECTED_CANCELLATION), e);
-        }
-        break;
-      }
-    }
-    for (Iterator iter = allMembershipListeners.iterator();
-         iter.hasNext(); ) {
-      MembershipListener listener = (MembershipListener) iter.next();
-      try {
-        listener.memberDeparted(id, false);
-      } catch (CancelException e) {
-        if (isCloseInProgress()) {
-          if (logger.isTraceEnabled()) {
-            logger.trace("MemberEventInvoker: cancelled");
-          }
-        }
-        else {
-          logger.warn(LocalizedMessage.create(LocalizedStrings.DistributionManager_UNEXPECTED_CANCELLATION), e);
-        }
-        break;
-      }
-    }
-  }
-  private void handleSuspectEvent(MemberSuspectEvent ev) {
-    InternalDistributedMember id = ev.getId();
-    InternalDistributedMember whoSuspected = ev.whoSuspected();
-    for (Iterator iter = membershipListeners.keySet().iterator();
-         iter.hasNext(); ) {
-      MembershipListener listener = (MembershipListener) iter.next();
-      try {
-        listener.memberSuspect(id, whoSuspected);
-      } catch (CancelException e) {
-        if (isCloseInProgress()) {
-          if (logger.isTraceEnabled()) {
-            logger.trace("MemberEventInvoker: cancelled");
-          }
-        }
-        else {
-          logger.warn(LocalizedMessage.create(LocalizedStrings.DistributionManager_UNEXPECTED_CANCELLATION), e);
-        }
-        break;
-      }
-    }
-    for (Iterator iter = allMembershipListeners.iterator();
-    iter.hasNext(); ) {
-      MembershipListener listener = (MembershipListener) iter.next();
-      try {
-        listener.memberSuspect(id, whoSuspected);
-      } catch (CancelException e) {
-        if (isCloseInProgress()) {
-          if (logger.isTraceEnabled()) {
-            logger.trace("MemberEventInvoker: cancelled");
-          }
-        }
-        else {
-          logger.warn(LocalizedMessage.create(LocalizedStrings.DistributionManager_UNEXPECTED_CANCELLATION), e);
-        }
-        break;
-      }
-    }
-  }
   
   private void handleViewInstalledEvent(ViewInstalledEvent ev) {
     synchronized(this.membershipViewIdGuard) {
@@ -2651,43 +2500,6 @@ public class DistributionManager
     }
   }
   
-  private void handleQuorumLostEvent(QuorumLostEvent ev) {
-    for (Iterator iter = membershipListeners.keySet().iterator();
-    iter.hasNext(); ) {
-      MembershipListener listener = (MembershipListener) iter.next();
-      try {
-        listener.quorumLost(ev.getFailures(), ev.getRemaining());
-      } catch (CancelException e) {
-        if (isCloseInProgress()) {
-          if (logger.isTraceEnabled()) {
-            logger.trace("MemberEventInvoker: cancelled");
-          }
-        }
-        else {
-          logger.warn(LocalizedMessage.create(LocalizedStrings.DistributionManager_UNEXPECTED_CANCELLATION), e);
-        }
-        break;
-      }
-    }
-    for (Iterator iter = allMembershipListeners.iterator();
-    iter.hasNext(); ) {
-      MembershipListener listener = (MembershipListener) iter.next();
-      try {
-        listener.quorumLost(ev.getFailures(), ev.getRemaining());
-      } catch (CancelException e) {
-        if (isCloseInProgress()) {
-          if (logger.isTraceEnabled()) {
-            logger.trace("MemberEventInvoker: cancelled");
-          }
-        }
-        else {
-          logger.warn(LocalizedMessage.create(LocalizedStrings.DistributionManager_UNEXPECTED_CANCELLATION), e);
-        }
-        break;
-      }
-    }
-  }
-  
   /**
    * This stalls waiting for the current membership view (as seen by the
    * membership manager) to be acknowledged by all membership listeners
@@ -2707,44 +2519,8 @@ public class DistributionManager
   }
 
   protected void handleMemberEvent(MemberEvent ev) {
-    try {
-      switch (ev.eventType()) {
-      case MemberEvent.MEMBER_JOINED:
-        handleJoinEvent((MemberJoinedEvent)ev);
-        break;
-      case MemberEvent.MEMBER_DEPARTED:
-        handleDepartEvent((MemberDepartedEvent)ev);
-        break;
-      case MemberEvent.MEMBER_CRASHED:
-        handleCrashEvent((MemberCrashedEvent)ev);
-        break;
-      case MemberEvent.MEMBER_SUSPECT:
-        handleSuspectEvent((MemberSuspectEvent)ev);
-        break;
-      case MemberEvent.VIEW_INSTALLED:
-        // we're done processing events for a view
-        handleViewInstalledEvent((ViewInstalledEvent)ev);
-        break;
-      case MemberEvent.QUORUM_LOST:
-        handleQuorumLostEvent((QuorumLostEvent)ev);
-        break;
-      default:
-        logger.warn(LocalizedMessage.create(LocalizedStrings.DistributionManager_UNKNOWN_TYPE_OF_MEMBERSHIP_EVENT_RECEIVED_0, ev));
-        break;
-      }
-    }
-    catch (CancelException ex) {
-      // bug 37198...don't print a stack trace
-      logger.debug("Cancellation while calling membership listener for event <{}>: {}", ev, ex.getMessage(), ex);
-      
-      // ...and kill the caller...
-      throw ex;
-    }
-    catch (RuntimeException ex) {
-      logger.warn(LocalizedMessage.create(LocalizedStrings.DistributionManager_EXCEPTION_WHILE_CALLING_MEMBERSHIP_LISTENER_FOR_EVENT__0, ev), ex);
-    }
+    ev.handleEvent(this);
   }
-  
 
   /**
    * This thread processes member events as they occur.
@@ -4766,12 +4542,6 @@ public class DistributionManager
   
  
   private static abstract class MemberEvent  {
-    static final int MEMBER_JOINED = 0;
-    static final int MEMBER_DEPARTED = 1;
-    static final int MEMBER_CRASHED = 2;
-    static final int MEMBER_SUSPECT = 3;
-    static final int VIEW_INSTALLED = 4;
-    static final int QUORUM_LOST = 5;
     
     private InternalDistributedMember id;
     MemberEvent(InternalDistributedMember id) {
@@ -4780,9 +4550,45 @@ public class DistributionManager
     public InternalDistributedMember getId() {
       return this.id;
     }
-    /** return the type of event: MEMBER_JOINED, MEMBER_DEPARTED, etc */
-    public abstract int eventType();
-  }
+
+    public void handleEvent(DistributionManager manager) {
+      handleEvent(manager, manager.membershipListeners.keySet());
+      handleEvent(manager, manager.allMembershipListeners);
+    }
+
+    protected abstract void handleEvent(MembershipListener listener);
+
+    protected void handleEvent(DistributionManager manager, Set<MembershipListener> membershipListeners) {
+      for (MembershipListener listener : membershipListeners) {
+        try {
+          handleEvent(listener);
+        } catch (CancelException e) {
+          if (manager.isCloseInProgress()) {
+            if (logger.isTraceEnabled()) {
+              logger.trace("MemberEventInvoker: cancelled");
+            }
+          }
+          else {
+            logger.warn(LocalizedMessage.create(LocalizedStrings.DistributionManager_UNEXPECTED_CANCELLATION), e);
+          }
+          break;
+        } catch (VirtualMachineError err) {
+          SystemFailure.initiateFailure(err);
+          // If this ever returns, rethrow the error.  We're poisoned
+          // now, so don't let this thread continue.
+          throw err;
+        } catch (Throwable t) {
+          // Whenever you catch Error or Throwable, you must also
+          // catch VirtualMachineError (see above).  However, there is
+          // _still_ a possibility that you are dealing with a cascading
+          // error condition, so you also need to check to see if the JVM
+          // is still usable:
+          SystemFailure.checkFailure();
+          logger.warn(LocalizedMessage.create(LocalizedStrings.DistributionManager_EXCEPTION_WHILE_CALLING_MEMBERSHIP_LISTENER_FOR_EVENT__0, this), t);
+        }
+      }
+    }
+}
   
   /**
    * This is an event reflecting that a InternalDistributedMember has joined
@@ -4800,8 +4606,8 @@ public class DistributionManager
       return "member " + getId() + " joined";
     }
     @Override
-    public int eventType() {
-      return MEMBER_JOINED;
+    protected void handleEvent(MembershipListener listener) {
+      listener.memberJoined(getId());	
     }
   }
   
@@ -4818,13 +4624,13 @@ public class DistributionManager
       reason = r;
     }
     @Override
-    public int eventType() {
-      return MEMBER_DEPARTED;
-    }
-    @Override
     public String toString() {
       return "member " + getId() + " departed (" + reason + ")";
     }
+    @Override
+    protected void handleEvent(MembershipListener listener) {
+     listener.memberDeparted(getId(), false);	
+    }
   }
   
   /**
@@ -4842,13 +4648,13 @@ public class DistributionManager
       reason = r;
     }
     @Override
-    public int eventType() {
-      return MEMBER_CRASHED;
-    }
-    @Override
     public String toString() {
       return "member " + getId() + " crashed: " + reason;
     }
+    @Override
+    protected void handleEvent(MembershipListener listener) {
+      listener.memberDeparted(getId(), true/*crashed*/);	
+    }
   }
 
   /**
@@ -4866,13 +4672,13 @@ public class DistributionManager
       return this.whoSuspected;
     }
     @Override
-    public int eventType() {
-      return MEMBER_SUSPECT;
-    }
-    @Override
     public String toString() {
       return "member " + getId() + " suspected by: " + this.whoSuspected;
     }
+    @Override
+    protected void handleEvent(MembershipListener listener) {
+      listener.memberSuspect(getId(), whoSuspected());	
+    }
   }
   
   private static final class ViewInstalledEvent extends MemberEvent {
@@ -4885,13 +4691,17 @@ public class DistributionManager
       return view.getViewNumber();
     }
     @Override
-    public int eventType() {
-      return VIEW_INSTALLED;
-    }
-    @Override
     public String toString() {
       return "view installed: " + this.view;
     }
+    @Override
+    public void handleEvent(DistributionManager manager) {
+      manager.handleViewInstalledEvent(this);
+    }
+    @Override
+    protected void handleEvent(MembershipListener listener) {
+      throw new UnsupportedOperationException();
+    }
   }
 
   private static final class QuorumLostEvent extends MemberEvent {
@@ -4910,13 +4720,13 @@ public class DistributionManager
       return this.remaining;
     }
     @Override
-    public int eventType() {
-      return QUORUM_LOST;
-    }
-    @Override
     public String toString() {
       return "quorum lost.  failures=" + failures + "; remaining=" + remaining;
     }
+    @Override
+    protected void handleEvent(MembershipListener listener) {
+      listener.quorumLost(getFailures(), getRemaining());	
+    }
   }
 
 


[34/50] [abbrv] incubator-geode git commit: GEODE-192: Removing TransactionFunctionService

Posted by ma...@apache.org.
GEODE-192: Removing TransactionFunctionService

This internal class was added for a use case that is no longer
supported. It has a bug, in that the client may never have connected to
the server that it supposed to be able to look up and invoke the
function on. Deleting the class rather than trying to fix the bug
because the class is no longer needed.


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

Branch: refs/heads/feature/GEODE-53
Commit: 3fc29923007f92011f4bfd4e985d1854536a98cb
Parents: e8ddd33
Author: Dan Smith <up...@apache.org>
Authored: Tue Oct 27 13:35:49 2015 -0700
Committer: Dan Smith <up...@apache.org>
Committed: Tue Nov 17 10:53:56 2015 -0800

----------------------------------------------------------------------
 .../client/internal/EndpointManagerImpl.java    |   2 -
 .../cache/execute/ServerFunctionExecutor.java   |  18 --
 .../execute/TransactionFunctionService.java     | 193 -------------------
 .../cache/execute/util/CommitFunction.java      |   1 -
 .../cache/execute/util/RollbackFunction.java    |   1 -
 .../cache/ClientServerTransactionDUnitTest.java |  31 +--
 6 files changed, 8 insertions(+), 238 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3fc29923/gemfire-core/src/main/java/com/gemstone/gemfire/cache/client/internal/EndpointManagerImpl.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/client/internal/EndpointManagerImpl.java b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/client/internal/EndpointManagerImpl.java
index 5c03be8..853ab36 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/client/internal/EndpointManagerImpl.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/client/internal/EndpointManagerImpl.java
@@ -34,7 +34,6 @@ import com.gemstone.gemfire.distributed.DistributedSystem;
 import com.gemstone.gemfire.distributed.internal.ServerLocation;
 import com.gemstone.gemfire.internal.DummyStatisticsFactory;
 import com.gemstone.gemfire.internal.cache.PoolStats;
-import com.gemstone.gemfire.internal.cache.execute.TransactionFunctionService;
 import com.gemstone.gemfire.internal.cache.tier.InternalClientMembership;
 import com.gemstone.gemfire.internal.logging.LogService;
 
@@ -59,7 +58,6 @@ public class EndpointManagerImpl implements EndpointManager {
     this.cancelCriterion = cancelCriterion;
     this.poolStats = poolStats;
     listener.addListener(new EndpointListenerForBridgeMembership());
-    listener.addListener(new TransactionFunctionService.ListenerForTransactionFunctionService());
   }
   
   /* (non-Javadoc)

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3fc29923/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/execute/ServerFunctionExecutor.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/execute/ServerFunctionExecutor.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/execute/ServerFunctionExecutor.java
index ba87bb5..bf00268 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/execute/ServerFunctionExecutor.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/execute/ServerFunctionExecutor.java
@@ -45,8 +45,6 @@ public class ServerFunctionExecutor extends AbstractExecution {
 
   private final boolean allServers;
   
-  private boolean onBehalfOfTXFunctionService;
-
   private String[] groups;
 
   public ServerFunctionExecutor(Pool p, boolean allServers, String... groups) {
@@ -68,7 +66,6 @@ public class ServerFunctionExecutor extends AbstractExecution {
       this.pool = sfe.pool;
     }
     this.allServers = sfe.allServers;
-    this.onBehalfOfTXFunctionService = sfe.onBehalfOfTXFunctionService;
     this.groups = sfe.groups;
   }
   
@@ -114,9 +111,6 @@ public class ServerFunctionExecutor extends AbstractExecution {
     }
     } finally {
       UserAttributes.userAttributes.set(null);
-      if (isOnBehalfOfTXFunctionService()) {
-        pool.releaseServerAffinity();
-      }
     }
   }
 
@@ -148,9 +142,6 @@ public class ServerFunctionExecutor extends AbstractExecution {
     }
     finally {
       UserAttributes.userAttributes.set(null);
-      if (isOnBehalfOfTXFunctionService()) {
-        pool.releaseServerAffinity();
-      }
     }
 
   }
@@ -434,13 +425,4 @@ public class ServerFunctionExecutor extends AbstractExecution {
       return executeFunction(functionObject);      
     }
   }
-
-  public void setOnBehalfOfTXFunctionService(boolean onBehalfOfTXFunctionService) {
-    this.onBehalfOfTXFunctionService = onBehalfOfTXFunctionService;
-  }
-
-  public boolean isOnBehalfOfTXFunctionService() {
-    return onBehalfOfTXFunctionService;
-  }
-  
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3fc29923/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/execute/TransactionFunctionService.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/execute/TransactionFunctionService.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/execute/TransactionFunctionService.java
deleted file mode 100644
index e56e647..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/execute/TransactionFunctionService.java
+++ /dev/null
@@ -1,193 +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.
- */
-package com.gemstone.gemfire.internal.cache.execute;
-
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.ConcurrentMap;
-
-import com.gemstone.gemfire.cache.TransactionDataNodeHasDepartedException;
-import com.gemstone.gemfire.cache.TransactionId;
-import com.gemstone.gemfire.cache.client.Pool;
-import com.gemstone.gemfire.cache.client.internal.Endpoint;
-import com.gemstone.gemfire.cache.client.internal.EndpointManager;
-import com.gemstone.gemfire.cache.client.internal.PoolImpl;
-import com.gemstone.gemfire.cache.execute.Execution;
-import com.gemstone.gemfire.cache.execute.FunctionService;
-import com.gemstone.gemfire.distributed.DistributedMember;
-import com.gemstone.gemfire.distributed.internal.ServerLocation;
-import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
-import com.gemstone.gemfire.internal.cache.PoolManagerImpl;
-import com.gemstone.gemfire.internal.cache.TXId;
-import com.gemstone.gemfire.internal.cache.execute.util.CommitFunction;
-import com.gemstone.gemfire.internal.cache.execute.util.RollbackFunction;
-
-/**
- * Access point for executing functions that should be targeted to
- * execute on member where the transaction is hosted.
- * </p> To commit a transaction which is not hosted locally, this
- * functionService can be used to obtain an execution object on which
- * {@link CommitFunction} and {@link RollbackFunction} can be called.
- * 
- * @author sbawaska
- * @since 6.6.1
- */
-public final class TransactionFunctionService {
-
-  private TransactionFunctionService() {
-  }
-
-  /**
-   * This is a convenience method to obtain execution objects for transactional
-   * functions. This method can be invoked from clients as well as peer members.
-   * When invoked from a client this method makes sure that the function is
-   * executed on the member where the transaction is hosted. This prevents the
-   * need for fanning out the function to multiple servers. e.g. A remotely
-   * hosted transaction can be committed as:
-   * 
-   * <pre>
-   * Execution exe = TransactionFunctionService.onTransaction(txId);
-   * List l = (List) exe.execute(transactionalFunction).getResult();
-   * </pre>
-   * 
-   * @param transactionId
-   *          the transaction identifier
-   * @return the execution object
-   * @see CommitFunction
-   * @see RollbackFunction
-   * @since 6.6.1
-   */
-  public static Execution onTransaction(TransactionId transactionId) {
-    Execution execution = null;
-    GemFireCacheImpl cache = GemFireCacheImpl
-        .getExisting("getting transaction execution");
-    if (cache.hasPool()) {
-      if (cache.getLoggerI18n().fineEnabled()) {
-        cache.getLoggerI18n().fine("TxFunctionService: inClientMode");
-      }
-      PoolImpl pool = (PoolImpl) getPool(cache);
-      
-      DistributedMember member = ((TXId)transactionId).getMemberId();
-      ServerLocation loc = memberToServerLocation.get(member);
-      if (loc == null) {
-        loc = getServerLocationForMember(pool, member);
-        if (loc == null) {
-          throw new TransactionDataNodeHasDepartedException("Could not connect to member:"+member);
-        }
-        memberToServerLocation.put(member, loc);
-      }
-      // setup server affinity so that the function is executed
-      // on the member hosting the transaction
-      pool.setupServerAffinity(false/*allowFailover*/);
-      pool.setServerAffinityLocation(loc);
-      if (cache.getLoggerI18n().fineEnabled()) {
-        cache.getLoggerI18n().fine(
-            "TxFunctionService: setting server affinity to:" + loc
-                + " which represents member:" + member);
-      }
-      execution = FunctionService.onServer(pool).withArgs(
-          transactionId);
-      // this serverAffinity is cleared up in the finally blocks
-      // of ServerFunctionExecutor
-      ((ServerFunctionExecutor)execution).setOnBehalfOfTXFunctionService(true);
-    } else {
-      if (cache.getLoggerI18n().fineEnabled()) {
-        cache.getLoggerI18n().fine("TxFunctionService: inPeerMode");
-      }
-      TXId txId = (TXId) transactionId;
-      DistributedMember member = txId.getMemberId();
-      execution = FunctionService
-          .onMember(cache.getDistributedSystem(), member).withArgs(
-              transactionId);
-    }
-    return execution;
-  }
-  
-  /**
-   * keep a mapping of DistributedMemeber to ServerLocation so that we can still
-   * connect to the same server when the poolLoadConditioningMonitor closes
-   * connection. fix for bug 43810
-   */
-  private static final ConcurrentMap<DistributedMember, ServerLocation> memberToServerLocation =
-    new ConcurrentHashMap<DistributedMember, ServerLocation>();
-  
-  /**
-   * Get the ServerLocation corresponding to the given DistributedMember
-   * or null if there is no endPoint to the member
-   * @param pool
-   * @param member
-   */
-  private static ServerLocation getServerLocationForMember(PoolImpl pool,
-      DistributedMember member) {
-    Map<ServerLocation, Endpoint> endPoints = pool.getEndpointMap();
-    for (Endpoint endPoint : endPoints.values()) {
-      if (endPoint.getMemberId().equals(member)) {
-        return endPoint.getLocation();
-      }
-    }
-    return null;
-  }
-
-  private static Pool getPool(GemFireCacheImpl cache) {
-    Pool pool = cache.getDefaultPool();
-    if (pool == null) {
-      Collection<Pool> pools = getPools();
-      if (pools.size() > 1) {
-        throw new IllegalStateException("More than one pools found");
-      }
-      pool = pools.iterator().next();
-    }
-    return pool;
-  }
-  
-  private static Collection<Pool> getPools() {
-    Collection<Pool> pools = PoolManagerImpl.getPMI().getMap().values();
-    for(Iterator<Pool> itr= pools.iterator(); itr.hasNext(); ) {
-      PoolImpl pool = (PoolImpl) itr.next();
-      if(pool.isUsedByGateway()) {
-        itr.remove();
-      }
-    }
-    return pools;
-  }
-  
-  /**
-   * When an EndPoint becomes available we remember the mapping of
-   * DistributedMember to ServerLocation so that we can reconnect to the server.
-   * fix for bug 43817
-   * 
-   * @author sbawaska
-   */
-  public static class ListenerForTransactionFunctionService implements
-      EndpointManager.EndpointListener {
-
-    public void endpointNoLongerInUse(Endpoint endpoint) {
-    }
-
-    public void endpointCrashed(Endpoint endpoint) {
-    }
-
-    public void endpointNowInUse(Endpoint endpoint) {
-      assert endpoint != null;
-      memberToServerLocation.put(endpoint.getMemberId(),
-          endpoint.getLocation());
-    }
-
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3fc29923/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/execute/util/CommitFunction.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/execute/util/CommitFunction.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/execute/util/CommitFunction.java
index bafafa9..b0f4d93 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/execute/util/CommitFunction.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/execute/util/CommitFunction.java
@@ -34,7 +34,6 @@ import com.gemstone.gemfire.cache.execute.FunctionInvocationTargetException;
 import com.gemstone.gemfire.cache.execute.FunctionService;
 import com.gemstone.gemfire.distributed.DistributedMember;
 import com.gemstone.gemfire.internal.cache.TXId;
-import com.gemstone.gemfire.internal.cache.execute.TransactionFunctionService;
 import com.gemstone.gemfire.internal.logging.LogService;
 
 /**

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3fc29923/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/execute/util/RollbackFunction.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/execute/util/RollbackFunction.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/execute/util/RollbackFunction.java
index 7dbfc62..459cd47 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/execute/util/RollbackFunction.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/execute/util/RollbackFunction.java
@@ -33,7 +33,6 @@ import com.gemstone.gemfire.cache.execute.FunctionException;
 import com.gemstone.gemfire.cache.execute.FunctionService;
 import com.gemstone.gemfire.distributed.DistributedMember;
 import com.gemstone.gemfire.internal.cache.TXId;
-import com.gemstone.gemfire.internal.cache.execute.TransactionFunctionService;
 import com.gemstone.gemfire.internal.logging.LogService;
 
 /**

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3fc29923/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ClientServerTransactionDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ClientServerTransactionDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ClientServerTransactionDUnitTest.java
index b361110..b5e8437 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ClientServerTransactionDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ClientServerTransactionDUnitTest.java
@@ -17,6 +17,7 @@
 package com.gemstone.gemfire.internal.cache;
 
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Iterator;
@@ -39,6 +40,7 @@ import com.gemstone.gemfire.cache.client.ClientCache;
 import com.gemstone.gemfire.cache.client.ClientCacheFactory;
 import com.gemstone.gemfire.cache.client.ClientRegionFactory;
 import com.gemstone.gemfire.cache.client.ClientRegionShortcut;
+import com.gemstone.gemfire.cache.client.Pool;
 import com.gemstone.gemfire.cache.client.PoolFactory;
 import com.gemstone.gemfire.cache.client.PoolManager;
 import com.gemstone.gemfire.cache.execute.Execution;
@@ -56,7 +58,6 @@ import com.gemstone.gemfire.distributed.DistributedSystem;
 import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
 import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
 import com.gemstone.gemfire.internal.AvailablePort;
-import com.gemstone.gemfire.internal.cache.execute.TransactionFunctionService;
 import com.gemstone.gemfire.internal.cache.execute.data.CustId;
 import com.gemstone.gemfire.internal.cache.execute.data.Customer;
 import com.gemstone.gemfire.internal.cache.execute.data.Order;
@@ -2607,22 +2608,6 @@ public void testClientCommitAndDataStoreGetsEvent() throws Exception {
     }
   }
   
-  class TestCommitFunction extends FunctionAdapter {
-    @Override
-    public void execute(FunctionContext context) {
-      CacheTransactionManager mgr = getCache().getCacheTransactionManager();
-      TransactionId txId = (TransactionId) context.getArguments();
-      assertTrue(mgr.isSuspended(txId));
-      mgr.resume(txId);
-      mgr.commit();
-      context.getResultSender().lastResult(Boolean.TRUE);
-    }
-    @Override
-    public String getId() {
-      return "CommitFunction";
-    }
-  }
-  
   public void testBasicResumableTX() {
     disconnectAllFromDS();
     Host host = Host.getHost(0);
@@ -2649,7 +2634,7 @@ public void testClientCommitAndDataStoreGetsEvent() throws Exception {
         result = (List) FunctionService.onRegion(cust).withArgs(args).execute(new TXFunction()).getResult();
         TransactionId txId2 = (TransactionId) result.get(0);
         assertEquals(txId, txId2);
-        result = (List) TransactionFunctionService.onTransaction(txId).execute(new TestCommitFunction()).getResult();
+        result = (List) FunctionService.onServer(getCache()).withArgs(txId).execute(new CommitFunction()).getResult();
         Boolean b = (Boolean) result.get(0);
         assertEquals(Boolean.TRUE, b);
         assertEquals(new Customer("name0", "address0"), cust.get(new CustId(0)));
@@ -2667,8 +2652,8 @@ public void testClientCommitAndDataStoreGetsEvent() throws Exception {
   public void testClientCommitFunction() {
     doFunctionWork(true);
   }
-  @Ignore("Bug 52331")
-  public void DISABLED_testClientRollbackFunction() {
+  
+  public void testClientRollbackFunction() {
     doFunctionWork(false);
   }
   private void doFunctionWork(final boolean commit) {
@@ -2741,9 +2726,9 @@ public void testClientCommitAndDataStoreGetsEvent() throws Exception {
           }
           List list = null;
           if (commit) {
-            list = (List) TransactionFunctionService.onTransaction(txId).execute(new CommitFunction()).getResult();
+            list = (List) FunctionService.onServer(getCache()).withArgs(txId).execute(new CommitFunction()).getResult();
           } else {
-            list = (List) TransactionFunctionService.onTransaction(txId).execute(new RollbackFunction()).getResult();
+            list = (List) FunctionService.onServer(getCache()).withArgs(txId).execute(new RollbackFunction()).getResult();
           }
           assertEquals(Boolean.TRUE, list.get(0));
           if (commit) {
@@ -2889,7 +2874,7 @@ public void testClientCommitAndDataStoreGetsEvent() throws Exception {
     
     accessor.invoke(new SerializableCallable() {
       public Object call() throws Exception {
-        Execution exe = TransactionFunctionService.onTransaction(txId);
+        Execution exe = FunctionService.onMember(((TXId) txId).getMemberId()).withArgs(txId);
         List list = null;
         if (commit) {
           list = (List) exe.execute(new CommitFunction()).getResult();


[06/50] [abbrv] incubator-geode git commit: GEODE-11: ADD Apache License header

Posted by ma...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/300397c1/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/LuceneQueryFactoryImplJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/LuceneQueryFactoryImplJUnitTest.java b/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/LuceneQueryFactoryImplJUnitTest.java
index 6cb5368..0614e62 100644
--- a/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/LuceneQueryFactoryImplJUnitTest.java
+++ b/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/LuceneQueryFactoryImplJUnitTest.java
@@ -1,3 +1,21 @@
+/*
+ * 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 com.gemstone.gemfire.cache.lucene.internal;
 
 import static org.junit.Assert.*;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/300397c1/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/LuceneQueryImplJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/LuceneQueryImplJUnitTest.java b/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/LuceneQueryImplJUnitTest.java
index e26ab00..3975ac3 100644
--- a/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/LuceneQueryImplJUnitTest.java
+++ b/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/LuceneQueryImplJUnitTest.java
@@ -1,3 +1,22 @@
+/*
+ * 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 com.gemstone.gemfire.cache.lucene.internal;
 
 import static org.junit.Assert.assertEquals;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/300397c1/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/LuceneQueryResultsImplJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/LuceneQueryResultsImplJUnitTest.java b/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/LuceneQueryResultsImplJUnitTest.java
index 7009255..91556a9 100644
--- a/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/LuceneQueryResultsImplJUnitTest.java
+++ b/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/LuceneQueryResultsImplJUnitTest.java
@@ -1,3 +1,22 @@
+/*
+ * 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 com.gemstone.gemfire.cache.lucene.internal;
 
 import static org.junit.Assert.*;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/300397c1/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/LuceneResultStructImpJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/LuceneResultStructImpJUnitTest.java b/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/LuceneResultStructImpJUnitTest.java
index bc9ad33..7893940 100644
--- a/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/LuceneResultStructImpJUnitTest.java
+++ b/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/LuceneResultStructImpJUnitTest.java
@@ -1,3 +1,22 @@
+/*
+ * 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 com.gemstone.gemfire.cache.lucene.internal;
 
 import static org.junit.Assert.*;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/300397c1/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/LuceneServiceImplJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/LuceneServiceImplJUnitTest.java b/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/LuceneServiceImplJUnitTest.java
index 0cfd989..159fd46 100644
--- a/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/LuceneServiceImplJUnitTest.java
+++ b/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/LuceneServiceImplJUnitTest.java
@@ -1,3 +1,22 @@
+/*
+ * 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 com.gemstone.gemfire.cache.lucene.internal;
 
 import static org.junit.Assert.assertEquals;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/300397c1/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/PartitionedRepositoryManagerJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/PartitionedRepositoryManagerJUnitTest.java b/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/PartitionedRepositoryManagerJUnitTest.java
index 23518e1..41376f5 100644
--- a/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/PartitionedRepositoryManagerJUnitTest.java
+++ b/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/PartitionedRepositoryManagerJUnitTest.java
@@ -1,3 +1,22 @@
+/*
+ * 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 com.gemstone.gemfire.cache.lucene.internal;
 
 import static org.junit.Assert.assertEquals;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/300397c1/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/StringQueryProviderJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/StringQueryProviderJUnitTest.java b/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/StringQueryProviderJUnitTest.java
index 673fdf2..a16b019 100644
--- a/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/StringQueryProviderJUnitTest.java
+++ b/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/StringQueryProviderJUnitTest.java
@@ -1,3 +1,22 @@
+/*
+ * 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 com.gemstone.gemfire.cache.lucene.internal;
 
 import static org.junit.Assert.assertEquals;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/300397c1/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/directory/RegionDirectoryJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/directory/RegionDirectoryJUnitTest.java b/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/directory/RegionDirectoryJUnitTest.java
index 9dd1d6b..d20b052 100644
--- a/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/directory/RegionDirectoryJUnitTest.java
+++ b/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/directory/RegionDirectoryJUnitTest.java
@@ -1,3 +1,22 @@
+/*
+ * 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 com.gemstone.gemfire.cache.lucene.internal.directory;
 
 import java.io.IOException;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/300397c1/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/distributed/DistributedScoringJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/distributed/DistributedScoringJUnitTest.java b/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/distributed/DistributedScoringJUnitTest.java
index d18c520..bec2da8 100644
--- a/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/distributed/DistributedScoringJUnitTest.java
+++ b/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/distributed/DistributedScoringJUnitTest.java
@@ -1,3 +1,22 @@
+/*
+ * 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 com.gemstone.gemfire.cache.lucene.internal.distributed;
 
 import java.io.IOException;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/300397c1/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/distributed/EntryScoreJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/distributed/EntryScoreJUnitTest.java b/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/distributed/EntryScoreJUnitTest.java
index c05fb61..abdf8ec 100644
--- a/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/distributed/EntryScoreJUnitTest.java
+++ b/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/distributed/EntryScoreJUnitTest.java
@@ -1,3 +1,22 @@
+/*
+ * 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 com.gemstone.gemfire.cache.lucene.internal.distributed;
 
 import org.junit.Assert;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/300397c1/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/distributed/LuceneFunctionContextJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/distributed/LuceneFunctionContextJUnitTest.java b/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/distributed/LuceneFunctionContextJUnitTest.java
index 98b48d8..46ea67f 100644
--- a/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/distributed/LuceneFunctionContextJUnitTest.java
+++ b/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/distributed/LuceneFunctionContextJUnitTest.java
@@ -1,3 +1,22 @@
+/*
+ * 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 com.gemstone.gemfire.cache.lucene.internal.distributed;
 
 import static org.junit.Assert.assertEquals;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/300397c1/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/distributed/LuceneFunctionJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/distributed/LuceneFunctionJUnitTest.java b/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/distributed/LuceneFunctionJUnitTest.java
index 419aa26..750ec0f 100644
--- a/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/distributed/LuceneFunctionJUnitTest.java
+++ b/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/distributed/LuceneFunctionJUnitTest.java
@@ -1,3 +1,22 @@
+/*
+ * 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 com.gemstone.gemfire.cache.lucene.internal.distributed;
 
 import static org.junit.Assert.assertEquals;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/300397c1/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/distributed/LuceneFunctionReadPathDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/distributed/LuceneFunctionReadPathDUnitTest.java b/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/distributed/LuceneFunctionReadPathDUnitTest.java
index b3460b7..4ba1fc7 100644
--- a/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/distributed/LuceneFunctionReadPathDUnitTest.java
+++ b/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/distributed/LuceneFunctionReadPathDUnitTest.java
@@ -1,3 +1,22 @@
+/*
+ * 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 com.gemstone.gemfire.cache.lucene.internal.distributed;
 
 import java.io.Serializable;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/300397c1/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/distributed/TopEntriesCollectorJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/distributed/TopEntriesCollectorJUnitTest.java b/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/distributed/TopEntriesCollectorJUnitTest.java
index 8acdd5a..b36d8cc 100644
--- a/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/distributed/TopEntriesCollectorJUnitTest.java
+++ b/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/distributed/TopEntriesCollectorJUnitTest.java
@@ -1,3 +1,22 @@
+/*
+ * 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 com.gemstone.gemfire.cache.lucene.internal.distributed;
 
 import static org.junit.Assert.assertEquals;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/300397c1/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/distributed/TopEntriesFunctionCollectorJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/distributed/TopEntriesFunctionCollectorJUnitTest.java b/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/distributed/TopEntriesFunctionCollectorJUnitTest.java
index f17200b..4f93587 100644
--- a/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/distributed/TopEntriesFunctionCollectorJUnitTest.java
+++ b/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/distributed/TopEntriesFunctionCollectorJUnitTest.java
@@ -1,3 +1,22 @@
+/*
+ * 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 com.gemstone.gemfire.cache.lucene.internal.distributed;
 
 import static org.junit.Assert.assertEquals;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/300397c1/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/distributed/TopEntriesJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/distributed/TopEntriesJUnitTest.java b/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/distributed/TopEntriesJUnitTest.java
index 6c2e08b..d849c8e 100644
--- a/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/distributed/TopEntriesJUnitTest.java
+++ b/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/distributed/TopEntriesJUnitTest.java
@@ -1,3 +1,22 @@
+/*
+ * 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 com.gemstone.gemfire.cache.lucene.internal.distributed;
 
 import static org.junit.Assert.assertEquals;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/300397c1/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/filesystem/ChunkKeyJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/filesystem/ChunkKeyJUnitTest.java b/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/filesystem/ChunkKeyJUnitTest.java
index 90cfca0..f28b84a 100644
--- a/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/filesystem/ChunkKeyJUnitTest.java
+++ b/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/filesystem/ChunkKeyJUnitTest.java
@@ -1,3 +1,22 @@
+/*
+ * 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 com.gemstone.gemfire.cache.lucene.internal.filesystem;
 
 import static org.junit.Assert.*;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/300397c1/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/filesystem/FileJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/filesystem/FileJUnitTest.java b/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/filesystem/FileJUnitTest.java
index a30e69b..e4e8752 100644
--- a/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/filesystem/FileJUnitTest.java
+++ b/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/filesystem/FileJUnitTest.java
@@ -1,3 +1,22 @@
+/*
+ * 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 com.gemstone.gemfire.cache.lucene.internal.filesystem;
 
 import static org.junit.Assert.*;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/300397c1/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/filesystem/FileSystemJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/filesystem/FileSystemJUnitTest.java b/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/filesystem/FileSystemJUnitTest.java
index 8f1b7dc..83d9e03 100644
--- a/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/filesystem/FileSystemJUnitTest.java
+++ b/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/filesystem/FileSystemJUnitTest.java
@@ -1,3 +1,22 @@
+/*
+ * 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 com.gemstone.gemfire.cache.lucene.internal.filesystem;
 
 import static org.junit.Assert.assertArrayEquals;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/300397c1/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/repository/IndexRepositoryImplJUnitPerformanceTest.java
----------------------------------------------------------------------
diff --git a/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/repository/IndexRepositoryImplJUnitPerformanceTest.java b/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/repository/IndexRepositoryImplJUnitPerformanceTest.java
index 8641254..ab2db78 100644
--- a/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/repository/IndexRepositoryImplJUnitPerformanceTest.java
+++ b/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/repository/IndexRepositoryImplJUnitPerformanceTest.java
@@ -1,6 +1,23 @@
-package com.gemstone.gemfire.cache.lucene.internal.repository;
+/*
+ * 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.
+ */
 
-import static org.junit.Assert.*;
+package com.gemstone.gemfire.cache.lucene.internal.repository;
 
 import java.io.DataInput;
 import java.io.DataOutput;
@@ -20,7 +37,6 @@ import org.apache.lucene.document.TextField;
 import org.apache.lucene.index.IndexWriter;
 import org.apache.lucene.index.IndexWriterConfig;
 import org.apache.lucene.index.Term;
-import org.apache.lucene.queryparser.classic.QueryParser;
 import org.apache.lucene.search.IndexSearcher;
 import org.apache.lucene.search.Query;
 import org.apache.lucene.search.SearcherManager;
@@ -29,7 +45,6 @@ import org.apache.lucene.store.RAMDirectory;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
-import com.carrotsearch.randomizedtesting.generators.RandomStrings;
 import com.gemstone.gemfire.DataSerializable;
 import com.gemstone.gemfire.DataSerializer;
 import com.gemstone.gemfire.cache.Cache;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/300397c1/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/repository/IndexRepositoryImplJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/repository/IndexRepositoryImplJUnitTest.java b/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/repository/IndexRepositoryImplJUnitTest.java
index ede267c..617879f 100644
--- a/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/repository/IndexRepositoryImplJUnitTest.java
+++ b/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/repository/IndexRepositoryImplJUnitTest.java
@@ -1,3 +1,22 @@
+/*
+ * 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 com.gemstone.gemfire.cache.lucene.internal.repository;
 
 import static org.junit.Assert.*;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/300397c1/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/repository/serializer/HeterogenousLuceneSerializerJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/repository/serializer/HeterogenousLuceneSerializerJUnitTest.java b/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/repository/serializer/HeterogenousLuceneSerializerJUnitTest.java
index 7322311..e54856a 100644
--- a/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/repository/serializer/HeterogenousLuceneSerializerJUnitTest.java
+++ b/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/repository/serializer/HeterogenousLuceneSerializerJUnitTest.java
@@ -1,3 +1,22 @@
+/*
+ * 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 com.gemstone.gemfire.cache.lucene.internal.repository.serializer;
 
 import static org.junit.Assert.assertEquals;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/300397c1/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/repository/serializer/PdxFieldMapperJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/repository/serializer/PdxFieldMapperJUnitTest.java b/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/repository/serializer/PdxFieldMapperJUnitTest.java
index e6e6b79..ec31da9 100644
--- a/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/repository/serializer/PdxFieldMapperJUnitTest.java
+++ b/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/repository/serializer/PdxFieldMapperJUnitTest.java
@@ -1,3 +1,22 @@
+/*
+ * 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 com.gemstone.gemfire.cache.lucene.internal.repository.serializer;
 
 import static org.junit.Assert.assertEquals;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/300397c1/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/repository/serializer/ReflectionFieldMapperJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/repository/serializer/ReflectionFieldMapperJUnitTest.java b/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/repository/serializer/ReflectionFieldMapperJUnitTest.java
index 5731ffc..3ca8fbf 100644
--- a/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/repository/serializer/ReflectionFieldMapperJUnitTest.java
+++ b/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/repository/serializer/ReflectionFieldMapperJUnitTest.java
@@ -1,3 +1,22 @@
+/*
+ * 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 com.gemstone.gemfire.cache.lucene.internal.repository.serializer;
 
 import static org.junit.Assert.assertEquals;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/300397c1/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/repository/serializer/Type1.java
----------------------------------------------------------------------
diff --git a/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/repository/serializer/Type1.java b/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/repository/serializer/Type1.java
index b82d0be..e7f2ca4 100644
--- a/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/repository/serializer/Type1.java
+++ b/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/repository/serializer/Type1.java
@@ -1,3 +1,22 @@
+/*
+ * 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 com.gemstone.gemfire.cache.lucene.internal.repository.serializer;
 
 import java.io.Serializable;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/300397c1/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/repository/serializer/Type2.java
----------------------------------------------------------------------
diff --git a/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/repository/serializer/Type2.java b/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/repository/serializer/Type2.java
index 10cc11e..81210ab 100644
--- a/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/repository/serializer/Type2.java
+++ b/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/repository/serializer/Type2.java
@@ -1,3 +1,22 @@
+/*
+ * 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 com.gemstone.gemfire.cache.lucene.internal.repository.serializer;
 
 /**

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/300397c1/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/xml/LuceneIndexXmlGeneratorIntegrationJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/xml/LuceneIndexXmlGeneratorIntegrationJUnitTest.java b/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/xml/LuceneIndexXmlGeneratorIntegrationJUnitTest.java
index e991643..8272522 100644
--- a/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/xml/LuceneIndexXmlGeneratorIntegrationJUnitTest.java
+++ b/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/xml/LuceneIndexXmlGeneratorIntegrationJUnitTest.java
@@ -1,3 +1,22 @@
+/*
+ * 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 com.gemstone.gemfire.cache.lucene.internal.xml;
 
 import static org.junit.Assert.*;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/300397c1/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/xml/LuceneIndexXmlGeneratorJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/xml/LuceneIndexXmlGeneratorJUnitTest.java b/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/xml/LuceneIndexXmlGeneratorJUnitTest.java
index 3db5d73..c1e93ad 100644
--- a/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/xml/LuceneIndexXmlGeneratorJUnitTest.java
+++ b/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/xml/LuceneIndexXmlGeneratorJUnitTest.java
@@ -1,3 +1,22 @@
+/*
+ * 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 com.gemstone.gemfire.cache.lucene.internal.xml;
 
 import static org.junit.Assert.*;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/300397c1/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/xml/LuceneIndexXmlParserIntegrationJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/xml/LuceneIndexXmlParserIntegrationJUnitTest.java b/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/xml/LuceneIndexXmlParserIntegrationJUnitTest.java
index d97e160..62b4f5a 100644
--- a/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/xml/LuceneIndexXmlParserIntegrationJUnitTest.java
+++ b/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/xml/LuceneIndexXmlParserIntegrationJUnitTest.java
@@ -1,3 +1,22 @@
+/*
+ * 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 com.gemstone.gemfire.cache.lucene.internal.xml;
 
 import static org.junit.Assert.*;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/300397c1/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/xml/LuceneIndexXmlParserJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/xml/LuceneIndexXmlParserJUnitTest.java b/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/xml/LuceneIndexXmlParserJUnitTest.java
index ff271dd..298c92f 100644
--- a/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/xml/LuceneIndexXmlParserJUnitTest.java
+++ b/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/xml/LuceneIndexXmlParserJUnitTest.java
@@ -1,3 +1,22 @@
+/*
+ * 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 com.gemstone.gemfire.cache.lucene.internal.xml;
 
 import static org.junit.Assert.*;


[44/50] [abbrv] incubator-geode git commit: Merge branch 'develop' of https://git-wip-us.apache.org/repos/asf/incubator-geode into develop

Posted by ma...@apache.org.
Merge branch 'develop' of https://git-wip-us.apache.org/repos/asf/incubator-geode into develop


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

Branch: refs/heads/feature/GEODE-53
Commit: bc127847ed87427255c5b2aa96d5a4b7eac1fc86
Parents: 2e9af89 8552461
Author: Bruce Schuchardt <bs...@pivotal.io>
Authored: Fri Nov 20 13:00:03 2015 -0800
Committer: Bruce Schuchardt <bs...@pivotal.io>
Committed: Fri Nov 20 13:00:03 2015 -0800

----------------------------------------------------------------------
 .../admin/remote/AlertLevelChangeMessage.java   |  5 +-
 .../internal/logging/log4j/AlertAppender.java   | 15 +++++-
 .../management/DistributedSystemDUnitTest.java  | 51 ++++++++++----------
 3 files changed, 40 insertions(+), 31 deletions(-)
----------------------------------------------------------------------



[04/50] [abbrv] incubator-geode git commit: GEODE-77: removing references to GMSJoinLeave from the health monitor unit tests

Posted by ma...@apache.org.
GEODE-77: removing references to GMSJoinLeave from the health monitor unit tests


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

Branch: refs/heads/feature/GEODE-53
Commit: 026d149d415eadf39ff6c421fdd0452291ac5d75
Parents: f0c5ec2
Author: Bruce Schuchardt <bs...@pivotal.io>
Authored: Mon Nov 9 08:44:00 2015 -0800
Committer: Bruce Schuchardt <bs...@pivotal.io>
Committed: Mon Nov 9 08:44:00 2015 -0800

----------------------------------------------------------------------
 .../gms/membership/fd/GMSHealthMonitorJUnitTest.java    | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/026d149d/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/fd/GMSHealthMonitorJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/fd/GMSHealthMonitorJUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/fd/GMSHealthMonitorJUnitTest.java
index 1f0ccf0..4307bdd 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/fd/GMSHealthMonitorJUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/fd/GMSHealthMonitorJUnitTest.java
@@ -32,8 +32,9 @@ import com.gemstone.gemfire.distributed.internal.membership.gms.ServiceConfig;
 import com.gemstone.gemfire.distributed.internal.membership.gms.Services;
 import com.gemstone.gemfire.distributed.internal.membership.gms.Services.Stopper;
 import com.gemstone.gemfire.distributed.internal.membership.gms.fd.GMSHealthMonitor;
+import com.gemstone.gemfire.distributed.internal.membership.gms.interfaces.JoinLeave;
+import com.gemstone.gemfire.distributed.internal.membership.gms.interfaces.Manager;
 import com.gemstone.gemfire.distributed.internal.membership.gms.interfaces.Messenger;
-import com.gemstone.gemfire.distributed.internal.membership.gms.membership.GMSJoinLeave;
 import com.gemstone.gemfire.distributed.internal.membership.gms.messages.HeartbeatMessage;
 import com.gemstone.gemfire.distributed.internal.membership.gms.messages.HeartbeatRequestMessage;
 import com.gemstone.gemfire.distributed.internal.membership.gms.messages.SuspectMembersMessage;
@@ -49,8 +50,9 @@ public class GMSHealthMonitorJUnitTest {
   private DistributionConfig mockDistConfig;
   private List<InternalDistributedMember> mockMembers;
   private Messenger messenger;
-  private GMSJoinLeave joinLeave;
+  private JoinLeave joinLeave;
   private GMSHealthMonitor gmsHealthMonitor;
+  private Manager manager;
   final long memberTimeout = 1000l;
   private int[] portRange= new int[]{0, 65535};
 
@@ -60,7 +62,8 @@ public class GMSHealthMonitorJUnitTest {
     mockDistConfig = mock(DistributionConfig.class);
     mockConfig = mock(ServiceConfig.class);
     messenger = mock(Messenger.class);
-    joinLeave = mock(GMSJoinLeave.class);
+    joinLeave = mock(JoinLeave.class);
+    manager = mock(Manager.class);
     services = mock(Services.class);
     Stopper stopper = mock(Stopper.class);
 
@@ -71,6 +74,7 @@ public class GMSHealthMonitorJUnitTest {
     when(services.getMessenger()).thenReturn(messenger);
     when(services.getJoinLeave()).thenReturn(joinLeave);
     when(services.getCancelCriterion()).thenReturn(stopper);
+    when(services.getManager()).thenReturn(manager);
     when(stopper.isCancelInProgress()).thenReturn(false);
     
 
@@ -182,7 +186,7 @@ public class GMSHealthMonitorJUnitTest {
 
     Assert.assertEquals(mockMembers.get(4), gmsHealthMonitor.getNextNeighbor());
   }
-
+  
   /***
    * checks whether member-check thread sends suspectMembers message
    */


[31/50] [abbrv] incubator-geode git commit: GEODE-543: upgrade the Jline and Spring Shell libraries and fix the compilation erros

Posted by ma...@apache.org.
GEODE-543: upgrade the Jline and Spring Shell libraries and fix the compilation erros

Closes #34


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

Branch: refs/heads/feature/GEODE-53
Commit: 058aad3663cb00de3ac83f76b9c9b72a32952ca3
Parents: 3dc3add
Author: Jinmei Liao <ji...@pivotal.io>
Authored: Wed Nov 11 12:06:22 2015 -0800
Committer: Jens Deppe <jd...@pivotal.io>
Committed: Mon Nov 16 13:13:55 2015 -0800

----------------------------------------------------------------------
 gemfire-core/build.gradle                       |   2 +-
 .../management/internal/cli/CliUtil.java        |   2 +-
 .../management/internal/cli/Launcher.java       |   4 +-
 .../internal/cli/commands/ShellCommands.java    |   4 +-
 .../management/internal/cli/shell/Gfsh.java     |  15 +-
 .../internal/cli/shell/jline/ANSIBuffer.java    | 433 +++++++++++++++++++
 .../internal/cli/shell/jline/ANSIHandler.java   |   5 +-
 .../cli/shell/jline/CygwinMinttyTerminal.java   | 137 +-----
 .../internal/cli/shell/jline/GfshHistory.java   |  13 +-
 .../shell/jline/GfshUnsupportedTerminal.java    |   2 +-
 .../internal/cli/util/CLIConsoleBufferUtil.java |   8 +-
 .../PersistentPartitionedRegionTestBase.java    |   2 +-
 gradle/dependency-versions.properties           |   4 +-
 13 files changed, 468 insertions(+), 163 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/058aad36/gemfire-core/build.gradle
----------------------------------------------------------------------
diff --git a/gemfire-core/build.gradle b/gemfire-core/build.gradle
index f03066f..aa83bb9 100755
--- a/gemfire-core/build.gradle
+++ b/gemfire-core/build.gradle
@@ -35,7 +35,7 @@ dependencies {
   compile 'mx4j:mx4j-remote:' + project.'mx4j.version'
   compile 'mx4j:mx4j-tools:' + project.'mx4j.version'
   compile 'net.java.dev.jna:jna:' + project.'jna.version'
-  compile 'net.sourceforge.jline:jline:' + project.'jline.version'
+  compile 'jline:jline:' + project.'jline.version'
   provided 'org.apache.hadoop:hadoop-common:' + project.'hadoop.version'
   provided 'org.apache.hadoop:hadoop-annotations:' + project.'hadoop.version'
   provided 'org.apache.hadoop:hadoop-hdfs:' + project.'hadoop.version'

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/058aad36/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/CliUtil.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/CliUtil.java b/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/CliUtil.java
index bc1f7b7..09f8bd8 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/CliUtil.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/CliUtil.java
@@ -105,7 +105,7 @@ public class CliUtil {
 
     if (includeGfshDependencies) {
       // ConsoleReader from jline
-      jarProductName = checkLibraryByLoadingClass("jline.ConsoleReader", "JLine");
+      jarProductName = checkLibraryByLoadingClass("jline.console.ConsoleReader", "JLine");
       if (jarProductName != null) {
         return jarProductName;
       }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/058aad36/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/Launcher.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/Launcher.java b/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/Launcher.java
index 8bf1ce1..12e2c50 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/Launcher.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/Launcher.java
@@ -166,7 +166,7 @@ public final class Launcher {
           System.err.println(CliStrings.format(MSG_INVALID_COMMAND_OR_OPTION, CliUtil.arrayToString(args)));
           exitRequest = ExitShellRequest.FATAL_EXIT;
         } else {
-          if (!gfsh.executeCommand(commandLineCommand)) {
+          if (!gfsh.executeScriptLine(commandLineCommand)) {
               if (gfsh.getLastExecutionStatus() != 0) 
                 exitRequest = ExitShellRequest.FATAL_EXIT;
           } else if (gfsh.getLastExecutionStatus() != 0) {
@@ -224,7 +224,7 @@ public final class Launcher {
             String command = commandsToExecute.get(i);
             System.out.println(GfshParser.LINE_SEPARATOR + "(" + (i + 1) + ") Executing - " + command
                 + GfshParser.LINE_SEPARATOR);
-            if (!gfsh.executeCommand(command) || gfsh.getLastExecutionStatus() != 0) {
+            if (!gfsh.executeScriptLine(command) || gfsh.getLastExecutionStatus() != 0) {
               exitRequest = ExitShellRequest.FATAL_EXIT;
             }
           }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/058aad36/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/commands/ShellCommands.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/commands/ShellCommands.java b/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/commands/ShellCommands.java
index edab207..1bd7692 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/commands/ShellCommands.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/commands/ShellCommands.java
@@ -853,8 +853,8 @@ private void configureHttpsURLConnection(Map<String, String> sslConfigProps) thr
       int historySizeWordLength = historySizeString.length();
 
       GfshHistory gfshHistory = gfsh.getGfshHistory();
-      List<?> gfshHistoryList = gfshHistory.getHistoryList();
-      Iterator<?> it = gfshHistoryList.iterator();
+      //List<?> gfshHistoryList = gfshHistory.getHistoryList();
+      Iterator<?> it = gfshHistory.entries();
       boolean flagForLineNumbers = (saveHistoryTo != null && saveHistoryTo
           .length() > 0) ? false : true;
       long lineNumber = 0;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/058aad36/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/shell/Gfsh.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/shell/Gfsh.java b/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/shell/Gfsh.java
index 1d14c5b..67a8ccb 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/shell/Gfsh.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/shell/Gfsh.java
@@ -36,9 +36,9 @@ import java.util.logging.Level;
 import java.util.logging.LogManager;
 import java.util.logging.Logger;
 
-import jline.ConsoleReader;
 import jline.Terminal;
 
+import jline.console.ConsoleReader;
 import org.springframework.shell.core.AbstractShell;
 import org.springframework.shell.core.CommandMarker;
 import org.springframework.shell.core.Converter;
@@ -380,7 +380,6 @@ public class Gfsh extends JLineShell {
   /**
    * See findResources in {@link AbstractShell}
    */
-  @Override
   protected Collection<URL> findResources(String resourceName) {
 //    return Collections.singleton(ClassPathLoader.getLatest().getResource(resourceName));
     return null;
@@ -420,7 +419,7 @@ public class Gfsh extends JLineShell {
    * @return true if execution is successful; false otherwise
    */
   @Override
-  public boolean executeCommand(final String line) {
+  public boolean executeScriptLine(final String line) {
     boolean success = false;
     String withPropsExpanded = line;
 
@@ -440,7 +439,7 @@ public class Gfsh extends JLineShell {
       if (gfshFileLogger.fineEnabled()) {
         gfshFileLogger.fine(logMessage + withPropsExpanded);
       }
-      success = super.executeCommand(withPropsExpanded);
+      success = super.executeScriptLine(withPropsExpanded);
     } catch (Exception e) {
       //TODO: should there be a way to differentiate error in shell & error on
       //server. May be by exception type.
@@ -633,12 +632,12 @@ public class Gfsh extends JLineShell {
   ///////////////////// JLineShell Class Methods End  //////////////////////////
 
   public int getTerminalHeight() {
-    return terminal != null ? terminal.getTerminalHeight() : DEFAULT_HEIGHT;
+    return terminal != null ? terminal.getHeight() : DEFAULT_HEIGHT;
   }
 
   public int getTerminalWidth() {
     if (terminal != null) {
-      return terminal.getTerminalWidth();
+      return terminal.getWidth();
     }
 
     Map<String, String> env = System.getenv();
@@ -805,7 +804,7 @@ public class Gfsh extends JLineShell {
                 ++commandSrNum;
                 Gfsh.println(commandSrNum+". Executing - " + cmdLet);                
                 Gfsh.println();
-                boolean executeSuccess = executeCommand(cmdLet);
+                boolean executeSuccess = executeScriptLine(cmdLet);
                 if (!executeSuccess) {
                   setLastExecutionStatus(-1);
                 }
@@ -922,7 +921,7 @@ public class Gfsh extends JLineShell {
       readLine = reader.readLine(prompt);
     } catch (IndexOutOfBoundsException e) {
       if (earlierLine.length() == 0) {
-        reader.printNewline();
+        reader.println();
         readLine = LINE_SEPARATOR;
         reader.getCursorBuffer().cursor = 0;
       } else {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/058aad36/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/shell/jline/ANSIBuffer.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/shell/jline/ANSIBuffer.java b/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/shell/jline/ANSIBuffer.java
new file mode 100644
index 0000000..572f899
--- /dev/null
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/shell/jline/ANSIBuffer.java
@@ -0,0 +1,433 @@
+/*
+ * Copyright (c) 2002-2007, Marc Prud'hommeaux. All rights reserved.
+ *
+ * This software is distributable under the BSD license. See the terms of the
+ * BSD license in the documentation provided with this software.
+ */
+package com.gemstone.gemfire.management.internal.cli.shell.jline;
+
+import org.springframework.shell.support.util.OsUtils;
+
+import java.io.BufferedReader;
+import java.io.InputStreamReader;
+
+/**
+ *  A buffer that can contain ANSI text.
+ *
+ *  @author  <a href="mailto:mwp1@cornell.edu">Marc Prud'hommeaux</a>
+ */
+public class ANSIBuffer {
+    private boolean ansiEnabled = true;
+    private final StringBuffer ansiBuffer = new StringBuffer();
+    private final StringBuffer plainBuffer = new StringBuffer();
+
+    public ANSIBuffer() {
+    }
+
+    public ANSIBuffer(final String str) {
+        append(str);
+    }
+
+    public void setAnsiEnabled(final boolean ansi) {
+        this.ansiEnabled = ansi;
+    }
+
+    public boolean getAnsiEnabled() {
+        return this.ansiEnabled;
+    }
+
+    public String getAnsiBuffer() {
+        return ansiBuffer.toString();
+    }
+
+    public String getPlainBuffer() {
+        return plainBuffer.toString();
+    }
+
+    public String toString(final boolean ansi) {
+        return ansi ? getAnsiBuffer() : getPlainBuffer();
+    }
+
+    public String toString() {
+        return toString(ansiEnabled);
+    }
+
+    public ANSIBuffer append(final String str) {
+        ansiBuffer.append(str);
+        plainBuffer.append(str);
+
+        return this;
+    }
+
+    public ANSIBuffer attrib(final String str, final int code) {
+        ansiBuffer.append(ANSICodes.attrib(code)).append(str)
+                  .append(ANSICodes.attrib(ANSICodes.OFF));
+        plainBuffer.append(str);
+
+        return this;
+    }
+
+    public ANSIBuffer red(final String str) {
+        return attrib(str, ANSICodes.FG_RED);
+    }
+
+    public ANSIBuffer blue(final String str) {
+        return attrib(str, ANSICodes.FG_BLUE);
+    }
+
+    public ANSIBuffer green(final String str) {
+        return attrib(str, ANSICodes.FG_GREEN);
+    }
+
+    public ANSIBuffer black(final String str) {
+        return attrib(str, ANSICodes.FG_BLACK);
+    }
+
+    public ANSIBuffer yellow(final String str) {
+        return attrib(str, ANSICodes.FG_YELLOW);
+    }
+
+    public ANSIBuffer magenta(final String str) {
+        return attrib(str, ANSICodes.FG_MAGENTA);
+    }
+
+    public ANSIBuffer cyan(final String str) {
+        return attrib(str, ANSICodes.FG_CYAN);
+    }
+
+    public ANSIBuffer bold(final String str) {
+        return attrib(str, ANSICodes.BOLD);
+    }
+
+    public ANSIBuffer underscore(final String str) {
+        return attrib(str, ANSICodes.UNDERSCORE);
+    }
+
+    public ANSIBuffer blink(final String str) {
+        return attrib(str, ANSICodes.BLINK);
+    }
+
+    public ANSIBuffer reverse(final String str) {
+        return attrib(str, ANSICodes.REVERSE);
+    }
+
+    public static class ANSICodes {
+        static final int OFF = 0;
+        static final int BOLD = 1;
+        static final int UNDERSCORE = 4;
+        static final int BLINK = 5;
+        static final int REVERSE = 7;
+        static final int CONCEALED = 8;
+        static final int FG_BLACK = 30;
+        static final int FG_RED = 31;
+        static final int FG_GREEN = 32;
+        static final int FG_YELLOW = 33;
+        static final int FG_BLUE = 34;
+        static final int FG_MAGENTA = 35;
+        static final int FG_CYAN = 36;
+        static final int FG_WHITE = 37;
+        static final char ESC = 27;
+
+        /**
+         *  Constructor is private since this is a utility class.
+         */
+        private ANSICodes() {
+        }
+
+        /**
+          * Sets the screen mode. The mode will be one of the following values:
+          * <pre>
+          * mode     description
+          * ----------------------------------------
+          *   0      40 x 148 x 25 monochrome (text)
+          *   1      40 x 148 x 25 color (text)
+          *   2      80 x 148 x 25 monochrome (text)
+          *   3      80 x 148 x 25 color (text)
+          *   4      320 x 148 x 200 4-color (graphics)
+          *   5      320 x 148 x 200 monochrome (graphics)
+          *   6      640 x 148 x 200 monochrome (graphics)
+          *   7      Enables line wrapping
+          *  13      320 x 148 x 200 color (graphics)
+          *  14      640 x 148 x 200 color (16-color graphics)
+          *  15      640 x 148 x 350 monochrome (2-color graphics)
+          *  16      640 x 148 x 350 color (16-color graphics)
+          *  17      640 x 148 x 480 monochrome (2-color graphics)
+          *  18      640 x 148 x 480 color (16-color graphics)
+          *  19      320 x 148 x 200 color (256-color graphics)
+          * </pre>
+          */
+        public static String setmode(final int mode) {
+            return ESC + "[=" + mode + "h";
+        }
+
+        /**
+          * Same as setmode () except for mode = 7, which disables line
+          * wrapping (useful for writing the right-most column without
+          * scrolling to the next line).
+          */
+        public static String resetmode(final int mode) {
+            return ESC + "[=" + mode + "l";
+        }
+
+        /**
+          * Clears the screen and moves the cursor to the home postition.
+          */
+        public static String clrscr() {
+            return ESC + "[2J";
+        }
+
+        /**
+          * Removes all characters from the current cursor position until
+          * the end of the line.
+          */
+        public static String clreol() {
+            return ESC + "[K";
+        }
+
+        /**
+          * Moves the cursor n positions to the left. If n is greater or
+          * equal to the current cursor column, the cursor is moved to the
+          * first column.
+          */
+        public static String left(final int n) {
+            return ESC + "[" + n + "D";
+        }
+
+        /**
+          * Moves the cursor n positions to the right. If n plus the current
+          * cursor column is greater than the rightmost column, the cursor
+          * is moved to the rightmost column.
+          */
+        public static String right(final int n) {
+            return ESC + "[" + n + "C";
+        }
+
+        /**
+          * Moves the cursor n rows up without changing the current column.
+          * If n is greater than or equal to the current row, the cursor is
+          * placed in the first row.
+          */
+        public static String up(final int n) {
+            return ESC + "[" + n + "A";
+        }
+
+        /**
+          * Moves the cursor n rows down. If n plus the current row is greater
+          * than the bottom row, the cursor is moved to the bottom row.
+          */
+        public static String down(final int n) {
+            return ESC + "[" + n + "B";
+        }
+
+        /*
+          * Moves the cursor to the given row and column. (1,1) represents
+          * the upper left corner. The lower right corner of a usual DOS
+          * screen is (25, 80).
+          */
+        public static String gotoxy(final int row, final int column) {
+            return ESC + "[" + row + ";" + column + "H";
+        }
+
+        /**
+          * Saves the current cursor position.
+          */
+        public static String save() {
+            return ESC + "[s";
+        }
+
+        /**
+          * Restores the saved cursor position.
+          */
+        public static String restore() {
+            return ESC + "[u";
+        }
+
+        /**
+          * Sets the character attribute. It will be
+         * one of the following character attributes:
+          *
+          * <pre>
+          * Text attributes
+          *    0    All attributes off
+          *    1    Bold on
+          *    4    Underscore (on monochrome display adapter only)
+          *    5    Blink on
+          *    7    Reverse video on
+          *    8    Concealed on
+          *
+          *   Foreground colors
+          *    30    Black
+          *    31    Red
+          *    32    Green
+          *    33    Yellow
+          *    34    Blue
+          *    35    Magenta
+          *    36    Cyan
+          *    37    White
+          *
+          *   Background colors
+          *    40    Black
+          *    41    Red
+          *    42    Green
+          *    43    Yellow
+          *    44    Blue
+          *    45    Magenta
+          *    46    Cyan
+          *    47    White
+          * </pre>
+          *
+          * The attributes remain in effect until the next attribute command
+          * is sent.
+          */
+        public static String attrib(final int attr) {
+            return ESC + "[" + attr + "m";
+        }
+
+        /**
+          * Sets the key with the given code to the given value. code must be
+          * derived from the following table, value must
+         * be any semicolon-separated
+          * combination of String (enclosed in double quotes) and numeric values.
+          * For example, to set F1 to the String "Hello F1", followed by a CRLF
+          * sequence, one can use: ANSI.setkey ("0;59", "\"Hello F1\";13;10").
+          * Heres's the table of key values:
+          * <pre>
+          * Key                       Code      SHIFT+code  CTRL+code  ALT+code
+          * ---------------------------------------------------------------
+          * F1                        0;59      0;84        0;94       0;104
+          * F2                        0;60      0;85        0;95       0;105
+          * F3                        0;61      0;86        0;96       0;106
+          * F4                        0;62      0;87        0;97       0;107
+          * F5                        0;63      0;88        0;98       0;108
+          * F6                        0;64      0;89        0;99       0;109
+          * F7                        0;65      0;90        0;100      0;110
+          * F8                        0;66      0;91        0;101      0;111
+          * F9                        0;67      0;92        0;102      0;112
+          * F10                       0;68      0;93        0;103      0;113
+          * F11                       0;133     0;135       0;137      0;139
+          * F12                       0;134     0;136       0;138      0;140
+          * HOME (num keypad)         0;71      55          0;119      --
+          * UP ARROW (num keypad)     0;72      56          (0;141)    --
+          * PAGE UP (num keypad)      0;73      57          0;132      --
+          * LEFT ARROW (num keypad)   0;75      52          0;115      --
+          * RIGHT ARROW (num keypad)  0;77      54          0;116      --
+          * END (num keypad)          0;79      49          0;117      --
+          * DOWN ARROW (num keypad)   0;80      50          (0;145)    --
+          * PAGE DOWN (num keypad)    0;81      51          0;118      --
+          * INSERT (num keypad)       0;82      48          (0;146)    --
+          * DELETE  (num keypad)      0;83      46          (0;147)    --
+          * HOME                      (224;71)  (224;71)    (224;119)  (224;151)
+          * UP ARROW                  (224;72)  (224;72)    (224;141)  (224;152)
+          * PAGE UP                   (224;73)  (224;73)    (224;132)  (224;153)
+          * LEFT ARROW                (224;75)  (224;75)    (224;115)  (224;155)
+          * RIGHT ARROW               (224;77)  (224;77)    (224;116)  (224;157)
+          * END                       (224;79)  (224;79)    (224;117)  (224;159)
+          * DOWN ARROW                (224;80)  (224;80)    (224;145)  (224;154)
+          * PAGE DOWN                 (224;81)  (224;81)    (224;118)  (224;161)
+          * INSERT                    (224;82)  (224;82)    (224;146)  (224;162)
+          * DELETE                    (224;83)  (224;83)    (224;147)  (224;163)
+          * PRINT SCREEN              --        --          0;114      --
+          * PAUSE/BREAK               --        --          0;0        --
+          * BACKSPACE                 8         8           127        (0)
+          * ENTER                     13        --          10         (0
+          * TAB                       9         0;15        (0;148)    (0;165)
+          * NULL                      0;3       --          --         --
+          * A                         97        65          1          0;30
+          * B                         98        66          2          0;48
+          * C                         99        66          3          0;46
+          * D                         100       68          4          0;32
+          * E                         101       69          5          0;18
+          * F                         102       70          6          0;33
+          * G                         103       71          7          0;34
+          * H                         104       72          8          0;35
+          * I                         105       73          9          0;23
+          * J                         106       74          10         0;36
+          * K                         107       75          11         0;37
+          * L                         108       76          12         0;38
+          * M                         109       77          13         0;50
+          * N                         110       78          14         0;49
+          * O                         111       79          15         0;24
+          * P                         112       80          16         0;25
+          * Q                         113       81          17         0;16
+          * R                         114       82          18         0;19
+          * S                         115       83          19         0;31
+          * T                         116       84          20         0;20
+          * U                         117       85          21         0;22
+          * V                         118       86          22         0;47
+          * W                         119       87          23         0;17
+          * X                         120       88          24         0;45
+          * Y                         121       89          25         0;21
+          * Z                         122       90          26         0;44
+          * 1                         49        33          --         0;120
+          * 2                         50        64          0          0;121
+          * 3                         51        35          --         0;122
+          * 4                         52        36          --         0;123
+          * 5                         53        37          --         0;124
+          * 6                         54        94          30         0;125
+          * 7                         55        38          --         0;126
+          * 8                         56        42          --         0;126
+          * 9                         57        40          --         0;127
+          * 0                         48        41          --         0;129
+          * -                         45        95          31         0;130
+          * =                         61        43          ---        0;131
+          * [                         91        123         27         0;26
+          * ]                         93        125         29         0;27
+          *                           92        124         28         0;43
+          * ;                         59        58          --         0;39
+          * '                         39        34          --         0;40
+          * ,                         44        60          --         0;51
+          * .                         46        62          --         0;52
+          * /                         47        63          --         0;53
+          * `                         96        126         --         (0;41)
+          * ENTER (keypad)            13        --          10         (0;166)
+          * / (keypad)                47        47          (0;142)    (0;74)
+          * * (keypad)                42        (0;144)     (0;78)     --
+          * - (keypad)                45        45          (0;149)    (0;164)
+          * + (keypad)                43        43          (0;150)    (0;55)
+          * 5 (keypad)                (0;76)    53          (0;143)    --
+          */
+        public static String setkey(final String code, final String value) {
+            return ESC + "[" + code + ";" + value + "p";
+        }
+    }
+
+    public static void main(final String[] args) throws Exception {
+        // sequence, one can use: ANSI.setkey ("0;59", "\"Hello F1\";13;10").
+        BufferedReader reader =
+            new BufferedReader(new InputStreamReader(System.in));
+        System.out.print(ANSICodes.setkey("97", "97;98;99;13")
+                         + ANSICodes.attrib(ANSICodes.OFF));
+        System.out.flush();
+
+        String line;
+
+        while ((line = reader.readLine()) != null) {
+            System.out.println("GOT: " + line);
+        }
+    }
+
+    private static final boolean ROO_BRIGHT_COLORS = Boolean.getBoolean("roo.bright");
+    private static final boolean SHELL_BRIGHT_COLORS = Boolean.getBoolean("spring.shell.bright");
+    private static final boolean BRIGHT_COLORS = ROO_BRIGHT_COLORS || SHELL_BRIGHT_COLORS;
+
+    public static ANSIBuffer getANSIBuffer() {
+        final char esc = (char) 27;
+        return new ANSIBuffer() {
+            @Override
+            public ANSIBuffer reverse(final String str) {
+                if (OsUtils.isWindows()) {
+                    return super.reverse(str).append(ANSICodes.attrib(esc));
+                }
+                return super.reverse(str);
+            };
+            @Override
+            public ANSIBuffer attrib(final String str, final int code) {
+                if (BRIGHT_COLORS && 30 <= code && code <= 37) {
+                    // This is a color code: add a 'bright' code
+                    return append(esc + "[" + code + ";1m").append(str).append(ANSICodes.attrib(0));
+                }
+                return super.attrib(str, code);
+            }
+        };
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/058aad36/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/shell/jline/ANSIHandler.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/shell/jline/ANSIHandler.java b/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/shell/jline/ANSIHandler.java
index ccd9864..c8102ae 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/shell/jline/ANSIHandler.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/shell/jline/ANSIHandler.java
@@ -18,8 +18,6 @@ package com.gemstone.gemfire.management.internal.cli.shell.jline;
 
 import org.springframework.shell.core.JLineLogHandler;
 
-import jline.ANSIBuffer;
-
 /**
  * Overrides jline.History to add History without newline characters.
  * 
@@ -50,7 +48,8 @@ public class ANSIHandler {
     String decoratedInput = input;
     
     if (isAnsiEnabled()) {
-      ANSIBuffer ansiBuffer = JLineLogHandler.getANSIBuffer();
+      ANSIBuffer ansiBuffer = ANSIBuffer.getANSIBuffer();
+
 
       for (ANSIStyle ansiStyle : styles) {
         switch (ansiStyle) {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/058aad36/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/shell/jline/CygwinMinttyTerminal.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/shell/jline/CygwinMinttyTerminal.java b/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/shell/jline/CygwinMinttyTerminal.java
index d84bbe7..f486774 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/shell/jline/CygwinMinttyTerminal.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/shell/jline/CygwinMinttyTerminal.java
@@ -39,147 +39,18 @@ public class CygwinMinttyTerminal extends UnixTerminal {
   
   
   String encoding = System.getProperty("input.encoding", "UTF-8");
-  ReplayPrefixOneCharInputStream replayStream = new ReplayPrefixOneCharInputStream(encoding);
   InputStreamReader replayReader;
 
-  public CygwinMinttyTerminal() {
-      try {
-          replayReader = new InputStreamReader(replayStream, encoding);
-      } catch (Exception e) {
-          throw new RuntimeException(e);
-      }
+  public CygwinMinttyTerminal() throws Exception{
   }
 
   @Override
-  public void initializeTerminal() throws IOException, InterruptedException {
+  public void init() throws Exception{
 
   }
 
   @Override
-  public void restoreTerminal() throws Exception {
-    resetTerminal();
+  public void restore() throws Exception {
+    reset();
   }
-
-  @Override
-  public int readVirtualKey(InputStream in) throws IOException {
-    int c = readCharacter(in);
-
-    //if (backspaceDeleteSwitched)
-        if (c == DELETE)
-            c = BACKSPACE;
-        else if (c == BACKSPACE)
-            c = DELETE;
-
-    // in Unix terminals, arrow keys are represented by
-    // a sequence of 3 characters. E.g., the up arrow
-    // key yields 27, 91, 68
-    if (c == ARROW_START && in.available() > 0) {
-        // Escape key is also 27, so we use InputStream.available()
-        // to distinguish those. If 27 represents an arrow, there
-        // should be two more chars immediately available.
-        while (c == ARROW_START) {
-            c = readCharacter(in);
-        }
-        if (c == ARROW_PREFIX || c == O_PREFIX) {
-            c = readCharacter(in);
-            if (c == ARROW_UP) {
-                return CTRL_P;
-            } else if (c == ARROW_DOWN) {
-                return CTRL_N;
-            } else if (c == ARROW_LEFT) {
-                return CTRL_B;
-            } else if (c == ARROW_RIGHT) {
-                return CTRL_F;
-            } else if (c == HOME_CODE) {
-                return CTRL_A;
-            } else if (c == END_CODE) {
-                return CTRL_E;
-            } else if (c == DEL_THIRD) {
-                c = readCharacter(in); // read 4th
-                return DELETE;
-            }
-        } 
-    } 
-    // handle unicode characters, thanks for a patch from amyi@inf.ed.ac.uk
-    if (c > 128) {      
-      // handle unicode characters longer than 2 bytes,
-      // thanks to Marc.Herbert@continuent.com        
-        replayStream.setInput(c, in);
-//      replayReader = new InputStreamReader(replayStream, encoding);
-        c = replayReader.read();
-        
-    }
-    return c;
-  }
-  
-  /**
-   * This is awkward and inefficient, but probably the minimal way to add
-   * UTF-8 support to JLine
-   *
-   * @author <a href="mailto:Marc.Herbert@continuent.com">Marc Herbert</a>
-   */
-  static class ReplayPrefixOneCharInputStream extends InputStream {
-      byte firstByte;
-      int byteLength;
-      InputStream wrappedStream;
-      int byteRead;
-
-      final String encoding;
-      
-      public ReplayPrefixOneCharInputStream(String encoding) {
-          this.encoding = encoding;
-      }
-      
-      public void setInput(int recorded, InputStream wrapped) throws IOException {
-          this.byteRead = 0;
-          this.firstByte = (byte) recorded;
-          this.wrappedStream = wrapped;
-
-          byteLength = 1;
-          if (encoding.equalsIgnoreCase("UTF-8"))
-              setInputUTF8(recorded, wrapped);
-          else if (encoding.equalsIgnoreCase("UTF-16"))
-              byteLength = 2;
-          else if (encoding.equalsIgnoreCase("UTF-32"))
-              byteLength = 4;
-      }
-          
-          
-      public void setInputUTF8(int recorded, InputStream wrapped) throws IOException {
-          // 110yyyyy 10zzzzzz
-          if ((firstByte & (byte) 0xE0) == (byte) 0xC0)
-              this.byteLength = 2;
-          // 1110xxxx 10yyyyyy 10zzzzzz
-          else if ((firstByte & (byte) 0xF0) == (byte) 0xE0)
-              this.byteLength = 3;
-          // 11110www 10xxxxxx 10yyyyyy 10zzzzzz
-          else if ((firstByte & (byte) 0xF8) == (byte) 0xF0)
-              this.byteLength = 4;
-          else
-              throw new IOException("invalid UTF-8 first byte: " + firstByte);
-      }
-
-      public int read() throws IOException {
-          if (available() == 0)
-              return -1;
-
-          byteRead++;
-
-          if (byteRead == 1)
-              return firstByte;
-
-          return wrappedStream.read();
-      }
-
-      /**
-      * InputStreamReader is greedy and will try to read bytes in advance. We
-      * do NOT want this to happen since we use a temporary/"losing bytes"
-      * InputStreamReader above, that's why we hide the real
-      * wrappedStream.available() here.
-      */
-      public int available() {
-          return byteLength - byteRead;
-      }
-  }
-
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/058aad36/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/shell/jline/GfshHistory.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/shell/jline/GfshHistory.java b/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/shell/jline/GfshHistory.java
index 9f18cae..dc3fbe1 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/shell/jline/GfshHistory.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/shell/jline/GfshHistory.java
@@ -18,7 +18,10 @@ package com.gemstone.gemfire.management.internal.cli.shell.jline;
 
 import com.gemstone.gemfire.management.internal.cli.parser.preprocessor.PreprocessorUtils;
 
-import jline.History;
+import jline.console.history.MemoryHistory;
+
+import java.io.File;
+import java.io.IOException;
 
 /**
  * Overrides jline.History to add History without newline characters.
@@ -26,14 +29,14 @@ import jline.History;
  * @author Abhishek Chaudhari
  * @since 7.0
  */
-public class GfshHistory extends History {
+public class GfshHistory extends MemoryHistory {
+
   // let the history from history file get added initially
   private boolean autoFlush = true;
-  
-  @Override
+
   public void addToHistory(String buffer) {
     if (isAutoFlush()) {
-      super.addToHistory(toHistoryLoggable(buffer));
+      super.add(toHistoryLoggable(buffer));
     }
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/058aad36/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/shell/jline/GfshUnsupportedTerminal.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/shell/jline/GfshUnsupportedTerminal.java b/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/shell/jline/GfshUnsupportedTerminal.java
index 59609ba..3bc839e 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/shell/jline/GfshUnsupportedTerminal.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/shell/jline/GfshUnsupportedTerminal.java
@@ -27,7 +27,7 @@ import jline.UnsupportedTerminal;
  */
 public class GfshUnsupportedTerminal extends UnsupportedTerminal {
   @Override
-  public boolean isANSISupported() {
+  public synchronized boolean isAnsiSupported() {
     return false;
   }
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/058aad36/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/util/CLIConsoleBufferUtil.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/util/CLIConsoleBufferUtil.java b/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/util/CLIConsoleBufferUtil.java
index 70a00a1..9d1bdbe 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/util/CLIConsoleBufferUtil.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/util/CLIConsoleBufferUtil.java
@@ -16,7 +16,7 @@
  */
 package com.gemstone.gemfire.management.internal.cli.util;
 
-import jline.ConsoleReader;
+import jline.console.ConsoleReader;
 import com.gemstone.gemfire.management.internal.cli.shell.Gfsh;
 
 public class CLIConsoleBufferUtil {
@@ -24,9 +24,9 @@ public class CLIConsoleBufferUtil {
     
     ConsoleReader reader = Gfsh.getConsoleReader();    
     if (reader != null) {
-      StringBuffer buffer = reader.getCursorBuffer().getBuffer();    
-      if(buffer.length() > messege.length()){
-        int appendSpaces = buffer.length() - messege.length();
+      int bufferLength = reader.getCursorBuffer().length();
+      if(bufferLength > messege.length()){
+        int appendSpaces = bufferLength - messege.length();
         for(int i = 0; i < appendSpaces; i++){
           messege = messege + " ";
         }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/058aad36/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/PersistentPartitionedRegionTestBase.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/PersistentPartitionedRegionTestBase.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/PersistentPartitionedRegionTestBase.java
index 6ce1a13..057be81 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/PersistentPartitionedRegionTestBase.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/PersistentPartitionedRegionTestBase.java
@@ -172,7 +172,7 @@ public abstract class PersistentPartitionedRegionTestBase extends CacheTestCase
           public void run() {
             Cache cache = getCache();
             Region region = cache.getRegion(regionName);
-            
+
             for(int i =startKey; i < endKey; i++) {
               assertEquals("For key " + i, value, region.get(i));
             }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/058aad36/gradle/dependency-versions.properties
----------------------------------------------------------------------
diff --git a/gradle/dependency-versions.properties b/gradle/dependency-versions.properties
index c86d45d..9c47763 100644
--- a/gradle/dependency-versions.properties
+++ b/gradle/dependency-versions.properties
@@ -33,7 +33,7 @@ javax.servlet-api.version = 3.1.0
 javax.transaction-api.version = 1.2
 jedis.version = 2.7.2
 jetty.version = 9.2.3.v20140905
-jline.version = 1.0.S2-B
+jline.version = 2.12
 jmock.version = 2.8.1
 jna.version = 4.0.0
 json4s.version = 3.2.4
@@ -56,7 +56,7 @@ snappy-java.version = 1.1.1.6
 spring-data-commons.version = 1.9.1.RELEASE
 spring-data-gemfire.version = 1.5.1.RELEASE
 spring-hateos.version = 0.16.0.RELEASE
-spring-shell.version = 1.0.0.RELEASE
+spring-shell.version = 1.1.0.RELEASE
 springframework.version = 3.2.12.RELEASE
 spymemcached.version = 2.9.0
 swagger.version = 1.3.2



[25/50] [abbrv] incubator-geode git commit: GEODE-77: faster initiation of suspect processing on crashed member TCPConduit's Connection.java was not initiating suspect processing when a member crashed. This was due to not having the check in the normal

Posted by ma...@apache.org.
GEODE-77: faster initiation of suspect processing on crashed member
TCPConduit's Connection.java was not initiating suspect processing when a member crashed.  This was due to not having the check in the normal (amt < 0) check for a socket error.

In testing this fix with ReconnectDUnitTest I found that the change exposed some problems in GMSJoinLeave that were keeping reconnect from happening as fast as it should:

1. The reconnecting member was processing a RemoveMember message intended for its old incarnation.  This caused it to invoke forceDisconnect() but the concurrent join() attempt did not notice this and continued to try to connect until it timed out.

2. ViewCreator was removing the new member from the view if its old ID was being declared crashed in the same view because of the way InternalDistributedMember.compareTo() works with viewless identifiers.

This change-set also gets rid of a bunch of references to JGroups scattered around in the code and removes references to JGroups classes from GMSMembershipManager, moving the code requiring these refs to the quorum checker.


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

Branch: refs/heads/feature/GEODE-53
Commit: f57eb8b15e042e87576b117e093180bba256f90f
Parents: 4addcea
Author: Bruce Schuchardt <bs...@pivotal.io>
Authored: Fri Nov 13 11:44:00 2015 -0800
Committer: Bruce Schuchardt <bs...@pivotal.io>
Committed: Fri Nov 13 11:45:34 2015 -0800

----------------------------------------------------------------------
 .../internal/DistributionMessage.java           |  2 +-
 .../distributed/internal/ReplyMessage.java      |  2 +-
 .../distributed/internal/ShutdownMessage.java   |  2 +-
 .../distributed/internal/StartupMessage.java    |  2 +-
 .../internal/StartupResponseMessage.java        |  2 +-
 .../internal/WaitForViewInstallation.java       |  2 +-
 .../internal/membership/QuorumChecker.java      |  7 +++
 .../internal/membership/gms/GMSMember.java      |  2 +-
 .../membership/gms/GMSMemberFactory.java        |  2 +-
 .../membership/gms/fd/GMSHealthMonitor.java     |  7 +--
 .../membership/gms/membership/GMSJoinLeave.java | 20 ++++--
 .../gms/messenger/GMSQuorumChecker.java         | 10 ++-
 .../gms/mgr/GMSMembershipManager.java           | 64 +++++++++-----------
 .../internal/admin/remote/AdminResponse.java    |  2 +-
 .../admin/remote/AlertListenerMessage.java      |  2 +-
 .../admin/remote/FetchStatsResponse.java        |  2 +-
 .../admin/remote/FetchSysCfgRequest.java        |  2 +-
 .../admin/remote/HealthListenerMessage.java     |  2 +-
 .../admin/remote/ShutdownAllRequest.java        |  2 +-
 .../admin/remote/ShutdownAllResponse.java       |  2 +-
 .../admin/remote/SnapshotResultMessage.java     |  2 +-
 .../admin/remote/StatListenerMessage.java       |  2 +-
 .../internal/cache/CloseCacheMessage.java       |  2 +-
 .../internal/cache/CreateRegionProcessor.java   |  4 +-
 .../internal/cache/FindRemoteTXMessage.java     |  2 +-
 .../cache/UpdateAttributesProcessor.java        |  2 +-
 .../partitioned/BucketProfileUpdateMessage.java |  2 +-
 .../cache/partitioned/FetchEntriesMessage.java  | 11 ++--
 .../gemfire/internal/i18n/LocalizedStrings.java |  4 +-
 .../internal/i18n/ParentLocalizedStrings.java   |  6 +-
 .../gemfire/internal/tcp/Connection.java        | 21 ++++---
 .../management/internal/JmxManagerAdvisor.java  |  2 +-
 .../cli/commands/DiskStoreCommands.java         |  7 ++-
 .../membership/gms/MembershipManagerHelper.java |  1 +
 .../fd/GMSHealthMonitorJUnitTest.java           |  3 +
 .../java/dunit/standalone/ProcessManager.java   |  8 ++-
 36 files changed, 124 insertions(+), 93 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f57eb8b1/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionMessage.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionMessage.java b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionMessage.java
index 83ef91d..551e47d 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionMessage.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionMessage.java
@@ -234,7 +234,7 @@ public abstract class DistributionMessage
    * direct-channel.  This is typically only done for messages that are
    * broadcast to the full membership set.
    */
-  public boolean sendViaJGroups() {
+  public boolean sendViaUDP() {
     return false;
   }
   /**

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f57eb8b1/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/ReplyMessage.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/ReplyMessage.java b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/ReplyMessage.java
index 98d2365..96ca5ef 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/ReplyMessage.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/ReplyMessage.java
@@ -64,7 +64,7 @@ public class ReplyMessage extends HighPriorityDistributionMessage  {
   }
   
   @Override
-  public boolean sendViaJGroups() {
+  public boolean sendViaUDP() {
     return this.sendViaJGroups;
   }
   

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f57eb8b1/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/ShutdownMessage.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/ShutdownMessage.java b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/ShutdownMessage.java
index bdf3599..b96850e 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/ShutdownMessage.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/ShutdownMessage.java
@@ -42,7 +42,7 @@ public final class ShutdownMessage extends HighPriorityDistributionMessage imple
   }
   
   @Override
-  public boolean sendViaJGroups() {
+  public boolean sendViaUDP() {
     return true;
   }
   

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f57eb8b1/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/StartupMessage.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/StartupMessage.java b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/StartupMessage.java
index 4bdf99f..612d3fa 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/StartupMessage.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/StartupMessage.java
@@ -142,7 +142,7 @@ public final class StartupMessage extends HighPriorityDistributionMessage implem
   }
   
   @Override
-  public boolean sendViaJGroups() {
+  public boolean sendViaUDP() {
     return true;
   }
   

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f57eb8b1/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/StartupResponseMessage.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/StartupResponseMessage.java b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/StartupResponseMessage.java
index c9b6baf..762c111 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/StartupResponseMessage.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/StartupResponseMessage.java
@@ -129,7 +129,7 @@ public class StartupResponseMessage extends HighPriorityDistributionMessage impl
   }
   
   @Override
-  public boolean sendViaJGroups() {
+  public boolean sendViaUDP() {
     return true;
   }
   

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f57eb8b1/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/WaitForViewInstallation.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/WaitForViewInstallation.java b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/WaitForViewInstallation.java
index 1ba0ed1..6cd0912 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/WaitForViewInstallation.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/WaitForViewInstallation.java
@@ -64,7 +64,7 @@ public class WaitForViewInstallation extends HighPriorityDistributionMessage
   }
 
   @Override
-  public boolean sendViaJGroups() {
+  public boolean sendViaUDP() {
     return true;
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f57eb8b1/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/QuorumChecker.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/QuorumChecker.java b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/QuorumChecker.java
index 3d8d261..32e68d5 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/QuorumChecker.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/QuorumChecker.java
@@ -42,6 +42,13 @@ public interface QuorumChecker {
    * resumes the quorum checker after having invoked suspend();
    */
   public void resume();
+  
+  /**
+   * closes the quorum checker and releases resources.  Use this if
+   * the distributed system is not going to be reconnected and you
+   * want to release resources.
+   */
+  public void close();
 
   /**
    * Get the membership info from the old system that needs to be passed

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f57eb8b1/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/GMSMember.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/GMSMember.java b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/GMSMember.java
index 51a166b..c92ff7d 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/GMSMember.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/GMSMember.java
@@ -217,7 +217,7 @@ public class GMSMember implements NetMember, DataSerializableFixedID {
     }
     // obligatory type check
     if (o == null || !(o instanceof GMSMember) ) {
-      throw new ClassCastException(LocalizedStrings.JGroupMember_JGROUPMEMBERCOMPARETO_COMPARISON_BETWEEN_DIFFERENT_CLASSES.toLocalizedString());
+      throw new ClassCastException(LocalizedStrings.Member_MEMBERCOMPARETO_COMPARISON_BETWEEN_DIFFERENT_CLASSES.toLocalizedString());
     }
     byte[] myAddr = inetAddr.getAddress();
     GMSMember his = (GMSMember)o;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f57eb8b1/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/GMSMemberFactory.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/GMSMemberFactory.java b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/GMSMemberFactory.java
index 59f9deb..36311a2 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/GMSMemberFactory.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/GMSMemberFactory.java
@@ -116,7 +116,7 @@ public class GMSMemberFactory implements MemberServices {
       services.start();
     }
     catch (ConnectionException e) {
-      throw new DistributionException(LocalizedStrings.JGroupMemberFactory_UNABLE_TO_CREATE_MEMBERSHIP_MANAGER.toLocalizedString(), e);
+      throw new DistributionException(LocalizedStrings.MemberFactory_UNABLE_TO_CREATE_MEMBERSHIP_MANAGER.toLocalizedString(), e);
     }
     catch (GemFireConfigException
         | SystemConnectException

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f57eb8b1/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/fd/GMSHealthMonitor.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/fd/GMSHealthMonitor.java b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/fd/GMSHealthMonitor.java
index 84eca62..da42ddb 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/fd/GMSHealthMonitor.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/fd/GMSHealthMonitor.java
@@ -977,11 +977,8 @@ public class GMSHealthMonitor implements HealthMonitor, MessageHandler {
     
     // only respond if the intended recipient is this member
     InternalDistributedMember me = localAddress;
-    // TODO the first part of this check should be removed.
-    // because a restarted server will probably have the same
-    // membership port as it had in its last incarnation, causing
-    // delays in removing the old member ID from the view.
-    if (me.getVmViewId() < 0 || m.getTarget().equals(me)) {
+
+    if (me.getVmViewId() >= 0  &&  m.getTarget().equals(me)) {
       HeartbeatMessage prm = new HeartbeatMessage(m.getRequestId());
       prm.setRecipient(m.getSender());
       Set<InternalDistributedMember> membersNotReceivedMsg = services.getMessenger().send(prm);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f57eb8b1/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeave.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeave.java b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeave.java
index 500131b..a7ffe18 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeave.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeave.java
@@ -222,7 +222,7 @@ public class GMSJoinLeave implements JoinLeave, MessageHandler {
       long locatorGiveUpTime = startTime + locatorWaitTime;
       long giveupTime = startTime + timeout;
 
-      for (int tries=0; !this.isJoined; tries++) {
+      for (int tries=0; !this.isJoined && !this.isStopping; tries++) {
         logger.debug("searching for the membership coordinator");
         boolean found = findCoordinator();
         if (found) {
@@ -489,6 +489,11 @@ public class GMSJoinLeave implements JoinLeave, MessageHandler {
       logger.info("Membership ignoring removal request for " + mbr + " from non-member " + incomingRequest.getSender());
       return;
     }
+    
+    if (v == null) {
+      // not yet a member
+      return;
+    }
 
     logger.info("Membership received a request to remove " + mbr
         + " from " + incomingRequest.getSender() 
@@ -1103,7 +1108,7 @@ public class GMSJoinLeave implements JoinLeave, MessageHandler {
           return;
         }
       }
-
+      
       if (isJoined && isNetworkPartition(newView, true)) {
         if (quorumRequired) {
           Set<InternalDistributedMember> crashes = newView.getActualCrashedMembers(currentView);
@@ -1352,6 +1357,7 @@ public class GMSJoinLeave implements JoinLeave, MessageHandler {
   @Override
   public void memberShutdown(DistributedMember mbr, String reason) {
     LeaveRequestMessage msg = new LeaveRequestMessage(Collections.singleton(this.localAddress), (InternalDistributedMember)mbr, reason);
+    msg.setSender((InternalDistributedMember)mbr);
     processLeaveRequest(msg);
   }
 
@@ -1806,7 +1812,7 @@ public class GMSJoinLeave implements JoinLeave, MessageHandler {
           }
           break;
         case REMOVE_MEMBER_REQUEST:
-          // process these after gathring all leave-requests so that
+          // process these after gathering all leave-requests so that
           // we don't kick out a member that's shutting down
           break;
         default:
@@ -1850,14 +1856,16 @@ public class GMSJoinLeave implements JoinLeave, MessageHandler {
         int viewNumber = 0;
         List<InternalDistributedMember> mbrs;
         if (currentView == null) {
-          mbrs = new ArrayList<InternalDistributedMember>(joinReqs);
+          mbrs = new ArrayList<InternalDistributedMember>();
         } else {
           viewNumber = currentView.getViewId() + 1;
           mbrs = new ArrayList<InternalDistributedMember>(oldMembers);
-          mbrs.addAll(joinReqs);
         }
         mbrs.removeAll(leaveReqs);
         mbrs.removeAll(removalReqs);
+        // add joinReqs after removing old members because an ID may
+        // be reused in an auto-reconnect and get a new vmViewID
+        mbrs.addAll(joinReqs);
         newView = new NetView(localAddress, viewNumber, mbrs, leaveReqs, new HashSet<InternalDistributedMember>(removalReqs));
         int size = joinReqs.size();
         for (InternalDistributedMember mbr: joinReqs) {
@@ -1888,7 +1896,7 @@ public class GMSJoinLeave implements JoinLeave, MessageHandler {
 
       // if there are no membership changes then abort creation of
       // the new view
-      if (newView.getMembers().equals(currentView.getMembers())) {
+      if (joinReqs.isEmpty() && newView.getMembers().equals(currentView.getMembers())) {
         logger.info("membership hasn't changed - aborting new view {}", newView);
         return;
       }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f57eb8b1/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/GMSQuorumChecker.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/GMSQuorumChecker.java b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/GMSQuorumChecker.java
index cf3fc6b..f8b5f28 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/GMSQuorumChecker.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/GMSQuorumChecker.java
@@ -91,8 +91,14 @@ public class GMSQuorumChecker implements QuorumChecker {
 
   @Override
   public void suspend() {
-    // TODO Auto-generated method stub
-
+    // NO-OP for this implementation
+  }
+  
+  @Override
+  public void close() {
+    if (channel != null  &&  !channel.isClosed()) {
+      channel.close();
+    }
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f57eb8b1/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/mgr/GMSMembershipManager.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/mgr/GMSMembershipManager.java b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/mgr/GMSMembershipManager.java
index 4c5718f..79af74e 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/mgr/GMSMembershipManager.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/mgr/GMSMembershipManager.java
@@ -29,7 +29,6 @@ import java.util.concurrent.locks.ReadWriteLock;
 import java.util.concurrent.locks.ReentrantReadWriteLock;
 
 import org.apache.logging.log4j.Logger;
-import org.jgroups.JChannel;
 
 import com.gemstone.gemfire.CancelException;
 import com.gemstone.gemfire.ForcedDisconnectException;
@@ -108,11 +107,11 @@ public class GMSMembershipManager implements MembershipManager, Manager
   private volatile QuorumChecker quorumChecker;
   
   /**
-   * thread-local used to force use of JGroups for communications, usually to
+   * thread-local used to force use of Messenger for communications, usually to
    * avoid deadlock when conserve-sockets=true.  Use of this should be removed
    * when connection pools are implemented in the direct-channel 
    */
-  private ThreadLocal<Boolean> forceUseJGroups = new ThreadLocal<Boolean>();
+  private ThreadLocal<Boolean> forceUseUDPMessaging = new ThreadLocal<Boolean>();
   
   /**
    * Trick class to make the startup synch more
@@ -268,7 +267,7 @@ public class GMSMembershipManager implements MembershipManager, Manager
   
   /**
    * This is the latest view (ordered list of DistributedMembers) 
-   * that has been returned from Jgroups
+   * that has been installed
    * 
    * All accesses to this object are protected via {@link #latestViewLock}
    */
@@ -302,8 +301,8 @@ public class GMSMembershipManager implements MembershipManager, Manager
   
   volatile boolean isJoining;
   
-  /** has the jgroups channel been connected successfully? */
-  volatile boolean hasConnected;
+  /** have we joined successfully? */
+  volatile boolean hasJoined;
   
   /**
    * a map keyed on InternalDistributedMember, values are Stubs that represent direct
@@ -340,7 +339,7 @@ public class GMSMembershipManager implements MembershipManager, Manager
 
   /**
    * Members that have sent a shutdown message.  This is used to suppress
-   * suspect processing in JGroups that otherwise becomes pretty aggressive 
+   * suspect processing that otherwise becomes pretty aggressive 
    * when a member is shutting down.
    */
   private final Map shutdownMembers = new BoundedLinkedHashMap(1000);
@@ -356,7 +355,7 @@ public class GMSMembershipManager implements MembershipManager, Manager
   /**
    * The identities and birth-times of others that we have allowed into
    * membership at the distributed system level, but have not yet appeared
-   * in a jgroups view.
+   * in a view.
    * <p>
    * Keys are instances of {@link InternalDistributedMember}, values are 
    * Longs indicating the time this member was shunned.
@@ -415,7 +414,7 @@ public class GMSMembershipManager implements MembershipManager, Manager
   protected volatile boolean processingEvents = false;
   
   /**
-   * This is the latest viewId received from JGroups
+   * This is the latest viewId installed
    */
   long latestViewId = -1;
   
@@ -595,7 +594,7 @@ public class GMSMembershipManager implements MembershipManager, Manager
       for (int i = 0; i < newView.getMembers().size(); i++) { // additions
         InternalDistributedMember m = (InternalDistributedMember)newView.getMembers().get(i);
         
-        // Once a member has been seen via JGroups, remove them from the
+        // Once a member has been seen via a view, remove them from the
         // newborn set
         boolean wasSurprise = surpriseMembers.remove(m) != null;
         
@@ -678,7 +677,7 @@ public class GMSMembershipManager implements MembershipManager, Manager
         }
         
         if (surpriseMembers.containsKey(m)) {
-          continue; // member has not yet appeared in JGroups view
+          continue; // member has not yet appeared in a view
         }
 
         try {
@@ -686,7 +685,7 @@ public class GMSMembershipManager implements MembershipManager, Manager
               LocalizedStrings.GroupMembershipService_MEMBERSHIP_PROCESSING_DEPARTING_MEMBER__0_, m));
           removeWithViewLock(m,
               newView.getCrashedMembers().contains(m) || suspectedMembers.containsKey(m)
-              , "departed JGroups view");
+              , "departed membership view");
         }
         catch (VirtualMachineError err) {
           SystemFailure.initiateFailure(err);
@@ -797,7 +796,7 @@ public class GMSMembershipManager implements MembershipManager, Manager
         long delta = System.currentTimeMillis() - start;
 
         logger.info(LogMarker.DISTRIBUTION, LocalizedMessage.create(
-            LocalizedStrings.GroupMembershipService_CONNECTED_TO_JGROUPS_CHANNEL_TOOK__0__MS, delta));
+            LocalizedStrings.GroupMembershipService_JOINED_TOOK__0__MS, delta));
 
         NetView initialView = services.getJoinLeave().getView();
         latestView = new NetView(initialView, initialView.getViewId());
@@ -810,7 +809,7 @@ public class GMSMembershipManager implements MembershipManager, Manager
         if (ex.getCause() != null && ex.getCause().getCause() instanceof SystemConnectException) {
           throw (SystemConnectException)(ex.getCause().getCause());
         }
-        throw new DistributionException(LocalizedStrings.GroupMembershipService_AN_EXCEPTION_WAS_THROWN_WHILE_CONNECTING_TO_JGROUPS.toLocalizedString(), ex);
+        throw new DistributionException(LocalizedStrings.GroupMembershipService_AN_EXCEPTION_WAS_THROWN_WHILE_JOINING.toLocalizedString(), ex);
       }
       finally {
         this.isJoining = false;
@@ -899,7 +898,7 @@ public class GMSMembershipManager implements MembershipManager, Manager
       stubToMemberMap.put(stub, address);
     }
 
-    this.hasConnected = true;
+    this.hasJoined = true;
 
     // in order to debug startup issues we need to announce the membership
     // ID as soon as we know it
@@ -1078,7 +1077,7 @@ public class GMSMembershipManager implements MembershipManager, Manager
   
   /**
    * Logic for handling a direct connection event (message received
-   * from a member not in the JGroups view).  Does not employ the
+   * from a member not in the view).  Does not employ the
    * startup queue.
    * <p>
    * Must be called with {@link #latestViewLock} held.  Waits
@@ -1131,7 +1130,7 @@ public class GMSMembershipManager implements MembershipManager, Manager
       }
 
       // Adding him to this set ensures we won't remove him if a new
-      // JGroups view comes in and he's still not visible.
+      // view comes in and he's still not visible.
       surpriseMembers.put(member, Long.valueOf(System.currentTimeMillis()));
 
       if (shutdownInProgress()) {
@@ -1185,7 +1184,7 @@ public class GMSMembershipManager implements MembershipManager, Manager
 
         // However, we put the new member at the end of the list.  This
         // should ensure he's not chosen as an elder.
-        // This will get corrected when he finally shows up in the JGroups
+        // This will get corrected when he finally shows up in the
         // view.
         NetView newMembers = new NetView(latestView, latestView.getViewId());
         newMembers.add(member);
@@ -1336,7 +1335,7 @@ public class GMSMembershipManager implements MembershipManager, Manager
    */
   protected void handleOrDeferViewEvent(NetView viewArg) {
     if (this.isJoining) {
-      // bug #44373 - queue all view messages while connecting the jgroups channel.
+      // bug #44373 - queue all view messages while joining.
       // This is done under the latestViewLock, but we can't block here because
       // we're sitting in the UDP reader thread.
       synchronized(startupLock) {
@@ -1353,7 +1352,7 @@ public class GMSMembershipManager implements MembershipManager, Manager
         }
       }
       // view processing can take a while, so we use a separate thread
-      // to avoid blocking the jgroups stack
+      // to avoid blocking a reader thread
       NetView newView = viewArg;
       long newId = viewArg.getViewId();
       if (logger.isTraceEnabled(LogMarker.DM_VIEWS)) {
@@ -1660,8 +1659,8 @@ public class GMSMembershipManager implements MembershipManager, Manager
   protected static volatile boolean inhibitForceDisconnectLogging;
   
   /**
-   * Ensure that the critical classes from JGroups and the TCP conduit
-   * implementation get loaded.
+   * Ensure that the critical classes from components
+   * get loaded.
    * 
    * @see SystemFailure#loadEmergencyClasses()
    */
@@ -1897,7 +1896,7 @@ public class GMSMembershipManager implements MembershipManager, Manager
   }
   
   public void suspectMember(DistributedMember mbr, String reason) {
-    if (mbr != null && !this.shutdownMembers.containsKey(mbr)) {
+    if (!this.shutdownInProgress && !this.shutdownMembers.containsKey(mbr)) {
       this.services.getHealthMonitor().suspect((InternalDistributedMember)mbr, reason);
     }
   }
@@ -2032,7 +2031,7 @@ public class GMSMembershipManager implements MembershipManager, Manager
    * @see com.gemstone.gemfire.distributed.internal.membership.MembershipManager#isConnected()
    */
   public boolean isConnected() {
-    return (this.hasConnected && !this.shutdownInProgress); 
+    return (this.hasJoined && !this.shutdownInProgress); 
   }
   
   /**
@@ -2040,9 +2039,7 @@ public class GMSMembershipManager implements MembershipManager, Manager
    * Otherwise returns false.
    */
   public boolean isReconnectingDS() {
-    if (this.hasConnected) {
-      // if the jgroups channel has been connected then we aren't in the
-      // middle of a reconnect attempt in this instance of the distributed system
+    if (this.hasJoined) {
       return false;
     } else {
       return this.wasReconnectingSystem;
@@ -2068,10 +2065,7 @@ public class GMSMembershipManager implements MembershipManager, Manager
     ((GMSQuorumChecker)checker).suspend();
     InternalDistributedSystem system = InternalDistributedSystem.getAnyInstance();
     if (system == null || !system.isConnected()) {
-      JChannel channel = (JChannel)checker.getMembershipInfo();
-      if (channel != null  &&  !channel.isClosed()) {
-        channel.close();
-      }
+      checker.close();
     }
   }
   
@@ -2145,9 +2139,9 @@ public class GMSMembershipManager implements MembershipManager, Manager
       useMcast = (msg.getMulticast() || allDestinations);
     }
     
-    boolean sendViaJGroups = isForceUDPCommunications(); // enable when bug #46438 is fixed: || msg.sendViaJGroups();
+    boolean sendViaMessenger = isForceUDPCommunications(); // enable when bug #46438 is fixed: || msg.sendViaUDP();
 
-    if (useMcast || tcpDisabled || sendViaJGroups) {
+    if (useMcast || tcpDisabled || sendViaMessenger) {
       result = services.getMessenger().send(msg);
     }
     else {
@@ -2165,11 +2159,11 @@ public class GMSMembershipManager implements MembershipManager, Manager
   // MembershipManager method
   @Override
   public void forceUDPMessagingForCurrentThread() {
-    forceUseJGroups.set(null);
+    forceUseUDPMessaging.set(null);
   }
   
   private boolean isForceUDPCommunications() {
-    Boolean forced = forceUseJGroups.get();
+    Boolean forced = forceUseUDPMessaging.get();
     return forced == Boolean.TRUE;
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f57eb8b1/gemfire-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/AdminResponse.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/AdminResponse.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/AdminResponse.java
index cc5707e..14a201c 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/AdminResponse.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/AdminResponse.java
@@ -47,7 +47,7 @@ public abstract class AdminResponse extends HighPriorityDistributionMessage
   }
   
   @Override
-  public boolean sendViaJGroups() {
+  public boolean sendViaUDP() {
     return true;
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f57eb8b1/gemfire-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/AlertListenerMessage.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/AlertListenerMessage.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/AlertListenerMessage.java
index 6f0f0c1..5892d35 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/AlertListenerMessage.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/AlertListenerMessage.java
@@ -105,7 +105,7 @@ public final class AlertListenerMessage extends PooledDistributionMessage implem
   }
   
   @Override
-  public boolean sendViaJGroups() {
+  public boolean sendViaUDP() {
     return true;
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f57eb8b1/gemfire-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/FetchStatsResponse.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/FetchStatsResponse.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/FetchStatsResponse.java
index a4991f8..22003d1 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/FetchStatsResponse.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/FetchStatsResponse.java
@@ -80,7 +80,7 @@ public final class FetchStatsResponse extends AdminResponse {
 
   
   @Override
-  public boolean sendViaJGroups() {
+  public boolean sendViaUDP() {
     return true;
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f57eb8b1/gemfire-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/FetchSysCfgRequest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/FetchSysCfgRequest.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/FetchSysCfgRequest.java
index 156b853..5f9db76 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/FetchSysCfgRequest.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/FetchSysCfgRequest.java
@@ -41,7 +41,7 @@ public final class FetchSysCfgRequest extends AdminRequest {
   }
   
   @Override
-  public boolean sendViaJGroups() {
+  public boolean sendViaUDP() {
     return true;
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f57eb8b1/gemfire-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/HealthListenerMessage.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/HealthListenerMessage.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/HealthListenerMessage.java
index 28261ee..2047821 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/HealthListenerMessage.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/HealthListenerMessage.java
@@ -62,7 +62,7 @@ public final class HealthListenerMessage extends PooledDistributionMessage imple
   }
   
   @Override
-  public boolean sendViaJGroups() {
+  public boolean sendViaUDP() {
     return true;
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f57eb8b1/gemfire-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/ShutdownAllRequest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/ShutdownAllRequest.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/ShutdownAllRequest.java
index 122b94c..ffe1ddf 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/ShutdownAllRequest.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/ShutdownAllRequest.java
@@ -137,7 +137,7 @@ public class ShutdownAllRequest extends AdminRequest {
   }
   
   @Override
-  public boolean sendViaJGroups() {
+  public boolean sendViaUDP() {
     return true;
   }
   

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f57eb8b1/gemfire-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/ShutdownAllResponse.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/ShutdownAllResponse.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/ShutdownAllResponse.java
index f467a99..ad36a9a 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/ShutdownAllResponse.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/ShutdownAllResponse.java
@@ -37,7 +37,7 @@ public class ShutdownAllResponse extends AdminResponse {
   }
   
   @Override
-  public boolean sendViaJGroups() {
+  public boolean sendViaUDP() {
     return true;
   }
   

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f57eb8b1/gemfire-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/SnapshotResultMessage.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/SnapshotResultMessage.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/SnapshotResultMessage.java
index 6820831..a19447f 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/SnapshotResultMessage.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/SnapshotResultMessage.java
@@ -48,7 +48,7 @@ public final class SnapshotResultMessage extends PooledDistributionMessage
   }
 
   @Override
-  public boolean sendViaJGroups() {
+  public boolean sendViaUDP() {
     return true;
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f57eb8b1/gemfire-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/StatListenerMessage.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/StatListenerMessage.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/StatListenerMessage.java
index f97c45d..acd980d 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/StatListenerMessage.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/StatListenerMessage.java
@@ -85,7 +85,7 @@ public final class StatListenerMessage extends PooledDistributionMessage
   }
 
   @Override
-  public boolean sendViaJGroups() {
+  public boolean sendViaUDP() {
     return true;
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f57eb8b1/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/CloseCacheMessage.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/CloseCacheMessage.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/CloseCacheMessage.java
index 4aa37b2..edd4db2 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/CloseCacheMessage.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/CloseCacheMessage.java
@@ -50,7 +50,7 @@ public final class CloseCacheMessage extends HighPriorityDistributionMessage
   }
   
   @Override
-  public boolean sendViaJGroups() {
+  public boolean sendViaUDP() {
     return true;
   }
   

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f57eb8b1/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/CreateRegionProcessor.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/CreateRegionProcessor.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/CreateRegionProcessor.java
index f4ac672..bfd287e 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/CreateRegionProcessor.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/CreateRegionProcessor.java
@@ -347,7 +347,7 @@ public class CreateRegionProcessor implements ProfileExchangeProcessor {
     }
 
     @Override
-    public boolean sendViaJGroups() {
+    public boolean sendViaUDP() {
       return true;
     }
     
@@ -807,7 +807,7 @@ public class CreateRegionProcessor implements ProfileExchangeProcessor {
     }
 
     @Override
-    public boolean sendViaJGroups() {
+    public boolean sendViaUDP() {
       return true;
     }
     

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f57eb8b1/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/FindRemoteTXMessage.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/FindRemoteTXMessage.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/FindRemoteTXMessage.java
index f0e9de7..bf96551 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/FindRemoteTXMessage.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/FindRemoteTXMessage.java
@@ -230,7 +230,7 @@ public class FindRemoteTXMessage extends HighPriorityDistributionMessage impleme
   }
   
   @Override
-  public boolean sendViaJGroups() {
+  public boolean sendViaUDP() {
     return true;
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f57eb8b1/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/UpdateAttributesProcessor.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/UpdateAttributesProcessor.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/UpdateAttributesProcessor.java
index 4aed85e..c81eac1 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/UpdateAttributesProcessor.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/UpdateAttributesProcessor.java
@@ -277,7 +277,7 @@ public class UpdateAttributesProcessor {
     }
     
     @Override
-    public boolean sendViaJGroups() {
+    public boolean sendViaUDP() {
       return true;
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f57eb8b1/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/BucketProfileUpdateMessage.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/BucketProfileUpdateMessage.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/BucketProfileUpdateMessage.java
index 7325789..aa7bacc 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/BucketProfileUpdateMessage.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/BucketProfileUpdateMessage.java
@@ -77,7 +77,7 @@ public final class BucketProfileUpdateMessage extends DistributionMessage
   }
 
   @Override
-  public boolean sendViaJGroups() {
+  public boolean sendViaUDP() {
     return true;
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f57eb8b1/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/FetchEntriesMessage.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/FetchEntriesMessage.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/FetchEntriesMessage.java
index d8767e6..ef22609 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/FetchEntriesMessage.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/FetchEntriesMessage.java
@@ -568,10 +568,13 @@ public final class FetchEntriesMessage extends PartitionMessage
               VersionTag versionTag = DataSerializer.readObject(in);
               
               //Fix for 47260 - canonicalize the mebmer ids to avoid an OOME
-              if(canonicalMembers.containsKey(versionTag.getMemberID())) {
-                versionTag.setMemberID(canonicalMembers.get(versionTag.getMemberID()));
-              } else {
-                canonicalMembers.put(versionTag.getMemberID(), versionTag.getMemberID());
+              VersionSource id = versionTag.getMemberID();
+              if (id != null) {
+                if(canonicalMembers.containsKey(id)) {
+                  versionTag.setMemberID(canonicalMembers.get(id));
+                } else {
+                  canonicalMembers.put(id, id);
+                }
               }
               
               synchronized(returnValue) {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f57eb8b1/gemfire-core/src/main/java/com/gemstone/gemfire/internal/i18n/LocalizedStrings.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/i18n/LocalizedStrings.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/i18n/LocalizedStrings.java
index dc02e36..f6edb9b 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/i18n/LocalizedStrings.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/i18n/LocalizedStrings.java
@@ -67,7 +67,7 @@ public class LocalizedStrings extends ParentLocalizedStrings {
   public static final StringId MessageFactory_COULD_NOT_ACCESS_ZEROARG_CONSTRUCTOR_OF_0 = new StringId(3435, "Could not access zero-arg constructor of  {0}");
   public static final StringId GroupMembershipService_AN_IOEXCEPTION_WAS_THROWN_WHILE_OPENING_0 = new StringId(3436, "An IOException was thrown while opening \"{0}\"");
   public static final StringId GroupMembershipService_AN_EXCEPTION_WAS_THROWN_WHILE_READING_JGROUPS_CONFIG = new StringId(3437, "An Exception was thrown while reading JGroups config.");
-  public static final StringId GroupMembershipService_AN_EXCEPTION_WAS_THROWN_WHILE_CONNECTING_TO_JGROUPS = new StringId(3438, "An Exception was thrown while connecting to Jgroups.");
+  public static final StringId GroupMembershipService_AN_EXCEPTION_WAS_THROWN_WHILE_JOINING = new StringId(3438, "An Exception was thrown while attempting to join the distributed system.");
   public static final StringId InternalInstantiator_CANNOT_UNREGISTER_A_NULL_CLASS = new StringId(3439, "Cannot unregister a null class");
   public static final StringId StatisticDescriptorImpl_THE_STATISTIC_0_WITH_ID_1_IS_OF_TYPE_2_AND_IT_WAS_EXPECTED_TO_BE_AN_INT = new StringId(3440, "The statistic  {0}  with id  {1}  is of type  {2}  and it was expected to be an int.");
   public static final StringId StatisticDescriptorImpl_THE_STATISTIC_0_WITH_ID_1_IS_OF_TYPE_2_AND_IT_WAS_EXPECTED_TO_BE_A_DOUBLE = new StringId(3441, "The statistic  {0}  with id  {1}  is of type  {2}  and it was expected to be a double.");
@@ -188,7 +188,7 @@ public class LocalizedStrings extends ParentLocalizedStrings {
   public static final StringId MemberAttributes_IOEXCEPTION_ON_A_BYTE_ARRAY_0 = new StringId(3553, "IOException on a byte array:  {0}");
   public static final StringId MemberAttributes_CLASSNOTFOUNDEXCEPTION_IN_DESERIALIZATION_0 = new StringId(3554, "ClassNotFoundException in deserialization:  {0}");
   public static final StringId GroupMembershipService_UNKNOWN_STARTUP_EVENT_0 = new StringId(3555, "unknown startup event:  {0}");
-  public static final StringId JGroupMember_ATTEMPT_TO_EXTERNALIZE_NULL_IP_ADDRESS = new StringId(3556, "attempt to externalize null ip address");
+  // 3556 available for reuse
   public static final StringId UpdateOperation_UNKNOWN_DESERIALIZATION_POLICY = new StringId(3557, "unknown deserialization policy");
   public static final StringId UpdateOperation_UNKNOWN_DESERIALIZATION_POLICY_0 = new StringId(3558, "unknown deserialization policy:  {0}");
   public static final StringId QueuedOperation_CACHEWRITER_SHOULD_NOT_BE_CALLED = new StringId(3559, "CacheWriter should not be called");

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f57eb8b1/gemfire-core/src/main/java/com/gemstone/gemfire/internal/i18n/ParentLocalizedStrings.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/i18n/ParentLocalizedStrings.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/i18n/ParentLocalizedStrings.java
index 0e6cdcd..150b408 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/i18n/ParentLocalizedStrings.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/i18n/ParentLocalizedStrings.java
@@ -719,7 +719,7 @@ class ParentLocalizedStrings {
   public static final StringId Invalid_0_INVALID_MESSAGE_TYPE_WITH_TX_1_FROM_2 = new StringId(1711, "{0}: INVALID message type with tx: {1} from {2}");
   // ok to reuse 1712
   public static final StringId JCAConnectionManagerImpl_EXCEPTION_CAUGHT_WHILE_INITIALIZING = new StringId(1713, "JCAConnectionManagerImpl::Constructor: An exception was caught while initialising due to {0}" );
-  public static final StringId GroupMembershipService_CONNECTED_TO_JGROUPS_CHANNEL_TOOK__0__MS = new StringId(1714, "Connected to Jgroups channel (took  {0}  ms)");
+  public static final StringId GroupMembershipService_JOINED_TOOK__0__MS = new StringId(1714, "Joined the distributed system (took  {0}  ms)");
   public static final StringId GroupMembershipService_FAILED_TO_SEND_MESSAGE_0_TO_MEMBER_1_VIEW_2 = new StringId(1715, "Failed to send message <{0}> to member <{1}> view = {2}");
   // ok to reuse 1716
   // ok to reuse 1717
@@ -1807,8 +1807,8 @@ class ParentLocalizedStrings {
   public static final StringId InvalidateMessage_FAILED_SENDING_0 = new StringId(2798, "Failed sending < {0} >");
   public static final StringId InvalidateMessage_NO_RESPONSE_CODE_RECEIVED = new StringId(2799, "no response code received");
   public static final StringId JCAConnectionManagerImpl_JCACONNECTIONMANAGERIMPLALLOCATECONNECTIONNO_VALID_CONNECTION_AVAILABLE = new StringId(2800, "JCAConnectionManagerImpl::allocateConnection::No valid Connection available");
-  public static final StringId JGroupMemberFactory_UNABLE_TO_CREATE_MEMBERSHIP_MANAGER = new StringId(2801, "Unable to create membership manager");
-  public static final StringId JGroupMember_JGROUPMEMBERCOMPARETO_COMPARISON_BETWEEN_DIFFERENT_CLASSES = new StringId(2802, "JGroupMember.compareTo(): comparison between different classes");
+  public static final StringId MemberFactory_UNABLE_TO_CREATE_MEMBERSHIP_MANAGER = new StringId(2801, "Unable to create membership manager");
+  public static final StringId Member_MEMBERCOMPARETO_COMPARISON_BETWEEN_DIFFERENT_CLASSES = new StringId(2802, "NetMember.compareTo(): comparison between different classes");
   public static final StringId GroupMembershipService_CANNOT_FIND_0 = new StringId(2803, "Cannot find  {0}");
   public static final StringId GroupMembershipService_CHANNEL_CLOSED = new StringId(2804, "Channel closed");
   public static final StringId GroupMembershipService_CHANNEL_FAILURE = new StringId(2805, "Channel failure");

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f57eb8b1/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tcp/Connection.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tcp/Connection.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tcp/Connection.java
index 700e495..b6b1f8b 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tcp/Connection.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tcp/Connection.java
@@ -1856,6 +1856,7 @@ public class Connection implements Runnable {
             continue;
           }
           if (amt < 0) {
+            initiateSuspicionIfSharedUnordered();
             this.readerShuttingDown = true;
             try {
               requestClose("SocketChannel.read returned EOF");
@@ -1893,14 +1894,14 @@ public class Connection implements Runnable {
         }
         catch (ClosedChannelException e) {
           this.readerShuttingDown = true;
-          initiateSuspicionIfShared();
+          initiateSuspicionIfSharedUnordered();
           try { 
             requestClose(LocalizedStrings.Connection_CLOSEDCHANNELEXCEPTION_IN_CHANNEL_READ_0.toLocalizedString(e));
           } catch (Exception ex) {}
           return;
         }
         catch (IOException e) {
-          initiateSuspicionIfShared();
+          initiateSuspicionIfSharedUnordered();
           if (! isSocketClosed()
                 && !"Socket closed".equalsIgnoreCase(e.getMessage()) // needed for Solaris jdk 1.4.2_08
                 ) {
@@ -1924,7 +1925,7 @@ public class Connection implements Runnable {
           if (!stopped && ! isSocketClosed() ) {
             logger.fatal(LocalizedMessage.create(LocalizedStrings.Connection_0_EXCEPTION_IN_CHANNEL_READ, p2pReaderName()), e);
           }
-          initiateSuspicionIfShared();
+          initiateSuspicionIfSharedUnordered();
           this.readerShuttingDown = true;
           try { 
             requestClose(LocalizedStrings.Connection_0_EXCEPTION_IN_CHANNEL_READ.toLocalizedString(e)); 
@@ -1946,11 +1947,12 @@ public class Connection implements Runnable {
   }
 
   /** initiate suspect processing if a shared/ordered connection is lost and we're not shutting down */
-  private void initiateSuspicionIfShared() {
-    if (this.isReceiver && this.handshakeRead && this.preserveOrder && this.sharedResource) {
+  private void initiateSuspicionIfSharedUnordered() {
+    if (this.isReceiver && this.handshakeRead && !this.preserveOrder && this.sharedResource) {
       if (this.owner.getConduit().getCancelCriterion().cancelInProgress() == null) {
-            this.owner.getDM().getMembershipManager().suspectMember(this.getRemoteAddress(),
-            "member shut down shared/ordered connection");
+        String reason = "member shut down shared unordered connection";
+        this.owner.getDM().getMembershipManager().suspectMember(this.getRemoteAddress(),
+            reason);
       }
     }
   }
@@ -2089,6 +2091,7 @@ public class Connection implements Runnable {
         }
         int len = 0;
         if (readFully(input, lenbytes, lenbytes.length) < 0) {
+          initiateSuspicionIfSharedUnordered();
           stopped = true;
           continue;
         }
@@ -2445,7 +2448,7 @@ public class Connection implements Runnable {
         this.stopped = true;
       }
       catch (IOException io) {
-        initiateSuspicionIfShared();
+        initiateSuspicionIfSharedUnordered();
         boolean closed = isSocketClosed()
                 || "Socket closed".equalsIgnoreCase(io.getMessage()); // needed for Solaris jdk 1.4.2_08
         if (!closed) {
@@ -2479,7 +2482,7 @@ public class Connection implements Runnable {
         if (!stopped && !(e instanceof InterruptedException) ) {
           logger.fatal(LocalizedMessage.create(LocalizedStrings.Connection_0_EXCEPTION_RECEIVED, p2pReaderName()), e);
         }
-        initiateSuspicionIfShared();
+        initiateSuspicionIfSharedUnordered();
         if (isSocketClosed()) {
           stopped = true;
         }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f57eb8b1/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/JmxManagerAdvisor.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/JmxManagerAdvisor.java b/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/JmxManagerAdvisor.java
index 4e0518c..e47400d 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/JmxManagerAdvisor.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/JmxManagerAdvisor.java
@@ -154,7 +154,7 @@ public class JmxManagerAdvisor extends DistributionAdvisor {
     public JmxManagerProfileMessage() {}
     
     @Override
-    public boolean sendViaJGroups() {
+    public boolean sendViaUDP() {
       return true;
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f57eb8b1/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/commands/DiskStoreCommands.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/commands/DiskStoreCommands.java b/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/commands/DiskStoreCommands.java
index 9df08d0..f724921 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/commands/DiskStoreCommands.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/commands/DiskStoreCommands.java
@@ -1189,7 +1189,10 @@ public class DiskStoreCommands extends AbstractCommandsSupport {
       }
       
       //Pass any java options on to the command
-      commandList.add(System.getenv("JAVA_OPTS"));
+      String opts = System.getenv("JAVA_OPTS");
+      if (opts != null) {
+        commandList.add(opts);
+      }
       commandList.add("-classpath");
       commandList.add(System.getProperty("java.class.path", "."));
       commandList.add(DiskStoreValidater.class.getName());
@@ -1219,6 +1222,8 @@ public class DiskStoreCommands extends AbstractCommandsSupport {
       return ResultBuilder
           .createGemFireErrorResult(CliStrings.format(CliStrings.VALIDATE_DISK_STORE__MSG__IO_ERROR,diskStoreName, ex.getMessage() ));
     } catch (Exception ex) {
+//      StringPrintWriter s = new StringPrintWriter();
+//      ex.printStackTrace(s);
       return ResultBuilder.createGemFireErrorResult(CliStrings.format(CliStrings.VALIDATE_DISK_STORE__MSG__ERROR,diskStoreName, ex.getMessage()));
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f57eb8b1/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/MembershipManagerHelper.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/MembershipManagerHelper.java b/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/MembershipManagerHelper.java
index b2c67e0..c5141de 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/MembershipManagerHelper.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/MembershipManagerHelper.java
@@ -154,6 +154,7 @@ public class MembershipManagerHelper
   }
   
   public static void crashDistributedSystem(final DistributedSystem msys) {
+    msys.getLogWriter().info("crashing distributed system: " + msys);
     MembershipManagerHelper.inhibitForcedDisconnectLogging(true);
     MembershipManagerHelper.playDead(msys);
     GMSMembershipManager mgr = ((GMSMembershipManager)getMembershipManager(msys));

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f57eb8b1/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/fd/GMSHealthMonitorJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/fd/GMSHealthMonitorJUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/fd/GMSHealthMonitorJUnitTest.java
index 4307bdd..697e899 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/fd/GMSHealthMonitorJUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/fd/GMSHealthMonitorJUnitTest.java
@@ -106,8 +106,11 @@ public class GMSHealthMonitorJUnitTest {
   public void testHMServiceStarted() throws IOException {
 
     InternalDistributedMember mbr = new InternalDistributedMember(SocketCreator.getLocalHost(), 12345);
+    mbr.setVmViewId(1);
     when(messenger.getMemberID()).thenReturn(mbr);
     gmsHealthMonitor.started();
+    
+    NetView v = new NetView(mbr, 1, mockMembers, new HashSet<InternalDistributedMember>(), new HashSet<InternalDistributedMember>());
 
     gmsHealthMonitor.processMessage(new HeartbeatRequestMessage(mbr, 1));
     verify(messenger, atLeastOnce()).send(any(HeartbeatMessage.class));

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f57eb8b1/gemfire-core/src/test/java/dunit/standalone/ProcessManager.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/dunit/standalone/ProcessManager.java b/gemfire-core/src/test/java/dunit/standalone/ProcessManager.java
index f8a4da7..b6a4493 100644
--- a/gemfire-core/src/test/java/dunit/standalone/ProcessManager.java
+++ b/gemfire-core/src/test/java/dunit/standalone/ProcessManager.java
@@ -131,8 +131,12 @@ public class ProcessManager {
         try {
           String line = reader.readLine();
           while(line != null) {
-            out.print(vmName);
-            out.println(line);
+            if (line.length() == 0) {
+              out.println();
+            } else {
+              out.print(vmName);
+              out.println(line);
+            }
             line = reader.readLine();
           }
         } catch(Exception e) {


[38/50] [abbrv] incubator-geode git commit: Merge branch 'feature/GEODE-331' into develop

Posted by ma...@apache.org.
Merge branch 'feature/GEODE-331' into develop

Closes #35


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

Branch: refs/heads/feature/GEODE-53
Commit: b2e0142c2fc4f4919e82fcba17be64e82e0e0e6c
Parents: 90b9a63 6df4b10
Author: Jens Deppe <jd...@pivotal.io>
Authored: Wed Nov 18 07:50:48 2015 -0800
Committer: Jens Deppe <jd...@pivotal.io>
Committed: Wed Nov 18 07:50:48 2015 -0800

----------------------------------------------------------------------
 gradle/dependency-versions.properties | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------



[29/50] [abbrv] incubator-geode git commit: GEODE-151: Convert to use Gradle Git plugin

Posted by ma...@apache.org.
GEODE-151: Convert to use Gradle Git plugin

The build was using the executable git command to populate version
information, which created big blocks of Gradle code and could be
unstable. All Git executable commands have been changed to use the
Gradle Git plugin. If directory is not a valid Git workspace, then
it will log a warning and use default values to populate version
information.

Tested with and without Git workspace


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

Branch: refs/heads/feature/GEODE-53
Commit: c7024bd846e5075fe87b1b2b6c1707950241370b
Parents: 88da702
Author: Mark Bretl <mb...@pivotal.io>
Authored: Mon Nov 16 10:44:50 2015 -0800
Committer: Mark Bretl <mb...@pivotal.io>
Committed: Mon Nov 16 12:16:58 2015 -0800

----------------------------------------------------------------------
 build.gradle              | 13 +++++++++-
 gemfire-core/build.gradle | 59 +++++++-----------------------------------
 2 files changed, 22 insertions(+), 50 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c7024bd8/build.gradle
----------------------------------------------------------------------
diff --git a/build.gradle b/build.gradle
index e3b1033..a186710 100755
--- a/build.gradle
+++ b/build.gradle
@@ -1,5 +1,15 @@
-apply plugin: 'wrapper'
+buildscript {
+  repositories {
+    maven {
+      url "https://plugins.gradle.org/m2/"
+    }
+  }
+  dependencies {
+    classpath "org.ajoberstar:gradle-git:1.3.2"
+  }
+}
 
+apply plugin: 'wrapper'
 
 // Load all properties in dependency-version.properties as project properties, so all projects can read them
 Properties dependencyVersions = new Properties()
@@ -25,6 +35,7 @@ allprojects {
 
   group = "org.apache.geode"
 
+  apply plugin: 'org.ajoberstar.grgit'
   apply plugin: 'idea'
   apply plugin: 'eclipse'
   

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c7024bd8/gemfire-core/build.gradle
----------------------------------------------------------------------
diff --git a/gemfire-core/build.gradle b/gemfire-core/build.gradle
index 80761ed..f03066f 100755
--- a/gemfire-core/build.gradle
+++ b/gemfire-core/build.gradle
@@ -99,55 +99,16 @@ task createVersionPropertiesFile {
   inputs.dir compileJava.destinationDir
 
   doLast {
-    new ByteArrayOutputStream().withStream { gitWorkspaceStream ->
-      def result = exec {
-        workingDir = "${projectDir}"
-        standardOutput = gitWorkspaceStream
-        ignoreExitValue = true
-        executable = "git"
-        args = ['rev-parse', '--is-inside-work-tree']
-      }
-      ext.isGitWorkspace = gitWorkspaceStream.toString()
-      ext.isGitWorkspace = ext.isGitWorkspace.trim()
-    }
 
-    if ( isGitWorkspace.equalsIgnoreCase('true') ) {
-      new ByteArrayOutputStream().withStream { gitBranchStream ->
-        def result = exec {
-          workingDir = "${projectDir}"
-          standardOutput = gitBranchStream
-          executable = "git"
-          args = ['rev-parse', '--abbrev-ref', 'HEAD']
-        }
-        ext.gitBranchString = gitBranchStream.toString()
-        ext.gitBranch = ext.gitBranchString.trim()
-      }
-
-      new ByteArrayOutputStream().withStream { commitStream ->
-        def result = exec {
-          workingDir = "${projectDir}"
-          standardOutput = commitStream
-          executable = "git"
-          args = ['rev-parse', 'HEAD']
-        }
-        ext.commitIdString = commitStream.toString()
-        ext.commitId = ext.commitIdString.trim()
-      }
-
-      new ByteArrayOutputStream().withStream { sourceDateStream ->
-        def result = exec {
-          workingDir = "${projectDir}"
-          standardOutput = sourceDateStream
-          executable = "git"
-          args = ['show', '-s', '--format=%ci', "${ext.commitId}"]
-        }
-        ext.sourceDateString = sourceDateStream.toString()
-        ext.sourceDate = ext.sourceDateString.trim()
-      }
-    }
-    else {
-      // Not in SCM workspace, use default values
-      ext.gitBranch = 'UNKNOWN'
+    try {
+      def grgit = org.ajoberstar.grgit.Grgit.open()
+      ext.branch = grgit.branch.getCurrent().name
+      ext.commitId = grgit.head().id
+      ext.sourceDate = grgit.head().getDate().format('yyyy-MM-dd HH:mm:ss Z')
+      grgit.close()
+    } catch (Exception e) {
+      logger.warn( '***** Unable to find Git workspace. Using default version information *****' )
+      ext.branch = 'UNKNOWN'
       ext.commitId = 'UNKNOWN'
       ext.sourceDate = new Date().format('yyyy-MM-dd HH:mm:ss Z')
     }
@@ -168,7 +129,7 @@ task createVersionPropertiesFile {
       "Build-Java-Version": ext.jdkVersion,
       "Source-Date"       : ext.sourceDate,
       "Source-Revision"   : ext.commitId,
-      "Source-Repository" : ext.gitBranch
+      "Source-Repository" : ext.branch
     ] as Properties
 
     propertiesFile.getParentFile().mkdirs();


[22/50] [abbrv] incubator-geode git commit: GEODE-544: Removes soplog code and tests

Posted by ma...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/9438c8b1/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/persistence/soplog/SoplogToken.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/persistence/soplog/SoplogToken.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/persistence/soplog/SoplogToken.java
deleted file mode 100644
index 73175e7..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/persistence/soplog/SoplogToken.java
+++ /dev/null
@@ -1,116 +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.
- */
-package com.gemstone.gemfire.internal.cache.persistence.soplog;
-
-import com.gemstone.gemfire.internal.DSCODE;
-import com.gemstone.gemfire.internal.cache.EntryBits;
-
-/**
- * Defines serialized tokens for soplogs. 
- */
-public enum SoplogToken {
-  
-  /** indicates the serialized value is a wildcard compares equal to any other key */
-  WILDCARD( DSCODE.WILDCARD ),
-  
-  /** indicates the serialized value is a tombstone of a deleted key */ 
-  TOMBSTONE( EntryBits.setTombstone((byte)0, true) ),
-
-  /** indicates the serialized value is a invalid token*/
-  INVALID( EntryBits.setInvalid((byte)0, true) ),
-
-  /** indicates the serialized tombstone has been garbage collected*/
-  REMOVED_PHASE2( EntryBits.setLocalInvalid((byte)0, true) ),
-  
-  /** indicates the value is serialized */
-  SERIALIZED( EntryBits.setSerialized((byte)0, true) );
-
-  /** the serialized form of the token */
-  private final byte val;
-  
-  private SoplogToken(byte val) {
-    this.val = val;
-  }
-  
-  @Override
-  public String toString() {
-    return super.toString()+" byte:"+val;
-  }
-
-  /**
-   * Returns the serialized form of the token.
-   * @return the byte
-   */
-  public byte toByte() {
-    return val;
-  }
-  
-  /**
-   * Returns true if either of the serialized objects is a wildcard.
-   * 
-   * @param b1 the first object
-   * @param off1 the first offset
-   * @param b2 the second object
-   * @param off2 the second object
-   * @return true if a wildcard
-   */
-  public static boolean isWildcard(byte[] b1, int off1, byte[] b2, int off2) {
-    return b1[off1] == DSCODE.WILDCARD || b2[off2] == DSCODE.WILDCARD;
-  }
-  
-  /**
-   * Returns true if the serialized object is a tombstone.
-   * 
-   * @param b the magic entry type byte
-   * @return true if a tombstone
-   */
-  public static boolean isTombstone(byte b) {
-    return EntryBits.isTombstone(b);
-  }
-
-  /**
-   * Returns true if the serialized object is an invalid token.
-   * 
-   * @param b the magic entry type byte
-   * @return true if invalid
-   */
-  public static boolean isInvalid(byte b) {
-    return EntryBits.isInvalid(b);
-  }
-
-  /**
-   * Returns true if the serialized tombstone was garbage collected
-   * 
-   * @param b the magic entry type byte
-   * @return true if RemovedPhase2
-   */
-  public static boolean isRemovedPhase2(byte b) {
-    return EntryBits.isLocalInvalid(b);
-  }
-
-  /**
-   * Returns true if the serialized object is not any token
-   * 
-   *@param b the magic entry type byte
-   * @return true if not any token
-   */
-  public static boolean isSerialized(byte b) {
-    return EntryBits.isSerialized(b);
-  }
-}
-
-

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/9438c8b1/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/persistence/soplog/SortedBuffer.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/persistence/soplog/SortedBuffer.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/persistence/soplog/SortedBuffer.java
deleted file mode 100644
index b301ac5..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/persistence/soplog/SortedBuffer.java
+++ /dev/null
@@ -1,367 +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.
- */
-package com.gemstone.gemfire.internal.cache.persistence.soplog;
-
-import java.io.IOException;
-import java.nio.ByteBuffer;
-import java.util.Collections;
-import java.util.EnumMap;
-import java.util.Iterator;
-import java.util.Map.Entry;
-import java.util.NavigableMap;
-import java.util.concurrent.ConcurrentSkipListMap;
-
-import org.apache.logging.log4j.Logger;
-
-import com.gemstone.gemfire.internal.cache.persistence.soplog.SortedOplogFactory.SortedOplogConfiguration;
-import com.gemstone.gemfire.internal.logging.LogService;
-
-/**
- * Provides an in-memory buffer to temporarily hold key/value pairs until they
- * can be flushed to disk.  Each buffer instance can be optionally associated
- * with a user-specified tag for identification purposes.
- * 
- * @param <T> the tag type
- * @author bakera
- */
-public class SortedBuffer<T> extends AbstractSortedReader {
-  private static final Logger logger = LogService.getLogger();
-  
-  /** the tag */
-  private final T tag;
-  
-  /** in-memory sorted key/vaue buffer */
-  private final NavigableMap<byte[], byte[]> buffer;
-
-  /** the stats */
-  private final BufferStats stats;
-  
-  /** the metadata, set during flush */
-  private final EnumMap<Metadata, byte[]> metadata;
-  
-  /** the command to run (or defer) when the flush is complete */
-  private Runnable flushAction;
-  
-  private final String logPrefix;
-  
-  public SortedBuffer(SortedOplogConfiguration config, T tag) {
-    assert config != null;
-    assert tag != null;
-    
-    this.tag = tag;
-    
-    buffer = new ConcurrentSkipListMap<byte[], byte[]>(config.getComparator());
-    stats = new BufferStats();
-    metadata = new EnumMap<Metadata, byte[]>(Metadata.class);
-    
-    this.logPrefix = "<" + config.getName() + "#" + tag + "> ";
-  }
-  
-  /**
-   * Returns the tag associated with the buffer.
-   * @return the tag
-   */
-  public T getTag() {
-    return tag;
-  }
-  
-  @Override
-  public String toString() {
-    return logger.getName() + this.logPrefix;
-  }
-  
-  /**
-   * Adds a new value to the buffer.
-   * @param key the key
-   * @param value the value
-   */
-  public void put(byte[] key, byte[] value) {
-    if (buffer.put(key, value) == null) {
-      // ASSUMPTION: updates don't significantly change the value length
-      // this lets us optimize statistics calculations
-      stats.add(key.length, value.length);
-    }
-  }
-  
-  /**
-   * Allows sorted iteration over the buffer contents.
-   * @return the buffer entries
-   */
-  public Iterable<Entry<byte[], byte[]>> entries() {
-    return buffer.entrySet();
-  }
-  
-  /**
-   * Returns the number of entries in the buffer.
-   * @return the count
-   */
-  public int count() {
-    return buffer.size();
-  }
-  
-  /**
-   * Returns the size of the data in bytes.
-   * @return the data size
-   */
-  public long dataSize() {
-    return stats.totalSize();
-  }
-  
-  /**
-   * Clears the buffer of all entries.
-   */
-  public void clear() {
-    if (logger.isDebugEnabled()) {
-      logger.debug("{}Clearing buffer", this.logPrefix);
-    }
-    
-    buffer.clear();
-    stats.clear();
-    metadata.clear();
-    
-    synchronized (this) {
-      flushAction = null;
-    }
-  }
-  
-  /**
-   * Returns true if the flush completion has been deferred.
-   * @return true if deferred
-   */
-  public synchronized boolean isDeferred() {
-    return flushAction != null;
-  }
-  
-  /**
-   * Defers the flush completion to a later time.  This is used to ensure correct
-   * ordering of soplogs during parallel flushes.
-   * 
-   * @param action the action to perform when ready
-   */
-  public synchronized void defer(Runnable action) {
-    assert flushAction == null;
-    
-    if (logger.isDebugEnabled()) {
-      logger.debug("{}Deferring flush completion", this.logPrefix);
-    }
-    flushAction = action;
-  }
-  
-  /**
-   * Completes the deferred flush operation.
-   */
-  public synchronized void complete() {
-    assert flushAction != null;
-
-    try {
-      if (logger.isDebugEnabled()) {
-        logger.debug("{}Completing deferred flush operation", this.logPrefix);
-      }
-      flushAction.run();
-      
-    } finally {
-      flushAction = null;
-    }
-  }
-  
-  /**
-   * Returns the buffer metadata.
-   * @return the metadata
-   */
-  public synchronized EnumMap<Metadata, byte[]> getMetadata() {
-    return metadata;
-  }
-  
-  /**
-   * Returns the metadata value for the given key.
-   * 
-   * @param name the metadata name
-   * @return the requested metadata
-   */
-  public synchronized byte[] getMetadata(Metadata name) {
-    return metadata.get(name);
-  }
-  
-  /**
-   * Sets the metadata for the buffer.  This is not available until the buffer
-   * is about to be flushed.
-   * 
-   * @param metadata the metadata
-   */
-  public synchronized void setMetadata(EnumMap<Metadata, byte[]> metadata) {
-    if (metadata != null) {
-      this.metadata.putAll(metadata);
-    }
-  }
-  
-  @Override
-  public boolean mightContain(byte[] key) {
-    return true;
-  }
-
-  @Override
-  public ByteBuffer read(byte[] key) throws IOException {
-    byte[] val = buffer.get(key);
-    if (val != null) {
-      return ByteBuffer.wrap(val);
-    }
-    return null;
-  }
-
-  @Override
-  public SortedIterator<ByteBuffer> scan(
-      byte[] from, boolean fromInclusive, 
-      byte[] to, boolean toInclusive,
-      boolean ascending,
-      MetadataFilter filter) {
-
-    if (filter == null || filter.accept(metadata.get(filter.getName()))) {
-      NavigableMap<byte[],byte[]> subset = ascending ? buffer : buffer.descendingMap();
-      if (from == null && to == null) {
-        // we're good
-      } else if (from == null) {
-        subset = subset.headMap(to, toInclusive);
-      } else if (to == null) {
-        subset = subset.tailMap(from, fromInclusive);
-      } else {
-        subset = subset.subMap(from, fromInclusive, to, toInclusive);
-      }
-      return new BufferIterator(subset.entrySet().iterator());
-    }
-    return new BufferIterator(Collections.<byte[], byte[]>emptyMap().entrySet().iterator());
-  }
-
-  @Override
-  public SerializedComparator getComparator() {
-    return (SerializedComparator) buffer.comparator();
-  }
-
-  @Override
-  public SortedStatistics getStatistics() {
-    return stats;
-  }
-  
-  @Override
-  public void close() throws IOException {
-    if (logger.isDebugEnabled()) {
-      logger.debug("{}Closing buffer", this.logPrefix);
-    }
-    
-    synchronized (this) {
-      flushAction = null;
-    }
-  }
-  
-  /**
-   * Allows sorted iteration over the buffer contents.
-   */
-  public static class BufferIterator 
-    extends AbstractKeyValueIterator<ByteBuffer, ByteBuffer>
-    implements SortedIterator<ByteBuffer>
-  {
-    /** the backing iterator */
-    private final Iterator<Entry<byte[], byte[]>> entries;
-    
-    /** the iteration cursor */
-    private Entry<byte[], byte[]> current;
-    
-    public BufferIterator(Iterator<Entry<byte[], byte[]>> iterator) {
-      this.entries = iterator;
-    }
-    
-    @Override
-    public ByteBuffer key() {
-      return ByteBuffer.wrap(current.getKey());
-    }
-
-    @Override
-    public ByteBuffer value() {
-      return ByteBuffer.wrap(current.getValue());
-    }
-
-    @Override
-    public void close() {
-    }
-
-    @Override
-    protected boolean step() {
-      return (current = entries.hasNext() ? entries.next() : null) != null;
-    }
-  }
-  
-  private class BufferStats implements SortedStatistics {
-    /** data size */
-    private long totalSize;
-    
-    /** key count */
-    private long keys;
-    
-    /** avg key size */
-    private double avgKeySize;
-    
-    /** avg value size */
-    private double avgValueSize;
-    
-    private synchronized void clear() {
-      totalSize = 0;
-      keys = 0;
-      avgKeySize = 0;
-      avgValueSize = 0;
-    }
-    
-    private synchronized void add(int keyLength, int valueLength) {
-      totalSize += keyLength + valueLength;
-      avgKeySize = (keyLength + keys * avgKeySize) / (keys + 1);
-      avgValueSize = (keyLength + keys * avgValueSize) / (keys + 1);
-      
-      keys++;
-    }
-    
-    @Override
-    public synchronized long keyCount() {
-      return keys;
-    }
-
-    @Override
-    public byte[] firstKey() {
-      return buffer.firstKey();
-    }
-
-    @Override
-    public byte[] lastKey() {
-      return buffer.lastKey();
-    }
-
-    @Override
-    public synchronized double avgKeySize() {
-      return avgKeySize;
-    }
-    
-    @Override
-    public synchronized double avgValueSize() {
-      return avgValueSize;
-    }
-    
-    @Override
-    public void close() {
-    }
-
-    public synchronized long totalSize() {
-      return totalSize;
-    }
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/9438c8b1/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/persistence/soplog/SortedOplog.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/persistence/soplog/SortedOplog.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/persistence/soplog/SortedOplog.java
deleted file mode 100644
index 95fb411..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/persistence/soplog/SortedOplog.java
+++ /dev/null
@@ -1,158 +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.
- */
-package com.gemstone.gemfire.internal.cache.persistence.soplog;
-
-import java.io.File;
-import java.io.IOException;
-import java.nio.ByteBuffer;
-import java.util.EnumMap;
-
-import com.gemstone.gemfire.internal.cache.persistence.soplog.SortedReader.Metadata;
-
-/**
- * Defines the API for reading and writing sorted key/value pairs.  The keys
- * are expected to be lexicographically comparable {@code byte[]} arrays.
- * 
- * @author bakera
- */
-public interface SortedOplog {
-  /**
-   * Checks if a key may be present in a set.
-   */
-  public interface BloomFilter {
-    /**
-     * Returns true if the bloom filter might contain the supplied key.  The 
-     * nature of the bloom filter is such that false positives are allowed, but
-     * false negatives cannot occur.
-     * 
-     * @param key the key to test
-     * @return true if the key might be present
-     */
-    boolean mightContain(byte[] key);
-  }
-  
-  /**
-   * Reads key/value pairs from the sorted file.
-   */
-  public interface SortedOplogReader extends SortedReader<ByteBuffer> {
-    /**
-     * Returns the bloom filter associated with this reader.
-     * @return the bloom filter
-     */
-    BloomFilter getBloomFilter();
-    
-    /**
-     * Returns the metadata value for the given key.
-     * 
-     * @param name the metadata name
-     * @return the requested metadata
-     * @throws IOException error reading metadata
-     */
-    byte[] getMetadata(Metadata name) throws IOException;
-    
-    /**
-     * Returns the file used to persist the soplog contents.
-     * @return the file
-     */
-    File getFile();
-    
-    /**
-     * @return file name
-     */
-    String getFileName();
-    
-    /**
-     * renames the file to the input name
-     * 
-     * @throws IOException
-     */
-    void rename(String name) throws IOException;
-    
-    /**
-     * @return the modification timestamp of the file
-     * @throws IOException 
-     */
-    long getModificationTimeStamp() throws IOException;
-    
-    /**
-     * Deletes the sorted oplog file
-     */
-    public void delete() throws IOException;
-
-    /**
-     * Returns true if the reader is closed.
-     * @return true if closed
-     */
-    boolean isClosed();
-  }
-  
-  /**
-   * Writes key/value pairs in a sorted manner.  Each entry that is appended
-   * must have a key that is greater than or equal to the previous key.
-   */
-  public interface SortedOplogWriter {
-    /**
-     * Appends another key and value.  The key is expected to be greater than
-     * or equal to the last key that was appended.
-     * 
-     * @param key the key
-     * @param value the value
-     * @throws IOException write error
-     */
-    void append(ByteBuffer key, ByteBuffer value) throws IOException;
-
-    /**
-     * Appends another key and value.  The key is expected to be greater than
-     * or equal to the last key that was appended.
-     * 
-     * @param key the key
-     * @param value the value
-     * @throws IOException write error
-     */
-    void append(byte[] key, byte[] value) throws IOException;
-
-    /**
-     * Closes the file, first writing optional user and system metadata. 
-     * 
-     * @param metadata the metadata to include
-     * @throws IOException unable to close file
-     */
-    void close(EnumMap<Metadata, byte[]> metadata) throws IOException;
-    
-    /**
-     * Invoked to close and remove the file to clean up after an error.
-     * @throws IOException error closing
-     */
-    void closeAndDelete() throws IOException;
-  }
-  
-  /**
-   * Creates a new sorted reader.
-   * 
-   * @return the reader
-   * @throws IOException error creating reader
-   */
-  SortedOplogReader createReader() throws IOException;
-  
-  /**
-   * Creates a new sorted writer.
-   * 
-   * @return the writer
-   * @throws IOException error creating writer
-   */
-  SortedOplogWriter createWriter() throws IOException;
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/9438c8b1/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/persistence/soplog/SortedOplogFactory.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/persistence/soplog/SortedOplogFactory.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/persistence/soplog/SortedOplogFactory.java
deleted file mode 100644
index a470d7e..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/persistence/soplog/SortedOplogFactory.java
+++ /dev/null
@@ -1,278 +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.
- */
-package com.gemstone.gemfire.internal.cache.persistence.soplog;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.EnumMap;
-
-import org.apache.hadoop.hbase.io.hfile.BlockCache;
-
-import com.gemstone.gemfire.internal.cache.persistence.soplog.Compactor.MetadataCompactor;
-import com.gemstone.gemfire.internal.cache.persistence.soplog.SortedReader.Metadata;
-import com.gemstone.gemfire.internal.cache.persistence.soplog.SortedReader.SerializedComparator;
-
-/**
- * Provides a means to construct a soplog.
- */
-public interface SortedOplogFactory {
-  /**
-   * Configures a <code>SortedOplog</code>.
-   * 
-   * @author bakera
-   */
-  public class SortedOplogConfiguration {
-    /** the default metadata compactor */
-    public static MetadataCompactor DEFAULT_METADATA_COMPACTOR = new MetadataCompactor() {
-      @Override
-      public byte[] compact(byte[] metadata1, byte[] metadata2) {
-        return metadata1;
-      }
-    };
-    
-    /**
-     * Defines the available checksum algorithms.
-     */
-    public enum Checksum {
-      NONE,
-      CRC32
-    }
-    
-    /**
-     * Defines the available compression algorithms.
-     */
-    public enum Compression { 
-      NONE, 
-    }
-    
-    /**
-     * Defines the available key encodings.
-     */
-    public enum KeyEncoding { 
-      NONE, 
-    }
-
-    /** the soplog name */
-    private final String name;
-    
-    /** the statistics */
-    private final SortedOplogStatistics stats;
-    
-    private final HFileStoreStatistics storeStats;
-    
-    /** true if bloom filters are enabled */
-    private boolean bloom;
-    
-    /** the soplog block size */
-    private int blockSize;
-    
-    /** the number of bytes for each checksum */
-    private int bytesPerChecksum;
-    
-    /** the checksum type */
-    private Checksum checksum;
-    
-    /** the compression type */
-    private Compression compression;
-    
-    /** the key encoding type */
-    private KeyEncoding keyEncoding;
-    
-    /** the comparator */
-    private SerializedComparator comparator;
-
-    /** metadata comparers */
-    private EnumMap<Metadata, MetadataCompactor> metaCompactors;
-
-    private BlockCache blockCache;
-
-    private boolean cacheDataBlocksOnRead;
-    
-    public SortedOplogConfiguration(String name) {
-      this(name, null, new SortedOplogStatistics("GridDBRegionStatistics", name), new HFileStoreStatistics("GridDBStoreStatistics", name));
-    }
-    
-    public SortedOplogConfiguration(String name, BlockCache blockCache, SortedOplogStatistics stats, HFileStoreStatistics storeStats) {
-      this.name = name;
-      this.stats = stats;
-      
-      // defaults
-      bloom = true;
-      blockSize = 1 << 16;
-      bytesPerChecksum = 1 << 14;
-      checksum = Checksum.NONE;
-      compression = Compression.NONE;
-      keyEncoding = KeyEncoding.NONE;
-      comparator = new ByteComparator();
-      this.cacheDataBlocksOnRead = true;
-      this.storeStats = storeStats;
-      this.blockCache = blockCache;
-    }
-    
-    public SortedOplogConfiguration setBloomFilterEnabled(boolean enabled) {
-      this.bloom = enabled;
-      return this;
-    }
-    
-    public SortedOplogConfiguration setBlockSize(int size) {
-      this.blockSize = size;
-      return this;
-    }
-    
-    public SortedOplogConfiguration setBytesPerChecksum(int bytes) {
-      this.bytesPerChecksum = bytes;
-      return this;
-    }
-    
-    public SortedOplogConfiguration setChecksum(Checksum type) {
-      this.checksum = type;
-      return this;
-    }
-    
-    public SortedOplogConfiguration setCompression(Compression type) {
-      this.compression = type;
-      return this;
-    }
-    
-    public SortedOplogConfiguration setKeyEncoding(KeyEncoding type) {
-      this.keyEncoding = type;
-      return this;
-    }
-    
-    public SortedOplogConfiguration setComparator(SerializedComparator comp) {
-      this.comparator = comp;
-      return this;
-    }
-    
-    public SortedOplogConfiguration addMetadataCompactor(Metadata name, MetadataCompactor compactor) {
-      metaCompactors.put(name, compactor);
-      return this;
-    }
-    
-    /**
-     * Returns the soplog name.
-     * @return the name
-     */
-    public String getName() {
-      return name;
-    }
-
-    /**
-     * Returns the statistics.
-     * @return the statistics
-     */
-    public SortedOplogStatistics getStatistics() {
-      return stats;
-    }
-    
-    public HFileStoreStatistics getStoreStatistics() {
-      return storeStats;
-    }
-    
-    /**
-     * Returns true if the bloom filter is enabled.
-     * @return true if enabled
-     */
-    public boolean isBloomFilterEnabled() {
-      return bloom;
-    }
-
-    /**
-     * Returns the block size in bytes.
-     * @return the block size
-     */
-    public int getBlockSize() {
-      return blockSize;
-    }
-
-    /**
-     * Returns the number of bytes per checksum.
-     * @return the bytes
-     */
-    public int getBytesPerChecksum() {
-      return bytesPerChecksum;
-    }
-
-    /**
-     * Returns the checksum type.
-     * @return the checksum
-     */
-    public Checksum getChecksum() {
-      return checksum;
-    }
-
-    /**
-     * Returns the compression type.
-     * @return the compression
-     */
-    public Compression getCompression() {
-      return compression;
-    }
-
-    /**
-     * Returns the key encoding type.
-     * @return the key encoding
-     */
-    public KeyEncoding getKeyEncoding() {
-      return keyEncoding;
-    }
-
-    /**
-     * Returns the comparator.
-     * @return the comparator
-     */
-    public SerializedComparator getComparator() {
-      return comparator;
-    }
-    
-    /**
-     * Returns the metadata compactor for the given name. 
-     * @param name the metadata name
-     * @return the compactor
-     */
-    public MetadataCompactor getMetadataCompactor(Metadata name) {
-      MetadataCompactor mc = metaCompactors.get(name);
-      if (mc != null) {
-        return mc;
-      }
-      return DEFAULT_METADATA_COMPACTOR;
-    }
-
-    public BlockCache getBlockCache() {
-      return this.blockCache;
-    }
-
-    public boolean getCacheDataBlocksOnRead() {
-      return cacheDataBlocksOnRead ;
-    }
-  }
-  
-  /**
-   * Returns the configuration.
-   * @return the configuration
-   */
-  SortedOplogConfiguration getConfiguration();
-  
-  /**
-   * Creates a new soplog.
-   * 
-   * @param name the filename
-   * @return the soplog
-   * @throws IOException error creating soplog
-   */
-  SortedOplog createSortedOplog(File name) throws IOException;
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/9438c8b1/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/persistence/soplog/SortedOplogSet.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/persistence/soplog/SortedOplogSet.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/persistence/soplog/SortedOplogSet.java
deleted file mode 100644
index 2900229..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/persistence/soplog/SortedOplogSet.java
+++ /dev/null
@@ -1,118 +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.
- */
-package com.gemstone.gemfire.internal.cache.persistence.soplog;
-
-import java.io.IOException;
-import java.nio.ByteBuffer;
-import java.util.EnumMap;
-
-/**
- * Provides a unified view of the current SBuffer, the unflushed SBuffers, and
- * the existing soplogs.
- * 
- * @author bakera
- */
-public interface SortedOplogSet extends SortedReader<ByteBuffer> {
-  /**
-   * Defines a callback handler for asynchronous operations.
-   */
-  public interface FlushHandler {
-    /**
-     * Invoked when the operation completed successfully.
-     */
-    void complete();
-    
-    /**
-     * Invoked when the operation completed with an error.
-     * @param t the error
-     */
-    void error(Throwable t);
-  }
-
-  /**
-   * Inserts or updates an entry in the current buffer.  This invocation may
-   * block if the current buffer is full and there are too many outstanding
-   * write requests.
-   * 
-   * @param key the key
-   * @param value the value
-   * @throws IOException 
-   */
-  void put(byte[] key, byte[] value) throws IOException;
-  
-  /**
-   * Returns the size of the current buffer in bytes.
-   * @return the buffer size
-   */
-  long bufferSize();
-  
-  /**
-   * Returns the size of the unflushed buffers in bytes.
-   * @return the unflushed size
-   */
-  long unflushedSize();
-  
-  /**
-   * Requests that the current buffer be flushed to disk.  This invocation may
-   * block if there are too many outstanding write requests.
-   * 
-   * @param metadata supplemental data to be included in the soplog
-   * @param handler the flush completion callback
-   * @throws IOException error preparing flush
-   */
-  void flush(EnumMap<Metadata, byte[]> metadata, FlushHandler handler) throws IOException;
-
-  /**
-   * Flushes the current buffer and closes the soplog set.  Blocks until the flush
-   * is completed.
-   * 
-   * @param metadata supplemental data to be included in the soplog
-   * @throws IOException error during flush
-   */
-  void flushAndClose(EnumMap<Metadata, byte[]> metadata) throws IOException;
-
-  /**
-   * Returns the configured compaction strategy.
-   * @return the compactor
-   */
-  Compactor getCompactor();
-
-  /**
-   * Clears the current buffer, any existing buffers, and all active soplogs.
-   * 
-   * @throws IOException unable to clear
-   */
-  void clear() throws IOException;
-  
-  /**
-   * Clears existing and closes the soplog set.
-   * @throws IOException unable to destroy
-   */
-  void destroy() throws IOException;
-  
-  /**
-   * Returns true if the set is closed.
-   * @return true if closed
-   */
-  boolean isClosed();
-
-  /**
-   * Returns the soplog factory.
-   * @return the factory
-   */
-  SortedOplogFactory getFactory();
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/9438c8b1/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/persistence/soplog/SortedOplogSetImpl.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/persistence/soplog/SortedOplogSetImpl.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/persistence/soplog/SortedOplogSetImpl.java
deleted file mode 100644
index 2cf1191..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/persistence/soplog/SortedOplogSetImpl.java
+++ /dev/null
@@ -1,780 +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.
- */
-package com.gemstone.gemfire.internal.cache.persistence.soplog;
-
-import java.io.File;
-import java.io.IOException;
-import java.nio.ByteBuffer;
-import java.util.ArrayDeque;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Deque;
-import java.util.EnumMap;
-import java.util.List;
-import java.util.Map.Entry;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.Executor;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicBoolean;
-import java.util.concurrent.atomic.AtomicInteger;
-import java.util.concurrent.atomic.AtomicReference;
-import java.util.concurrent.locks.ReadWriteLock;
-import java.util.concurrent.locks.ReentrantReadWriteLock;
-
-import org.apache.logging.log4j.Logger;
-
-import com.gemstone.gemfire.internal.cache.persistence.soplog.SortedOplog.SortedOplogReader;
-import com.gemstone.gemfire.internal.cache.persistence.soplog.SortedOplog.SortedOplogWriter;
-import com.gemstone.gemfire.internal.logging.LogService;
-import com.gemstone.gemfire.internal.util.AbortableTaskService;
-import com.gemstone.gemfire.internal.util.AbortableTaskService.AbortableTask;
-
-/**
- * Provides a unifies view across a set of sbuffers and soplogs.  Updates are 
- * made into the current sbuffer.  When requested, the current sbuffer will be
- * flushed and subsequent updates will flow into a new sbuffer.  All flushes are
- * done on a background thread.
- * 
- * @author bakera
- */
-public class SortedOplogSetImpl extends AbstractSortedReader implements SortedOplogSet {
-  private static final Logger logger = LogService.getLogger();
-  
-  /** creates new soplogs */
-  private final SortedOplogFactory factory;
-  
-  /** the background flush thread pool */
-  private final AbortableTaskService flusher;
-  
-  /** the compactor */
-  private final Compactor compactor;
-  
-  /** the current sbuffer */
-  private final AtomicReference<SortedBuffer<Integer>> current;
-  
-  /** the buffer count */
-  private final AtomicInteger bufferCount;
-  
-  /** the unflushed sbuffers */
-  private final Deque<SortedBuffer<Integer>> unflushed;
-  
-  /** the lock for access to unflushed and soplogs */
-  private final ReadWriteLock rwlock;
-  
-  /** test hook for clear/close/destroy during flush */
-  volatile CountDownLatch testDelayDuringFlush;
-  
-  /** test hook to cause IOException during flush */
-  volatile boolean testErrorDuringFlush;
-  
-  private final String logPrefix;
-  
-  public SortedOplogSetImpl(final SortedOplogFactory factory, Executor exec, Compactor ctor) throws IOException {
-    this.factory = factory;
-    this.flusher = new AbortableTaskService(exec);
-    this.compactor = ctor;
-    
-    rwlock = new ReentrantReadWriteLock();
-    bufferCount = new AtomicInteger(0);
-    unflushed = new ArrayDeque<SortedBuffer<Integer>>();
-    current = new AtomicReference<SortedBuffer<Integer>>(
-        new SortedBuffer<Integer>(factory.getConfiguration(), 0));
-    
-    this.logPrefix = "<" + factory.getConfiguration().getName() + "> ";
-    if (logger.isDebugEnabled()) {
-      logger.debug("{}Creating soplog set", this.logPrefix);
-    }
-  }
-  
-  @Override
-  public boolean mightContain(byte[] key) throws IOException {
-    // loops through the following readers:
-    //   current sbuffer
-    //   unflushed sbuffers
-    //   soplogs
-    //
-    // The loop has been unrolled for efficiency.
-    //
-    if (getCurrent().mightContain(key)) {
-      return true;
-    }
-
-    // snapshot the sbuffers and soplogs for stable iteration
-    List<SortedReader<ByteBuffer>> readers;
-    Collection<TrackedReference<SortedOplogReader>> soplogs;
-    rwlock.readLock().lock();
-    try {
-      readers = new ArrayList<SortedReader<ByteBuffer>>(unflushed);
-      soplogs = compactor.getActiveReaders(key, key);
-      for (TrackedReference<SortedOplogReader> tr : soplogs) {
-        readers.add(tr.get());
-      }
-    } finally {
-      rwlock.readLock().unlock();
-    }
-
-    try {
-      for (SortedReader<ByteBuffer> rdr : readers) {
-        if (rdr.mightContain(key)) {
-          return true;
-        }
-      }
-      return false;
-    } finally {
-      TrackedReference.decrementAll(soplogs);
-    }
-  }
-
-  @Override
-  public ByteBuffer read(byte[] key) throws IOException {
-    // loops through the following readers:
-    //   current sbuffer
-    //   unflushed sbuffers
-    //   soplogs
-    //
-    // The loop has been slightly unrolled for efficiency.
-    //
-    ByteBuffer val = getCurrent().read(key);
-    if (val != null) {
-      return val;
-    }
-
-    // snapshot the sbuffers and soplogs for stable iteration
-    List<SortedReader<ByteBuffer>> readers;
-    Collection<TrackedReference<SortedOplogReader>> soplogs;
-    rwlock.readLock().lock();
-    try {
-      readers = new ArrayList<SortedReader<ByteBuffer>>(unflushed);
-      soplogs = compactor.getActiveReaders(key, key);
-      for (TrackedReference<SortedOplogReader> tr : soplogs) {
-        readers.add(tr.get());
-      }
-    } finally {
-      rwlock.readLock().unlock();
-    }
-    
-    try {
-      for (SortedReader<ByteBuffer> rdr : readers) {
-        if (rdr.mightContain(key)) {
-          val = rdr.read(key);
-          if (val != null) {
-            return val;
-          }
-        }
-      }
-      return null;
-    } finally {
-      TrackedReference.decrementAll(soplogs);
-    }
-  }
-
-  @Override
-  public SortedIterator<ByteBuffer> scan(
-      byte[] from, boolean fromInclusive, 
-      byte[] to, boolean toInclusive,
-      boolean ascending,
-      MetadataFilter filter) throws IOException {
-
-    SerializedComparator sc = factory.getConfiguration().getComparator();
-    sc = ascending ? sc : ReversingSerializedComparator.reverse(sc);
-
-    List<SortedIterator<ByteBuffer>> scans = new ArrayList<SortedIterator<ByteBuffer>>();
-    Collection<TrackedReference<SortedOplogReader>> soplogs;
-    rwlock.readLock().lock();
-    try {
-      scans.add(getCurrent().scan(from, fromInclusive, to, toInclusive, ascending, filter));
-      for (SortedBuffer<Integer> sb : unflushed) {
-        scans.add(sb.scan(from, fromInclusive, to, toInclusive, ascending, filter));
-      }
-      soplogs = compactor.getActiveReaders(from, to);
-    } finally {
-      rwlock.readLock().unlock();
-    }
-
-    for (TrackedReference<SortedOplogReader> tr : soplogs) {
-      scans.add(tr.get().scan(from, fromInclusive, to, toInclusive, ascending, filter));
-    }
-    return new MergedIterator(sc, soplogs, scans);
-  }
-
-  @Override
-  public void put(byte[] key, byte[] value) {
-    assert key != null;
-    assert value != null;
-    
-    long start = factory.getConfiguration().getStatistics().getPut().begin();
-    getCurrent().put(key, value);
-    factory.getConfiguration().getStatistics().getPut().end(value.length, start);
-  }
-
-  @Override
-  public long bufferSize() {
-    return getCurrent().dataSize();
-  }
-
-  @Override
-  public long unflushedSize() {
-    long size = 0;
-    rwlock.readLock().lock();
-    try {
-      for (SortedBuffer<Integer> sb : unflushed) {
-        size += sb.dataSize();
-      }
-    } finally {
-      rwlock.readLock().unlock();
-    }
-    return size;
-  }
-  
-  @Override
-  public void flushAndClose(EnumMap<Metadata, byte[]> metadata) throws IOException {
-    final AtomicReference<Throwable> err = new AtomicReference<Throwable>(null);
-    flush(metadata, new FlushHandler() {
-      @Override public void complete() { }
-      @Override public void error(Throwable t) { err.set(t); }
-    });
-    
-    // waits for flush completion
-    close();
-    
-    Throwable t = err.get();
-    if (t != null) {
-      throw new IOException(t);
-    }
-  }
-  
-  @Override
-  public void flush(EnumMap<Metadata, byte[]> metadata, FlushHandler handler) {
-    assert handler != null;
-    
-    long start = factory.getConfiguration().getStatistics().getFlush().begin();
-    
-    // flip to a new buffer
-    final SortedBuffer<Integer> sb;
-    rwlock.writeLock().lock();
-    try {
-      if (isClosed()) {
-        handler.complete();
-        factory.getConfiguration().getStatistics().getFlush().end(0, start);
-        
-        return;
-      }
-      
-      sb = flipBuffer();
-      if (sb.count() == 0) {
-        if (logger.isDebugEnabled()) {
-          logger.debug("{}Skipping flush of empty buffer {}", this.logPrefix, sb);
-        }
-        handler.complete();
-        return;
-      }
-      
-      sb.setMetadata(metadata);
-      unflushed.addFirst(sb);
-    
-      // Note: this is queued while holding the lock to ensure correct ordering
-      // on the executor queue.  Don't use a bounded queue here or we will block
-      // the flush invoker.
-      flusher.execute(new FlushTask(handler, sb, start));
-      
-    } finally {
-      rwlock.writeLock().unlock();
-    }
-  }
-
-  @Override
-  public void clear() throws IOException {
-    if (logger.isDebugEnabled()) {
-      logger.debug("{}Clearing soplog set", this.logPrefix);
-    }
-
-    long start = factory.getConfiguration().getStatistics().getClear().begin();
-
-    // acquire lock to ensure consistency with flushes
-    rwlock.writeLock().lock();
-    try {
-      SortedBuffer<Integer> tmp = current.get();
-      if (tmp != null) {
-        tmp.clear();
-      }
-
-      flusher.abortAll();
-      for (SortedBuffer<Integer> sb : unflushed) {
-        sb.clear();
-      }
-      
-      unflushed.clear();
-      compactor.clear();
-
-      releaseTestDelay();
-      flusher.waitForCompletion();
-      factory.getConfiguration().getStatistics().getClear().end(start);
-      
-    } catch (IOException e) {
-      factory.getConfiguration().getStatistics().getClear().error(start);
-      throw (IOException) e.fillInStackTrace();
-      
-    } finally {
-      rwlock.writeLock().unlock();
-    }
-  }
-  
-  @Override
-  public void destroy() throws IOException {
-    if (logger.isDebugEnabled()) {
-      logger.debug("{}Destroying soplog set", this.logPrefix);
-    }
-
-    long start = factory.getConfiguration().getStatistics().getDestroy().begin();
-    try {
-      unsetCurrent();
-      clear();
-      close();
-      
-      factory.getConfiguration().getStatistics().getDestroy().end(start);
-      
-    } catch (IOException e) {
-      factory.getConfiguration().getStatistics().getDestroy().error(start);
-      throw (IOException) e.fillInStackTrace();
-    }
-  }
-  
-  @Override
-  public void close() throws IOException {
-    if (logger.isDebugEnabled()) {
-      logger.debug("{}Closing soplog set", this.logPrefix);
-    }
-
-    unsetCurrent();
-    releaseTestDelay();
-
-    flusher.waitForCompletion();
-    compactor.close();
-  }
-
-  @Override
-  public SerializedComparator getComparator() {
-    return factory.getConfiguration().getComparator();
-  }
-
-  @Override
-  public SortedStatistics getStatistics() throws IOException {
-    List<SortedStatistics> stats = new ArrayList<SortedStatistics>();
-    Collection<TrackedReference<SortedOplogReader>> soplogs;
-    
-    // snapshot, this is expensive
-    rwlock.readLock().lock();
-    try {
-      stats.add(getCurrent().getStatistics());
-      for (SortedBuffer<Integer> sb : unflushed) {
-        stats.add(sb.getStatistics());
-      }
-      soplogs = compactor.getActiveReaders(null, null);
-    } finally {
-      rwlock.readLock().unlock();
-    }
-    
-    for (TrackedReference<SortedOplogReader> tr : soplogs) {
-      stats.add(tr.get().getStatistics());
-    }
-    return new MergedStatistics(stats, soplogs);
-  }
-
-  @Override
-  public Compactor getCompactor() {
-    return compactor;
-  }
-  
-  @Override
-  public boolean isClosed() {
-    return current.get() == null;
-  }
-  
-  @Override
-  public SortedOplogFactory getFactory() {
-    return factory;
-  }
-  
-  private SortedBuffer<Integer> flipBuffer() {
-    final SortedBuffer<Integer> sb;
-    sb = getCurrent();
-    SortedBuffer<Integer> next = new SortedBuffer<Integer>(
-        factory.getConfiguration(), 
-        bufferCount.incrementAndGet());
-  
-    current.set(next);
-    if (logger.isDebugEnabled()) {
-      logger.debug("{}Switching from buffer {} to {}", this.logPrefix, sb, next);
-    }
-    return sb;
-  }
-
-  private SortedBuffer<Integer> getCurrent() {
-    SortedBuffer<Integer> tmp = current.get();
-    if (tmp == null) {
-      throw new IllegalStateException("Closed");
-    }
-    return tmp;
-  }
-  
-  private void unsetCurrent() {
-    rwlock.writeLock().lock();
-    try {
-      SortedBuffer<Integer> tmp = current.getAndSet(null);
-      if (tmp != null) {
-        tmp.clear();
-      }
-    } finally {
-      rwlock.writeLock().unlock();
-    }
-  }
-  
-  private void releaseTestDelay() {
-    if (testDelayDuringFlush != null) {
-      if (logger.isDebugEnabled()) {
-        logger.debug("{}Releasing testDelayDuringFlush", this.logPrefix);
-      }
-      testDelayDuringFlush.countDown();
-    }
-  }
-
-  private class FlushTask implements AbortableTask {
-    private final FlushHandler handler;
-    private final SortedBuffer<Integer> buffer;
-    private final long start;
-    
-    public FlushTask(FlushHandler handler, SortedBuffer<Integer> buffer, long start) {
-      this.handler = handler;
-      this.buffer = buffer;
-      this.start = start;
-    }
-    
-    @Override
-    public void runOrAbort(final AtomicBoolean aborted) {
-      try {
-        // First transfer the contents of the buffer to a new soplog.
-        final SortedOplog soplog = writeBuffer(buffer, aborted);
-        
-        // If we are aborted, someone else will cleanup the unflushed queue
-        if (soplog == null || !lockOrAbort(aborted)) {
-          handler.complete();
-          return;
-        }
-
-        try {
-          Runnable action = new Runnable() {
-            @Override
-            public void run() {
-              try {
-                compactor.add(soplog);
-                compactor.compact(false, null);
-
-                unflushed.removeFirstOccurrence(buffer);
-                
-                // TODO need to invoke this while NOT holding write lock
-                handler.complete();
-                factory.getConfiguration().getStatistics().getFlush().end(buffer.dataSize(), start);
-                
-              } catch (Exception e) {
-                handleError(e, aborted);
-                return;
-              }
-            }
-          };
-          
-          // Enforce flush ordering for consistency.  If the previous buffer flush
-          // is incomplete, we defer completion and release the thread to avoid
-          // deadlocks.
-          if (buffer == unflushed.peekLast()) {
-            action.run();
-            
-            SortedBuffer<Integer> tail = unflushed.peekLast();
-            while (tail != null && tail.isDeferred() && !aborted.get()) {
-              // TODO need to invoke this while NOT holding write lock
-              tail.complete();
-              tail = unflushed.peekLast();
-            }
-          } else {
-            buffer.defer(action);
-          }
-        } finally {
-          rwlock.writeLock().unlock();
-        }
-      } catch (Exception e) {
-        handleError(e, aborted);
-      }
-    }
-    
-    @Override
-    public void abortBeforeRun() {
-      handler.complete();
-      factory.getConfiguration().getStatistics().getFlush().end(start);
-    }
-    
-    private void handleError(Exception e, AtomicBoolean aborted) {
-      if (lockOrAbort(aborted)) {
-        try {
-          unflushed.removeFirstOccurrence(buffer);
-        } finally {
-          rwlock.writeLock().unlock();
-        }
-      }  
-
-      handler.error(e);
-      factory.getConfiguration().getStatistics().getFlush().error(start);
-    }
-    
-    private SortedOplog writeBuffer(SortedBuffer<Integer> sb, AtomicBoolean aborted) 
-        throws IOException {
-      File f = compactor.getFileset().getNextFilename();
-      if (logger.isDebugEnabled()) {
-        logger.debug("{}Flushing buffer {} to {}", SortedOplogSetImpl.this.logPrefix, sb, f);
-      }
-
-      SortedOplog so = factory.createSortedOplog(f);
-      SortedOplogWriter writer = so.createWriter();
-      try {
-        if (testErrorDuringFlush) {
-          throw new IOException("Flush error due to testErrorDuringFlush=true");
-        }
-        
-        for (Entry<byte[], byte[]> entry : sb.entries()) {
-          if (aborted.get()) {
-            writer.closeAndDelete();
-            return null;
-          }
-          writer.append(entry.getKey(), entry.getValue());
-        }
-   
-        checkTestDelay();
-        
-        writer.close(buffer.getMetadata());
-        return so;
-   
-      } catch (IOException e) {
-        if (logger.isDebugEnabled()) {
-          logger.debug("{}Encountered error while flushing buffer {}", SortedOplogSetImpl.this.logPrefix, sb, e);
-        }
-        
-        writer.closeAndDelete();
-        throw e;
-      }
-    }
-
-    private void checkTestDelay() {
-      if (testDelayDuringFlush != null) {
-        try {
-          if (logger.isDebugEnabled()) {
-            logger.debug("{}Waiting for testDelayDuringFlush", SortedOplogSetImpl.this.logPrefix);
-          }
-          testDelayDuringFlush.await();
-          
-        } catch (InterruptedException e) {
-          Thread.currentThread().interrupt();
-        }
-      }
-    }
-
-    private boolean lockOrAbort(AtomicBoolean abort) {
-      try {
-        while (!abort.get()) {
-          if (rwlock.writeLock().tryLock(10, TimeUnit.MILLISECONDS)) {
-            return true;
-          }
-        }
-      } catch (InterruptedException e) {
-        Thread.currentThread().interrupt();
-      }
-      return false;
-    }
-  }
-  
-  private class MergedStatistics implements SortedStatistics {
-    private final List<SortedStatistics> stats;
-    private final Collection<TrackedReference<SortedOplogReader>> soplogs;
-
-    public MergedStatistics(List<SortedStatistics> stats, Collection<TrackedReference<SortedOplogReader>> soplogs) {
-      this.stats = stats;
-      this.soplogs = soplogs;
-    }
-    
-    @Override
-    public long keyCount() {
-      // TODO we have no way of determining the overall key population
-      // just assume no overlap for now
-      long keys = 0;
-      for (SortedStatistics ss : stats) {
-        keys += ss.keyCount();
-      }
-      return keys;
-    }
-
-    @Override
-    public byte[] firstKey() {
-      byte[] first = stats.get(0).firstKey();
-      for (int i = 1; i < stats.size(); i++) {
-        byte[] tmp = stats.get(i).firstKey();
-        if (getComparator().compare(first, tmp) > 0) {
-          first = tmp;
-        }
-      }
-      return first;
-    }
-
-    @Override
-    public byte[] lastKey() {
-      byte[] last = stats.get(0).lastKey();
-      for (int i = 1; i < stats.size(); i++) {
-        byte[] tmp = stats.get(i).lastKey();
-        if (getComparator().compare(last, tmp) < 0) {
-          last = tmp;
-        }
-      }
-      return last;
-    }
-
-    @Override
-    public double avgKeySize() {
-      double avg = 0;
-      for (SortedStatistics ss : stats) {
-        avg += ss.avgKeySize();
-      }
-      return avg / stats.size();
-    }
-
-    @Override
-    public double avgValueSize() {
-      double avg = 0;
-      for (SortedStatistics ss : stats) {
-        avg += ss.avgValueSize();
-      }
-      return avg / stats.size();
-    }
-
-    @Override
-    public void close() {
-      TrackedReference.decrementAll(soplogs);
-    }
-  }
-  
-  /**
-   * Provides ordered iteration across a set of sorted data sets. 
-   */
-  public static class MergedIterator 
-    extends AbstractKeyValueIterator<ByteBuffer, ByteBuffer> 
-    implements SortedIterator<ByteBuffer>
-  {
-    /** the comparison operator */
-    private final SerializedComparator comparator;
-    
-    /** the reference counted soplogs */
-    private final Collection<TrackedReference<SortedOplogReader>> soplogs;
-
-    /** the backing iterators */
-    private final List<SortedIterator<ByteBuffer>> iters;
-    
-    /** the current key */
-    private ByteBuffer key;
-    
-    /** the current value */
-    private ByteBuffer value;
-    
-    public MergedIterator(SerializedComparator comparator, 
-        Collection<TrackedReference<SortedOplogReader>> soplogs, 
-        List<SortedIterator<ByteBuffer>> iters) {
-      this.comparator = comparator;
-      this.soplogs = soplogs;
-      this.iters = iters;
-      
-      // initialize iteration positions
-      int i = 0;
-      while (i < iters.size()) {
-        i = advance(i);
-      }
-    }
-    
-    @Override
-    public ByteBuffer key() {
-      return key;
-    }
-
-    @Override
-    public ByteBuffer value() {
-      return value;
-    }
-
-    @Override
-    protected boolean step() {
-      if (iters.isEmpty() || readerIsClosed()) {
-        return false;
-      }
-      
-      int cursor = 0;
-      key = iters.get(cursor).key();
-      
-      int i = 1;
-      while (i < iters.size()) {
-        ByteBuffer tmp = iters.get(i).key();
-        
-        int diff = comparator.compare(tmp.array(), tmp.arrayOffset(), tmp.remaining(), 
-            key.array(), key.arrayOffset(), key.remaining());
-        if (diff < 0) {
-          cursor = i++;
-          key = tmp;
-          
-        } else if (diff == 0) {
-          i = advance(i);
-          
-        } else {
-          i++;
-        }
-      }
-      
-      value = iters.get(cursor).value();
-      advance(cursor);
-      
-      return true;
-    }
-    
-    @Override
-    public void close() {
-      for (SortedIterator<ByteBuffer> iter : iters) {
-        iter.close();
-      }
-      TrackedReference.decrementAll(soplogs);
-    }
-
-    private int advance(int idx) {
-      // either advance the cursor or remove the iterator
-      if (!iters.get(idx).hasNext()) {
-        iters.remove(idx).close();
-        return idx;
-      }
-      iters.get(idx).next();
-      return idx + 1;
-    }
-    
-    private boolean readerIsClosed() {
-      for (TrackedReference<SortedOplogReader> tr : soplogs) {
-        if (tr.get().isClosed()) {
-          return true;
-        }
-      }
-      return false;
-    }
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/9438c8b1/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/persistence/soplog/hfile/BlockCacheHolder.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/persistence/soplog/hfile/BlockCacheHolder.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/persistence/soplog/hfile/BlockCacheHolder.java
deleted file mode 100644
index eb5154c..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/persistence/soplog/hfile/BlockCacheHolder.java
+++ /dev/null
@@ -1,39 +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.
- */
-package com.gemstone.gemfire.internal.cache.persistence.soplog.hfile;
-
-import org.apache.hadoop.hbase.io.hfile.BlockCache;
-
-import com.gemstone.gemfire.internal.cache.persistence.soplog.HFileStoreStatistics;
-
-public class BlockCacheHolder {
-  private BlockCache cache;
-  private HFileStoreStatistics stats;
-  
-  public BlockCacheHolder(HFileStoreStatistics stats, BlockCache cache) {
-    this.stats = stats;
-    this.cache = cache;
-  }
-
-  public synchronized BlockCache getBlockCache() {
-    return cache;
-  }
-  
-  public synchronized HFileStoreStatistics getHFileStoreStats() {
-    return stats;
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/9438c8b1/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/persistence/soplog/hfile/HFileSortedOplog.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/persistence/soplog/hfile/HFileSortedOplog.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/persistence/soplog/hfile/HFileSortedOplog.java
deleted file mode 100644
index 56c6960..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/persistence/soplog/hfile/HFileSortedOplog.java
+++ /dev/null
@@ -1,694 +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.
- */
-package com.gemstone.gemfire.internal.cache.persistence.soplog.hfile;
-
-import java.io.ByteArrayInputStream;
-import java.io.DataInput;
-import java.io.DataInputStream;
-import java.io.File;
-import java.io.IOException;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.EnumMap;
-import java.util.Map.Entry;
-import java.util.NoSuchElementException;
-
-import org.apache.hadoop.conf.Configuration;
-import org.apache.hadoop.fs.FileStatus;
-import org.apache.hadoop.fs.FileSystem;
-import org.apache.hadoop.fs.Path;
-
-import com.gemstone.gemfire.cache.hdfs.HDFSIOException;
-import com.gemstone.gemfire.internal.cache.persistence.soplog.AbstractSortedReader;
-import com.gemstone.gemfire.internal.cache.persistence.soplog.DelegatingSerializedComparator;
-import com.gemstone.gemfire.internal.cache.persistence.soplog.ReversingSerializedComparator;
-import com.gemstone.gemfire.internal.cache.persistence.soplog.SortedBuffer.BufferIterator;
-import com.gemstone.gemfire.internal.cache.persistence.soplog.SortedOplog;
-import com.gemstone.gemfire.internal.cache.persistence.soplog.SortedOplogFactory.SortedOplogConfiguration;
-import com.gemstone.gemfire.internal.cache.persistence.soplog.SortedReader.Metadata;
-import com.gemstone.gemfire.internal.cache.persistence.soplog.SortedReader.SerializedComparator;
-import com.gemstone.gemfire.internal.cache.persistence.soplog.SortedReader.SortedIterator;
-import com.gemstone.gemfire.internal.cache.persistence.soplog.SortedReader.SortedStatistics;
-import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
-import com.gemstone.gemfire.internal.util.Bytes;
-import com.gemstone.gemfire.internal.util.Hex;
-import org.apache.hadoop.hbase.io.hfile.CacheConfig;
-import org.apache.hadoop.hbase.io.hfile.HFile;
-import org.apache.hadoop.hbase.io.hfile.HFile.Reader;
-import org.apache.hadoop.hbase.io.hfile.HFile.Writer;
-import org.apache.hadoop.hbase.io.hfile.HFileScanner;
-import org.apache.hadoop.hbase.regionserver.StoreFile.BloomType;
-import org.apache.hadoop.hbase.regionserver.metrics.SchemaMetrics;
-import org.apache.hadoop.hbase.util.BloomFilterFactory;
-import org.apache.hadoop.hbase.util.BloomFilterWriter;
-import org.apache.hadoop.hbase.util.FSUtils;
-import org.apache.logging.log4j.Logger;
-import com.gemstone.gemfire.internal.logging.LogService;
-
-/**
- * Provides a soplog backed by an HFile.
- * 
- * @author bakera
- */
-public class HFileSortedOplog implements SortedOplog {
-  public static final byte[] MAGIC          = new byte[] { 0x53, 0x4F, 0x50 };
-  public static final byte[] VERSION_1      = new byte[] { 0x1 };
-  
-  // FileInfo is not visible
-  private static final byte[] AVG_KEY_LEN   = "hfile.AVG_KEY_LEN".getBytes();
-  private static final byte[] AVG_VALUE_LEN = "hfile.AVG_VALUE_LEN".getBytes();
-  
-  /** a default bloom filter */
-  private static final BloomFilter DUMMY_BLOOM = new BloomFilter() {
-    @Override
-    public boolean mightContain(byte[] key) {
-      return true;
-    }
-  };
-
-  static final Configuration hconf;
-  private static final FileSystem fs;
-
-  static {
-    // Leave these HBase properties set to defaults for now
-    //
-    // hfile.block.cache.size (25% of heap)
-    // hbase.hash.type (murmur)
-    // hfile.block.index.cacheonwrite (false)
-    // hfile.index.block.max.size (128k)
-    // hfile.format.version (2)
-    // io.storefile.bloom.block.size (128k)
-    // hfile.block.bloom.cacheonwrite (false)
-    // hbase.rs.cacheblocksonwrite (false)
-    // hbase.offheapcache.minblocksize (64k)
-    // hbase.offheapcache.percentage (0)
-    hconf = new Configuration();
-
-    hconf.setBoolean("hbase.metrics.showTableName", true);
-    SchemaMetrics.configureGlobally(hconf);
-
-    try {
-      fs = FileSystem.get(hconf);
-    } catch (IOException e) {
-      throw new IllegalStateException(e);
-    }
-  }
-
-  private static enum InternalMetadata {
-    /** identifies the soplog as a gemfire file, required */
-    GEMFIRE_MAGIC,
-    
-    /** identifies the soplog version, required */
-    VERSION,
-    
-    /** identifies the statistics data */
-    STATISTICS,
-
-    /** identifies the names of embedded comparators */
-    COMPARATORS;
-
-    public byte[] bytes() {
-      return ("gemfire." + name()).getBytes();
-    }
-  }
-  
-  //logger instance
-  private static final Logger logger = LogService.getLogger();
-  protected final String logPrefix;
-  
-  /** the configuration */
-  private final SortedOplogConfiguration sopConfig;
-  
-  /** the hfile cache config */
-  private final CacheConfig hcache;
-  
-  /** the hfile location */
-  private Path path;
-  
-  public HFileSortedOplog(File hfile, SortedOplogConfiguration sopConfig) throws IOException {
-    assert hfile != null;
-    assert sopConfig != null;
-    
-    this.sopConfig = sopConfig;
-    path = fs.makeQualified(new Path(hfile.toString()));
-    
-//    hcache = new CacheConfig(hconf, sopConfig.getCacheDataBlocksOnRead(), sopConfig.getBlockCache(), 
-//        HFileSortedOplogFactory.convertStatistics(sopConfig.getStatistics(), sopConfig.getStoreStatistics()));
-    hcache = new CacheConfig(hconf);
-    this.logPrefix = "<" + sopConfig.getName() + "> ";
-  }
-
-  @Override
-  public SortedOplogReader createReader() throws IOException {
-    if (logger.isDebugEnabled()) {
-      logger.debug("{}Creating an HFile reader on " + path, logPrefix);
-    }
-    
-    return new HFileSortedOplogReader();
-  }
-
-  @Override
-  public SortedOplogWriter createWriter() throws IOException {
-    if (logger.isDebugEnabled()) {
-      logger.debug("{}Creating an HFile writer on " + path, logPrefix);
-    }
-
-    return new HFileSortedOplogWriter();  
-  }
-  
-  SortedOplogConfiguration getConfiguration() {
-    return sopConfig;
-  }
-  
-  private class HFileSortedOplogReader extends AbstractSortedReader implements SortedOplogReader {
-    private final Reader reader;
-    private final BloomFilter bloom;
-    private final SortedStatistics stats;
-    private volatile boolean closed;
-    
-    public HFileSortedOplogReader() throws IOException {
-      reader = HFile.createReader(fs, path, hcache);
-      validate();
-      
-      stats = new HFileSortedStatistics(reader);
-      closed = false;
-      
-      if (reader.getComparator() instanceof DelegatingSerializedComparator) {
-        loadComparators((DelegatingSerializedComparator) reader.getComparator());
-      }
-
-      DataInput bin = reader.getGeneralBloomFilterMetadata();
-      if (bin != null) {
-        final org.apache.hadoop.hbase.util.BloomFilter hbloom = BloomFilterFactory.createFromMeta(bin, reader);
-        if (reader.getComparator() instanceof DelegatingSerializedComparator) {
-          loadComparators((DelegatingSerializedComparator) hbloom.getComparator());
-        }
-
-        bloom = new BloomFilter() {
-          @Override
-          public boolean mightContain(byte[] key) {
-            assert key != null;
-            
-            long start = sopConfig.getStatistics().getBloom().begin();
-            boolean foundKey = hbloom.contains(key, 0, key.length, null);
-            sopConfig.getStatistics().getBloom().end(start);
-            
-            if (logger.isTraceEnabled()) {
-              logger.trace(String.format("{}Bloom check on %s for key %s: %b", 
-                  path, Hex.toHex(key), foundKey), logPrefix);
-            }
-            return foundKey;
-          }
-        };
-        
-      } else {
-        bloom = DUMMY_BLOOM;
-      }
-    }
-    
-    @Override
-    public boolean mightContain(byte[] key) {
-      return getBloomFilter().mightContain(key);
-    }
-
-    @Override
-    public ByteBuffer read(byte[] key) throws IOException {
-      assert key != null;
-      
-      if (logger.isTraceEnabled()) {
-        logger.trace(String.format("{}Reading key %s from %s", Hex.toHex(key), path), logPrefix);
-      }
-
-      long start = sopConfig.getStatistics().getRead().begin();
-      try {
-        HFileScanner seek = reader.getScanner(true, true);
-        if (seek.seekTo(key) == 0) {
-          ByteBuffer val = seek.getValue();
-          sopConfig.getStatistics().getRead().end(val.remaining(), start);
-          
-          return val;
-        }
-        
-        sopConfig.getStatistics().getRead().end(start);
-        sopConfig.getStatistics().getBloom().falsePositive();
-        return null;
-        
-      } catch (IOException e) {
-        sopConfig.getStatistics().getRead().error(start);
-        throw (IOException) e.fillInStackTrace();
-      }
-    }
-
-    @Override
-    public SortedIterator<ByteBuffer> scan(
-        byte[] from, boolean fromInclusive, 
-        byte[] to, boolean toInclusive,
-        boolean ascending,
-        MetadataFilter filter) throws IOException {
-      if (filter == null || filter.accept(getMetadata(filter.getName()))) {
-        SerializedComparator tmp = (SerializedComparator) reader.getComparator();
-        tmp = ascending ? tmp : ReversingSerializedComparator.reverse(tmp); 
-  
-//        HFileScanner scan = reader.getScanner(true, false, ascending, false);
-        HFileScanner scan = reader.getScanner(true, false, false);
-        return new HFileSortedIterator(scan, tmp, from, fromInclusive, to, toInclusive);
-      }
-      return new BufferIterator(Collections.<byte[], byte[]>emptyMap().entrySet().iterator());
-    }
-
-    @Override
-    public SerializedComparator getComparator() {
-      return (SerializedComparator) reader.getComparator();
-    }
-
-    @Override
-    public SortedStatistics getStatistics() {
-      return stats;
-    }
-
-    @Override
-    public boolean isClosed() {
-      return closed;
-    }
-    
-    @Override
-    public void close() throws IOException {
-      if (logger.isDebugEnabled()) {
-        logger.debug("{}Closing reader on " + path, logPrefix);
-      }
-      reader.close();
-      closed = true;
-    }
-
-    @Override
-    public BloomFilter getBloomFilter() {
-      return bloom;
-    }
-
-    @Override
-    public byte[] getMetadata(Metadata name) throws IOException {
-      assert name != null;
-      
-      return reader.loadFileInfo().get(name.bytes());
-    }
-    
-    @Override
-    public File getFile() {
-      return new File(path.toUri());
-    }
-    
-    @Override
-    public String getFileName() {
-      return path.getName();
-    }
-   
-    @Override
-    public long getModificationTimeStamp() throws IOException {
-      FileStatus[] stats = FSUtils.listStatus(fs, path, null);
-      if (stats != null && stats.length == 1) {
-        return stats[0].getModificationTime();
-      } else {
-        return 0;
-      }
-    }
-    
-    @Override
-    public void rename(String name) throws IOException {
-      Path parent = path.getParent();
-      Path newPath = new Path(parent, name);
-      fs.rename(path, newPath);
-      // update path to point to the new path
-      path = newPath;
-    }
-    
-    @Override
-    public void delete() throws IOException {
-      fs.delete(path, false);
-    }
-    
-    @Override
-    public String toString() {
-      return path.toString();
-    }
-    
-    private byte[] getMetadata(InternalMetadata name) throws IOException {
-      return reader.loadFileInfo().get(name.bytes());
-    }
-    
-    private void validate() throws IOException {
-      // check magic
-      byte[] magic = getMetadata(InternalMetadata.GEMFIRE_MAGIC);
-      if (!Arrays.equals(magic, MAGIC)) {
-        throw new IOException(LocalizedStrings.Soplog_INVALID_MAGIC.toLocalizedString(Hex.toHex(magic)));
-      }
-      
-      // check version compatibility
-      byte[] ver = getMetadata(InternalMetadata.VERSION);
-      if (logger.isDebugEnabled()) {
-        logger.debug("{}Soplog version is " + Hex.toHex(ver), logPrefix);
-      }
-      
-      if (!Arrays.equals(ver, VERSION_1)) {
-        throw new IOException(LocalizedStrings.Soplog_UNRECOGNIZED_VERSION.toLocalizedString(Hex.toHex(ver)));
-      }
-    }
-    
-    private void loadComparators(DelegatingSerializedComparator comparator) throws IOException {
-      byte[] raw = reader.loadFileInfo().get(InternalMetadata.COMPARATORS.bytes());
-      assert raw != null;
-
-      DataInput in = new DataInputStream(new ByteArrayInputStream(raw));
-      comparator.setComparators(readComparators(in));
-    }
-    
-    private SerializedComparator[] readComparators(DataInput in) throws IOException {
-      try {
-        SerializedComparator[] comps = new SerializedComparator[in.readInt()];
-        assert comps.length > 0;
-        
-        for (int i = 0; i < comps.length; i++) {
-          comps[i] = (SerializedComparator) Class.forName(in.readUTF()).newInstance();
-          if (comps[i] instanceof DelegatingSerializedComparator) {
-            ((DelegatingSerializedComparator) comps[i]).setComparators(readComparators(in));
-          }
-        }
-        return comps;
-        
-      } catch (Exception e) {
-        throw new IOException(e);
-      }
-    }
-  }
-  
-  private class HFileSortedOplogWriter implements SortedOplogWriter {
-    private final Writer writer;
-    private final BloomFilterWriter bfw;
-    
-    public HFileSortedOplogWriter() throws IOException {
-      writer = HFile.getWriterFactory(hconf, hcache)
-          .withPath(fs, path)
-          .withBlockSize(sopConfig.getBlockSize())
-          .withBytesPerChecksum(sopConfig.getBytesPerChecksum())
-          .withChecksumType(HFileSortedOplogFactory.convertChecksum(sopConfig.getChecksum()))
-//          .withComparator(sopConfig.getComparator())
-          .withCompression(HFileSortedOplogFactory.convertCompression(sopConfig.getCompression()))
-          .withDataBlockEncoder(HFileSortedOplogFactory.convertEncoding(sopConfig.getKeyEncoding()))
-          .create();
-      
-      bfw = sopConfig.isBloomFilterEnabled() ?
-//          BloomFilterFactory.createGeneralBloomAtWrite(hconf, hcache, BloomType.ROW, 
-//              0, writer, sopConfig.getComparator())
-          BloomFilterFactory.createGeneralBloomAtWrite(hconf, hcache, BloomType.ROW, 
-              0, writer)
-          : null;
-    }
-    
-    @Override
-    public void append(byte[] key, byte[] value) throws IOException {
-      assert key != null;
-      assert value != null;
-
-      if (logger.isTraceEnabled()) {
-        logger.trace(String.format("{}Appending key %s to %s", Hex.toHex(key), path), logPrefix);
-      }
-
-      try {
-        writer.append(key, value);
-        if (bfw != null) {
-          bfw.add(key, 0, key.length);
-        }
-      } catch (IOException e) {
-        throw (IOException) e.fillInStackTrace();
-      }
-    }
-
-    @Override
-    public void append(ByteBuffer key, ByteBuffer value) throws IOException {
-      assert key != null;
-      assert value != null;
-
-      if (logger.isTraceEnabled()) {
-        logger.trace(String.format("{}Appending key %s to %s", 
-            Hex.toHex(key.array(), key.arrayOffset(), key.remaining()), path), logPrefix);
-      }
-
-      try {
-        byte[] keyBytes = new byte[key.remaining()];
-        key.duplicate().get(keyBytes);
-        byte[] valueBytes = new byte[value.remaining()];
-        value.duplicate().get(valueBytes);
-        writer.append(keyBytes, valueBytes);
-        if (bfw != null) {
-          bfw.add(key.array(), key.arrayOffset(), key.remaining());
-        }
-      } catch (IOException e) {
-        throw (IOException) e.fillInStackTrace();
-      }
-    }
-    
-    @Override
-    public void close(EnumMap<Metadata, byte[]> metadata) throws IOException {
-      if (logger.isTraceEnabled()) {
-        logger.debug("{}Finalizing and closing writer on " + path, logPrefix);
-      }
-
-      if (bfw != null) {
-        bfw.compactBloom();
-        writer.addGeneralBloomFilter(bfw);
-      }
-      
-      // append system metadata
-      writer.appendFileInfo(InternalMetadata.GEMFIRE_MAGIC.bytes(), MAGIC);
-      writer.appendFileInfo(InternalMetadata.VERSION.bytes(), VERSION_1);
-      
-      // append comparator info
-//      if (writer.getComparator() instanceof DelegatingSerializedComparator) {
-//        ByteArrayOutputStream bos = new ByteArrayOutputStream();
-//        DataOutput out = new DataOutputStream(bos);
-//        
-//        writeComparatorInfo(out, ((DelegatingSerializedComparator) writer.getComparator()).getComparators());
-//        writer.appendFileInfo(InternalMetadata.COMPARATORS.bytes(), bos.toByteArray());
-//      }
-      
-      // TODO write statistics data to soplog
-      // writer.appendFileInfo(Meta.STATISTICS.toBytes(), null);
-
-      // append user metadata
-      if (metadata != null) {
-        for (Entry<Metadata, byte[]> entry : metadata.entrySet()) {
-          writer.appendFileInfo(entry.getKey().name().getBytes(), entry.getValue());
-        }
-      }
-      
-      writer.close();
-    }
-    
-    @Override
-    public void closeAndDelete() throws IOException {
-      if (logger.isTraceEnabled()) {
-        logger.debug("{}Closing writer and deleting " + path, logPrefix);
-      }
-
-      writer.close();
-      new File(writer.getPath().toUri()).delete();
-    }
-    
-//    private void writeComparatorInfo(DataOutput out, SerializedComparator[] comparators) throws IOException {
-//      out.writeInt(comparators.length);
-//      for (SerializedComparator sc : comparators) {
-//        out.writeUTF(sc.getClass().getName());
-//        if (sc instanceof DelegatingSerializedComparator) {
-//          writeComparatorInfo(out, ((DelegatingSerializedComparator) sc).getComparators());
-//        }
-//      }
-//    }
-  }
-  
-  private class HFileSortedIterator implements SortedIterator<ByteBuffer> {
-    private final HFileScanner scan;
-    private final SerializedComparator comparator;
-    
-    private final byte[] from;
-    private final boolean fromInclusive;
-
-    private final byte[] to;
-    private final boolean toInclusive;
-    
-    private final long start;
-    private long bytes;
-    
-    private boolean foundNext;
-    
-    private ByteBuffer key;
-    private ByteBuffer value;
-    
-    public HFileSortedIterator(HFileScanner scan, SerializedComparator comparator, 
-        byte[] from, boolean fromInclusive, 
-        byte[] to, boolean toInclusive) throws IOException {
-      this.scan = scan;
-      this.comparator = comparator;
-      this.from = from;
-      this.fromInclusive = fromInclusive;
-      this.to = to;
-      this.toInclusive = toInclusive;
-      
-      assert from == null 
-          || to == null 
-          || comparator.compare(from, 0, from.length, to, 0, to.length) <= 0;
-      
-      start = sopConfig.getStatistics().getScan().begin();
-      foundNext = evalFrom();
-    }
-    
-    @Override
-    public ByteBuffer key() {
-      return key;
-    }
-    
-    @Override 
-    public ByteBuffer value() {
-      return value;
-    }
-
-    @Override
-    public boolean hasNext() {
-      if (!foundNext) {
-        foundNext = step();
-      }
-      return foundNext;
-    }
-    
-    @Override
-    public ByteBuffer next() {
-      long startNext = sopConfig.getStatistics().getScan().beginIteration();
-      
-      if (!hasNext()) {
-        throw new NoSuchElementException();
-      }
-      
-      foundNext = false;
-      key = scan.getKey();
-      value = scan.getValue();
-      
-      int len = key.remaining() + value.remaining(); 
-      bytes += len;
-      sopConfig.getStatistics().getScan().endIteration(len, startNext);
-      
-      return key;
-    }
-    
-    @Override
-    public void remove() {
-      throw new UnsupportedOperationException();
-    }
-
-    @Override
-    public void close() {
-      sopConfig.getStatistics().getScan().end(bytes, start);
-    }
-
-    private boolean step() {
-      try {
-        if (!scan.isSeeked()) {
-          return false;
-          
-        } else  if (scan.next() && evalTo()) {
-          return true;
-        }
-      } catch (IOException e) {
-        throw new HDFSIOException("Error from HDFS during iteration", e);
-      }
-      return false;
-    }
-    
-    private boolean evalFrom() throws IOException {
-      if (from == null) {
-        return scan.seekTo() && evalTo();
-        
-      } else {
-        int compare = scan.seekTo(from);
-        if (compare < 0) {
-          return scan.seekTo() && evalTo();
-          
-        } else if (compare == 0 && fromInclusive) {
-          return true;
-          
-        } else {
-          return step();
-        }
-      }
-    }
-    
-    private boolean evalTo() throws IOException {
-      int compare = -1;
-      if (to != null) {
-        ByteBuffer key = scan.getKey();
-        compare = comparator.compare(
-            key.array(), key.arrayOffset(), key.remaining(), 
-            to, 0, to.length);
-      }
-
-      return compare < 0 || (compare == 0 && toInclusive);
-    }
-  }
-  
-  private static class HFileSortedStatistics implements SortedStatistics {
-    private final Reader reader;
-    private final int keySize;
-    private final int valueSize;
-    
-    public HFileSortedStatistics(Reader reader) throws IOException {
-      this.reader = reader;
-
-      byte[] sz = reader.loadFileInfo().get(AVG_KEY_LEN);
-      keySize = Bytes.toInt(sz[0], sz[1], sz[2], sz[3]);
-
-      sz = reader.loadFileInfo().get(AVG_VALUE_LEN);
-      valueSize = Bytes.toInt(sz[0], sz[1], sz[2], sz[3]);
-    }
-
-    @Override
-    public long keyCount() {
-      return reader.getEntries();
-    }
-
-    @Override
-    public byte[] firstKey() {
-      return reader.getFirstKey();
-    }
-
-    @Override
-    public byte[] lastKey() {
-      return reader.getLastKey();
-    }
-
-    @Override
-    public double avgKeySize() {
-      return keySize;
-    }
-    
-    @Override
-    public double avgValueSize() {
-      return valueSize;
-    }
-    
-    @Override
-    public void close() {
-    }
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/9438c8b1/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/persistence/soplog/hfile/HFileSortedOplogFactory.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/persistence/soplog/hfile/HFileSortedOplogFactory.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/persistence/soplog/hfile/HFileSortedOplogFactory.java
deleted file mode 100644
index 9546fd3..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/persistence/soplog/hfile/HFileSortedOplogFactory.java
+++ /dev/null
@@ -1,80 +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.
- */
-package com.gemstone.gemfire.internal.cache.persistence.soplog.hfile;
-
-import java.io.File;
-import java.io.IOException;
-
-import org.apache.hadoop.hbase.io.hfile.BlockCache;
-import org.apache.hadoop.hbase.io.hfile.Compression.Algorithm;
-import org.apache.hadoop.hbase.io.hfile.HFileDataBlockEncoder;
-import org.apache.hadoop.hbase.io.hfile.NoOpDataBlockEncoder;
-import org.apache.hadoop.hbase.util.ChecksumType;
-
-import com.gemstone.gemfire.internal.cache.persistence.soplog.HFileStoreStatistics;
-import com.gemstone.gemfire.internal.cache.persistence.soplog.SortedOplog;
-import com.gemstone.gemfire.internal.cache.persistence.soplog.SortedOplogFactory;
-import com.gemstone.gemfire.internal.cache.persistence.soplog.SortedOplogFactory.SortedOplogConfiguration.Checksum;
-import com.gemstone.gemfire.internal.cache.persistence.soplog.SortedOplogFactory.SortedOplogConfiguration.Compression;
-import com.gemstone.gemfire.internal.cache.persistence.soplog.SortedOplogFactory.SortedOplogConfiguration.KeyEncoding;
-import com.gemstone.gemfire.internal.cache.persistence.soplog.SortedOplogStatistics;
-
-/**
- * Creates HFile soplogs.
- * 
- * @author bakera
- */
-public class HFileSortedOplogFactory implements SortedOplogFactory {
-  private final SortedOplogConfiguration config;
-  
-  public HFileSortedOplogFactory(String name, BlockCache blockCache, SortedOplogStatistics stats, HFileStoreStatistics storeStats) {
-    config = new SortedOplogConfiguration(name, blockCache, stats, storeStats);
-  }
-  
-  @Override
-  public SortedOplogConfiguration getConfiguration() {
-    return config;
-  }
-
-  @Override
-  public SortedOplog createSortedOplog(File name) throws IOException {
-    return new HFileSortedOplog(name, config);
-  }
-  
-  public static ChecksumType convertChecksum(Checksum type) {
-    switch (type) {
-    case NONE:  return ChecksumType.NULL;
-    
-    default:
-    case CRC32: return ChecksumType.CRC32;
-    }
-  }
-
-  public static Algorithm convertCompression(Compression type) {
-    switch (type) {
-    default:
-    case NONE: return Algorithm.NONE;
-    }
-  }
-  
-  public static HFileDataBlockEncoder convertEncoding(KeyEncoding type) {
-    switch (type) {
-    default:
-    case NONE: return NoOpDataBlockEncoder.INSTANCE;
-    }
-  }
-}


[17/50] [abbrv] incubator-geode git commit: GEODE-77: Fix unable to allocate a failure detection port in the membership-port range

Posted by ma...@apache.org.
GEODE-77: Fix unable to allocate a failure detection port in the membership-port range


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

Branch: refs/heads/feature/GEODE-53
Commit: 4addcea057a22e1f1c5f131f8bc1f2f42a04fe4b
Parents: 21274f9
Author: Jianxia Chen <jc...@pivotal.io>
Authored: Thu Nov 12 15:49:37 2015 -0800
Committer: Jianxia Chen <jc...@pivotal.io>
Committed: Thu Nov 12 15:53:01 2015 -0800

----------------------------------------------------------------------
 .../internal/membership/gms/fd/GMSHealthMonitor.java     | 11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4addcea0/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/fd/GMSHealthMonitor.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/fd/GMSHealthMonitor.java b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/fd/GMSHealthMonitor.java
index b9ec83a..84eca62 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/fd/GMSHealthMonitor.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/fd/GMSHealthMonitor.java
@@ -10,7 +10,6 @@ import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
 import java.net.InetAddress;
-import java.net.InetSocketAddress;
 import java.net.ServerSocket;
 import java.net.Socket;
 import java.net.SocketTimeoutException;
@@ -41,7 +40,6 @@ import org.jgroups.util.UUID;
 
 import com.gemstone.gemfire.CancelException;
 import com.gemstone.gemfire.GemFireConfigException;
-import com.gemstone.gemfire.SystemConnectException;
 import com.gemstone.gemfire.distributed.DistributedMember;
 import com.gemstone.gemfire.distributed.DistributedSystemDisconnectedException;
 import com.gemstone.gemfire.distributed.internal.DistributionMessage;
@@ -55,7 +53,6 @@ import com.gemstone.gemfire.distributed.internal.membership.gms.messages.Heartbe
 import com.gemstone.gemfire.distributed.internal.membership.gms.messages.HeartbeatRequestMessage;
 import com.gemstone.gemfire.distributed.internal.membership.gms.messages.SuspectMembersMessage;
 import com.gemstone.gemfire.distributed.internal.membership.gms.messages.SuspectRequest;
-import com.gemstone.gemfire.internal.AvailablePort;
 import com.gemstone.gemfire.internal.ConnectionWatcher;
 import com.gemstone.gemfire.internal.SocketCreator;
 import com.gemstone.gemfire.internal.Version;
@@ -614,13 +611,9 @@ public class GMSHealthMonitor implements HealthMonitor, MessageHandler {
     // socket port and joining the system
     socketAddress = localAddress.getInetAddress();
     int[] portRange = services.getConfig().getMembershipPortRange();            
-    socketPort = AvailablePort.getAvailablePortInRange(portRange[0], portRange[1], AvailablePort.SOCKET);
-    if (socketPort == -1) {
-      throw new SystemConnectException("Unable to find a free port in the membership port range");
-    }
     try {
-      serverSocket = new ServerSocket();
-      serverSocket.bind(new InetSocketAddress(socketAddress, socketPort));
+      serverSocket = SocketCreator.getDefaultInstance().createServerSocketUsingPortRange(socketAddress, 50/*backlog*/, true/*isBindAddress*/, false/*useNIO*/, 65536/*tcpBufferSize*/, portRange);
+      socketPort = serverSocket.getLocalPort();
     } catch (IOException e) {
       throw new GemFireConfigException("Unable to allocate a failure detection port in the membership-port range", e);
     }


[30/50] [abbrv] incubator-geode git commit: GEODE-565 Update guava dependency to 15.0

Posted by ma...@apache.org.
GEODE-565 Update guava dependency to 15.0


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

Branch: refs/heads/feature/GEODE-53
Commit: 3dc3addd2d2b2c346ab59b32911694291350eee6
Parents: c7024bd
Author: Jens Deppe <jd...@pivotal.io>
Authored: Mon Nov 16 12:56:30 2015 -0800
Committer: Jens Deppe <jd...@pivotal.io>
Committed: Mon Nov 16 12:56:30 2015 -0800

----------------------------------------------------------------------
 gradle/dependency-versions.properties | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3dc3addd/gradle/dependency-versions.properties
----------------------------------------------------------------------
diff --git a/gradle/dependency-versions.properties b/gradle/dependency-versions.properties
index 8be0f15..c86d45d 100644
--- a/gradle/dependency-versions.properties
+++ b/gradle/dependency-versions.properties
@@ -20,7 +20,7 @@ commons-logging.version = 1.1.1
 commons-modeler.version = 2.0
 derby.version = 10.2.2.0
 fastutil.version = 7.0.2
-guava.version = 11.0.2
+guava.version = 15.0
 hadoop.version = 2.4.1
 hamcrest-all.version = 1.3
 hbase.version = 0.94.27


[26/50] [abbrv] incubator-geode git commit: GEODE-546: Resetting stats when AbstractGatewaySender is stopped

Posted by ma...@apache.org.
GEODE-546: Resetting stats when AbstractGatewaySender is stopped


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

Branch: refs/heads/feature/GEODE-53
Commit: 5a0d43e3f1b96b6360fc7d35e211923598cc37b4
Parents: 8703abc
Author: Dan Smith <up...@apache.org>
Authored: Thu Nov 12 13:50:11 2015 -0800
Committer: Dan Smith <up...@apache.org>
Committed: Fri Nov 13 13:14:12 2015 -0800

----------------------------------------------------------------------
 .../cache/wan/AbstractGatewaySender.java        |  3 ++
 .../SerialAsyncEventQueueImplJUnitTest.java     | 46 ++++++++++++++++++++
 2 files changed, 49 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/5a0d43e3/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/wan/AbstractGatewaySender.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/wan/AbstractGatewaySender.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/wan/AbstractGatewaySender.java
index ae1b523..bd19a71 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/wan/AbstractGatewaySender.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/wan/AbstractGatewaySender.java
@@ -1100,6 +1100,9 @@ public abstract class AbstractGatewaySender implements GatewaySender,
       }
       this.enqueuedAllTempQueueEvents = false;
     }
+    
+    statistics.setQueueSize(0);
+    statistics.setTempQueueSize(0);
   }
   
   public Object getSubstituteValue(EntryEventImpl clonedEvent, EnumListenerEvent operation) {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/5a0d43e3/gemfire-core/src/test/java/com/gemstone/gemfire/cache/asyncqueue/internal/SerialAsyncEventQueueImplJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/asyncqueue/internal/SerialAsyncEventQueueImplJUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/asyncqueue/internal/SerialAsyncEventQueueImplJUnitTest.java
new file mode 100644
index 0000000..594a98f
--- /dev/null
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/asyncqueue/internal/SerialAsyncEventQueueImplJUnitTest.java
@@ -0,0 +1,46 @@
+package com.gemstone.gemfire.cache.asyncqueue.internal;
+
+import static org.junit.Assert.*;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import com.gemstone.gemfire.cache.Cache;
+import com.gemstone.gemfire.cache.CacheFactory;
+import com.gemstone.gemfire.internal.cache.wan.GatewaySenderAttributes;
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+
+@Category(IntegrationTest.class)
+public class SerialAsyncEventQueueImplJUnitTest {
+
+  private Cache cache;
+  @Before
+  public void setUp() {
+    CacheFactory cf = new CacheFactory().set("mcast-port", "0");
+    cache = cf.create();
+  }
+  
+  @After
+  public void tearDown() {
+    cache.close();
+  }
+  @Test
+  public void testStopClearsStats() {
+    GatewaySenderAttributes attrs = new GatewaySenderAttributes();
+    attrs.id = AsyncEventQueueImpl.ASYNC_EVENT_QUEUE_PREFIX + "id";
+    SerialAsyncEventQueueImpl queue = new SerialAsyncEventQueueImpl(cache, attrs);
+    queue.getStatistics().incQueueSize(5);
+    queue.getStatistics().incTempQueueSize(10);
+    
+    assertEquals(5, queue.getStatistics().getEventQueueSize());
+    assertEquals(10, queue.getStatistics().getTempEventQueueSize());
+   
+    queue.stop();
+    
+    assertEquals(0, queue.getStatistics().getEventQueueSize());
+    assertEquals(0, queue.getStatistics().getTempEventQueueSize());
+  }
+
+}


[45/50] [abbrv] incubator-geode git commit: fixing minor problem with a test configuration.

Posted by ma...@apache.org.
fixing minor problem with a test configuration.

This test was setting a bind-address but it did so after building
the distribution-config, so it wasn't used in the test.  That causes
it to fail on some machines.  Moving the bind-address setting one
line up in the file fixes the problem.


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

Branch: refs/heads/feature/GEODE-53
Commit: c9d877851034189f2a14d87fffee5cc58938e6de
Parents: bc12784
Author: Bruce Schuchardt <bs...@pivotal.io>
Authored: Fri Nov 20 14:03:21 2015 -0800
Committer: Bruce Schuchardt <bs...@pivotal.io>
Committed: Fri Nov 20 14:03:21 2015 -0800

----------------------------------------------------------------------
 .../membership/gms/locator/GMSLocatorRecoveryJUnitTest.java        | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c9d87785/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/locator/GMSLocatorRecoveryJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/locator/GMSLocatorRecoveryJUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/locator/GMSLocatorRecoveryJUnitTest.java
index 90f6816..8484f7c 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/locator/GMSLocatorRecoveryJUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/locator/GMSLocatorRecoveryJUnitTest.java
@@ -137,8 +137,8 @@ public class GMSLocatorRecoveryJUnitTest {
       nonDefault.put(DistributionConfig.LOG_FILE_NAME, "");
       nonDefault.put(DistributionConfig.LOG_LEVEL_NAME, "fine");
       nonDefault.put(DistributionConfig.LOCATORS_NAME, localHost.getHostName()+'['+port+']');
-      DistributionConfigImpl config = new DistributionConfigImpl(nonDefault);
       nonDefault.put(DistributionConfig.BIND_ADDRESS_NAME, localHost.getHostName());
+      DistributionConfigImpl config = new DistributionConfigImpl(nonDefault);
       RemoteTransportConfig transport = new RemoteTransportConfig(config,
           DistributionManager.NORMAL_DM_TYPE);
 


[50/50] [abbrv] incubator-geode git commit: Merge PR #42

Posted by ma...@apache.org.
Merge PR #42


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

Branch: refs/heads/feature/GEODE-53
Commit: b66c47946909f8801064767b08e6ad73d8c090a9
Parents: 655699d 831ce70
Author: William Markito <wm...@pivotal.io>
Authored: Mon Nov 23 12:46:30 2015 -0800
Committer: William Markito <wm...@pivotal.io>
Committed: Mon Nov 23 12:46:30 2015 -0800

----------------------------------------------------------------------
 gemfire-site/content/index.html | 36 +++++++++++++++++++++---------------
 1 file changed, 21 insertions(+), 15 deletions(-)
----------------------------------------------------------------------



[03/50] [abbrv] incubator-geode git commit: GEODE-77: fixing the bind-address in this test to be the same as the locator's address

Posted by ma...@apache.org.
GEODE-77: fixing the bind-address in this test to be the same as the locator's address


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

Branch: refs/heads/feature/GEODE-53
Commit: f0c5ec2644e78e1522b7cb3ba0bae824e796ea27
Parents: 4eb09ad
Author: Bruce Schuchardt <bs...@pivotal.io>
Authored: Mon Nov 9 08:11:14 2015 -0800
Committer: Bruce Schuchardt <bs...@pivotal.io>
Committed: Mon Nov 9 08:11:14 2015 -0800

----------------------------------------------------------------------
 .../membership/gms/locator/GMSLocatorRecoveryJUnitTest.java         | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f0c5ec26/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/locator/GMSLocatorRecoveryJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/locator/GMSLocatorRecoveryJUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/locator/GMSLocatorRecoveryJUnitTest.java
index 7fd4a03..90f6816 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/locator/GMSLocatorRecoveryJUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/locator/GMSLocatorRecoveryJUnitTest.java
@@ -138,6 +138,7 @@ public class GMSLocatorRecoveryJUnitTest {
       nonDefault.put(DistributionConfig.LOG_LEVEL_NAME, "fine");
       nonDefault.put(DistributionConfig.LOCATORS_NAME, localHost.getHostName()+'['+port+']');
       DistributionConfigImpl config = new DistributionConfigImpl(nonDefault);
+      nonDefault.put(DistributionConfig.BIND_ADDRESS_NAME, localHost.getHostName());
       RemoteTransportConfig transport = new RemoteTransportConfig(config,
           DistributionManager.NORMAL_DM_TYPE);
 


[21/50] [abbrv] incubator-geode git commit: GEODE-544: Removes soplog code and tests

Posted by ma...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/9438c8b1/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/persistence/soplog/nofile/NoFileSortedOplog.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/persistence/soplog/nofile/NoFileSortedOplog.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/persistence/soplog/nofile/NoFileSortedOplog.java
deleted file mode 100644
index 8995f66..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/persistence/soplog/nofile/NoFileSortedOplog.java
+++ /dev/null
@@ -1,244 +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.
- */
-package com.gemstone.gemfire.internal.cache.persistence.soplog.nofile;
-
-import java.io.File;
-import java.io.IOException;
-import java.nio.ByteBuffer;
-import java.util.Collections;
-import java.util.EnumMap;
-import java.util.NavigableMap;
-import java.util.concurrent.ConcurrentSkipListMap;
-import java.util.concurrent.atomic.AtomicReference;
-
-import com.gemstone.gemfire.internal.cache.persistence.soplog.AbstractSortedReader;
-import com.gemstone.gemfire.internal.cache.persistence.soplog.SortedBuffer.BufferIterator;
-import com.gemstone.gemfire.internal.cache.persistence.soplog.SortedOplog;
-import com.gemstone.gemfire.internal.cache.persistence.soplog.SortedOplogFactory.SortedOplogConfiguration;
-import com.gemstone.gemfire.internal.cache.persistence.soplog.SortedReader.Metadata;
-import com.gemstone.gemfire.internal.cache.persistence.soplog.SortedReader.SortedStatistics;
-
-public class NoFileSortedOplog implements SortedOplog {
-  private final SortedOplogConfiguration config;
-  
-  private final AtomicReference<NavigableMap<byte[], byte[]>> data;
-  private final EnumMap<Metadata, byte[]> metadata;
-  private final NoFileStatistics stats;
-  
-  public NoFileSortedOplog(SortedOplogConfiguration config) {
-    this.config = config;
-    
-    data = new AtomicReference<NavigableMap<byte[],byte[]>>();
-    metadata = new EnumMap<Metadata, byte[]>(Metadata.class);
-    stats = new NoFileStatistics();
-  }
-  
-  @Override
-  public SortedOplogReader createReader() throws IOException {
-    return new NoFileReader();
-  }
-
-  @Override
-  public SortedOplogWriter createWriter() throws IOException {
-    synchronized (metadata) {
-      metadata.clear();
-    }
-    data.set(new ConcurrentSkipListMap<byte[], byte[]>(config.getComparator()));
-    
-    return new NoFileWriter();
-  }
-  
-  private class NoFileWriter implements SortedOplogWriter {
-    @Override
-    public void append(byte[] key, byte[] value) throws IOException {
-      if (data.get().put(key, value) == null) {
-        stats.add(key.length, value.length);
-      }
-    }
-
-    @Override
-    public void append(ByteBuffer key, ByteBuffer value) throws IOException {
-      byte[] k = new byte[key.remaining()];
-      byte[] v = new byte[value.remaining()];
-      
-      key.get(k);
-      value.get(v);
-      
-      append(k, v);
-    }
-
-    @Override
-    public void close(EnumMap<Metadata, byte[]> meta) throws IOException {
-      if (meta != null) {
-        synchronized (metadata) {
-          metadata.putAll(meta);
-        }
-      }
-    }
-
-    @Override
-    public void closeAndDelete() throws IOException {
-      data.get().clear();
-      data.set(null);
-    }
-  }
-  
-  private class NoFileReader extends AbstractSortedReader implements SortedOplogReader {
-    private final BloomFilter bloom;
-    private volatile boolean closed;
-    
-    public NoFileReader() {
-      closed = false;
-      bloom = new BloomFilter() {
-        @Override
-        public boolean mightContain(byte[] key) {
-          return data.get().containsKey(key);
-        }
-      };
-    }
-    
-    @Override
-    public boolean mightContain(byte[] key) throws IOException {
-      return bloom.mightContain(key);
-    }
-
-    @Override
-    public ByteBuffer read(byte[] key) throws IOException {
-      return ByteBuffer.wrap(data.get().get(key));
-    }
-
-    @Override
-    public SortedIterator<ByteBuffer> scan(
-        byte[] from, boolean fromInclusive, 
-        byte[] to, boolean toInclusive,
-        boolean ascending,
-        MetadataFilter filter) {
-
-      if (filter == null || filter.accept(metadata.get(filter.getName()))) {
-        NavigableMap<byte[],byte[]> subset = ascending ? data.get() : data.get().descendingMap();
-        if (from == null && to == null) {
-          // we're good
-        } else if (from == null) {
-          subset = subset.headMap(to, toInclusive);
-        } else if (to == null) {
-          subset = subset.tailMap(from, fromInclusive);
-        } else {
-          subset = subset.subMap(from, fromInclusive, to, toInclusive);
-        }
-        return new BufferIterator(subset.entrySet().iterator());
-      }
-      return new BufferIterator(Collections.<byte[], byte[]>emptyMap().entrySet().iterator());
-    }
-
-    @Override
-    public SerializedComparator getComparator() {
-      return (SerializedComparator) data.get().comparator();
-    }
-
-    @Override
-    public SortedStatistics getStatistics() {
-      return stats;
-    }
-
-    @Override
-    public boolean isClosed() {
-      return closed;
-    }
-    
-    @Override
-    public void close() throws IOException {
-      closed = true;
-    }
-
-    @Override
-    public BloomFilter getBloomFilter() {
-      return bloom;
-    }
-
-    @Override
-    public byte[] getMetadata(Metadata name) {
-      synchronized (metadata) {
-        return metadata.get(name);
-      }
-    }
-
-    @Override
-    public File getFile() {
-      return new File(".");
-    }
-    
-    @Override
-    public String getFileName() {
-      return "name";
-    }
-   
-    @Override
-    public long getModificationTimeStamp() throws IOException {
-      return 0;
-    }
-    
-    @Override
-    public void rename(String name) throws IOException {
-    }
-    
-    @Override
-    public void delete() throws IOException {
-    }
-  }
-  
-  private class NoFileStatistics implements SortedStatistics {
-    private long keys;
-    private double avgKeySize;
-    private double avgValueSize;
-    
-    private synchronized void add(int keyLength, int valueLength) {
-      avgKeySize = (keyLength + keys * avgKeySize) / (keys + 1);
-      avgValueSize = (keyLength + keys * avgValueSize) / (keys + 1);
-      
-      keys++;
-    }
-    
-    @Override
-    public synchronized long keyCount() {
-      return keys;
-    }
-
-    @Override
-    public byte[] firstKey() {
-      return data.get().firstKey();
-    }
-
-    @Override
-    public byte[] lastKey() {
-      return data.get().lastKey();
-    }
-
-    @Override
-    public synchronized double avgKeySize() {
-      return avgKeySize;
-    }
-    
-    @Override
-    public synchronized double avgValueSize() {
-      return avgValueSize;
-    }
-    
-    @Override
-    public void close() {
-    }
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/9438c8b1/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/persistence/soplog/nofile/NoFileSortedOplogFactory.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/persistence/soplog/nofile/NoFileSortedOplogFactory.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/persistence/soplog/nofile/NoFileSortedOplogFactory.java
deleted file mode 100644
index 365d796..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/persistence/soplog/nofile/NoFileSortedOplogFactory.java
+++ /dev/null
@@ -1,41 +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.
- */
-package com.gemstone.gemfire.internal.cache.persistence.soplog.nofile;
-
-import java.io.File;
-import java.io.IOException;
-
-import com.gemstone.gemfire.internal.cache.persistence.soplog.SortedOplog;
-import com.gemstone.gemfire.internal.cache.persistence.soplog.SortedOplogFactory;
-
-public class NoFileSortedOplogFactory implements SortedOplogFactory {
-  private final SortedOplogConfiguration config;
-  
-  public NoFileSortedOplogFactory(String name) {
-    config = new SortedOplogConfiguration(name);
-  }
-  
-  @Override
-  public SortedOplog createSortedOplog(File name) throws IOException {
-    return new NoFileSortedOplog(config);
-  }
-
-  @Override
-  public SortedOplogConfiguration getConfiguration() {
-    return config;
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/9438c8b1/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/persistence/soplog/AppendLog.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/persistence/soplog/AppendLog.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/persistence/soplog/AppendLog.java
deleted file mode 100644
index e0e696a..0000000
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/persistence/soplog/AppendLog.java
+++ /dev/null
@@ -1,65 +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.
- */
-package com.gemstone.gemfire.internal.cache.persistence.soplog;
-
-import java.io.BufferedOutputStream;
-import java.io.Closeable;
-import java.io.DataOutputStream;
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-
-public class AppendLog {
-
-  public static AppendLogReader recover(File f) throws IOException {
-    throw new RuntimeException("Not implemented");
-  }
-  
-  public static AppendLogWriter create(File f) throws IOException {
-    DataOutputStream dos = new DataOutputStream(new BufferedOutputStream(new FileOutputStream(f)));
-    return new AppendLogWriter(f, dos);
-  }
-  
-  public static class AppendLogReader {
-  }
-  
-  public static class AppendLogWriter implements Closeable {
-    private final File file;
-    private final DataOutputStream out;
-    
-    private AppendLogWriter(File f, DataOutputStream out) {
-      this.file = f;
-      this.out = out;
-    }
-    
-    public synchronized void append(byte[] key, byte[] value) throws IOException {
-      out.writeInt(key.length);
-      out.writeInt(value.length);
-      out.write(key);
-      out.write(value);
-    }
-
-    @Override
-    public void close() throws IOException {
-      out.close();
-    }
-    
-    public File getFile() {
-      return file;
-    }
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/9438c8b1/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/persistence/soplog/ArraySerializedComparatorJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/persistence/soplog/ArraySerializedComparatorJUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/persistence/soplog/ArraySerializedComparatorJUnitTest.java
deleted file mode 100644
index 3689255..0000000
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/persistence/soplog/ArraySerializedComparatorJUnitTest.java
+++ /dev/null
@@ -1,95 +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.
- */
-package com.gemstone.gemfire.internal.cache.persistence.soplog;
-
-import java.io.IOException;
-import java.nio.ByteBuffer;
-
-import org.junit.experimental.categories.Category;
-
-import com.gemstone.gemfire.internal.cache.persistence.soplog.SortedReader.SerializedComparator;
-import com.gemstone.gemfire.test.junit.categories.UnitTest;
-
-@Category(UnitTest.class)
-public class ArraySerializedComparatorJUnitTest extends ComparisonTestCase {
-  protected ArraySerializedComparator comp;
-  
-  public void testSearch() throws IOException {
-    byte[] k1 = comp.createCompositeKey(convert("aaaa"), convert(1), convert(true));
-    byte[] k2 = comp.createCompositeKey(convert("bbbb"), convert(2), convert(false));
-    byte[] k3 = comp.createCompositeKey(convert("bbbb"), convert(3), convert(true));
-    byte[] k4 = comp.createCompositeKey(convert("cccc"), convert(1), convert(false));
-
-    byte[] s1 = comp.createCompositeKey(convert("aaaa"), 
-        new byte[] {SoplogToken.WILDCARD.toByte()}, new byte[] {SoplogToken.WILDCARD.toByte()});
-    
-    
-    byte[] s2 = comp.createCompositeKey(convert("bbbb"), 
-        new byte[] {SoplogToken.WILDCARD.toByte()}, new byte[] {SoplogToken.WILDCARD.toByte()});
-    
-    byte[] s3 = comp.createCompositeKey(new byte[] {SoplogToken.WILDCARD.toByte()}, convert(1), 
-        new byte[] {SoplogToken.WILDCARD.toByte()});
-    
-    compareAsIs(comp, k1, s1, Comparison.EQ);
-    compareAsIs(comp, k2, s1, Comparison.GT);
-    compareAsIs(comp, k1, s2, Comparison.LT);
-    compareAsIs(comp, k2, s2, Comparison.EQ);
-    compareAsIs(comp, k3, s2, Comparison.EQ);
-    compareAsIs(comp, k4, s2, Comparison.GT);
-    compareAsIs(comp, s3, k4, Comparison.EQ);
-  }
-  
-  public void testCompositeKey() throws IOException {
-    byte[] k1 = comp.createCompositeKey(convert("aaaa"), convert(1), convert(true));
-    byte[] k2 = comp.createCompositeKey(convert("bbbb"), convert(2), convert(false));
-    byte[] k3 = comp.createCompositeKey(convert("bbbb"), convert(3), convert(true));
-    byte[] k4 = comp.createCompositeKey(convert("cccc"), convert(1), convert(false));
-    byte[] k5 = comp.createCompositeKey(convert(null),   convert(1), convert(false));
-    byte[] k6 = comp.createCompositeKey(convert(null),   convert(1), convert(true));
-    
-    compareAsIs(comp, k1, k1, Comparison.EQ);
-    compareAsIs(comp, k1, k2, Comparison.LT);
-    compareAsIs(comp, k2, k1, Comparison.GT);
-    compareAsIs(comp, k2, k3, Comparison.LT);
-    compareAsIs(comp, k3, k4, Comparison.LT);
-    
-    compareAsIs(comp, k4, k5, Comparison.LT);
-    compareAsIs(comp, k5, k1, Comparison.GT);
-    compareAsIs(comp, k5, k6, Comparison.LT);
-  }
-  
-  public void testGetKey() throws Exception {
-    Object[] vals = new Object[] { "aaaa", 1, true };
-    
-    byte[][] composite = new byte[][] { convert(vals[0]), convert(vals[1]), convert(vals[2]) };
-    ByteBuffer key = ByteBuffer.wrap(comp.createCompositeKey(composite));
-    
-    for (int i = 0; i < 3; i++) {
-      ByteBuffer subkey = comp.getKey(key, i);
-      assertEquals(vals[i], recover(subkey.array(), subkey.arrayOffset(), subkey.remaining()));
-    }
-  }
-
-  public void setUp() {
-    comp = new ArraySerializedComparator();
-    comp.setComparators(new SerializedComparator[] {
-        new LexicographicalComparator(), // string
-        new LexicographicalComparator(), // int
-        new LexicographicalComparator()  // boolean
-    });
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/9438c8b1/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/persistence/soplog/CompactionSortedOplogSetTestCase.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/persistence/soplog/CompactionSortedOplogSetTestCase.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/persistence/soplog/CompactionSortedOplogSetTestCase.java
deleted file mode 100644
index bca52a9..0000000
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/persistence/soplog/CompactionSortedOplogSetTestCase.java
+++ /dev/null
@@ -1,134 +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.
- */
-package com.gemstone.gemfire.internal.cache.persistence.soplog;
-
-import java.io.File;
-import java.io.IOException;
-import java.nio.ByteBuffer;
-import java.util.concurrent.Executors;
-
-import com.gemstone.gemfire.internal.cache.persistence.soplog.CompactionTestCase.FileTracker;
-import com.gemstone.gemfire.internal.cache.persistence.soplog.CompactionTestCase.WaitingHandler;
-import com.gemstone.gemfire.internal.cache.persistence.soplog.SortedReader.SortedIterator;
-import com.gemstone.gemfire.internal.cache.persistence.soplog.nofile.NoFileSortedOplogFactory;
-
-public abstract class CompactionSortedOplogSetTestCase extends SortedOplogSetJUnitTest {
-  public void testWithCompaction() throws IOException, InterruptedException {
-    FlushCounter handler = new FlushCounter();
-    SortedOplogSet sos = createSoplogSet("compact");
-    
-    for (int i = 0; i < 1000; i++) {
-      sos.put(wrapInt(i), wrapInt(i));
-      if (i % 100 == 0) {
-        sos.flush(null, handler);
-      }
-    }
-    
-    flushAndWait(handler, sos);
-    
-    compactAndWait(sos, false);
-    validate(sos, 1000);
-    sos.close();
-  }
-  
-  public void testTombstone() throws Exception {
-    FlushCounter handler = new FlushCounter();
-    SortedOplogFactory factory = new NoFileSortedOplogFactory("tombstone");
-    Compactor compactor = new SizeTieredCompactor(factory, 
-        NonCompactor.createFileset("tombstone", new File(".")), 
-        new FileTracker(), 
-        Executors.newSingleThreadExecutor(), 
-        2, 2);
-    
-    SortedOplogSet sos = new SortedOplogSetImpl(factory, Executors.newSingleThreadExecutor(), compactor);
-    
-    for (int i = 0; i < 1000; i++) {
-      sos.put(wrapInt(i), wrapInt(i));
-    }
-    sos.flush(null, handler);
-    
-    for (int i = 900; i < 1000; i++) {
-      sos.put(wrapInt(i), new byte[] {SoplogToken.TOMBSTONE.toByte()});
-    }
-    flushAndWait(handler, sos);
-    compactAndWait(sos, true);
-
-    validate(sos, 900);
-    sos.close();
-    
-  }
-  
-  public void testInUse() throws Exception {
-    FlushCounter handler = new FlushCounter();
-    SortedOplogSet sos = createSoplogSet("inuse");
-    
-    for (int i = 0; i < 1000; i++) {
-      sos.put(wrapInt(i), wrapInt(i));
-    }
-    
-    flushAndWait(handler, sos);
-    
-    // start iterating over soplog
-    SortedIterator<ByteBuffer> range = sos.scan();
-    assertEquals(0, ((SizeTieredCompactor) sos.getCompactor()).countInactiveReaders());
-
-    for (int i = 1000; i < 5000; i++) {
-      sos.put(wrapInt(i), wrapInt(i));
-      if (i % 100 == 0) {
-        sos.flush(null, handler);
-      }
-    }
-
-    flushAndWait(handler, sos);
-    compactAndWait(sos, false);
-    assertEquals(1, ((SizeTieredCompactor) sos.getCompactor()).countInactiveReaders());
-
-    range.close();
-    compactAndWait(sos, false);
-    assertEquals(0, ((SizeTieredCompactor) sos.getCompactor()).countInactiveReaders());
-
-    validate(sos, 5000);
-    sos.close();
-  }
-
-  @Override
-  protected SortedOplogSetImpl createSoplogSet(String name) throws IOException {
-    SortedOplogFactory factory = new NoFileSortedOplogFactory(name);
-    Compactor compactor = createCompactor(factory);
-    
-    return new SortedOplogSetImpl(factory,  Executors.newSingleThreadExecutor(), compactor);
-  }
-  
-  protected abstract AbstractCompactor<?> createCompactor(SortedOplogFactory factory) throws IOException;
-  
-  private void validate(SortedReader<ByteBuffer> range, int count) throws IOException {
-    int i = 0;
-    for (SortedIterator<ByteBuffer> iter = range.scan(); iter.hasNext(); i++) {
-      iter.next();
-      assertEquals(i, iter.key().getInt());
-    }
-    assertEquals(count, i);
-    range.close();
-  }
-
-  private void compactAndWait(SortedOplogSet sos, boolean force) throws InterruptedException {
-    WaitingHandler wh = new WaitingHandler();
-    sos.getCompactor().compact(force, wh);
-    wh.waitForCompletion();
-    assertNull(wh.getError());
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/9438c8b1/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/persistence/soplog/CompactionTestCase.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/persistence/soplog/CompactionTestCase.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/persistence/soplog/CompactionTestCase.java
deleted file mode 100644
index 7577b53..0000000
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/persistence/soplog/CompactionTestCase.java
+++ /dev/null
@@ -1,206 +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.
- */
-package com.gemstone.gemfire.internal.cache.persistence.soplog;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.atomic.AtomicReference;
-
-import org.apache.logging.log4j.Logger;
-
-import junit.framework.TestCase;
-
-import com.gemstone.gemfire.internal.cache.persistence.soplog.Compactor.CompactionHandler;
-import com.gemstone.gemfire.internal.cache.persistence.soplog.Compactor.CompactionTracker;
-import com.gemstone.gemfire.internal.cache.persistence.soplog.SortedOplog.SortedOplogWriter;
-import com.gemstone.gemfire.internal.cache.persistence.soplog.nofile.NoFileSortedOplogFactory;
-import com.gemstone.gemfire.internal.logging.LogService;
-
-public abstract class CompactionTestCase<T extends Comparable<T>> extends TestCase {
-  private static final Logger logger = LogService.getLogger();
-  protected SortedOplogFactory factory;
-  protected AbstractCompactor<T> compactor;
-  
-  public void testMaxCompaction() throws Exception {
-    for (int i = 0; i < 100; i += 2) {
-      compactor.add(createSoplog(0, 100, i));
-      compactor.add(createSoplog(100, 100, i+1));
-
-      WaitingHandler wh = new WaitingHandler();
-      compactor.compact(false, wh);
-      wh.waitForCompletion();
-    }
-    
-    WaitingHandler wh = new WaitingHandler();
-    compactor.compact(true, wh);
-    wh.waitForCompletion();
-  }
-  
-  public void testClear() throws IOException {
-    compactor.add(createSoplog(0, 100, 0));
-    compactor.add(createSoplog(100, 100, 1));
-    compactor.clear();
-    
-    assertEquals(0, compactor.getActiveReaders(null, null).size());
-    assertFalse(compactor.getLevel(0).needsCompaction());
-  }
-  
-  public void testInterruptedCompaction() throws IOException {
-    compactor.add(createSoplog(0, 100, 0));
-    compactor.add(createSoplog(100, 100, 1));
-    
-    compactor.testAbortDuringCompaction = true;
-    boolean compacted = compactor.compact();
-    
-    assertFalse(compacted);
-    assertEquals(2, compactor.getActiveReaders(null, null).size());
-    assertTrue(compactor.getLevel(0).needsCompaction());
-  }
-  
-  public void testClearDuringCompaction() throws Exception {
-    compactor.add(createSoplog(0, 100, 0));
-    compactor.add(createSoplog(100, 100, 1));
-    
-    compactor.testDelayDuringCompaction = new CountDownLatch(1);
-    WaitingHandler wh = new WaitingHandler();
-    
-    logger.debug("Invoking compact");
-    compactor.compact(false, wh);
-    
-    logger.debug("Invoking clear");
-    compactor.clear();
-    
-    boolean compacted = wh.waitForCompletion();
-    
-    assertFalse(compacted);
-    assertEquals(0, compactor.getActiveReaders(null, null).size());
-  }
-  
-  public void testClearRepeat() throws Exception {
-    int i = 0;
-    do {
-      testClearDuringCompaction();
-      logger.debug("Test {} is complete", i);
-      tearDown();
-      setUp();
-    } while (i++ < 100);
-  }
-
-  public void testCloseRepeat() throws Exception {
-    int i = 0;
-    do {
-      testCloseDuringCompaction();
-      logger.debug("Test {} is complete", i);
-      tearDown();
-      setUp();
-    } while (i++ < 100);
-  }
-
-  public void testCloseDuringCompaction() throws Exception {
-    compactor.add(createSoplog(0, 100, 0));
-    compactor.add(createSoplog(100, 100, 1));
-    
-    compactor.testDelayDuringCompaction = new CountDownLatch(1);
-    WaitingHandler wh = new WaitingHandler();
-    
-    compactor.compact(false, wh);
-    compactor.close();
-    
-    boolean compacted = wh.waitForCompletion();
-    
-    assertFalse(compacted);
-    assertEquals(0, compactor.getActiveReaders(null, null).size());
-  }
-
-  public void setUp() throws IOException {
-    factory = new NoFileSortedOplogFactory("test");
-    compactor = createCompactor(factory);
-  }
-  
-  public void tearDown() throws Exception {
-    compactor.close();
-    for (File f : SortedReaderTestCase.getSoplogsToDelete()) {
-      f.delete();
-    }
-  }
-  
-  protected SortedOplog createSoplog(int start, int count, int id) throws IOException {
-    SortedOplog soplog = factory.createSortedOplog(new File("test-" + id + ".soplog"));
-    SortedOplogWriter wtr = soplog.createWriter();
-    try {
-      for (int i = start; i < start + count; i++) {
-        wtr.append(SortedReaderTestCase.wrapInt(i), SortedReaderTestCase.wrapInt(i));
-      }
-    } finally {
-      wtr.close(null);
-    }
-    return soplog;
-  }
-
-  protected abstract AbstractCompactor<T> createCompactor(SortedOplogFactory factory) throws IOException;
-  
-  static class WaitingHandler implements CompactionHandler {
-    private final CountDownLatch latch;
-    private final AtomicReference<Throwable> err;
-    private volatile boolean compacted;
-    
-    public WaitingHandler() {
-      latch = new CountDownLatch(1);
-      err = new AtomicReference<Throwable>();
-    }
-    
-    public boolean waitForCompletion() throws InterruptedException {
-      logger.debug("Waiting for compaction to complete");
-      latch.await();
-      logger.debug("Done waiting!");
-      
-      return compacted;
-    }
-    
-    public Throwable getError() {
-      return err.get();
-    }
-    
-    @Override
-    public void complete(boolean compacted) {
-      logger.debug("Compaction completed with {}", compacted);
-      this.compacted = compacted;
-      latch.countDown();
-    }
-
-    @Override
-    public void failed(Throwable ex) {
-      err.set(ex);
-      latch.countDown();
-    }
-  }
-  
-  static class FileTracker implements CompactionTracker<Integer> {
-    @Override
-    public void fileDeleted(File f) {
-    }
-
-    @Override
-    public void fileAdded(File f, Integer attach) {
-    }
-
-    @Override
-    public void fileRemoved(File f, Integer attach) {
-    }
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/9438c8b1/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/persistence/soplog/ComparisonTestCase.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/persistence/soplog/ComparisonTestCase.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/persistence/soplog/ComparisonTestCase.java
deleted file mode 100644
index cb9e909..0000000
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/persistence/soplog/ComparisonTestCase.java
+++ /dev/null
@@ -1,77 +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.
- */
-package com.gemstone.gemfire.internal.cache.persistence.soplog;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import junit.framework.TestCase;
-
-import com.gemstone.gemfire.DataSerializer;
-import com.gemstone.gemfire.internal.cache.persistence.soplog.SortedReader.SerializedComparator;
-
-public abstract class ComparisonTestCase extends TestCase {
-  public enum Comparison {
-    EQ(0.0),
-    LT(-1.0),
-    GT(1.0);
-    
-    private final double sgn;
-    
-    private Comparison(double sgn) {
-      this.sgn = sgn;
-    }
-    
-    public double signum() {
-      return sgn;
-    }
-    
-    public Comparison opposite() {
-      switch (this) {
-      case LT: return GT;
-      case GT : return LT;
-      default : return EQ;
-      }
-    }
-  }
-  
-  public void compare(SerializedComparator sc, Object o1, Object o2, Comparison result) throws IOException {
-    double diff = sc.compare(convert(o1), convert(o2));
-    assertEquals(String.format("%s ? %s", o1, o2), result.signum(), Math.signum(diff));
-  }
-  
-  public void compareAsIs(SerializedComparator sc, byte[] b1, byte[] b2, Comparison result) throws IOException {
-    double diff = sc.compare(b1, b2);
-    assertEquals(result.signum(), Math.signum(diff));
-  }
-  
-  public static byte[] convert(Object o) throws IOException {
-    ByteArrayOutputStream b = new ByteArrayOutputStream();
-    DataOutputStream d = new DataOutputStream(b);
-    DataSerializer.writeObject(o, d);
-    
-    return b.toByteArray();
-  }
-  
-  public static Object recover(byte[] obj, int off, int len) throws ClassNotFoundException, IOException {
-    DataInputStream in = new DataInputStream(new ByteArrayInputStream(obj, off, len));
-    return DataSerializer.readObject(in);
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/9438c8b1/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/persistence/soplog/IndexComparatorJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/persistence/soplog/IndexComparatorJUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/persistence/soplog/IndexComparatorJUnitTest.java
deleted file mode 100644
index 27202ec..0000000
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/persistence/soplog/IndexComparatorJUnitTest.java
+++ /dev/null
@@ -1,79 +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.
- */
-package com.gemstone.gemfire.internal.cache.persistence.soplog;
-
-import java.io.IOException;
-import java.nio.ByteBuffer;
-
-import org.junit.experimental.categories.Category;
-
-import com.gemstone.gemfire.test.junit.categories.UnitTest;
-
-@Category(UnitTest.class)
-public class IndexComparatorJUnitTest extends ComparisonTestCase {
-  protected IndexSerializedComparator comp;
-  
-  public void testSearch() throws IOException {
-    byte[] k1 = comp.createCompositeKey(convert("aaaa"), convert(1));
-    byte[] k2 = comp.createCompositeKey(convert("bbbb"), convert(2));
-    byte[] k3 = comp.createCompositeKey(convert("bbbb"), convert(3));
-    byte[] k4 = comp.createCompositeKey(convert(null), convert(1));
-
-    byte[] s1 = comp.createCompositeKey(convert("aaaa"), new byte[] {SoplogToken.WILDCARD.toByte()});
-    byte[] s2 = comp.createCompositeKey(convert("bbbb"), new byte[] {SoplogToken.WILDCARD.toByte()});
-    byte[] s3 = comp.createCompositeKey(new byte[] {SoplogToken.WILDCARD.toByte()}, convert(1));
-    
-    compareAsIs(comp, k1, s1, Comparison.EQ);
-    compareAsIs(comp, k2, s1, Comparison.GT);
-    compareAsIs(comp, k1, s2, Comparison.LT);
-    compareAsIs(comp, k2, s2, Comparison.EQ);
-    compareAsIs(comp, k3, s2, Comparison.EQ);
-    compareAsIs(comp, k4, s2, Comparison.GT);
-    compareAsIs(comp, s3, k4, Comparison.EQ);
-  }
-  
-  public void testCompositeKey() throws IOException {
-    byte[] k1 = comp.createCompositeKey(convert("aaaa"), convert(1));
-    byte[] k2 = comp.createCompositeKey(convert("bbbb"), convert(2));
-    byte[] k3 = comp.createCompositeKey(convert("bbbb"), convert(3));
-    byte[] k4 = comp.createCompositeKey(convert("cccc"), convert(1));
-    byte[] k5 = comp.createCompositeKey(convert(null), convert(1));
-    
-    compareAsIs(comp, k1, k1, Comparison.EQ);
-    compareAsIs(comp, k1, k2, Comparison.LT);
-    compareAsIs(comp, k2, k1, Comparison.GT);
-    compareAsIs(comp, k2, k3, Comparison.LT);
-    compareAsIs(comp, k3, k4, Comparison.LT);
-    
-    compareAsIs(comp, k4, k5, Comparison.LT);
-    compareAsIs(comp, k5, k1, Comparison.GT);
-  }
-  
-  public void testGetKey() throws Exception {
-    ByteBuffer key = ByteBuffer.wrap(comp.createCompositeKey(convert("aaaa"), convert(1)));
-    
-    ByteBuffer k1 = comp.getKey(key, 0);
-    assertEquals("aaaa", recover(k1.array(), k1.arrayOffset(), k1.remaining()));
-    
-    ByteBuffer k2 = comp.getKey(key, 1);
-    assertEquals(1, recover(k2.array(), k2.arrayOffset(), k2.remaining()));
-  }
-  
-  public void setUp() {
-    comp = new IndexSerializedComparator();
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/9438c8b1/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/persistence/soplog/LexicographicalComparatorJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/persistence/soplog/LexicographicalComparatorJUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/persistence/soplog/LexicographicalComparatorJUnitTest.java
deleted file mode 100644
index 0c0e93e..0000000
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/persistence/soplog/LexicographicalComparatorJUnitTest.java
+++ /dev/null
@@ -1,204 +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.
- */
-package com.gemstone.gemfire.internal.cache.persistence.soplog;
-
-import java.math.BigInteger;
-import java.nio.ByteBuffer;
-
-import org.apache.hadoop.hbase.util.Bytes;
-import org.junit.experimental.categories.Category;
-
-import com.gemstone.gemfire.internal.DSCODE;
-import com.gemstone.gemfire.test.junit.categories.UnitTest;
-
-@Category(UnitTest.class)
-public class LexicographicalComparatorJUnitTest extends ComparisonTestCase {
-  private LexicographicalComparator lc;
-
-  public void testMixedNumeric() throws Exception {
-    compare(lc, (byte) 1,  (short) 2,    Comparison.LT);
-    compare(lc, (byte) 1,  (int)   2,    Comparison.LT);
-    compare(lc, (byte) 1,  (long)  2,    Comparison.LT);
-    compare(lc, (byte) 1,          2.1f, Comparison.LT);
-    compare(lc, (byte) 1,          2.1d, Comparison.LT);
-    
-    compare(lc, (short) 1, (byte) 2,    Comparison.LT);
-    compare(lc, (short) 1, (int)  2,    Comparison.LT);
-    compare(lc, (short) 1, (long) 2,    Comparison.LT);
-    compare(lc, (short) 1,        2.1f, Comparison.LT);
-    compare(lc, (short) 1,        2.1d, Comparison.LT);
-    
-    compare(lc, (int) 1,  (byte)  2,    Comparison.LT);
-    compare(lc, (int) 1,  (short) 2,    Comparison.LT);
-    compare(lc, (int) 1,  (long)  2,    Comparison.LT);
-    compare(lc, (int) 1,          2.1f, Comparison.LT);
-    compare(lc, (int) 1,          2.1d, Comparison.LT);
-
-    compare(lc, (long) 1,  (byte)  2,    Comparison.LT);
-    compare(lc, (long) 1,  (short) 2,    Comparison.LT);
-    compare(lc, (long) 1,  (int)   2,    Comparison.LT);
-    compare(lc, (long) 1,          2.1f, Comparison.LT);
-    compare(lc, (long) 1,          2.1d, Comparison.LT);
-
-    compare(lc, 1.1f,  (byte)  2,    Comparison.LT);
-    compare(lc, 1.1f,  (short) 2,    Comparison.LT);
-    compare(lc, 1.1f,  (int)   2,    Comparison.LT);
-    compare(lc, 1.1f,  (long)  2,    Comparison.LT);
-    compare(lc, 1.1f,          2.1d, Comparison.LT);
-
-    compare(lc, 1.1d,  (byte)  2,    Comparison.LT);
-    compare(lc, 1.1d,  (short) 2,    Comparison.LT);
-    compare(lc, 1.1d,  (int)   2,    Comparison.LT);
-    compare(lc, 1.1d,  (long)  2,    Comparison.LT);
-    compare(lc, 1.1d,          2.1f, Comparison.LT);
-  }
-  
-  public void testBoolean() throws Exception {
-    compare(lc, Boolean.TRUE,  Boolean.TRUE,  Comparison.EQ);
-    compare(lc, Boolean.FALSE, Boolean.FALSE, Comparison.EQ);
-    compare(lc, Boolean.TRUE,  Boolean.FALSE, Comparison.GT);
-    compare(lc, Boolean.FALSE, Boolean.TRUE,  Comparison.LT);
-  }
-  
-  public void testByte() throws Exception {
-    compare(lc, (byte)  0, (byte)  0, Comparison.EQ);
-    compare(lc, (byte)  0, (byte)  1, Comparison.LT);
-    compare(lc, (byte) -1, (byte)  1, Comparison.LT);
-    compare(lc, (byte)  1, (byte) -1, Comparison.GT);
-    compare(lc, (byte) -2, (byte) -1, Comparison.LT);
-    compare(lc, (byte)  1, (byte)  2, Comparison.LT);
-    compare(lc, (byte)  2, (byte)  1, Comparison.GT);
-  }
-  
-  public void testShort() throws Exception {
-    compare(lc, (short)  0, (short)  0, Comparison.EQ);
-    compare(lc, (short)  0, (short)  1, Comparison.LT);
-    compare(lc, (short) -1, (short)  1, Comparison.LT);
-    compare(lc, (short)  1, (short) -1, Comparison.GT);
-    compare(lc, (short) -2, (short) -1, Comparison.LT);
-    compare(lc, (short)  1, (short)  2, Comparison.LT);
-    compare(lc, (short)  2, (short)  1, Comparison.GT);
-  }
-
-  public void testInt() throws Exception {
-    compare(lc, (int)  0, (int)  0, Comparison.EQ);
-    compare(lc, (int)  0, (int)  1, Comparison.LT);
-    compare(lc, (int) -1, (int)  1, Comparison.LT);
-    compare(lc, (int)  1, (int) -1, Comparison.GT);
-    compare(lc, (int) -2, (int) -1, Comparison.LT);
-    compare(lc, (int)  1, (int)  2, Comparison.LT);
-    compare(lc, (int)  2, (int)  1, Comparison.GT);
-  }
-
-  public void testLong() throws Exception {
-    compare(lc, (long)  0, (long)  0, Comparison.EQ);
-    compare(lc, (long)  0, (long)  1, Comparison.LT);
-    compare(lc, (long) -1, (long)  1, Comparison.LT);
-    compare(lc, (long)  1, (long) -1, Comparison.GT);
-    compare(lc, (long) -2, (long) -1, Comparison.LT);
-    compare(lc, (long)  1, (long)  2, Comparison.LT);
-    compare(lc, (long)  2, (long)  1, Comparison.GT);
-  }
-
-  public void testFloat() throws Exception {
-    compare(lc,  0.0f,  0.0f, Comparison.EQ);
-    compare(lc,  0.0f,  1.0f, Comparison.LT);
-    compare(lc, -1.0f,  1.0f, Comparison.LT);
-    compare(lc,  1.0f, -1.0f, Comparison.GT);
-    compare(lc, -2.0f, -1.0f, Comparison.LT);
-    compare(lc,  1.0f,  2.0f, Comparison.LT);
-    compare(lc,  2.0f,  1.0f, Comparison.GT);
-    compare(lc,  2.1f,  0.9f, Comparison.GT);
-  }
-
-  public void testDouble() throws Exception {
-    compare(lc,  0.0d,  0.0d, Comparison.EQ);
-    compare(lc,  0.0d,  1.0d, Comparison.LT);
-    compare(lc, -1.0d,  1.0d, Comparison.LT);
-    compare(lc,  1.0d, -1.0d, Comparison.GT);
-    compare(lc, -2.0d, -1.0d, Comparison.LT);
-    compare(lc,  1.0d,  2.0d, Comparison.LT);
-    compare(lc,  2.0d,  1.0d, Comparison.GT);
-    compare(lc,  2.1d,  0.9d, Comparison.GT);
-  }
-
-  public void testString() throws Exception {
-    compare(lc, "",        "",         Comparison.EQ);
-    compare(lc, "aa",      "a",        Comparison.GT);
-    compare(lc, "a",       "b",        Comparison.LT);
-    compare(lc, "b",       "a",        Comparison.GT);
-    compare(lc, "baah",    "aardvark", Comparison.GT);
-    compare(lc, "Chloé",   "Réal",     Comparison.LT);
-    compare(lc, "chowder", "Réal",     Comparison.GT);
-    compare(lc, "Réal",    "chowder",  Comparison.LT);
-    compare(lc, "Réal",    "Réa",      Comparison.GT);
-    compare(lc, "Réal",    "Réa",      Comparison.GT);
-    compare(lc, "\u0061\u00a2\u0f00", "\u0061\u00a2\u0f00\u0061", Comparison.LT);
-  }
-  
-  public void testChar() throws Exception {
-    compare(lc, 'a', 'a', Comparison.EQ);
-    compare(lc, 'a', 'b', Comparison.LT);
-    compare(lc, 'b', 'a', Comparison.GT);
-  }
-  
-  public void testNull() throws Exception {
-    compare(lc, null,     null,     Comparison.EQ);
-    compare(lc, null,     "hi mom", Comparison.GT);
-    compare(lc, "hi mom", null,     Comparison.LT);
-  }
-
-  public void testObject() throws Exception {
-    compare(lc, new BigInteger("1"),  new BigInteger("1"), Comparison.EQ);
-    compare(lc, new BigInteger("1"),  new BigInteger("0"), Comparison.GT);
-    compare(lc, new BigInteger("-1"), new BigInteger("0"), Comparison.LT);
-  }
-
-  public void testIntPerformance() throws Exception {
-    ByteBuffer b1 = ByteBuffer.allocate(5).put(0, DSCODE.INTEGER);
-    ByteBuffer b2 = ByteBuffer.allocate(5).put(0, DSCODE.INTEGER);
-    
-    for (int n = 0; n < 5; n++) {
-    long diff = 0;
-      int count = 10000000;
-      long start = System.nanoTime();
-      for (int i = 0; i < count; i++) {
-        b1.putInt(1, i);
-        b2.putInt(1, i + 1);
-        diff += lc.compare(b1.array(), b1.arrayOffset(), b1.capacity(), b2.array(), b2.arrayOffset(), b2.capacity());
-      }
-      long nanos = System.nanoTime() - start;
-      
-      System.out.printf("(%d) %f int comparisons / ms\n", diff, 1000000.0 * count / nanos);
-  
-      diff = 0;
-      start = System.nanoTime();
-      for (int i = 0; i < count; i++) {
-        b1.putInt(1, i);
-        b2.putInt(1, i + 1);
-        diff += Bytes.compareTo(b1.array(), b1.arrayOffset(), b1.capacity(), b2.array(), b2.arrayOffset(), b2.capacity());
-      }
-      nanos = System.nanoTime() - start;
-      
-      System.out.printf("(%d) %f byte comparisons / ms\n\n", diff, 1000000.0 * count / nanos);
-    }
-  }
-
-  protected void setUp() {
-    lc = new LexicographicalComparator();
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/9438c8b1/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/persistence/soplog/RecoverableSortedOplogSet.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/persistence/soplog/RecoverableSortedOplogSet.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/persistence/soplog/RecoverableSortedOplogSet.java
deleted file mode 100644
index 0b3e1f5..0000000
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/persistence/soplog/RecoverableSortedOplogSet.java
+++ /dev/null
@@ -1,221 +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.
- */
-package com.gemstone.gemfire.internal.cache.persistence.soplog;
-
-import java.io.File;
-import java.io.IOException;
-import java.lang.management.ManagementFactory;
-import java.nio.ByteBuffer;
-import java.util.EnumMap;
-import java.util.UUID;
-import java.util.concurrent.atomic.AtomicReference;
-import java.util.concurrent.locks.Lock;
-import java.util.concurrent.locks.ReentrantLock;
-
-import org.apache.logging.log4j.Logger;
-
-import com.gemstone.gemfire.internal.cache.persistence.soplog.AppendLog.AppendLogWriter;
-import com.gemstone.gemfire.internal.logging.LogService;
-
-public class RecoverableSortedOplogSet extends AbstractSortedReader implements SortedOplogSet {
-  private static final Logger logger = LogService.getLogger();
-  
-  private final SortedOplogSet sos;
-  private final long bufferSize;
-  
-  private final long maxBufferMemory;
-  
-  private final Lock rollLock;
-  private AtomicReference<AppendLogWriter> writer;
-  
-  private final String logPrefix;
-  
-  public RecoverableSortedOplogSet(SortedOplogSet sos, long bufferSize, double memLimit) throws IOException {
-    this.sos = sos;
-    this.bufferSize = bufferSize;
-    
-    this.logPrefix = "<" + sos.getFactory().getConfiguration().getName() + "> ";
-    
-    rollLock = new ReentrantLock();
-    writer = new AtomicReference<AppendLogWriter>(AppendLog.create(nextLogFile()));
-    
-    maxBufferMemory = Math.round(memLimit * ManagementFactory.getMemoryMXBean().getHeapMemoryUsage().getMax());
-  }
-  
-  @Override
-  public boolean mightContain(byte[] key) throws IOException {
-    return sos.mightContain(key);
-  }
-
-  @Override
-  public ByteBuffer read(byte[] key) throws IOException {
-    return sos.read(key);
-  }
-
-  @Override
-  public SortedIterator<ByteBuffer> scan(byte[] from, boolean fromInclusive, byte[] to, boolean toInclusive) throws IOException {
-    return sos.scan(from, fromInclusive, to, toInclusive);
-  }
-
-  @Override
-  public SortedIterator<ByteBuffer> scan(
-      byte[] from,
-      boolean fromInclusive,
-      byte[] to,
-      boolean toInclusive,
-      boolean ascending,
-      MetadataFilter filter) throws IOException {
-    return sos.scan(from, fromInclusive, to, toInclusive, ascending, filter);
-  }
-
-  @Override
-  public SerializedComparator getComparator() {
-    return sos.getComparator();
-  }
-
-  @Override
-  public SortedOplogFactory getFactory() {
-    return sos.getFactory();
-  }
-  
-  @Override
-  public SortedStatistics getStatistics() throws IOException {
-    return sos.getStatistics();
-  }
-
-  @Override
-  public void close() throws IOException {
-    rollLock.lock();
-    try {
-      writer.get().close();
-      writer.set(null);
-      sos.close();
-    } finally {
-      rollLock.unlock();
-    }
-  }
-
-  @Override
-  public void put(byte[] key, byte[] value) throws IOException {
-    throttle();
-    if (sos.bufferSize() > bufferSize) {
-      roll(false);
-    }
-
-    writer.get().append(key, value);
-    sos.put(key, value);
-  }
-
-  @Override
-  public long bufferSize() {
-    return sos.bufferSize();
-  }
-
-  @Override
-  public long unflushedSize() {
-    return sos.unflushedSize();
-  }
-
-  @Override
-  public void flush(EnumMap<Metadata, byte[]> metadata, FlushHandler handler) throws IOException {
-    roll(true);
-  }
-
-  @Override
-  public void flushAndClose(EnumMap<Metadata, byte[]> metadata) throws IOException {
-    throw new RuntimeException("Not implemented");
-  }
-
-  @Override
-  public Compactor getCompactor() {
-    return sos.getCompactor();
-  }
-
-  @Override
-  public void clear() throws IOException {
-    rollLock.lock();
-    try {
-      roll(true);
-      sos.clear();
-    } finally {
-      rollLock.unlock();
-    }
-  }
-
-  @Override
-  public void destroy() throws IOException {
-    roll(true);
-    sos.destroy();
-  }
-
-  @Override
-  public boolean isClosed() {
-    return sos.isClosed();
-  }
-  
-  private void throttle() {
-    int n = 0;
-    while (sos.bufferSize() + sos.unflushedSize() > maxBufferMemory) {
-      try {
-        Thread.sleep(1 << n++);
-        
-      } catch (InterruptedException e) {
-        Thread.currentThread().interrupt();
-        break;
-      }
-    }
-  }
-
-  private void roll(boolean wait) throws IOException {
-    boolean locked = true;
-    if (wait) {
-      rollLock.lock();
-    } else {
-      locked = rollLock.tryLock();
-    }
-    
-    if (locked) {
-      try {
-        AppendLogWriter next = AppendLog.create(nextLogFile());
-        final AppendLogWriter old = writer.getAndSet(next);
-        old.close();
-
-        if (logger.isDebugEnabled()) {
-          logger.debug("{}Rolling from {} to {}", this.logPrefix, old.getFile(), next.getFile());
-        }
-
-        sos.flush(null, new FlushHandler() {
-          @Override
-          public void complete() {
-            old.getFile().delete();
-          }
-
-          @Override
-          public void error(Throwable t) {
-          }
-        });
-      } finally {
-        rollLock.unlock();
-      }
-    }
-  }
-
-  private File nextLogFile() {
-    return new File(sos.getFactory().getConfiguration().getName() 
-        + "-" + UUID.randomUUID().toString() + ".aolog");
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/9438c8b1/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/persistence/soplog/SizeTieredCompactorJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/persistence/soplog/SizeTieredCompactorJUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/persistence/soplog/SizeTieredCompactorJUnitTest.java
deleted file mode 100644
index ee76c55..0000000
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/persistence/soplog/SizeTieredCompactorJUnitTest.java
+++ /dev/null
@@ -1,110 +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.
- */
-package com.gemstone.gemfire.internal.cache.persistence.soplog;
-
-import java.io.File;
-import java.io.IOException;
-import java.nio.ByteBuffer;
-import java.util.concurrent.Executors;
-
-import org.junit.experimental.categories.Category;
-
-import com.gemstone.gemfire.internal.cache.persistence.soplog.SortedOplog.SortedOplogReader;
-import com.gemstone.gemfire.internal.cache.persistence.soplog.SortedReader.SortedIterator;
-import com.gemstone.gemfire.test.junit.categories.UnitTest;
-
-@Category(UnitTest.class)
-public class SizeTieredCompactorJUnitTest extends CompactionTestCase<Integer> {
-  public void testBasic() throws Exception {
-    compactor.add(createSoplog(0, 100, 0));
-    
-    assertEquals(1, compactor.getActiveReaders(null, null).size());
-    assertEquals(1, compactor.getLevel(0).getSnapshot().size());
-    assertFalse(compactor.getLevel(0).needsCompaction());
-    
-    WaitingHandler wh = new WaitingHandler();
-    compactor.compact(false, wh);
-    wh.waitForCompletion();
-
-    assertEquals(1, compactor.getActiveReaders(null, null).size());
-    assertEquals(1, compactor.getLevel(0).getSnapshot().size());
-    assertFalse(compactor.getLevel(0).needsCompaction());
-  }
-
-  public void testCompactionLevel0() throws Exception {
-    compactor.add(createSoplog(0, 100, 0));
-    compactor.add(createSoplog(100, 100, 1));
-    
-    assertEquals(2, compactor.getActiveReaders(null, null).size());
-    assertEquals(2, compactor.getLevel(0).getSnapshot().size());
-    assertTrue(compactor.getLevel(0).needsCompaction());
-
-    WaitingHandler wh = new WaitingHandler();
-    compactor.compact(false, wh);
-    wh.waitForCompletion();
-
-    assertEquals(1, compactor.getActiveReaders(null, null).size());
-    assertEquals(0, compactor.getLevel(0).getSnapshot().size());
-    assertEquals(1, compactor.getLevel(1).getSnapshot().size());
-    assertFalse(compactor.getLevel(0).needsCompaction());
-    assertFalse(compactor.getLevel(1).needsCompaction());
-    
-    validate(compactor.getActiveReaders(null, null).iterator().next().get(), 0, 200);
-  }
-  
-  public void testMultilevelCompaction() throws Exception {
-    for (int i = 0; i < 8; i += 2) {
-      compactor.add(createSoplog(0, 100, i));
-      compactor.add(createSoplog(100, 100, i+1));
-
-      WaitingHandler wh = new WaitingHandler();
-      compactor.compact(false, wh);
-      wh.waitForCompletion();
-    }
-    
-    assertEquals(1, compactor.getActiveReaders(null, null).size());
-    validate(compactor.getActiveReaders(null, null).iterator().next().get(), 0, 200);
-  }
-  
-  public void testForceCompaction() throws Exception {
-    compactor.add(createSoplog(0, 100, 0));
-    compactor.add(createSoplog(100, 100, 1));
-    boolean compacted = compactor.compact();
-    
-    assertTrue(compacted);
-    validate(compactor.getActiveReaders(null, null).iterator().next().get(), 0, 200);
-  }
-
-  @Override
-  protected AbstractCompactor<Integer> createCompactor(SortedOplogFactory factory) throws IOException {
-    return new SizeTieredCompactor(factory, 
-        NonCompactor.createFileset("test", new File(".")), 
-        new FileTracker(), 
-        Executors.newSingleThreadExecutor(),
-        2, 4);
-  }
-
-  private void validate(SortedOplogReader soplog, int start, int count) throws IOException {
-    int i = 0;
-    for (SortedIterator<ByteBuffer> iter = soplog.scan(); iter.hasNext(); i++) {
-      iter.next();
-      assertEquals(i, iter.key().getInt());
-      assertEquals(i, iter.value().getInt());
-    }
-    assertEquals(count, i);
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/9438c8b1/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/persistence/soplog/SizeTieredSortedOplogSetJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/persistence/soplog/SizeTieredSortedOplogSetJUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/persistence/soplog/SizeTieredSortedOplogSetJUnitTest.java
deleted file mode 100644
index cf1de00..0000000
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/persistence/soplog/SizeTieredSortedOplogSetJUnitTest.java
+++ /dev/null
@@ -1,43 +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.
- */
-package com.gemstone.gemfire.internal.cache.persistence.soplog;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.concurrent.Executors;
-
-import org.junit.experimental.categories.Category;
-
-import com.gemstone.gemfire.internal.cache.persistence.soplog.CompactionTestCase.FileTracker;
-import com.gemstone.gemfire.test.junit.categories.UnitTest;
-
-@Category(UnitTest.class)
-public class SizeTieredSortedOplogSetJUnitTest extends CompactionSortedOplogSetTestCase {
-  @Override
-  protected AbstractCompactor<?> createCompactor(SortedOplogFactory factory) throws IOException {
-    return new SizeTieredCompactor(factory, 
-        NonCompactor.createFileset("test", new File(".")), 
-        new FileTracker(), 
-        Executors.newSingleThreadExecutor(),
-        2, 4);
-  }
-  @Override
-  public void testStatistics() throws IOException {
-    // remove this noop override when bug 52249 is fixed
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/9438c8b1/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/persistence/soplog/SortedBufferJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/persistence/soplog/SortedBufferJUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/persistence/soplog/SortedBufferJUnitTest.java
deleted file mode 100644
index 1d79059..0000000
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/persistence/soplog/SortedBufferJUnitTest.java
+++ /dev/null
@@ -1,39 +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.
- */
-package com.gemstone.gemfire.internal.cache.persistence.soplog;
-
-import java.nio.ByteBuffer;
-import java.util.Map.Entry;
-import java.util.NavigableMap;
-
-import org.junit.experimental.categories.Category;
-
-import com.gemstone.gemfire.internal.cache.persistence.soplog.SortedOplogFactory.SortedOplogConfiguration;
-import com.gemstone.gemfire.test.junit.categories.UnitTest;
-
-@Category(UnitTest.class)
-public class SortedBufferJUnitTest extends SortedReaderTestCase {
-  @Override
-  protected SortedReader<ByteBuffer> createReader(NavigableMap<byte[], byte[]> data) {
-    SortedOplogConfiguration config = new SortedOplogConfiguration("test");
-    SortedBuffer<Integer> sb = new SortedBuffer<Integer>(config, 0);
-    for (Entry<byte[], byte[]> entry : data.entrySet()) {
-      sb.put(entry.getKey(), entry.getValue());
-    }
-    return sb;
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/9438c8b1/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/persistence/soplog/SortedOplogSetJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/persistence/soplog/SortedOplogSetJUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/persistence/soplog/SortedOplogSetJUnitTest.java
deleted file mode 100644
index bb0a198..0000000
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/persistence/soplog/SortedOplogSetJUnitTest.java
+++ /dev/null
@@ -1,273 +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.
- */
-package com.gemstone.gemfire.internal.cache.persistence.soplog;
-
-import java.io.File;
-import java.io.IOException;
-import java.nio.ByteBuffer;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map.Entry;
-import java.util.NavigableMap;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.Executors;
-import java.util.concurrent.atomic.AtomicBoolean;
-import java.util.concurrent.atomic.AtomicInteger;
-
-import org.apache.logging.log4j.Logger;
-import org.junit.experimental.categories.Category;
-
-import com.gemstone.gemfire.internal.cache.persistence.soplog.SortedOplogSet.FlushHandler;
-import com.gemstone.gemfire.internal.cache.persistence.soplog.SortedReader.SortedIterator;
-import com.gemstone.gemfire.internal.cache.persistence.soplog.nofile.NoFileSortedOplogFactory;
-import com.gemstone.gemfire.internal.logging.LogService;
-import com.gemstone.gemfire.test.junit.categories.UnitTest;
-
-@Category(UnitTest.class)
-public class SortedOplogSetJUnitTest extends SortedReaderTestCase {
-  private static final Logger logger = LogService.getLogger();
-  private SortedOplogSet set;
-  
-  public void testMergedIterator() throws IOException {
-    FlushCounter handler = new FlushCounter();
-    SortedOplogSet sos = createSoplogSet("merge");
-    
-    // #1
-    sos.put(wrapInt(1), wrapInt(1));
-    sos.put(wrapInt(2), wrapInt(1));
-    sos.put(wrapInt(3), wrapInt(1));
-    sos.put(wrapInt(4), wrapInt(1));
-    sos.flush(null, handler);
-    
-    // #2
-    sos.put(wrapInt(2), wrapInt(1));
-    sos.put(wrapInt(4), wrapInt(1));
-    sos.put(wrapInt(6), wrapInt(1));
-    sos.put(wrapInt(8), wrapInt(1));
-    sos.flush(null, handler);
-    
-    // #3
-    sos.put(wrapInt(1), wrapInt(1));
-    sos.put(wrapInt(3), wrapInt(1));
-    sos.put(wrapInt(5), wrapInt(1));
-    sos.put(wrapInt(7), wrapInt(1));
-    sos.put(wrapInt(9), wrapInt(1));
-    sos.flush(null, handler);
-    
-    // #4
-    sos.put(wrapInt(0), wrapInt(1));
-    sos.put(wrapInt(1), wrapInt(1));
-    sos.put(wrapInt(4), wrapInt(1));
-    sos.put(wrapInt(5), wrapInt(1));
-
-    while (!handler.flushes.compareAndSet(3, 0));
-    
-    // the iteration pattern for this test should be 0-9:
-    // 0 1 4 5   sbuffer #4
-    // 1 3 5 7 9 soplog #3
-    // 2 4 6 8   soplog #2
-    // 1 2 3 4   soplog #1
-    List<Integer> result = new ArrayList<Integer>();
-    SortedIterator<ByteBuffer> iter = sos.scan();
-    try {
-      while (iter.hasNext()) {
-        ByteBuffer key = iter.next();
-        ByteBuffer val = iter.value();
-        assertEquals(wrapInt(1), val);
-        
-        result.add(key.getInt());
-      }
-    } finally {
-      iter.close();
-    }
-
-    sos.close();
-    
-    assertEquals(10, result.size());
-    for (int i = 0; i < 10; i++) {
-      assertEquals(i, result.get(i).intValue());
-    }
-  }
-
-  @Override
-  protected SortedReader<ByteBuffer> createReader(NavigableMap<byte[], byte[]> data) 
-      throws IOException {
-    set = createSoplogSet("test");
-    
-    int i = 0;
-    int flushes = 0;
-    FlushCounter fc = new FlushCounter();
-    
-    for (Entry<byte[], byte[]> entry : data.entrySet()) {
-      set.put(entry.getKey(), entry.getValue());
-      if (i++ % 13 == 0) {
-        flushes++;
-        set.flush(null, fc);
-      }
-    }
-    
-    while (!fc.flushes.compareAndSet(flushes, 0));
-    return set;
-  }
-  
-  public void testClear() throws IOException {
-    set.clear();
-    validateEmpty(set);
-  }
-  
-  public void testDestroy() throws IOException {
-    set.destroy();
-    assertTrue(((SortedOplogSetImpl) set).isClosed());
-    try {
-      set.scan();
-      fail();
-    } catch (IllegalStateException e) { }
-  }
-  
-  public void testClearInterruptsFlush() throws Exception {
-    FlushCounter handler = new FlushCounter();
-    SortedOplogSetImpl sos = prepSoplogSet("clearDuringFlush");
-    
-    sos.testDelayDuringFlush = new CountDownLatch(1);
-    sos.flush(null, handler);
-    sos.clear();
-    
-    flushAndWait(handler, sos);
-    validateEmpty(sos);
-    assertEquals(2, handler.flushes.get());
-  }
-  
-  public void testClearRepeat() throws Exception {
-    int i = 0;
-    do {
-      testClearInterruptsFlush();
-      logger.debug("Test {} is complete", i);
-      tearDown();
-      setUp();
-    } while (i++ < 100);
- }
-  
-  public void testCloseInterruptsFlush() throws Exception {
-    FlushCounter handler = new FlushCounter();
-    SortedOplogSetImpl sos = prepSoplogSet("closeDuringFlush");
-    
-    sos.testDelayDuringFlush = new CountDownLatch(1);
-    sos.flush(null, handler);
-    sos.close();
-    
-    assertTrue(sos.isClosed());
-    assertEquals(1, handler.flushes.get());
-  }
-
-  public void testDestroyInterruptsFlush() throws Exception {
-    FlushCounter handler = new FlushCounter();
-    SortedOplogSetImpl sos = prepSoplogSet("destroyDuringFlush");
-    
-    sos.testDelayDuringFlush = new CountDownLatch(1);
-    sos.flush(null, handler);
-    sos.destroy();
-    
-    assertTrue(sos.isClosed());
-    assertEquals(1, handler.flushes.get());
-  }
-
-  public void testScanAfterClear() throws IOException {
-    SortedIterator<ByteBuffer> iter = set.scan();
-    set.clear();
-    assertFalse(iter.hasNext());
-  }
-
-  public void testScanAfterClose() throws IOException {
-    SortedIterator<ByteBuffer> iter = set.scan();
-    set.close();
-    assertFalse(iter.hasNext());
-  }
-  
-  public void testEmptyFlush() throws Exception {
-    FlushCounter handler = new FlushCounter();
-    SortedOplogSet sos = prepSoplogSet("empty");
-    
-    flushAndWait(handler, sos);
-    flushAndWait(handler, sos);
-  }
-  
-  public void testErrorDuringFlush() throws Exception {
-    FlushCounter handler = new FlushCounter();
-    handler.error.set(true);
-    
-    SortedOplogSetImpl sos = prepSoplogSet("err");
-    sos.testErrorDuringFlush = true;
-    
-    flushAndWait(handler, sos);
-  }
-  
-  protected void validateEmpty(SortedOplogSet sos) throws IOException {
-    assertEquals(0, sos.bufferSize());
-    assertEquals(0, sos.unflushedSize());
-    
-    SortedIterator<ByteBuffer> iter = sos.scan();
-    assertFalse(iter.hasNext());
-    iter.close();
-    sos.close();
-  }
-  
-  protected SortedOplogSetImpl prepSoplogSet(String name) throws IOException {
-    SortedOplogSetImpl sos = createSoplogSet(name);
-
-    sos.put(wrapInt(1), wrapInt(1));
-    sos.put(wrapInt(2), wrapInt(1));
-    sos.put(wrapInt(3), wrapInt(1));
-    sos.put(wrapInt(4), wrapInt(1));
-    
-    return sos;
-  }
-  
-  protected SortedOplogSetImpl createSoplogSet(String name) throws IOException {
-    SortedOplogFactory factory = new NoFileSortedOplogFactory(name);
-    Compactor compactor = new NonCompactor(name, new File("."));
-    
-    return new SortedOplogSetImpl(factory, Executors.newSingleThreadExecutor(), compactor);
-  }
-
-  protected void flushAndWait(FlushCounter handler, SortedOplogSet sos)
-      throws InterruptedException, IOException {
-    sos.flush(null, handler);
-    while (sos.unflushedSize() > 0) {
-      Thread.sleep(1000);
-    }
-  }
-
-  protected static class FlushCounter implements FlushHandler {
-    private final AtomicInteger flushes = new AtomicInteger(0);
-    private final AtomicBoolean error = new AtomicBoolean(false);
-    
-    @Override 
-    public void complete() {
-      logger.debug("Flush complete! {}", this);
-      assertFalse(error.get());
-      flushes.incrementAndGet();
-    }
-    
-    @Override 
-    public void error(Throwable t) {
-      if (!error.get()) {
-        t.printStackTrace();
-        fail(t.getMessage());
-      }
-    }
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/9438c8b1/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/persistence/soplog/SortedReaderTestCase.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/persistence/soplog/SortedReaderTestCase.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/persistence/soplog/SortedReaderTestCase.java
deleted file mode 100644
index b41e6ba..0000000
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/persistence/soplog/SortedReaderTestCase.java
+++ /dev/null
@@ -1,295 +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.
- */
-package com.gemstone.gemfire.internal.cache.persistence.soplog;
-
-import java.io.File;
-import java.io.FilenameFilter;
-import java.io.IOException;
-import java.nio.ByteBuffer;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map.Entry;
-import java.util.NavigableMap;
-import java.util.TreeMap;
-import java.util.concurrent.Callable;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-import java.util.concurrent.Future;
-
-import junit.framework.TestCase;
-
-import com.gemstone.gemfire.internal.cache.persistence.soplog.SortedReader.SortedIterator;
-import com.gemstone.gemfire.internal.cache.persistence.soplog.SortedReader.SortedStatistics;
-
-public abstract class SortedReaderTestCase extends TestCase {
-  private NavigableMap<byte[], byte[]> data;
-  protected SortedReader<ByteBuffer> reader;
-
-  public static void assertEquals(byte[] expected, ByteBuffer actual) {
-    assertEquals(expected.length, actual.remaining());
-    for (int i = 0; i < expected.length; i++) {
-      assertEquals(expected[i], actual.get(actual.position() + i));
-    }
-  }
-  
-  public void testComparator() {
-    assertNotNull(reader.getComparator());
-  }
-  
-  public void testStatistics() throws IOException {
-    SortedStatistics stats = reader.getStatistics();
-    try {
-      assertEquals(data.size(), stats.keyCount());
-      assertTrue(Arrays.equals(data.firstKey(), stats.firstKey()));
-      assertTrue(Arrays.equals(data.lastKey(), stats.lastKey()));
-      
-      int keySize = 0;
-      int valSize = 0;
-      for (Entry<byte[], byte[]> entry : data.entrySet()) {
-        keySize += entry.getKey().length;
-        valSize += entry.getValue().length;
-      }
-
-      double avgKey = keySize / data.size();
-      double avgVal = valSize / data.size();
-          
-      assertEquals(avgVal, stats.avgValueSize());
-      assertEquals(avgKey, stats.avgKeySize());
-      
-    } finally {
-      stats.close();
-    }
-  }
-
-  public void testMightContain() throws IOException {
-    for (byte[] key : data.keySet()) {
-      assertTrue(reader.mightContain(key));
-    }
-  }
-
-  public void testRead() throws IOException {
-    for (byte[] key : data.keySet()) {
-      assertEquals(data.get(key), reader.read(key));
-    }
-  }
-
-  public void testScan() throws IOException {
-    SortedIterator<ByteBuffer> scan = reader.scan();
-    try {
-      Iterator<Entry<byte[], byte[]>> iter = data.entrySet().iterator();
-      doIter(scan, iter);
-      
-    } finally {
-      scan.close();
-    }
-  }
-  
-  public void testMultithreadScan() throws Exception {
-    int threads = 10;
-    ExecutorService exec = Executors.newFixedThreadPool(threads);
-    List<Callable<Boolean>> tasks = new ArrayList<Callable<Boolean>>();
-    for (int i = 0; i < threads; i++) {
-      tasks.add(new Callable<Boolean>() {
-        @Override
-        public Boolean call() throws Exception {
-          testScan();
-          return true;
-        }
-      });
-    }
-
-    int i = 0;
-    while (i++ < 1000) {
-      for (Future<Boolean> ft : exec.invokeAll(tasks)) {
-        assertTrue(ft.get());
-      }
-    }
-  }
-  
-  public void testScanReverse() throws IOException {
-    SortedIterator<ByteBuffer> scan = reader.withAscending(false).scan();
-    try {
-      Iterator<Entry<byte[], byte[]>> iter = data.descendingMap().entrySet().iterator();
-      doIter(scan, iter);
-    } finally {
-      scan.close();
-    }
-  }
-  
-  public void testHead() throws IOException {
-    byte[] split = wrapInt(50);
-    SortedIterator<ByteBuffer> scan = reader.head(split, true);
-    try {
-      Iterator<Entry<byte[], byte[]>> iter = data.headMap(split, true).entrySet().iterator();
-      doIter(scan, iter);
-    } finally {
-      scan.close();
-    }
-    
-    scan = reader.head(split, false);
-    try {
-      Iterator<Entry<byte[], byte[]>> iter = data.headMap(split, false).entrySet().iterator();
-      doIter(scan, iter);
-    } finally {
-      scan.close();
-    }
-  }
-  
-  public void testTail() throws IOException {
-    byte[] split = wrapInt(50);
-    SortedIterator<ByteBuffer> scan = reader.tail(split, true);
-    try {
-      Iterator<Entry<byte[], byte[]>> iter = data.tailMap(split, true).entrySet().iterator();
-      doIter(scan, iter);
-    } finally {
-      scan.close();
-    }
-    
-    scan = reader.tail(split, false);
-    try {
-      Iterator<Entry<byte[], byte[]>> iter = data.tailMap(split, false).entrySet().iterator();
-      doIter(scan, iter);
-    } finally {
-      scan.close();
-    }
-  }
-  
-  public void testScanWithBounds() throws IOException {
-    byte[] lhs = wrapInt(10);
-    byte[] rhs = wrapInt(90);
-
-    // [lhs,rhs)
-    SortedIterator<ByteBuffer> scan = reader.scan(lhs, rhs);
-    try {
-      Iterator<Entry<byte[], byte[]>> iter = data.subMap(lhs, rhs).entrySet().iterator();
-      doIter(scan, iter);
-    } finally {
-      scan.close();
-    }
-    
-    // (lhs,rhs)
-    scan = reader.scan(lhs, false, rhs, false);
-    try {
-      Iterator<Entry<byte[], byte[]>> iter = data.subMap(lhs, false, rhs, false).entrySet().iterator();
-      doIter(scan, iter);
-    } finally {
-      scan.close();
-    }
-  
-    // [lhs,rhs]
-    scan = reader.scan(lhs, true, rhs, true);
-    try {
-      Iterator<Entry<byte[], byte[]>> iter = data.subMap(lhs, true, rhs, true).entrySet().iterator();
-      doIter(scan, iter);
-    } finally {
-      scan.close();
-    }
-  }
-  
-  public void testReverseScanWithBounds() throws IOException {
-    data = data.descendingMap();
-    byte[] rhs = wrapInt(10);
-    byte[] lhs = wrapInt(90);
-
-    SortedReader<ByteBuffer> rev = reader.withAscending(false);
-    
-    // [rhs,lhs)
-    SortedIterator<ByteBuffer> scan = rev.scan(lhs, rhs);
-    try {
-      Iterator<Entry<byte[], byte[]>> iter = data.subMap(lhs, rhs).entrySet().iterator();
-      doIter(scan, iter);
-    } finally {
-      scan.close();
-    }
-      
-    // (rhs,lhs)
-    scan = rev.scan(lhs, false, rhs, false);
-    try {
-      Iterator<Entry<byte[], byte[]>> iter = data.subMap(lhs, false, rhs, false).entrySet().iterator();
-      doIter(scan, iter);
-    } finally {
-      scan.close();
-    }
-  
-    // [rhs,lhs]
-    scan = rev.scan(lhs, true, rhs, true);
-    try {
-      Iterator<Entry<byte[], byte[]>> iter = data.subMap(lhs, true, rhs, true).entrySet().iterator();
-      doIter(scan, iter);
-    } finally {
-      scan.close();
-    }
-  }
-  
-  public void testScanEquality() throws IOException {
-    byte[] val = wrapInt(10);
-    
-    // [val,val]
-    SortedIterator<ByteBuffer> scan = reader.scan(val);
-    try {
-      Iterator<Entry<byte[], byte[]>> iter = data.subMap(val, true, val, true).entrySet().iterator();
-      doIter(scan, iter);
-    } finally {
-      scan.close();
-    }
-  }
-  
-  public static byte[] wrapInt(int n) {
-    ByteBuffer buf = (ByteBuffer) ByteBuffer.allocate(4).putInt(n).flip();
-    return buf.array();
-  }
-  
-  public static File[] getSoplogsToDelete() {
-    return new File(".").listFiles(new FilenameFilter() {
-      @Override
-      public boolean accept(File dir, String name) {
-        return name.endsWith("soplog") || name.endsWith("crc");
-      }
-    });
-  }
-
-  private void doIter(SortedIterator<ByteBuffer> scan, Iterator<Entry<byte[], byte[]>> iter) {
-    while (scan.hasNext() || iter.hasNext()) {
-      Entry<byte[], byte[]> expected = iter.next();
-      assertEquals(expected.getKey(), scan.next());
-      assertEquals(expected.getValue(), scan.value());
-    }
-  }
-
-  @Override
-  protected final void setUp() throws IOException {
-    data = new TreeMap<byte[], byte[]>(new ByteComparator());
-    
-    for (int i = 0; i < 100; i++) {
-      data.put(wrapInt(i), wrapInt(i));
-    }
-    reader = createReader(data);
-  }
-  
-  @Override 
-  protected void tearDown() throws IOException {
-    reader.close();
-    for (File f : getSoplogsToDelete()) {
-      f.delete();
-    }
-  }
-  
-  protected abstract SortedReader<ByteBuffer> createReader(NavigableMap<byte[], byte[]> data) 
-      throws IOException;
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/9438c8b1/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/persistence/soplog/nofile/NoFileSortedOplogJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/persistence/soplog/nofile/NoFileSortedOplogJUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/persistence/soplog/nofile/NoFileSortedOplogJUnitTest.java
deleted file mode 100644
index b6813d7..0000000
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/persistence/soplog/nofile/NoFileSortedOplogJUnitTest.java
+++ /dev/null
@@ -1,48 +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.
- */
-package com.gemstone.gemfire.internal.cache.persistence.soplog.nofile;
-
-import java.io.IOException;
-import java.nio.ByteBuffer;
-import java.util.Map.Entry;
-import java.util.NavigableMap;
-
-import org.junit.experimental.categories.Category;
-
-import com.gemstone.gemfire.internal.cache.persistence.soplog.SortedOplog.SortedOplogWriter;
-import com.gemstone.gemfire.internal.cache.persistence.soplog.SortedOplogFactory.SortedOplogConfiguration;
-import com.gemstone.gemfire.internal.cache.persistence.soplog.SortedReader;
-import com.gemstone.gemfire.internal.cache.persistence.soplog.SortedReaderTestCase;
-import com.gemstone.gemfire.test.junit.categories.UnitTest;
-
-@Category(UnitTest.class)
-public class NoFileSortedOplogJUnitTest extends SortedReaderTestCase {
-  private NoFileSortedOplog mfile;
-
-  @Override
-  protected SortedReader<ByteBuffer> createReader(NavigableMap<byte[], byte[]> data) throws IOException {
-    mfile = new NoFileSortedOplog(new SortedOplogConfiguration("nofile"));
-
-    SortedOplogWriter wtr = mfile.createWriter();
-    for (Entry<byte[], byte[]> entry : data.entrySet()) {
-      wtr.append(entry.getKey(), entry.getValue());
-    }
-    wtr.close(null);
-
-    return mfile.createReader();
-  }
-}


[40/50] [abbrv] incubator-geode git commit: GEODE-438: fix race in OffHeapMemoryMonitor This fix also fixes GEODE-488 and GEODE-551. Also fixed test to use standard locators for connectivity instead of an mcast-port.

Posted by ma...@apache.org.
GEODE-438: fix race in OffHeapMemoryMonitor
This fix also fixes GEODE-488 and GEODE-551.
Also fixed test to use standard locators for connectivity
instead of an mcast-port.


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

Branch: refs/heads/feature/GEODE-53
Commit: 59ab8cf5aef00dddb9587ae9b7964de277630d35
Parents: 4b904ce
Author: Darrel Schneider <ds...@pivotal.io>
Authored: Tue Nov 17 17:20:59 2015 -0800
Committer: Darrel Schneider <ds...@pivotal.io>
Committed: Thu Nov 19 14:35:12 2015 -0800

----------------------------------------------------------------------
 .../cache/control/InternalResourceManager.java  |   2 +-
 .../cache/control/OffHeapMemoryMonitor.java     | 137 +++++++++----------
 .../MemoryThresholdsOffHeapDUnitTest.java       |  17 ++-
 3 files changed, 74 insertions(+), 82 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/59ab8cf5/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/control/InternalResourceManager.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/control/InternalResourceManager.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/control/InternalResourceManager.java
index 81d46ff..98e1f25 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/control/InternalResourceManager.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/control/InternalResourceManager.java
@@ -165,7 +165,7 @@ public class InternalResourceManager implements ResourceManager {
     // Create the monitors
     Map<ResourceType, ResourceMonitor> tempMonitors = new HashMap<ResourceType, ResourceMonitor>();
     tempMonitors.put(ResourceType.HEAP_MEMORY, new HeapMemoryMonitor(this, cache, this.stats));
-    tempMonitors.put(ResourceType.OFFHEAP_MEMORY, new OffHeapMemoryMonitor(this, cache, this.stats));
+    tempMonitors.put(ResourceType.OFFHEAP_MEMORY, new OffHeapMemoryMonitor(this, cache, cache.getOffHeapStore(), this.stats));
     this.resourceMonitors = Collections.unmodifiableMap(tempMonitors);
     
     // Initialize the listener sets so that it only needs to be done once

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/59ab8cf5/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/control/OffHeapMemoryMonitor.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/control/OffHeapMemoryMonitor.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/control/OffHeapMemoryMonitor.java
index 721e9a6..3ab39ea 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/control/OffHeapMemoryMonitor.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/control/OffHeapMemoryMonitor.java
@@ -48,9 +48,6 @@ public class OffHeapMemoryMonitor implements ResourceMonitor, MemoryUsageListene
       MemoryState.DISABLED, null, 0L, true, this.thresholds);
   private volatile MemoryState currentState = MemoryState.DISABLED;
 
-  // This holds a new event as it transitions from updateStateAndSendEvent(...) to fillInProfile()
-  private ThreadLocal<MemoryEvent> upcomingEvent = new ThreadLocal<MemoryEvent>();
-  
   // Set when startMonitoring() and stopMonitoring() are called
   // Package private for testing
   Boolean started = false;
@@ -58,28 +55,33 @@ public class OffHeapMemoryMonitor implements ResourceMonitor, MemoryUsageListene
   // Set to true when setEvictionThreshold(...) is called.
   private boolean hasEvictionThreshold = false;
 
-  private OffHeapMemoryUsageListener offHeapMemoryUsageListener;
   private Thread memoryListenerThread;
   
+  private final OffHeapMemoryUsageListener offHeapMemoryUsageListener;
   private final InternalResourceManager resourceManager;
   private final ResourceAdvisor resourceAdvisor;
   private final GemFireCacheImpl cache;
   private final ResourceManagerStats stats;
+  /**
+   * InternalResoruceManager insists on creating a OffHeapMemoryMonitor even when it
+   * does not have off-heap memory. So we need to handle memoryAllocator being null.
+   */
   private final MemoryAllocator memoryAllocator;
   private final LogWriterI18n log;
 
-  OffHeapMemoryMonitor(final InternalResourceManager resourceManager, final GemFireCacheImpl cache, final ResourceManagerStats stats) {
+  OffHeapMemoryMonitor(final InternalResourceManager resourceManager, final GemFireCacheImpl cache, final MemoryAllocator memoryAllocator, final ResourceManagerStats stats) {
     this.resourceManager = resourceManager;
     this.resourceAdvisor = (ResourceAdvisor) cache.getDistributionAdvisor();
     this.cache = cache;
     this.stats = stats;
     
-    this.memoryAllocator = cache.getOffHeapStore();
-    if (this.memoryAllocator != null) {
+    this.memoryAllocator = memoryAllocator;
+    if (memoryAllocator != null) {
       this.thresholds = new MemoryThresholds(this.memoryAllocator.getTotalMemory());
     }
     
     this.log = cache.getLoggerI18n();
+    this.offHeapMemoryUsageListener = new OffHeapMemoryUsageListener();
   }
 
   /**
@@ -92,7 +94,6 @@ public class OffHeapMemoryMonitor implements ResourceMonitor, MemoryUsageListene
         return;
       }
 
-      this.offHeapMemoryUsageListener = new OffHeapMemoryUsageListener(getBytesUsed());
       ThreadGroup group = LoggingThreadGroup.createThreadGroup("OffHeapMemoryMonitor Threads", logger);
       Thread t = new Thread(group, this.offHeapMemoryUsageListener);
       t.setName(t.getName() + " OffHeapMemoryListener");
@@ -123,10 +124,7 @@ public class OffHeapMemoryMonitor implements ResourceMonitor, MemoryUsageListene
       
       this.memoryAllocator.removeMemoryUsageListener(this);
       
-      this.offHeapMemoryUsageListener.stopRequested = true;
-      synchronized (this.offHeapMemoryUsageListener) {
-        this.offHeapMemoryUsageListener.notifyAll();
-      }
+      this.offHeapMemoryUsageListener.stop();
       if (waitForThread) {
         threadToWaitFor = this.memoryListenerThread;
       }
@@ -177,10 +175,7 @@ public class OffHeapMemoryMonitor implements ResourceMonitor, MemoryUsageListene
     if (!willSendEvent) {
       return;
     }
-    synchronized (this.offHeapMemoryUsageListener) {
-      this.offHeapMemoryUsageListener.offHeapMemoryUsed = bytesUsed;
-      this.offHeapMemoryUsageListener.notifyAll();
-    }
+    this.offHeapMemoryUsageListener.deliverEvent();
     if (_testHook != null) {
       _testHook.afterNotifyUpdateMemoryUsed(bytesUsed);
     }
@@ -281,9 +276,10 @@ public class OffHeapMemoryMonitor implements ResourceMonitor, MemoryUsageListene
   /**
    * Compare the number of bytes used (fetched from the JVM) to the thresholds.
    * If necessary, change the state and send an event for the state change.
+   * @return true if an event was sent
    */
-  public void updateStateAndSendEvent() {
-    updateStateAndSendEvent(getBytesUsed());
+  public boolean updateStateAndSendEvent() {
+    return updateStateAndSendEvent(getBytesUsed());
   }
 
   /**
@@ -294,8 +290,10 @@ public class OffHeapMemoryMonitor implements ResourceMonitor, MemoryUsageListene
    * 
    * @param bytesUsed
    *          Number of bytes of off-heap memory currently used.
+   * @return true if an event was sent
    */
-  public void updateStateAndSendEvent(long bytesUsed) {
+  public boolean updateStateAndSendEvent(long bytesUsed) {
+    boolean result = false;
     synchronized (this) {
       final MemoryEvent mre = this.mostRecentEvent;
       final MemoryState oldState = mre.getState();
@@ -309,10 +307,10 @@ public class OffHeapMemoryMonitor implements ResourceMonitor, MemoryUsageListene
         if (_testHook != null) {
           _testHook.updateStateAndSendEventBeforeProcess(bytesUsed, event);
         }
-        this.upcomingEvent.set(event);
-
+        this.mostRecentEvent = event;
         processLocalEvent(event);
         updateStatsFromEvent(event);
+        result = true;
         
       } else if (!oldState.isNormal()
           && bytesUsed != mre.getBytesUsed()
@@ -322,8 +320,9 @@ public class OffHeapMemoryMonitor implements ResourceMonitor, MemoryUsageListene
         if (_testHook != null) {
           _testHook.updateStateAndSendEventBeforeAbnormalProcess(bytesUsed, event);
         }
-        this.upcomingEvent.set(event);
+        this.mostRecentEvent = event;
         processLocalEvent(event);
+        result = true;
       } else {
         if (_testHook != null) {
           _testHook.updateStateAndSendEventIgnore(bytesUsed, oldState, newState, mre.getBytesUsed(), this.deliverNextAbnormalEvent);
@@ -331,6 +330,7 @@ public class OffHeapMemoryMonitor implements ResourceMonitor, MemoryUsageListene
         
       }
     }
+    return result;
   }
   
   /**
@@ -344,7 +344,7 @@ public class OffHeapMemoryMonitor implements ResourceMonitor, MemoryUsageListene
   private boolean mightSendEvent(long bytesUsed) {
     final MemoryEvent mre = this.mostRecentEvent;
     final MemoryState oldState = mre.getState();
-    final MemoryThresholds thresholds = this.thresholds;
+    final MemoryThresholds thresholds = mre.getThresholds();
     MemoryState newState = thresholds.computeNextState(oldState, bytesUsed);
     if (oldState != newState) {
       return true;
@@ -400,11 +400,6 @@ public class OffHeapMemoryMonitor implements ResourceMonitor, MemoryUsageListene
    */
   @Override
   public void fillInProfile(final ResourceManagerProfile profile) {
-    final MemoryEvent tempEvent = this.upcomingEvent.get();
-    if (tempEvent != null) {
-      this.mostRecentEvent = tempEvent;
-      this.upcomingEvent.set(null);
-    }
     final MemoryEvent eventToPopulate = this.mostRecentEvent;
     profile.setOffHeapData(eventToPopulate.getBytesUsed(), eventToPopulate.getState(), eventToPopulate.getThresholds());
   }
@@ -428,7 +423,6 @@ public class OffHeapMemoryMonitor implements ResourceMonitor, MemoryUsageListene
     if (this.memoryAllocator == null) {
       return 0;
     }
-    
     return this.memoryAllocator.getUsedMemory();
   }
 
@@ -496,65 +490,60 @@ public class OffHeapMemoryMonitor implements ResourceMonitor, MemoryUsageListene
   }
   
   class OffHeapMemoryUsageListener implements Runnable {
-    volatile boolean stopRequested = false;
-    long offHeapMemoryUsed; // In bytes
+    private boolean deliverEvent = false;
+    private boolean stopRequested = false;
     
-    OffHeapMemoryUsageListener(final long offHeapMemoryUsed) {
-      this.offHeapMemoryUsed = offHeapMemoryUsed;
+    OffHeapMemoryUsageListener() {
+    }
+    
+    public synchronized void deliverEvent() {
+      this.deliverEvent = true;
+      this.notifyAll();
+    }
+
+    public synchronized void stop() {
+      this.stopRequested = true;
+      this.notifyAll();
     }
     
     @Override
     public void run() {
       getLogWriter().fine("OffHeapMemoryUsageListener is starting " + this);
-      long lastOffHeapMemoryUsed;
-      synchronized (this) {
-        lastOffHeapMemoryUsed = this.offHeapMemoryUsed;
-      }
-      while (!this.stopRequested) {
-        updateStateAndSendEvent(lastOffHeapMemoryUsed);
+      int callsWithNoEvent = 0;
+      final int MS_TIMEOUT = 10;
+      final int MAX_CALLS_WITH_NO_EVENT = 1000/MS_TIMEOUT;
+      boolean exitRunLoop = false;
+      while (!exitRunLoop) {
+        if (!updateStateAndSendEvent()) {
+          callsWithNoEvent++;
+          if (callsWithNoEvent > MAX_CALLS_WITH_NO_EVENT) {
+            deliverNextAbnormalEvent();
+            callsWithNoEvent = 0;
+          }
+        } else {
+          callsWithNoEvent = 0;
+        }
 
         synchronized (this) {
-          long newOffHeapMemoryUsed = this.offHeapMemoryUsed;
           if (this.stopRequested) {
-            // no need to wait since we are stopping
-          } else if (lastOffHeapMemoryUsed != newOffHeapMemoryUsed) {
-            // no need to wait since memory used has changed
-            // This fixes a race like bug GEODE-500
-            lastOffHeapMemoryUsed = newOffHeapMemoryUsed;
+            exitRunLoop = true;
+          } else if (this.deliverEvent) {
+            // No need to wait.
+            // Loop around and call updateStateAndSendEvent.
+            this.deliverEvent = false;
           } else {
-            // wait for memory used to change
+            // Wait to be notified that off-heap memory changed
+            // or for the wait to timeout.
+            // In some cases we need to generate an event even
+            // when we have not been notified (see GEODE-438).
+            // So we don't want this wait to be for very long.
             try {  
-              do {
-                this.wait(1000);
-                newOffHeapMemoryUsed = this.offHeapMemoryUsed;
-                if (newOffHeapMemoryUsed == lastOffHeapMemoryUsed) {
-                  // The wait timed out. So tell the OffHeapMemoryMonitor
-                  // that we need an event if the state is not normal.
-                  deliverNextAbnormalEvent();
-                  // TODO: don't we need a "break" here?
-                  //       As it is we set deliverNextAbnormalEvent
-                  //       but then go back to sleep in wait.
-                  //       We need to call updateStateAndSendEvent
-                  //       which tests deliverNextAbnormalEvent.
-                  // But just adding a break is probably not enough.
-                  // We only set deliverNextAbnormalEvent if the wait
-                  // timed out which means that the amount of offHeapMemoryUsed
-                  // did not change.
-                  // But in updateStateAndSendEvent we only deliver an
-                  // abnormal event if the amount of memory changed.
-                  // This code needs to be reviewed with Swapnil but
-                  // it looks to Darrel like deliverNextAbnormalEvent
-                  // can be removed.
-                } else {
-                  // we have been notified so exit the inner while loop
-                  // and call updateStateAndSendEvent.
-                  lastOffHeapMemoryUsed = newOffHeapMemoryUsed;
-                  break;
-                }
-              } while (!this.stopRequested);
+              this.wait(MS_TIMEOUT);
+              this.deliverEvent = false;
             } catch (InterruptedException iex) {
               getLogWriter().warning("OffHeapMemoryUsageListener was interrupted " + this);
               this.stopRequested = true;
+              exitRunLoop = true;
             }
           }
         }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/59ab8cf5/gemfire-core/src/test/java/com/gemstone/gemfire/cache/management/MemoryThresholdsOffHeapDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/management/MemoryThresholdsOffHeapDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/management/MemoryThresholdsOffHeapDUnitTest.java
index a6f24d0..5399d28 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/management/MemoryThresholdsOffHeapDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/management/MemoryThresholdsOffHeapDUnitTest.java
@@ -524,7 +524,6 @@ public class MemoryThresholdsOffHeapDUnitTest extends ClientServerTestCase {
     final VM replicate1 = host.getVM(1);
     final VM replicate2 = host.getVM(2);
     final String rName = getUniqueName();
-    final int mcastPort = AvailablePortHelper.getRandomAvailableUDPPort();
     
     // Make sure the desired VMs will have a fresh DS.
     AsyncInvocation d1 = replicate1.invokeAsync(DistributedTestCase.class, "disconnectFromDS");
@@ -537,7 +536,7 @@ public class MemoryThresholdsOffHeapDUnitTest extends ClientServerTestCase {
       @SuppressWarnings("synthetic-access")
       @Override
       public void run2() throws CacheException {
-        getSystem(getServerProperties(mcastPort));
+        getSystem(getOffHeapProperties());
       }
     };
     replicate1.invoke(establishConnectivity);
@@ -547,7 +546,7 @@ public class MemoryThresholdsOffHeapDUnitTest extends ClientServerTestCase {
       @Override
       public void run2() throws CacheException {
         // Assert some level of connectivity
-        InternalDistributedSystem ds = getSystem(getServerProperties(mcastPort));
+        InternalDistributedSystem ds = getSystem(getOffHeapProperties());
         assertTrue(ds.getDistributionManager().getNormalDistributionManagerIds().size() >= 1);
 
         InternalResourceManager irm = (InternalResourceManager)getCache().getResourceManager();
@@ -1156,14 +1155,13 @@ public class MemoryThresholdsOffHeapDUnitTest extends ClientServerTestCase {
     final Host host = Host.getHost(0);
     final VM vm = host.getVM(2);
     final String rName = getUniqueName();
-    final int mcastPort = AvailablePortHelper.getRandomAvailableUDPPort();
 
     vm.invoke(DistributedTestCase.class, "disconnectFromDS");
     
     vm.invoke(new CacheSerializableRunnable("test LocalRegion load passthrough when critical") {
       @Override
       public void run2() throws CacheException {
-        getSystem(getServerProperties(mcastPort));
+        getSystem(getOffHeapProperties());
         InternalResourceManager irm = (InternalResourceManager)getCache().getResourceManager();
         final OffHeapMemoryMonitor ohmm = irm.getOffHeapMonitor();
         irm.setCriticalOffHeapPercentage(90f);
@@ -1821,12 +1819,17 @@ public class MemoryThresholdsOffHeapDUnitTest extends ClientServerTestCase {
     });
   }
   
-  private Properties getServerProperties(int mcastPort) {
+  private Properties getOffHeapProperties() {
     Properties p = new Properties();
+    p.setProperty(DistributionConfig.OFF_HEAP_MEMORY_SIZE_NAME, "1m");
+    return p;
+  }
+
+  private Properties getServerProperties(int mcastPort) {
+    Properties p = getOffHeapProperties();
     p.setProperty(DistributionConfig.MCAST_PORT_NAME, mcastPort + "");
     p.setProperty(DistributionConfig.MCAST_TTL_NAME, "0");
     p.setProperty(DistributionConfig.LOCATORS_NAME, "");
-    p.setProperty(DistributionConfig.OFF_HEAP_MEMORY_SIZE_NAME, "1m");
     return p;
   }
   


[08/50] [abbrv] incubator-geode git commit: GEODE-11: Move Lucene dependency version info to versions file

Posted by ma...@apache.org.
GEODE-11: Move Lucene dependency version info to versions file

See commit dc5d343 or GEODE 227 for additional details.


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

Branch: refs/heads/feature/GEODE-53
Commit: 37cc70edf7c6e519684b1ce9903a364c251d7d22
Parents: 300397c
Author: Ashvin Agrawal <as...@apache.org>
Authored: Mon Nov 9 10:32:16 2015 -0800
Committer: Ashvin Agrawal <as...@apache.org>
Committed: Mon Nov 9 10:33:45 2015 -0800

----------------------------------------------------------------------
 gemfire-lucene/build.gradle           | 22 +++++++++++-----------
 gradle/dependency-versions.properties |  2 +-
 2 files changed, 12 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/37cc70ed/gemfire-lucene/build.gradle
----------------------------------------------------------------------
diff --git a/gemfire-lucene/build.gradle b/gemfire-lucene/build.gradle
index 40313c5..6c3adda 100644
--- a/gemfire-lucene/build.gradle
+++ b/gemfire-lucene/build.gradle
@@ -2,27 +2,27 @@ dependencies {
     provided project(':gemfire-core')
     provided project(':gemfire-common')
 
-    compile 'org.apache.lucene:lucene-analyzers-common:5.3.0'
-    compile 'org.apache.lucene:lucene-core:5.3.0'
-    compile 'org.apache.lucene:lucene-queries:5.3.0'
-    compile 'org.apache.lucene:lucene-queryparser:5.3.0'
+    compile 'org.apache.lucene:lucene-analyzers-common:' + project.'lucene.version'
+    compile 'org.apache.lucene:lucene-core:' + project.'lucene.version'
+    compile 'org.apache.lucene:lucene-queries:' + project.'lucene.version'
+    compile 'org.apache.lucene:lucene-queryparser:' + project.'lucene.version'
 
     provided project(path: ':gemfire-junit', configuration: 'testOutput')
 
     //Lucene test framework.
-    testCompile 'org.apache.lucene:lucene-test-framework:5.3.0'
-    testCompile 'org.apache.lucene:lucene-codecs:5.3.0'
+    testCompile 'org.apache.lucene:lucene-test-framework:' + project.'lucene.version'
+    testCompile 'org.apache.lucene:lucene-codecs:' + project.'lucene.version'
     testCompile project(path: ':gemfire-core', configuration: 'testOutput', transitive: false)
-    //Dependency ot lucene-test-framework. Can we turn on transitive depencies for
+    //Dependency of lucene-test-framework. Can we turn on transitive dependencies for
     //the test framework somehow? We've disabled them globally in the parent
     //build.gadle.
     testCompile 'com.carrotsearch.randomizedtesting:randomizedtesting-runner:2.1.6'
 
     // the following test dependencies are needed for mocking cache instance
-    testRuntime 'org.apache.hadoop:hadoop-common:2.4.1'
-    testRuntime 'org.apache.hadoop:hadoop-hdfs:2.4.1'
-    testRuntime 'com.google.guava:guava:11.0.2'
-    testRuntime 'commons-collections:commons-collections:3.2.1'
+    testRuntime 'org.apache.hadoop:hadoop-common:' + project.'hadoop.version'
+    testRuntime 'org.apache.hadoop:hadoop-hdfs:' + project.'hadoop.version'
+    testRuntime 'com.google.guava:guava:' + project.'guava.version'
+    testRuntime 'commons-collections:commons-collections:' + project.'commons-collections.version'
 }
 
 //The lucene integration tests don't have any issues that requiring forking

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/37cc70ed/gradle/dependency-versions.properties
----------------------------------------------------------------------
diff --git a/gradle/dependency-versions.properties b/gradle/dependency-versions.properties
index 5fc6fbc..8be0f15 100644
--- a/gradle/dependency-versions.properties
+++ b/gradle/dependency-versions.properties
@@ -40,7 +40,7 @@ json4s.version = 3.2.4
 junit.version = 4.12
 JUnitParams.version = 1.0.4
 log4j.version = 2.1
-lucene.version = 5.0.0
+lucene.version = 5.3.0
 mockito-core.version = 1.10.19
 multithreadedtc.version = 1.01
 mx4j.version = 3.0.1


[07/50] [abbrv] incubator-geode git commit: GEODE-11: ADD Apache License header

Posted by ma...@apache.org.
GEODE-11: ADD Apache License header


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

Branch: refs/heads/feature/GEODE-53
Commit: 300397c17203fccda28436779ede46ee23fc32a3
Parents: 3e87134
Author: Ashvin Agrawal <as...@apache.org>
Authored: Sun Nov 8 22:02:39 2015 -0800
Committer: Ashvin Agrawal <as...@apache.org>
Committed: Mon Nov 9 10:31:42 2015 -0800

----------------------------------------------------------------------
 .../cache/lucene/LuceneQueryProvider.java       | 19 ++++++++++++
 .../cache/lucene/LuceneQueryResults.java        | 19 ++++++++++++
 .../cache/lucene/LuceneServiceProvider.java     | 19 ++++++++++++
 .../lucene/internal/InternalLuceneIndex.java    | 19 ++++++++++++
 .../lucene/internal/InternalLuceneService.java  | 19 ++++++++++++
 .../lucene/internal/LuceneEventListener.java    | 19 ++++++++++++
 .../LuceneIndexForPartitionedRegion.java        | 19 ++++++++++++
 .../LuceneIndexForReplicatedRegion.java         | 19 ++++++++++++
 .../cache/lucene/internal/LuceneIndexImpl.java  | 24 ++++++++++++---
 .../lucene/internal/LuceneQueryFactoryImpl.java | 19 ++++++++++++
 .../cache/lucene/internal/LuceneQueryImpl.java  | 19 ++++++++++++
 .../lucene/internal/LuceneQueryResultsImpl.java | 19 ++++++++++++
 .../lucene/internal/LuceneResultStructImpl.java | 19 ++++++++++++
 .../lucene/internal/LuceneServiceImpl.java      | 19 ++++++++++++
 .../internal/PartitionedRepositoryManager.java  | 19 ++++++++++++
 .../lucene/internal/StringQueryProvider.java    | 20 +++++++++++-
 .../internal/directory/FileIndexInput.java      | 19 ++++++++++++
 .../internal/directory/RegionDirectory.java     | 32 ++++++++++++--------
 .../internal/distributed/CollectorManager.java  | 19 ++++++++++++
 .../lucene/internal/distributed/EntryScore.java | 19 ++++++++++++
 .../internal/distributed/LuceneFunction.java    | 20 +++++++++++-
 .../distributed/LuceneFunctionContext.java      | 19 ++++++++++++
 .../lucene/internal/distributed/TopEntries.java | 19 ++++++++++++
 .../distributed/TopEntriesCollector.java        | 19 ++++++++++++
 .../distributed/TopEntriesCollectorManager.java | 19 ++++++++++++
 .../TopEntriesFunctionCollector.java            | 19 ++++++++++++
 .../lucene/internal/filesystem/ChunkKey.java    | 19 ++++++++++++
 .../cache/lucene/internal/filesystem/File.java  | 19 ++++++++++++
 .../internal/filesystem/FileInputStream.java    | 20 +++++++++++-
 .../internal/filesystem/FileOutputStream.java   | 19 ++++++++++++
 .../lucene/internal/filesystem/FileSystem.java  | 19 ++++++++++++
 .../filesystem/SeekableInputStream.java         | 19 ++++++++++++
 .../internal/repository/IndexRepository.java    | 19 ++++++++++++
 .../repository/IndexRepositoryImpl.java         | 19 ++++++++++++
 .../repository/IndexResultCollector.java        | 19 ++++++++++++
 .../internal/repository/RepositoryManager.java  | 19 ++++++++++++
 .../HeterogenousLuceneSerializer.java           | 19 ++++++++++++
 .../repository/serializer/LuceneSerializer.java | 19 ++++++++++++
 .../serializer/PdxLuceneSerializer.java         | 19 ++++++++++++
 .../serializer/ReflectionLuceneSerializer.java  | 19 ++++++++++++
 .../repository/serializer/SerializerUtil.java   | 19 ++++++++++++
 .../internal/xml/LuceneIndexCreation.java       | 19 ++++++++++++
 .../internal/xml/LuceneIndexXmlGenerator.java   | 19 ++++++++++++
 .../internal/xml/LuceneServiceXmlGenerator.java | 19 ++++++++++++
 .../lucene/internal/xml/LuceneXmlConstants.java | 19 ++++++++++++
 .../lucene/internal/xml/LuceneXmlParser.java    | 19 ++++++++++++
 .../internal/LuceneEventListenerJUnitTest.java  | 19 ++++++++++++
 .../LuceneIndexRecoveryHAJUnitTest.java         | 19 ++++++++++++
 .../LuceneQueryFactoryImplJUnitTest.java        | 18 +++++++++++
 .../internal/LuceneQueryImplJUnitTest.java      | 19 ++++++++++++
 .../LuceneQueryResultsImplJUnitTest.java        | 19 ++++++++++++
 .../LuceneResultStructImpJUnitTest.java         | 19 ++++++++++++
 .../internal/LuceneServiceImplJUnitTest.java    | 19 ++++++++++++
 .../PartitionedRepositoryManagerJUnitTest.java  | 19 ++++++++++++
 .../internal/StringQueryProviderJUnitTest.java  | 19 ++++++++++++
 .../directory/RegionDirectoryJUnitTest.java     | 19 ++++++++++++
 .../DistributedScoringJUnitTest.java            | 19 ++++++++++++
 .../distributed/EntryScoreJUnitTest.java        | 19 ++++++++++++
 .../LuceneFunctionContextJUnitTest.java         | 19 ++++++++++++
 .../distributed/LuceneFunctionJUnitTest.java    | 19 ++++++++++++
 .../LuceneFunctionReadPathDUnitTest.java        | 19 ++++++++++++
 .../TopEntriesCollectorJUnitTest.java           | 19 ++++++++++++
 .../TopEntriesFunctionCollectorJUnitTest.java   | 19 ++++++++++++
 .../distributed/TopEntriesJUnitTest.java        | 19 ++++++++++++
 .../internal/filesystem/ChunkKeyJUnitTest.java  | 19 ++++++++++++
 .../internal/filesystem/FileJUnitTest.java      | 19 ++++++++++++
 .../filesystem/FileSystemJUnitTest.java         | 19 ++++++++++++
 ...IndexRepositoryImplJUnitPerformanceTest.java | 23 +++++++++++---
 .../IndexRepositoryImplJUnitTest.java           | 19 ++++++++++++
 .../HeterogenousLuceneSerializerJUnitTest.java  | 19 ++++++++++++
 .../serializer/PdxFieldMapperJUnitTest.java     | 19 ++++++++++++
 .../ReflectionFieldMapperJUnitTest.java         | 19 ++++++++++++
 .../internal/repository/serializer/Type1.java   | 19 ++++++++++++
 .../internal/repository/serializer/Type2.java   | 19 ++++++++++++
 ...neIndexXmlGeneratorIntegrationJUnitTest.java | 19 ++++++++++++
 .../xml/LuceneIndexXmlGeneratorJUnitTest.java   | 19 ++++++++++++
 ...uceneIndexXmlParserIntegrationJUnitTest.java | 19 ++++++++++++
 .../xml/LuceneIndexXmlParserJUnitTest.java      | 19 ++++++++++++
 78 files changed, 1481 insertions(+), 25 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/300397c1/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/LuceneQueryProvider.java
----------------------------------------------------------------------
diff --git a/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/LuceneQueryProvider.java b/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/LuceneQueryProvider.java
index 82f486c..8e3500e 100644
--- a/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/LuceneQueryProvider.java
+++ b/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/LuceneQueryProvider.java
@@ -1,3 +1,22 @@
+/*
+ * 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 com.gemstone.gemfire.cache.lucene;
 
 import java.io.Serializable;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/300397c1/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/LuceneQueryResults.java
----------------------------------------------------------------------
diff --git a/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/LuceneQueryResults.java b/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/LuceneQueryResults.java
index cdc8b10..68d4ec2 100644
--- a/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/LuceneQueryResults.java
+++ b/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/LuceneQueryResults.java
@@ -1,3 +1,22 @@
+/*
+ * 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 com.gemstone.gemfire.cache.lucene;
 
 import java.util.List;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/300397c1/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/LuceneServiceProvider.java
----------------------------------------------------------------------
diff --git a/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/LuceneServiceProvider.java b/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/LuceneServiceProvider.java
index 72ec554..bbd2b83 100644
--- a/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/LuceneServiceProvider.java
+++ b/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/LuceneServiceProvider.java
@@ -1,3 +1,22 @@
+/*
+ * 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 com.gemstone.gemfire.cache.lucene;
 
 import com.gemstone.gemfire.annotations.Experimental;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/300397c1/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/InternalLuceneIndex.java
----------------------------------------------------------------------
diff --git a/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/InternalLuceneIndex.java b/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/InternalLuceneIndex.java
index ab2c924..951b0f9 100644
--- a/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/InternalLuceneIndex.java
+++ b/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/InternalLuceneIndex.java
@@ -1,3 +1,22 @@
+/*
+ * 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 com.gemstone.gemfire.cache.lucene.internal;
 
 import com.gemstone.gemfire.cache.lucene.LuceneIndex;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/300397c1/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/InternalLuceneService.java
----------------------------------------------------------------------
diff --git a/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/InternalLuceneService.java b/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/InternalLuceneService.java
index cd78c2c..403853e 100644
--- a/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/InternalLuceneService.java
+++ b/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/InternalLuceneService.java
@@ -1,3 +1,22 @@
+/*
+ * 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 com.gemstone.gemfire.cache.lucene.internal;
 
 import com.gemstone.gemfire.cache.Cache;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/300397c1/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/LuceneEventListener.java
----------------------------------------------------------------------
diff --git a/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/LuceneEventListener.java b/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/LuceneEventListener.java
index 049fb64..9fdfd43 100644
--- a/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/LuceneEventListener.java
+++ b/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/LuceneEventListener.java
@@ -1,3 +1,22 @@
+/*
+ * 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 com.gemstone.gemfire.cache.lucene.internal;
 
 import java.io.IOException;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/300397c1/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/LuceneIndexForPartitionedRegion.java
----------------------------------------------------------------------
diff --git a/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/LuceneIndexForPartitionedRegion.java b/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/LuceneIndexForPartitionedRegion.java
index 0e5b424..7002567 100644
--- a/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/LuceneIndexForPartitionedRegion.java
+++ b/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/LuceneIndexForPartitionedRegion.java
@@ -1,3 +1,22 @@
+/*
+ * 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 com.gemstone.gemfire.cache.lucene.internal;
 
 import com.gemstone.gemfire.cache.Cache;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/300397c1/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/LuceneIndexForReplicatedRegion.java
----------------------------------------------------------------------
diff --git a/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/LuceneIndexForReplicatedRegion.java b/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/LuceneIndexForReplicatedRegion.java
index 7288399..7c585cf 100644
--- a/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/LuceneIndexForReplicatedRegion.java
+++ b/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/LuceneIndexForReplicatedRegion.java
@@ -1,3 +1,22 @@
+/*
+ * 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 com.gemstone.gemfire.cache.lucene.internal;
 
 import java.util.Map;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/300397c1/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/LuceneIndexImpl.java
----------------------------------------------------------------------
diff --git a/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/LuceneIndexImpl.java b/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/LuceneIndexImpl.java
index c8d4bb6..f869755 100644
--- a/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/LuceneIndexImpl.java
+++ b/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/LuceneIndexImpl.java
@@ -1,6 +1,24 @@
+/*
+ * 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 com.gemstone.gemfire.cache.lucene.internal;
 
-import java.util.HashSet;
 import java.util.Map;
 
 import org.apache.logging.log4j.Logger;
@@ -16,10 +34,6 @@ import com.gemstone.gemfire.internal.cache.PartitionedRegion;
 import com.gemstone.gemfire.internal.logging.LogService;
 
 public abstract class LuceneIndexImpl implements InternalLuceneIndex {
-
-  static private final boolean CREATE_CACHE = Boolean.getBoolean("lucene.createCache");
-  static private final boolean USE_FS = Boolean.getBoolean("lucene.useFileSystem");
-  
   protected static final Logger logger = LogService.getLogger();
   
 //  protected HashSet<String> searchableFieldNames = new HashSet<String>();

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/300397c1/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/LuceneQueryFactoryImpl.java
----------------------------------------------------------------------
diff --git a/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/LuceneQueryFactoryImpl.java b/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/LuceneQueryFactoryImpl.java
index b377949..c6087ea 100644
--- a/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/LuceneQueryFactoryImpl.java
+++ b/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/LuceneQueryFactoryImpl.java
@@ -1,3 +1,22 @@
+/*
+ * 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 com.gemstone.gemfire.cache.lucene.internal;
 
 import com.gemstone.gemfire.cache.Cache;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/300397c1/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/LuceneQueryImpl.java
----------------------------------------------------------------------
diff --git a/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/LuceneQueryImpl.java b/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/LuceneQueryImpl.java
index 222acdc..a876b40 100644
--- a/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/LuceneQueryImpl.java
+++ b/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/LuceneQueryImpl.java
@@ -1,3 +1,22 @@
+/*
+ * 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 com.gemstone.gemfire.cache.lucene.internal;
 
 import com.gemstone.gemfire.cache.Region;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/300397c1/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/LuceneQueryResultsImpl.java
----------------------------------------------------------------------
diff --git a/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/LuceneQueryResultsImpl.java b/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/LuceneQueryResultsImpl.java
index d77dbc5..f0e98c8 100644
--- a/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/LuceneQueryResultsImpl.java
+++ b/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/LuceneQueryResultsImpl.java
@@ -1,3 +1,22 @@
+/*
+ * 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 com.gemstone.gemfire.cache.lucene.internal;
 
 import java.util.ArrayList;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/300397c1/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/LuceneResultStructImpl.java
----------------------------------------------------------------------
diff --git a/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/LuceneResultStructImpl.java b/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/LuceneResultStructImpl.java
index 35cf086..a3794f2 100644
--- a/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/LuceneResultStructImpl.java
+++ b/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/LuceneResultStructImpl.java
@@ -1,3 +1,22 @@
+/*
+ * 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 com.gemstone.gemfire.cache.lucene.internal;
 
 import com.gemstone.gemfire.cache.lucene.LuceneResultStruct;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/300397c1/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/LuceneServiceImpl.java
----------------------------------------------------------------------
diff --git a/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/LuceneServiceImpl.java b/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/LuceneServiceImpl.java
index 5efe300..ab48b19 100644
--- a/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/LuceneServiceImpl.java
+++ b/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/LuceneServiceImpl.java
@@ -1,3 +1,22 @@
+/*
+ * 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 com.gemstone.gemfire.cache.lucene.internal;
 
 import java.util.Collection;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/300397c1/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/PartitionedRepositoryManager.java
----------------------------------------------------------------------
diff --git a/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/PartitionedRepositoryManager.java b/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/PartitionedRepositoryManager.java
index e276cff..07050e2 100644
--- a/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/PartitionedRepositoryManager.java
+++ b/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/PartitionedRepositoryManager.java
@@ -1,3 +1,22 @@
+/*
+ * 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 com.gemstone.gemfire.cache.lucene.internal;
 
 import java.io.IOException;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/300397c1/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/StringQueryProvider.java
----------------------------------------------------------------------
diff --git a/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/StringQueryProvider.java b/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/StringQueryProvider.java
index 7e50bae..1e2b63d 100644
--- a/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/StringQueryProvider.java
+++ b/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/StringQueryProvider.java
@@ -1,3 +1,22 @@
+/*
+ * 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 com.gemstone.gemfire.cache.lucene.internal;
 
 import java.io.DataInput;
@@ -5,7 +24,6 @@ import java.io.DataOutput;
 import java.io.IOException;
 
 import org.apache.logging.log4j.Logger;
-import org.apache.lucene.analysis.core.SimpleAnalyzer;
 import org.apache.lucene.analysis.standard.StandardAnalyzer;
 import org.apache.lucene.queryparser.classic.MultiFieldQueryParser;
 import org.apache.lucene.queryparser.classic.ParseException;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/300397c1/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/directory/FileIndexInput.java
----------------------------------------------------------------------
diff --git a/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/directory/FileIndexInput.java b/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/directory/FileIndexInput.java
index 235cd3a..9ebef51 100644
--- a/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/directory/FileIndexInput.java
+++ b/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/directory/FileIndexInput.java
@@ -1,3 +1,22 @@
+/*
+ * 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 com.gemstone.gemfire.cache.lucene.internal.directory;
 
 import java.io.EOFException;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/300397c1/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/directory/RegionDirectory.java
----------------------------------------------------------------------
diff --git a/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/directory/RegionDirectory.java b/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/directory/RegionDirectory.java
index 38e7714..e25dc77 100644
--- a/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/directory/RegionDirectory.java
+++ b/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/directory/RegionDirectory.java
@@ -1,3 +1,22 @@
+/*
+ * 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 com.gemstone.gemfire.cache.lucene.internal.directory;
 
 import java.io.IOException;
@@ -5,27 +24,16 @@ import java.io.OutputStream;
 import java.util.Collection;
 import java.util.concurrent.ConcurrentMap;
 
-import org.apache.logging.log4j.Logger;
 import org.apache.lucene.store.BaseDirectory;
-import org.apache.lucene.store.BufferedIndexInput;
 import org.apache.lucene.store.IOContext;
 import org.apache.lucene.store.IndexInput;
 import org.apache.lucene.store.IndexOutput;
 import org.apache.lucene.store.OutputStreamIndexOutput;
 import org.apache.lucene.store.SingleInstanceLockFactory;
 
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.PartitionAttributesFactory;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.RegionShortcut;
 import com.gemstone.gemfire.cache.lucene.internal.filesystem.ChunkKey;
 import com.gemstone.gemfire.cache.lucene.internal.filesystem.File;
 import com.gemstone.gemfire.cache.lucene.internal.filesystem.FileSystem;
-import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
-import com.gemstone.gemfire.internal.logging.LogService;
 
 /**
  * An implementation of Directory that stores data in geode regions.
@@ -36,8 +44,6 @@ import com.gemstone.gemfire.internal.logging.LogService;
  */
 public class RegionDirectory extends BaseDirectory {
 
-  private static final Logger logger = LogService.getLogger();
-  
   private final FileSystem fs;
   
   /**

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/300397c1/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/distributed/CollectorManager.java
----------------------------------------------------------------------
diff --git a/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/distributed/CollectorManager.java b/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/distributed/CollectorManager.java
index 904a47e..45750d1 100644
--- a/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/distributed/CollectorManager.java
+++ b/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/distributed/CollectorManager.java
@@ -1,3 +1,22 @@
+/*
+ * 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 com.gemstone.gemfire.cache.lucene.internal.distributed;
 
 import java.io.IOException;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/300397c1/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/distributed/EntryScore.java
----------------------------------------------------------------------
diff --git a/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/distributed/EntryScore.java b/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/distributed/EntryScore.java
index 456b3ba..6690342 100644
--- a/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/distributed/EntryScore.java
+++ b/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/distributed/EntryScore.java
@@ -1,3 +1,22 @@
+/*
+ * 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 com.gemstone.gemfire.cache.lucene.internal.distributed;
 
 import java.io.DataInput;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/300397c1/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/distributed/LuceneFunction.java
----------------------------------------------------------------------
diff --git a/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/distributed/LuceneFunction.java b/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/distributed/LuceneFunction.java
index b8552fa..c3b79c5 100644
--- a/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/distributed/LuceneFunction.java
+++ b/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/distributed/LuceneFunction.java
@@ -1,3 +1,22 @@
+/*
+ * 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 com.gemstone.gemfire.cache.lucene.internal.distributed;
 
 import java.io.IOException;
@@ -12,7 +31,6 @@ import com.gemstone.gemfire.cache.execute.FunctionAdapter;
 import com.gemstone.gemfire.cache.execute.FunctionContext;
 import com.gemstone.gemfire.cache.execute.RegionFunctionContext;
 import com.gemstone.gemfire.cache.execute.ResultSender;
-import com.gemstone.gemfire.cache.lucene.LuceneQueryFactory;
 import com.gemstone.gemfire.cache.lucene.LuceneQueryProvider;
 import com.gemstone.gemfire.cache.lucene.LuceneService;
 import com.gemstone.gemfire.cache.lucene.LuceneServiceProvider;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/300397c1/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/distributed/LuceneFunctionContext.java
----------------------------------------------------------------------
diff --git a/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/distributed/LuceneFunctionContext.java b/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/distributed/LuceneFunctionContext.java
index d36bcc2..b0b2c60 100644
--- a/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/distributed/LuceneFunctionContext.java
+++ b/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/distributed/LuceneFunctionContext.java
@@ -1,3 +1,22 @@
+/*
+ * 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 com.gemstone.gemfire.cache.lucene.internal.distributed;
 
 import java.io.DataInput;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/300397c1/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/distributed/TopEntries.java
----------------------------------------------------------------------
diff --git a/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/distributed/TopEntries.java b/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/distributed/TopEntries.java
index 3417615..5813d75 100644
--- a/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/distributed/TopEntries.java
+++ b/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/distributed/TopEntries.java
@@ -1,3 +1,22 @@
+/*
+ * 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 com.gemstone.gemfire.cache.lucene.internal.distributed;
 
 import java.io.DataInput;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/300397c1/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/distributed/TopEntriesCollector.java
----------------------------------------------------------------------
diff --git a/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/distributed/TopEntriesCollector.java b/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/distributed/TopEntriesCollector.java
index 37797d9..94b8a3a 100644
--- a/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/distributed/TopEntriesCollector.java
+++ b/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/distributed/TopEntriesCollector.java
@@ -1,3 +1,22 @@
+/*
+ * 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 com.gemstone.gemfire.cache.lucene.internal.distributed;
 
 import java.io.DataInput;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/300397c1/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/distributed/TopEntriesCollectorManager.java
----------------------------------------------------------------------
diff --git a/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/distributed/TopEntriesCollectorManager.java b/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/distributed/TopEntriesCollectorManager.java
index 417d80f..b19e104 100644
--- a/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/distributed/TopEntriesCollectorManager.java
+++ b/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/distributed/TopEntriesCollectorManager.java
@@ -1,3 +1,22 @@
+/*
+ * 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 com.gemstone.gemfire.cache.lucene.internal.distributed;
 
 import java.io.DataInput;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/300397c1/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/distributed/TopEntriesFunctionCollector.java
----------------------------------------------------------------------
diff --git a/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/distributed/TopEntriesFunctionCollector.java b/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/distributed/TopEntriesFunctionCollector.java
index 96ec296..2e8f2dc 100644
--- a/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/distributed/TopEntriesFunctionCollector.java
+++ b/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/distributed/TopEntriesFunctionCollector.java
@@ -1,3 +1,22 @@
+/*
+ * 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 com.gemstone.gemfire.cache.lucene.internal.distributed;
 
 import java.io.IOException;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/300397c1/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/filesystem/ChunkKey.java
----------------------------------------------------------------------
diff --git a/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/filesystem/ChunkKey.java b/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/filesystem/ChunkKey.java
index d13f3f5..8fbe356 100644
--- a/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/filesystem/ChunkKey.java
+++ b/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/filesystem/ChunkKey.java
@@ -1,3 +1,22 @@
+/*
+ * 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 com.gemstone.gemfire.cache.lucene.internal.filesystem;
 
 import java.io.DataInput;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/300397c1/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/filesystem/File.java
----------------------------------------------------------------------
diff --git a/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/filesystem/File.java b/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/filesystem/File.java
index 1ad0808..2937af5 100644
--- a/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/filesystem/File.java
+++ b/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/filesystem/File.java
@@ -1,3 +1,22 @@
+/*
+ * 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 com.gemstone.gemfire.cache.lucene.internal.filesystem;
 
 import java.io.DataInput;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/300397c1/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/filesystem/FileInputStream.java
----------------------------------------------------------------------
diff --git a/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/filesystem/FileInputStream.java b/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/filesystem/FileInputStream.java
index bcb0821..18194aa 100644
--- a/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/filesystem/FileInputStream.java
+++ b/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/filesystem/FileInputStream.java
@@ -1,8 +1,26 @@
+/*
+ * 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 com.gemstone.gemfire.cache.lucene.internal.filesystem;
 
 import java.io.EOFException;
 import java.io.IOException;
-import java.io.InputStream;
 
 /**
  * An input stream that reads chunks from

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/300397c1/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/filesystem/FileOutputStream.java
----------------------------------------------------------------------
diff --git a/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/filesystem/FileOutputStream.java b/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/filesystem/FileOutputStream.java
index ea80d78..3f9f614 100644
--- a/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/filesystem/FileOutputStream.java
+++ b/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/filesystem/FileOutputStream.java
@@ -1,3 +1,22 @@
+/*
+ * 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 com.gemstone.gemfire.cache.lucene.internal.filesystem;
 
 import java.io.IOException;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/300397c1/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/filesystem/FileSystem.java
----------------------------------------------------------------------
diff --git a/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/filesystem/FileSystem.java b/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/filesystem/FileSystem.java
index 5e29437..b84dc92 100644
--- a/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/filesystem/FileSystem.java
+++ b/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/filesystem/FileSystem.java
@@ -1,3 +1,22 @@
+/*
+ * 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 com.gemstone.gemfire.cache.lucene.internal.filesystem;
 
 import java.io.FileNotFoundException;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/300397c1/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/filesystem/SeekableInputStream.java
----------------------------------------------------------------------
diff --git a/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/filesystem/SeekableInputStream.java b/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/filesystem/SeekableInputStream.java
index abf3268..e10e0c4 100644
--- a/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/filesystem/SeekableInputStream.java
+++ b/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/filesystem/SeekableInputStream.java
@@ -1,3 +1,22 @@
+/*
+ * 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 com.gemstone.gemfire.cache.lucene.internal.filesystem;
 
 import java.io.IOException;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/300397c1/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/repository/IndexRepository.java
----------------------------------------------------------------------
diff --git a/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/repository/IndexRepository.java b/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/repository/IndexRepository.java
index b852b82..f1e63e0 100644
--- a/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/repository/IndexRepository.java
+++ b/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/repository/IndexRepository.java
@@ -1,3 +1,22 @@
+/*
+ * 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 com.gemstone.gemfire.cache.lucene.internal.repository;
 
 import java.io.IOException;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/300397c1/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/repository/IndexRepositoryImpl.java
----------------------------------------------------------------------
diff --git a/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/repository/IndexRepositoryImpl.java b/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/repository/IndexRepositoryImpl.java
index fbbc5db..a9c463e 100644
--- a/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/repository/IndexRepositoryImpl.java
+++ b/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/repository/IndexRepositoryImpl.java
@@ -1,3 +1,22 @@
+/*
+ * 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 com.gemstone.gemfire.cache.lucene.internal.repository;
 
 import java.io.IOException;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/300397c1/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/repository/IndexResultCollector.java
----------------------------------------------------------------------
diff --git a/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/repository/IndexResultCollector.java b/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/repository/IndexResultCollector.java
index fa867e1..7fd9e2a 100644
--- a/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/repository/IndexResultCollector.java
+++ b/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/repository/IndexResultCollector.java
@@ -1,3 +1,22 @@
+/*
+ * 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 com.gemstone.gemfire.cache.lucene.internal.repository;
 
 import com.gemstone.gemfire.annotations.Experimental;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/300397c1/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/repository/RepositoryManager.java
----------------------------------------------------------------------
diff --git a/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/repository/RepositoryManager.java b/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/repository/RepositoryManager.java
index cea4f89..20c2d51 100644
--- a/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/repository/RepositoryManager.java
+++ b/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/repository/RepositoryManager.java
@@ -1,3 +1,22 @@
+/*
+ * 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 com.gemstone.gemfire.cache.lucene.internal.repository;
 
 import java.util.Collection;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/300397c1/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/repository/serializer/HeterogenousLuceneSerializer.java
----------------------------------------------------------------------
diff --git a/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/repository/serializer/HeterogenousLuceneSerializer.java b/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/repository/serializer/HeterogenousLuceneSerializer.java
index 798f34e..7cb25bb 100644
--- a/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/repository/serializer/HeterogenousLuceneSerializer.java
+++ b/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/repository/serializer/HeterogenousLuceneSerializer.java
@@ -1,3 +1,22 @@
+/*
+ * 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 com.gemstone.gemfire.cache.lucene.internal.repository.serializer;
 
 import java.util.Map;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/300397c1/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/repository/serializer/LuceneSerializer.java
----------------------------------------------------------------------
diff --git a/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/repository/serializer/LuceneSerializer.java b/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/repository/serializer/LuceneSerializer.java
index a06617a..421dc0b 100644
--- a/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/repository/serializer/LuceneSerializer.java
+++ b/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/repository/serializer/LuceneSerializer.java
@@ -1,3 +1,22 @@
+/*
+ * 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 com.gemstone.gemfire.cache.lucene.internal.repository.serializer;
 
 import org.apache.lucene.document.Document;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/300397c1/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/repository/serializer/PdxLuceneSerializer.java
----------------------------------------------------------------------
diff --git a/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/repository/serializer/PdxLuceneSerializer.java b/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/repository/serializer/PdxLuceneSerializer.java
index 338edb2..c5c55a9 100644
--- a/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/repository/serializer/PdxLuceneSerializer.java
+++ b/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/repository/serializer/PdxLuceneSerializer.java
@@ -1,3 +1,22 @@
+/*
+ * 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 com.gemstone.gemfire.cache.lucene.internal.repository.serializer;
 
 import org.apache.lucene.document.Document;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/300397c1/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/repository/serializer/ReflectionLuceneSerializer.java
----------------------------------------------------------------------
diff --git a/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/repository/serializer/ReflectionLuceneSerializer.java b/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/repository/serializer/ReflectionLuceneSerializer.java
index 0b54fdd..953f31f 100644
--- a/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/repository/serializer/ReflectionLuceneSerializer.java
+++ b/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/repository/serializer/ReflectionLuceneSerializer.java
@@ -1,3 +1,22 @@
+/*
+ * 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 com.gemstone.gemfire.cache.lucene.internal.repository.serializer;
 
 import java.lang.reflect.Field;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/300397c1/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/repository/serializer/SerializerUtil.java
----------------------------------------------------------------------
diff --git a/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/repository/serializer/SerializerUtil.java b/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/repository/serializer/SerializerUtil.java
index 30224b4..7ffc5db 100644
--- a/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/repository/serializer/SerializerUtil.java
+++ b/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/repository/serializer/SerializerUtil.java
@@ -1,3 +1,22 @@
+/*
+ * 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 com.gemstone.gemfire.cache.lucene.internal.repository.serializer;
 
 import java.io.ByteArrayOutputStream;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/300397c1/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/xml/LuceneIndexCreation.java
----------------------------------------------------------------------
diff --git a/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/xml/LuceneIndexCreation.java b/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/xml/LuceneIndexCreation.java
index b2f2645..e664895 100644
--- a/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/xml/LuceneIndexCreation.java
+++ b/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/xml/LuceneIndexCreation.java
@@ -1,3 +1,22 @@
+/*
+ * 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 com.gemstone.gemfire.cache.lucene.internal.xml;
 
 import java.util.Arrays;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/300397c1/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/xml/LuceneIndexXmlGenerator.java
----------------------------------------------------------------------
diff --git a/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/xml/LuceneIndexXmlGenerator.java b/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/xml/LuceneIndexXmlGenerator.java
index dcfbec6..6399a80 100644
--- a/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/xml/LuceneIndexXmlGenerator.java
+++ b/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/xml/LuceneIndexXmlGenerator.java
@@ -1,3 +1,22 @@
+/*
+ * 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 com.gemstone.gemfire.cache.lucene.internal.xml;
 
 import static com.gemstone.gemfire.cache.lucene.internal.xml.LuceneXmlConstants.*;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/300397c1/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/xml/LuceneServiceXmlGenerator.java
----------------------------------------------------------------------
diff --git a/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/xml/LuceneServiceXmlGenerator.java b/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/xml/LuceneServiceXmlGenerator.java
index 6c0da01..c449f47 100644
--- a/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/xml/LuceneServiceXmlGenerator.java
+++ b/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/xml/LuceneServiceXmlGenerator.java
@@ -1,3 +1,22 @@
+/*
+ * 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 com.gemstone.gemfire.cache.lucene.internal.xml;
 
 import org.xml.sax.SAXException;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/300397c1/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/xml/LuceneXmlConstants.java
----------------------------------------------------------------------
diff --git a/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/xml/LuceneXmlConstants.java b/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/xml/LuceneXmlConstants.java
index 45c08b6..303424e 100644
--- a/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/xml/LuceneXmlConstants.java
+++ b/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/xml/LuceneXmlConstants.java
@@ -1,3 +1,22 @@
+/*
+ * 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 com.gemstone.gemfire.cache.lucene.internal.xml;
 
 public class LuceneXmlConstants {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/300397c1/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/xml/LuceneXmlParser.java
----------------------------------------------------------------------
diff --git a/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/xml/LuceneXmlParser.java b/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/xml/LuceneXmlParser.java
index 25aac41..764f461 100644
--- a/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/xml/LuceneXmlParser.java
+++ b/gemfire-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/xml/LuceneXmlParser.java
@@ -1,3 +1,22 @@
+/*
+ * 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 com.gemstone.gemfire.cache.lucene.internal.xml;
 
 import static com.gemstone.gemfire.cache.lucene.internal.xml.LuceneXmlConstants.*;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/300397c1/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/LuceneEventListenerJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/LuceneEventListenerJUnitTest.java b/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/LuceneEventListenerJUnitTest.java
index 617020b..85a5333 100644
--- a/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/LuceneEventListenerJUnitTest.java
+++ b/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/LuceneEventListenerJUnitTest.java
@@ -1,3 +1,22 @@
+/*
+ * 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 com.gemstone.gemfire.cache.lucene.internal;
 
 import static org.mockito.Matchers.any;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/300397c1/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/LuceneIndexRecoveryHAJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/LuceneIndexRecoveryHAJUnitTest.java b/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/LuceneIndexRecoveryHAJUnitTest.java
index 3ee1345..405c986 100644
--- a/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/LuceneIndexRecoveryHAJUnitTest.java
+++ b/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/LuceneIndexRecoveryHAJUnitTest.java
@@ -1,3 +1,22 @@
+/*
+ * 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 com.gemstone.gemfire.cache.lucene.internal;
 
 import static org.junit.Assert.assertNotNull;



[49/50] [abbrv] incubator-geode git commit: Merge branch 'develop' into feature/GEODE-53

Posted by ma...@apache.org.
Merge branch 'develop' into feature/GEODE-53


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

Branch: refs/heads/feature/GEODE-53
Commit: 655699d8b958b3d693bebed2815f23ac1b668be5
Parents: d0b593c 25c8f0c
Author: William Markito <wm...@pivotal.io>
Authored: Mon Nov 23 12:46:03 2015 -0800
Committer: William Markito <wm...@pivotal.io>
Committed: Mon Nov 23 12:46:03 2015 -0800

----------------------------------------------------------------------
 build.gradle                                    |   22 +-
 gemfire-assembly/build.gradle                   |   13 +-
 gemfire-core/build.gradle                       |   66 +-
 .../com/gemstone/gemfire/DataSerializer.java    |    2 +-
 .../gemfire/admin/AdminDistributedSystem.java   |    5 -
 .../internal/AdminDistributedSystemImpl.java    |   24 +-
 .../internal/DistributedSystemConfigImpl.java   |    1 -
 .../gemfire/admin/internal/InetAddressUtil.java |    2 +-
 .../ManagedEntityConfigXmlGenerator.java        |   21 +-
 .../gemfire/admin/jmx/internal/AgentImpl.java   |    2 +-
 .../gemstone/gemfire/cache/GemFireCache.java    |    7 -
 .../internal/AsyncEventQueueFactoryImpl.java    |    9 +-
 .../internal/AsyncEventQueueImpl.java           |    3 +
 .../internal/ParallelAsyncEventQueueImpl.java   |    2 +-
 .../internal/SerialAsyncEventQueueImpl.java     |    2 +-
 .../client/internal/AuthenticateUserOp.java     |    2 +
 .../client/internal/EndpointManagerImpl.java    |    2 -
 .../gemfire/cache/client/internal/PingOp.java   |   16 -
 .../cache/client/internal/QueueManagerImpl.java |    2 +-
 .../internal/pooling/ConnectionManagerImpl.java |    4 +-
 .../cache/hdfs/internal/HDFSEventListener.java  |    4 +-
 .../gemfire/cache/lucene/LuceneIndex.java       |   59 -
 .../gemfire/cache/lucene/LuceneQuery.java       |   53 -
 .../cache/lucene/LuceneQueryFactory.java        |  137 -
 .../cache/lucene/LuceneQueryResults.java        |   45 -
 .../cache/lucene/LuceneResultStruct.java        |   75 -
 .../gemfire/cache/lucene/LuceneService.java     |  119 -
 .../cache/lucene/LuceneServiceFactory.java      |   30 -
 .../cache/lucene/LuceneServiceProvider.java     |   52 -
 .../cache/lucene/internal/LuceneIndexImpl.java  |   70 -
 .../lucene/internal/LuceneQueryFactoryImpl.java |  104 -
 .../cache/lucene/internal/LuceneQueryImpl.java  |   78 -
 .../lucene/internal/LuceneQueryResultsImpl.java |   82 -
 .../lucene/internal/LuceneResultStructImpl.java |   61 -
 .../internal/LuceneServiceFactoryImpl.java      |   32 -
 .../lucene/internal/LuceneServiceImpl.java      |  106 -
 .../cache/util/BoundedLinkedHashMap.java        |    3 -
 .../gemfire/distributed/DistributedSystem.java  |   39 +-
 .../gemstone/gemfire/distributed/Locator.java   |    5 +-
 .../gemfire/distributed/internal/DM.java        |    9 +-
 .../gemfire/distributed/internal/DMStats.java   |  123 +-
 .../internal/DistributionChannel.java           |    2 +
 .../internal/DistributionConfig.java            |    8 +-
 .../internal/DistributionConfigImpl.java        |   16 +-
 .../internal/DistributionManager.java           |  484 +-
 .../internal/DistributionManagerConfig.java     |  102 -
 .../internal/DistributionMessage.java           |   15 +-
 .../distributed/internal/DistributionStats.java |  333 +-
 .../internal/HighPriorityAckedMessage.java      |    4 +-
 .../internal/InternalDistributedSystem.java     |  152 +-
 .../distributed/internal/InternalLocator.java   |  151 +-
 .../internal/LonerDistributionManager.java      |  238 +-
 .../internal/PooledExecutorWithDMStats.java     |   12 +-
 .../distributed/internal/ReplyMessage.java      |    2 +-
 .../distributed/internal/ReplyProcessor21.java  |    5 +-
 .../distributed/internal/ShutdownMessage.java   |    2 +-
 .../distributed/internal/StartupMessage.java    |   15 +-
 .../distributed/internal/StartupOperation.java  |    5 -
 .../internal/StartupResponseMessage.java        |    2 +-
 .../internal/WaitForViewInstallation.java       |    4 +-
 .../internal/deadlock/DeadlockDetector.java     |  185 +-
 .../internal/deadlock/DependencyGraph.java      |  172 +-
 .../internal/deadlock/LocalThread.java          |    2 +-
 .../deadlock/MessageDependencyMonitor.java      |    4 +-
 .../internal/direct/DirectChannel.java          |   34 +-
 .../membership/InternalDistributedMember.java   |  316 +-
 .../internal/membership/MemberAttributes.java   |   20 +-
 .../internal/membership/MemberFactory.java      |   25 +-
 .../internal/membership/MemberServices.java     |   22 +-
 .../internal/membership/MembershipManager.java  |   27 +-
 .../internal/membership/NetMember.java          |   59 +-
 .../internal/membership/NetView.java            |  543 ++-
 .../internal/membership/QuorumChecker.java      |   12 +
 .../internal/membership/gms/GMSMember.java      |  460 ++
 .../membership/gms/GMSMemberFactory.java        |  143 +
 .../internal/membership/gms/GMSUtil.java        |  124 +
 .../internal/membership/gms/NetLocator.java     |   16 +
 .../internal/membership/gms/ServiceConfig.java  |  158 +
 .../internal/membership/gms/Services.java       |  371 ++
 .../internal/membership/gms/SuspectMember.java  |   53 +
 .../membership/gms/auth/GMSAuthenticator.java   |  219 +
 .../membership/gms/fd/GMSHealthMonitor.java     | 1375 ++++++
 .../gms/interfaces/Authenticator.java           |   11 +
 .../gms/interfaces/HealthMonitor.java           |   49 +
 .../membership/gms/interfaces/JoinLeave.java    |   51 +
 .../membership/gms/interfaces/Locator.java      |   16 +
 .../membership/gms/interfaces/Manager.java      |  105 +
 .../gms/interfaces/MessageHandler.java          |   14 +
 .../membership/gms/interfaces/Messenger.java    |   43 +
 .../membership/gms/interfaces/Service.java      |   66 +
 .../gms/locator/FindCoordinatorRequest.java     |   99 +
 .../gms/locator/FindCoordinatorResponse.java    |  146 +
 .../membership/gms/locator/GMSLocator.java      |  357 ++
 .../membership/gms/locator/GetViewRequest.java  |   33 +
 .../membership/gms/locator/GetViewResponse.java |   48 +
 .../gms/locator/PeerLocatorRequest.java         |    9 +
 .../membership/gms/membership/GMSJoinLeave.java | 2141 +++++++++
 .../membership/gms/messages/HasMemberID.java    |    9 +
 .../gms/messages/HeartbeatMessage.java          |   58 +
 .../gms/messages/HeartbeatRequestMessage.java   |   64 +
 .../gms/messages/InstallViewMessage.java        |   90 +
 .../gms/messages/JoinRequestMessage.java        |   81 +
 .../gms/messages/JoinResponseMessage.java       |  113 +
 .../gms/messages/LeaveRequestMessage.java       |   78 +
 .../gms/messages/NetworkPartitionMessage.java   |   28 +
 .../gms/messages/RemoveMemberMessage.java       |   80 +
 .../gms/messages/SuspectMembersMessage.java     |   75 +
 .../membership/gms/messages/SuspectRequest.java |   56 +
 .../membership/gms/messages/ViewAckMessage.java |   87 +
 .../gms/messenger/AddressManager.java           |  114 +
 .../membership/gms/messenger/GMSPingPonger.java |   41 +
 .../gms/messenger/GMSQuorumChecker.java         |  258 +
 .../membership/gms/messenger/JGAddress.java     |  214 +
 .../gms/messenger/JGroupsMessenger.java         | 1075 +++++
 .../membership/gms/messenger/StatRecorder.java  |  146 +
 .../membership/gms/messenger/Transport.java     |  126 +
 .../gms/mgr/GMSMembershipManager.java           | 3018 ++++++++++++
 .../membership/gms/mgr/LocalViewMessage.java    |   85 +
 .../internal/membership/gms/package.html        |   41 +
 .../membership/jgroup/GFJGBasicAdapter.java     |  618 ---
 .../membership/jgroup/GFJGPeerAdapter.java      |  500 --
 .../membership/jgroup/JGroupMember.java         |  260 -
 .../membership/jgroup/JGroupMemberFactory.java  |  128 -
 .../jgroup/JGroupMembershipManager.java         | 4241 ----------------
 .../internal/membership/jgroup/LocatorImpl.java |  490 --
 .../membership/jgroup/QuorumCheckerImpl.java    |  300 --
 .../internal/membership/jgroup/ViewMessage.java |   82 -
 .../internal/membership/jgroup/package.html     |   43 -
 .../internal/tcpserver/TcpClient.java           |   60 +-
 .../internal/tcpserver/TcpServer.java           |  105 +-
 .../gemstone/gemfire/i18n/LogWriterI18n.java    |    8 +-
 .../com/gemstone/gemfire/i18n/StringId.java     |  161 +
 .../com/gemstone/gemfire/i18n/StringIdImpl.java |  162 -
 .../gemfire/internal/AvailablePort.java         |   73 +-
 .../gemfire/internal/ConnectionWatcher.java     |   41 +
 .../gemstone/gemfire/internal/DSFIDFactory.java |   38 +-
 .../internal/DataSerializableFixedID.java       |   43 +-
 .../internal/InternalDataSerializer.java        |  140 +-
 .../gemfire/internal/InternalInstantiator.java  |    2 +-
 .../gemfire/internal/SocketCreator.java         |    3 +-
 .../gemstone/gemfire/internal/SystemAdmin.java  |   15 +-
 .../com/gemstone/gemfire/internal/Version.java  |   19 +-
 .../internal/admin/remote/AdminResponse.java    |    2 +-
 .../admin/remote/AlertLevelChangeMessage.java   |    5 +-
 .../admin/remote/AlertListenerMessage.java      |    2 +-
 .../admin/remote/FetchStatsResponse.java        |    2 +-
 .../admin/remote/FetchSysCfgRequest.java        |    2 +-
 .../admin/remote/HealthListenerMessage.java     |    2 +-
 .../admin/remote/RemoteGfManagerAgent.java      |   37 +-
 .../admin/remote/RemoteTransportConfig.java     |  127 +-
 .../admin/remote/ShutdownAllRequest.java        |    6 +-
 .../admin/remote/ShutdownAllResponse.java       |    2 +-
 .../admin/remote/SnapshotResultMessage.java     |    2 +-
 .../admin/remote/StatListenerMessage.java       |    2 +-
 .../gemfire/internal/cache/BucketRegion.java    |    2 +-
 .../gemfire/internal/cache/CacheService.java    |   26 +
 .../internal/cache/CloseCacheMessage.java       |    2 +-
 .../internal/cache/CreateRegionProcessor.java   |    6 +-
 .../gemfire/internal/cache/DiskStoreImpl.java   |    6 +-
 .../cache/DistributedCacheOperation.java        |    6 +-
 .../internal/cache/DistributedRegion.java       |    2 +-
 .../gemfire/internal/cache/EntryEventImpl.java  |    1 -
 .../internal/cache/FindRemoteTXMessage.java     |    2 +-
 .../internal/cache/GemFireCacheImpl.java        |   79 +-
 .../internal/cache/InitialImageFlowControl.java |    2 +-
 .../gemfire/internal/cache/InternalCache.java   |    5 +-
 .../internal/cache/LoaderHelperImpl.java        |    2 +-
 .../gemfire/internal/cache/LocalRegion.java     |   17 +-
 .../cache/MemberFunctionStreamingMessage.java   |    9 +-
 .../internal/cache/PRHARedundancyProvider.java  |    2 +-
 .../internal/cache/PartitionedRegion.java       |    2 +-
 .../cache/PartitionedRegionDataStore.java       |    4 +-
 .../gemfire/internal/cache/RegionListener.java  |   30 +
 .../internal/cache/StateFlushOperation.java     |    5 +-
 .../gemfire/internal/cache/TXState.java         |    2 +-
 .../cache/UpdateAttributesProcessor.java        |    2 +-
 .../cache/control/InternalResourceManager.java  |    2 +-
 .../cache/control/OffHeapMemoryMonitor.java     |  154 +-
 .../internal/cache/doc-files/properties.html    |   22 -
 .../cache/execute/ServerFunctionExecutor.java   |   18 -
 .../execute/TransactionFunctionService.java     |  193 -
 .../cache/execute/util/CommitFunction.java      |    1 -
 .../cache/execute/util/RollbackFunction.java    |    1 -
 .../cache/extension/SimpleExtensionPoint.java   |    2 +-
 .../internal/cache/ha/HARegionQueue.java        |    2 +-
 .../partitioned/BucketProfileUpdateMessage.java |    2 +-
 .../cache/partitioned/FetchEntriesMessage.java  |   11 +-
 .../cache/partitioned/PRTombstoneMessage.java   |    3 +-
 .../persistence/soplog/AbstractCompactor.java   |  533 ---
 .../soplog/AbstractKeyValueIterator.java        |   76 -
 .../soplog/AbstractSortedReader.java            |  135 -
 .../soplog/ArraySerializedComparator.java       |  144 -
 .../cache/persistence/soplog/Compactor.java     |  174 -
 .../soplog/CompositeSerializedComparator.java   |   57 -
 .../soplog/IndexSerializedComparator.java       |  127 -
 .../cache/persistence/soplog/LevelTracker.java  |  120 -
 .../soplog/LexicographicalComparator.java       |  460 --
 .../cache/persistence/soplog/NonCompactor.java  |  110 -
 .../soplog/ReversingSerializedComparator.java   |   67 -
 .../persistence/soplog/SizeTieredCompactor.java |  198 -
 .../cache/persistence/soplog/SoplogToken.java   |  116 -
 .../cache/persistence/soplog/SortedBuffer.java  |  367 --
 .../cache/persistence/soplog/SortedOplog.java   |  158 -
 .../persistence/soplog/SortedOplogFactory.java  |  278 --
 .../persistence/soplog/SortedOplogSet.java      |  118 -
 .../persistence/soplog/SortedOplogSetImpl.java  |  780 ---
 .../soplog/hfile/BlockCacheHolder.java          |   39 -
 .../soplog/hfile/HFileSortedOplog.java          |  694 ---
 .../soplog/hfile/HFileSortedOplogFactory.java   |   80 -
 .../soplog/nofile/NoFileSortedOplog.java        |  244 -
 .../soplog/nofile/NoFileSortedOplogFactory.java |   41 -
 .../cache/tier/sockets/BaseCommand.java         |    1 +
 .../cache/tier/sockets/CacheClientNotifier.java |    8 +-
 .../cache/tier/sockets/CacheClientProxy.java    |    2 +-
 .../tier/sockets/ClientProxyMembershipID.java   |    6 +-
 .../internal/cache/tier/sockets/HandShake.java  |   18 +-
 .../internal/cache/tier/sockets/Message.java    |   23 +-
 .../cache/tier/sockets/ServerConnection.java    |    2 +-
 .../sockets/command/GatewayReceiverCommand.java |    2 +-
 .../cache/tier/sockets/command/Get70.java       |    2 +-
 .../cache/tier/sockets/command/Ping.java        |   15 +-
 .../cache/tier/sockets/command/Put.java         |    2 +-
 .../tier/sockets/command/RegisterInterest.java  |    2 +-
 .../sockets/command/RegisterInterest61.java     |    2 +-
 .../sockets/command/RegisterInterestList.java   |    2 +-
 .../sockets/command/RegisterInterestList61.java |    2 +-
 .../sockets/command/RegisterInterestList66.java |    2 +-
 .../cache/tier/sockets/command/Request.java     |    2 +-
 .../sockets/command/UnregisterInterest.java     |    2 +-
 .../sockets/command/UnregisterInterestList.java |    2 +-
 .../cache/wan/AbstractGatewaySender.java        |   30 +-
 .../cache/wan/GatewaySenderAttributes.java      |    5 +
 .../GatewaySenderEventCallbackDispatcher.java   |    2 +-
 ...rentParallelGatewaySenderEventProcessor.java |    2 +-
 .../ParallelGatewaySenderEventProcessor.java    |    2 +-
 .../parallel/ParallelGatewaySenderQueue.java    |   63 +-
 .../SerialGatewaySenderEventProcessor.java      |    4 +-
 .../internal/cache/xmlcache/CacheCreation.java  |   14 +-
 .../cache/xmlcache/DefaultEntityResolver2.java  |    2 +-
 .../cache/xmlcache/GeodeEntityResolver.java     |   49 +
 .../cache/xmlcache/PivotalEntityResolver.java   |    2 +-
 .../datasource/GemFireBasicDataSource.java      |    2 +-
 .../datasource/GemFireConnPooledDataSource.java |    2 +-
 .../i18n/AbstractStringIdResourceBundle.java    |    5 +-
 .../gemfire/internal/i18n/LocalizedStrings.java | 3985 +++++++--------
 .../internal/i18n/ParentLocalizedStrings.java   | 4517 +++++++++---------
 .../gemfire/internal/i18n/StringId.java         |   58 +
 .../internal/logging/DebugLogWriter.java        |    4 +-
 .../internal/logging/InternalLogWriter.java     |    5 +-
 .../gemfire/internal/logging/LogFileParser.java |    8 +
 .../gemfire/internal/logging/LogWriterImpl.java |    2 +-
 .../internal/logging/LoggingThreadGroup.java    |    2 +-
 .../gemfire/internal/logging/PureLogWriter.java |    2 +-
 .../logging/SecurityLocalLogWriter.java         |    2 +-
 .../internal/logging/SecurityLogWriter.java     |    2 +-
 .../logging/SecurityManagerLogWriter.java       |    2 +-
 .../internal/logging/log4j/AlertAppender.java   |   15 +-
 .../logging/log4j/LocalizedMessage.java         |    3 +-
 .../internal/logging/log4j/LogWriterLogger.java |    2 +-
 .../gemfire/internal/offheap/OffHeapHelper.java |    4 +-
 .../internal/offheap/OffHeapReference.java      |   72 -
 .../offheap/SimpleMemoryAllocatorImpl.java      |   28 +-
 .../gemfire/internal/offheap/StoredObject.java  |   42 +-
 .../gemfire/internal/process/StartupStatus.java |    2 +-
 .../gemfire/internal/redis/RegionProvider.java  |    2 +-
 .../gemfire/internal/tcp/Connection.java        |   53 +-
 .../gemfire/internal/tcp/ConnectionTable.java   |   10 +-
 .../gemfire/internal/tcp/TCPConduit.java        |    4 +-
 .../gemfire/internal/util/Breadcrumbs.java      |    2 +-
 .../gemfire/internal/util/PluckStacks.java      |   74 +-
 .../util/concurrent/CopyOnWriteHashMap.java     |   46 +-
 .../util/concurrent/CopyOnWriteWeakHashMap.java |   12 +
 .../management/internal/JmxManagerAdvisor.java  |    2 +-
 .../internal/JmxManagerLocatorRequest.java      |   11 -
 .../management/internal/MBeanJMXAdapter.java    |    2 +-
 .../management/internal/ManagementStrings.java  |  113 +-
 .../internal/beans/MemberMBeanBridge.java       |    4 +-
 .../internal/cli/commands/ClientCommands.java   |   44 +-
 .../CreateAlterDestroyRegionCommands.java       |   13 +-
 .../cli/commands/DiskStoreCommands.java         |    7 +-
 .../cli/commands/MiscellaneousCommands.java     |   38 +-
 .../cli/functions/RegionCreateFunction.java     |    5 +
 .../cli/functions/RegionFunctionArgs.java       |   27 +-
 .../internal/cli/i18n/CliStrings.java           |   59 +-
 .../internal/cli/result/ResultBuilder.java      |    0
 .../services/org.xml.sax.ext.EntityResolver2    |    1 +
 .../distributed/internal/javagroups-config.txt  |  101 -
 .../distributed/internal/javagroups-mcast.txt   |   97 -
 .../membership/gms/messenger/jgroups-config.xml |   56 +
 .../membership/gms/messenger/jgroups-mcast.xml  |   82 +
 gemfire-core/src/main/resources/log4j2.xml      |    1 +
 .../BindDistributedSystemJUnitTest.java         |  156 +-
 .../gemfire/cache/Bug42039JUnitTest.java        |   23 +-
 .../cache/ClientServerTimeSyncDUnitTest.java    |    2 +-
 .../SerialAsyncEventQueueImplJUnitTest.java     |   46 +
 .../ClientServerRegisterInterestsDUnitTest.java |    5 +-
 .../internal/AutoConnectionSourceDUnitTest.java |    6 +-
 .../AutoConnectionSourceWithUDPDUnitTest.java   |  149 -
 .../management/MemoryThresholdsDUnitTest.java   |  117 +-
 .../MemoryThresholdsOffHeapDUnitTest.java       |   82 +-
 .../gemfire/cache/query/data/PortfolioPdx.java  |    3 +
 .../query/dunit/QueryUsingPoolDUnitTest.java    |   30 +-
 .../cache/query/dunit/RemoteQueryDUnitTest.java |   27 +-
 ...esourceManagerWithQueryMonitorDUnitTest.java |   37 +-
 .../functional/IndexCreationJUnitTest.java      |    2 -
 .../index/CopyOnReadIndexDUnitTest.java         |    9 +-
 .../index/MultiIndexCreationDUnitTest.java      |    7 +-
 .../index/PdxCopyOnReadQueryJUnitTest.java      |    1 +
 .../PutAllWithIndexPerfDUnitDisabledTest.java   |    3 +-
 .../gemstone/gemfire/cache30/CacheTestCase.java |   54 -
 .../cache30/ClientMembershipDUnitTest.java      |    2 +
 .../gemfire/cache30/ClientServerTestCase.java   |    4 +-
 ...ckOverflowRegionCCECompressionDUnitTest.java |   70 -
 ...PersistentRegionCCECompressionDUnitTest.java |   71 -
 .../DistributedAckRegionCCEDUnitTest.java       |    8 +-
 .../DistributedNoAckRegionCCEDUnitTest.java     |    5 -
 ...tributedNoAckRegionCompressionDUnitTest.java |   71 -
 .../cache30/GlobalRegionCCEDUnitTest.java       |    3 -
 .../GlobalRegionCompressionDUnitTest.java       |   70 -
 .../gemfire/cache30/MultiVMRegionTestCase.java  |  216 -
 .../PRBucketSynchronizationDUnitTest.java       |    5 +-
 .../gemfire/cache30/ReconnectDUnitTest.java     |  146 +-
 .../ReconnectedCacheServerDUnitTest.java        |   10 +-
 .../RegionMembershipListenerDUnitTest.java      |   21 +-
 .../gemfire/cache30/RegionTestCase.java         |   54 +-
 .../gemfire/cache30/TXDistributedDUnitTest.java |   98 +-
 .../AnalyzeSerializablesJUnitTest.java          |   29 -
 .../codeAnalysis/decode/CompiledClass.java      |    4 +-
 .../distributed/DistributedSystemDUnitTest.java |  118 +-
 .../gemfire/distributed/JGroupsJUnitTest.java   |  180 -
 .../gemfire/distributed/LocatorDUnitTest.java   |  539 +--
 .../gemfire/distributed/LocatorJUnitTest.java   |   96 +-
 .../ConsoleDistributionManagerDUnitTest.java    |    2 +-
 .../internal/DistributionManagerDUnitTest.java  |   95 +-
 ...istributionManagerTimeDUnitDisabledTest.java |  220 -
 .../GemFireTimeSyncServiceDUnitTest.java        |  269 --
 .../InternalDistributedSystemJUnitTest.java     |    7 +-
 .../internal/LocalDistributionManagerTest.java  |  484 --
 .../internal/ProductUseLogDUnitTest.java        |    2 +-
 .../membership/MembershipJUnitTest.java         |  233 +-
 .../membership/gms/MembershipManagerHelper.java |  171 +
 .../gms/auth/GMSAuthenticatorJUnitTest.java     |  300 ++
 .../locator/GMSLocatorRecoveryJUnitTest.java    |  170 +
 .../gms/membership/GMSJoinLeaveJUnitTest.java   |  781 +++
 .../gms/membership/StatRecorderJUnitTest.java   |  211 +
 .../fd/GMSHealthMonitorJUnitTest.java           |  444 ++
 .../messenger/GMSQuorumCheckerJUnitTest.java    |  345 ++
 .../membership/gms/messenger/InterceptUDP.java  |   93 +
 .../messenger/JGroupsMessengerJUnitTest.java    |  433 ++
 .../jgroup/MembershipManagerHelper.java         |  189 -
 .../tcpserver/LocatorVersioningJUnitTest.java   |  218 -
 ...cpServerBackwardCompatDUnitDisabledTest.java |   63 +-
 .../tcpserver/TcpServerJUnitDisabledTest.java   |  219 -
 .../internal/tcpserver/TcpServerJUnitTest.java  |  221 +
 .../gemfire/internal/AvailablePortHelper.java   |    2 +-
 ...wardCompatibilitySerializationDUnitTest.java |  307 ++
 ...wardCompatibilitySerializationJUnitTest.java |  315 --
 .../gemstone/gemfire/internal/FDDUnitTest.java  |   18 +-
 .../internal/PdxDeleteFieldDUnitTest.java       |   13 +-
 .../gemfire/internal/PdxRenameDUnitTest.java    |   15 +-
 .../internal/cache/Bug33726JUnitTest.java       |    2 +
 .../internal/cache/Bug41957DUnitTest.java       |    8 +-
 .../internal/cache/CacheServiceJUnitTest.java   |   43 +
 ...ssagesRegionCreationAndDestroyJUnitTest.java |    4 +-
 .../cache/ClientServerGetAllDUnitTest.java      |   38 +-
 .../cache/ClientServerTransactionDUnitTest.java |   33 +-
 .../cache/ConcurrentMapOpsDUnitTest.java        |    2 +-
 .../cache/ConnectDisconnectDUnitTest.java       |   41 +-
 .../internal/cache/MockCacheService.java        |    8 +
 .../internal/cache/MockCacheServiceImpl.java    |   23 +
 .../internal/cache/RegionListenerJUnitTest.java |   47 +
 .../cache/execute/Bug51193DUnitTest.java        |    8 +-
 .../MemberFunctionExecutionDUnitTest.java       |   49 +
 .../PRFunctionExecutionTimeOutDUnitTest.java    |    1 +
 .../mock/DestroyMockCacheExtensionFunction.java |    2 +-
 .../internal/cache/ha/Bug48571DUnitTest.java    |    4 +-
 .../internal/cache/ha/Bug48879DUnitTest.java    |    7 +-
 .../cache/partitioned/Bug43684DUnitTest.java    |   32 +-
 .../cache/partitioned/Bug51400DUnitTest.java    |    6 +-
 .../PartitionedRegionLoadModelJUnitTest.java    |    8 +-
 .../cache/partitioned/ShutdownAllDUnitTest.java |   12 +-
 .../cache/persistence/soplog/AppendLog.java     |   65 -
 .../ArraySerializedComparatorJUnitTest.java     |   95 -
 .../CompactionSortedOplogSetTestCase.java       |  134 -
 .../persistence/soplog/CompactionTestCase.java  |  206 -
 .../persistence/soplog/ComparisonTestCase.java  |   77 -
 .../soplog/IndexComparatorJUnitTest.java        |   79 -
 .../LexicographicalComparatorJUnitTest.java     |  204 -
 .../soplog/RecoverableSortedOplogSet.java       |  221 -
 .../soplog/SizeTieredCompactorJUnitTest.java    |  110 -
 .../SizeTieredSortedOplogSetJUnitTest.java      |   43 -
 .../soplog/SortedBufferJUnitTest.java           |   39 -
 .../soplog/SortedOplogSetJUnitTest.java         |  273 --
 .../soplog/SortedReaderTestCase.java            |  295 --
 .../nofile/NoFileSortedOplogJUnitTest.java      |   48 -
 .../cache/tier/sockets/Bug36829DUnitTest.java   |    5 +-
 .../cache/tier/sockets/Bug37805DUnitTest.java   |    3 +-
 .../cache/tier/sockets/CacheServerTestUtil.java |   10 +-
 .../DurableClientQueueSizeDUnitTest.java        |   20 +-
 .../DurableClientReconnectDUnitTest.java        |    2 +-
 .../sockets/DurableClientStatsDUnitTest.java    |   12 +-
 .../sockets/DurableRegistrationDUnitTest.java   |   34 +-
 .../sockets/InterestListFailoverDUnitTest.java  |    5 +-
 .../sockets/UnregisterInterestDUnitTest.java    |    3 +-
 .../versions/RegionVersionVectorJUnitTest.java  |  231 +-
 .../internal/i18n/BasicI18nJUnitTest.java       |   49 +-
 .../log4j/LocalizedMessageJUnitTest.java        |    9 +-
 .../internal/stats50/AtomicStatsJUnitTest.java  |   16 +-
 .../internal/tcp/ConnectionJUnitTest.java       |   71 +
 .../concurrent/CopyOnWriteHashMapJUnitTest.java |  496 ++
 .../concurrent/ReentrantSemaphoreJUnitTest.java |    1 -
 .../management/ClientHealthStatsDUnitTest.java  |    1 +
 .../management/DistributedSystemDUnitTest.java  |   51 +-
 .../management/LocatorManagementDUnitTest.java  |    4 -
 .../gemfire/memcached/IntegrationJUnitTest.java |    3 +
 .../gemfire/redis/RedisDistDUnitTest.java       |   29 +-
 .../protocols/CacheTimeSlowDownDUnitTest.java   |  217 -
 .../GemFireTimeSyncProtocolDUnitTest.java       |  490 --
 .../JGroupsFailureDetectionJUnitTest.java       |  504 --
 .../protocols/JGroupsVersioningJUnitTest.java   |  352 --
 .../test/java/dunit/DistributedTestCase.java    |   58 +-
 .../java/dunit/standalone/DUnitLauncher.java    |   16 +-
 .../java/dunit/standalone/ProcessManager.java   |   12 +-
 .../src/test/java/hydra/log/AnyLogWriter.java   |    2 +-
 ...gemstone.gemfire.internal.cache.CacheService |    1 +
 .../sanctionedDataSerializables.txt             |  132 +-
 .../codeAnalysis/sanctionedSerializables.txt    |  123 +-
 gemfire-jgroups/build.gradle                    |   39 -
 .../java/com/gemstone/org/jgroups/Address.java  |   46 -
 .../com/gemstone/org/jgroups/BlockEvent.java    |   15 -
 .../java/com/gemstone/org/jgroups/Channel.java  |  508 --
 .../org/jgroups/ChannelClosedException.java     |   27 -
 .../gemstone/org/jgroups/ChannelException.java  |   28 -
 .../gemstone/org/jgroups/ChannelFactory.java    |   38 -
 .../gemstone/org/jgroups/ChannelListener.java   |   20 -
 .../jgroups/ChannelNotConnectedException.java   |   26 -
 .../java/com/gemstone/org/jgroups/Event.java    |  225 -
 .../com/gemstone/org/jgroups/ExitEvent.java     |   14 -
 .../com/gemstone/org/jgroups/GetStateEvent.java |   22 -
 .../java/com/gemstone/org/jgroups/Global.java   |   44 -
 .../java/com/gemstone/org/jgroups/Header.java   |   51 -
 .../java/com/gemstone/org/jgroups/JChannel.java | 1725 -------
 .../gemstone/org/jgroups/JChannelFactory.java   |  129 -
 .../gemstone/org/jgroups/JGroupsVersion.java    |   95 -
 .../com/gemstone/org/jgroups/Membership.java    |  358 --
 .../org/jgroups/MembershipListener.java         |   53 -
 .../com/gemstone/org/jgroups/MergeView.java     |  166 -
 .../java/com/gemstone/org/jgroups/Message.java  |  784 ---
 .../com/gemstone/org/jgroups/Message.java.old   |  711 ---
 .../gemstone/org/jgroups/MessageListener.java   |   34 -
 .../java/com/gemstone/org/jgroups/Receiver.java |   13 -
 .../gemstone/org/jgroups/ReceiverAdapter.java   |   35 -
 .../com/gemstone/org/jgroups/SetStateEvent.java |   37 -
 .../org/jgroups/ShunnedAddressException.java    |   30 -
 .../com/gemstone/org/jgroups/SuspectEvent.java  |   26 -
 .../com/gemstone/org/jgroups/SuspectMember.java |   56 -
 .../org/jgroups/SuspectedException.java         |   21 -
 .../gemstone/org/jgroups/TimeoutException.java  |   43 -
 .../com/gemstone/org/jgroups/Transport.java     |   22 -
 .../com/gemstone/org/jgroups/UpHandler.java     |   18 -
 .../java/com/gemstone/org/jgroups/View.java     |  528 --
 .../java/com/gemstone/org/jgroups/ViewId.java   |  174 -
 .../org/jgroups/blocks/ConnectionTable.java     | 1051 ----
 .../org/jgroups/blocks/ConnectionTableNIO.java  | 1519 ------
 .../jgroups/blocks/DistributedHashtable.java    |  656 ---
 .../jgroups/blocks/DistributedLockManager.java  |  742 ---
 .../org/jgroups/blocks/DistributedQueue.java    |  758 ---
 .../org/jgroups/blocks/DistributedTree.java     |  756 ---
 .../org/jgroups/blocks/GroupRequest.java        |  636 ---
 .../org/jgroups/blocks/GroupRequest.java.old    |  641 ---
 .../com/gemstone/org/jgroups/blocks/Link.java   |  680 ---
 .../com/gemstone/org/jgroups/blocks/Link.txt    |   48 -
 .../org/jgroups/blocks/LockManager.java         |   87 -
 .../blocks/LockMultiLockedException.java        |   26 -
 .../jgroups/blocks/LockNotGrantedException.java |   24 -
 .../blocks/LockNotReleasedException.java        |   24 -
 .../org/jgroups/blocks/LockingException.java    |   38 -
 .../org/jgroups/blocks/LogicalLink.java         |  340 --
 .../blocks/MembershipListenerAdapter.java       |   91 -
 .../org/jgroups/blocks/MessageDispatcher.java   |  845 ----
 .../jgroups/blocks/MessageListenerAdapter.java  |  123 -
 .../gemstone/org/jgroups/blocks/MethodCall.java |  529 --
 .../org/jgroups/blocks/MethodLookup.java        |   15 -
 .../org/jgroups/blocks/NBMessageForm_NIO.java   |   94 -
 .../org/jgroups/blocks/NotificationBus.java     |  458 --
 .../org/jgroups/blocks/PullPushAdapter.java     |  434 --
 .../org/jgroups/blocks/ReplicatedHashtable.java |  530 --
 .../org/jgroups/blocks/ReplicatedTree.java      | 1121 -----
 .../org/jgroups/blocks/ReplicationData.java     |  148 -
 .../org/jgroups/blocks/ReplicationManager.java  |  345 --
 .../org/jgroups/blocks/ReplicationReceiver.java |   69 -
 .../org/jgroups/blocks/RequestCorrelator.java   |  911 ----
 .../org/jgroups/blocks/RequestHandler.java      |   15 -
 .../org/jgroups/blocks/RpcDispatcher.java       |  392 --
 .../org/jgroups/blocks/RspCollector.java        |   18 -
 .../jgroups/blocks/TwoPhaseVotingAdapter.java   |  173 -
 .../jgroups/blocks/TwoPhaseVotingListener.java  |   35 -
 .../org/jgroups/blocks/UpdateException.java     |   19 -
 .../org/jgroups/blocks/VoteException.java       |   19 -
 .../jgroups/blocks/VoteResponseProcessor.java   |   31 -
 .../org/jgroups/blocks/VotingAdapter.java       |  472 --
 .../org/jgroups/blocks/VotingListener.java      |   26 -
 .../com/gemstone/org/jgroups/blocks/Xid.java    |  164 -
 .../gemstone/org/jgroups/blocks/package.html    |   13 -
 .../org/jgroups/conf/ClassConfigurator.java     |  228 -
 .../com/gemstone/org/jgroups/conf/ClassMap.java |   75 -
 .../jgroups/conf/ClassPathEntityResolver.java   |   63 -
 .../org/jgroups/conf/ConfiguratorFactory.java   |  449 --
 .../org/jgroups/conf/MagicNumberReader.java     |  402 --
 .../org/jgroups/conf/PlainConfigurator.java     |   48 -
 .../gemstone/org/jgroups/conf/ProtocolData.java |  130 -
 .../org/jgroups/conf/ProtocolParameter.java     |   64 -
 .../jgroups/conf/ProtocolStackConfigurator.java |   18 -
 .../org/jgroups/conf/XmlConfigurator.java       |  463 --
 .../gemstone/org/jgroups/conf/XmlValidator.java |  146 -
 .../com/gemstone/org/jgroups/conf/package.html  |    5 -
 .../gemstone/org/jgroups/debug/Debugger.java    |  133 -
 .../org/jgroups/debug/JChannelTestHook.java     |   30 -
 .../gemstone/org/jgroups/debug/Profiler.java    |  160 -
 .../org/jgroups/debug/ProtocolSpecificView.java |   24 -
 .../org/jgroups/debug/ProtocolTester.java       |  142 -
 .../org/jgroups/debug/ProtocolView.java         |   90 -
 .../gemstone/org/jgroups/debug/QUEUEView.java   |   28 -
 .../gemstone/org/jgroups/debug/Simulator.java   |  249 -
 .../com/gemstone/org/jgroups/debug/package.html |    5 -
 .../com/gemstone/org/jgroups/gemstonizing.txt   |   28 -
 .../org/jgroups/oswego/concurrent/Barrier.java  |   65 -
 .../oswego/concurrent/BoundedBuffer.java        |  190 -
 .../oswego/concurrent/BoundedChannel.java       |   37 -
 .../oswego/concurrent/BoundedLinkedQueue.java   |  384 --
 .../oswego/concurrent/BoundedPriorityQueue.java |  123 -
 .../concurrent/BrokenBarrierException.java      |   48 -
 .../org/jgroups/oswego/concurrent/Callable.java |   39 -
 .../org/jgroups/oswego/concurrent/Channel.java  |  309 --
 .../jgroups/oswego/concurrent/ClockDaemon.java  |  403 --
 .../org/jgroups/oswego/concurrent/CondVar.java  |  277 --
 .../jgroups/oswego/concurrent/CountDown.java    |  126 -
 .../oswego/concurrent/CyclicBarrier.java        |  299 --
 .../concurrent/DefaultChannelCapacity.java      |   58 -
 .../oswego/concurrent/DirectExecutor.java       |   36 -
 .../org/jgroups/oswego/concurrent/Executor.java |   70 -
 .../oswego/concurrent/FIFOReadWriteLock.java    |  198 -
 .../oswego/concurrent/FIFOSemaphore.java        |   84 -
 .../org/jgroups/oswego/concurrent/FJTask.java   |  535 ---
 .../jgroups/oswego/concurrent/FJTaskRunner.java |  979 ----
 .../oswego/concurrent/FJTaskRunnerGroup.java    |  625 ---
 .../jgroups/oswego/concurrent/FutureResult.java |  209 -
 .../org/jgroups/oswego/concurrent/Heap.java     |  151 -
 .../org/jgroups/oswego/concurrent/Latch.java    |  103 -
 .../jgroups/oswego/concurrent/LayeredSync.java  |   96 -
 .../jgroups/oswego/concurrent/LinkedNode.java   |   29 -
 .../jgroups/oswego/concurrent/LinkedQueue.java  |  192 -
 .../oswego/concurrent/LockedExecutor.java       |   62 -
 .../org/jgroups/oswego/concurrent/Mutex.java    |  173 -
 .../org/jgroups/oswego/concurrent/NullSync.java |   51 -
 .../oswego/concurrent/PooledExecutor.java       |  924 ----
 .../oswego/concurrent/PrioritySemaphore.java    |   96 -
 .../concurrent/PropertyChangeMulticaster.java   |  466 --
 .../org/jgroups/oswego/concurrent/Puttable.java |   68 -
 .../oswego/concurrent/QueuedExecutor.java       |  220 -
 .../oswego/concurrent/QueuedSemaphore.java      |  181 -
 .../oswego/concurrent/ReadWriteLock.java        |   86 -
 .../ReaderPreferenceReadWriteLock.java          |   35 -
 .../oswego/concurrent/ReentrantLock.java        |  151 -
 .../ReentrantWriterPreferenceReadWriteLock.java |  169 -
 .../jgroups/oswego/concurrent/Rendezvous.java   |  422 --
 .../jgroups/oswego/concurrent/Semaphore.java    |  193 -
 .../concurrent/SemaphoreControlledChannel.java  |  164 -
 .../org/jgroups/oswego/concurrent/Slot.java     |   88 -
 .../org/jgroups/oswego/concurrent/Sync.java     |  344 --
 .../oswego/concurrent/SyncCollection.java       |  514 --
 .../org/jgroups/oswego/concurrent/SyncList.java |  327 --
 .../org/jgroups/oswego/concurrent/SyncMap.java  |  314 --
 .../org/jgroups/oswego/concurrent/SyncSet.java  |   82 -
 .../oswego/concurrent/SyncSortedMap.java        |  129 -
 .../oswego/concurrent/SyncSortedSet.java        |  129 -
 .../oswego/concurrent/SynchronizedBoolean.java  |  182 -
 .../oswego/concurrent/SynchronizedByte.java     |  253 -
 .../oswego/concurrent/SynchronizedChar.java     |  176 -
 .../oswego/concurrent/SynchronizedDouble.java   |  181 -
 .../oswego/concurrent/SynchronizedFloat.java    |  181 -
 .../oswego/concurrent/SynchronizedInt.java      |  250 -
 .../oswego/concurrent/SynchronizedLong.java     |  252 -
 .../oswego/concurrent/SynchronizedRef.java      |  107 -
 .../oswego/concurrent/SynchronizedShort.java    |  254 -
 .../oswego/concurrent/SynchronizedVariable.java |  209 -
 .../oswego/concurrent/SynchronousChannel.java   |  379 --
 .../org/jgroups/oswego/concurrent/Takable.java  |   67 -
 .../oswego/concurrent/ThreadFactory.java        |   35 -
 .../oswego/concurrent/ThreadFactoryUser.java    |   62 -
 .../oswego/concurrent/ThreadedExecutor.java     |   40 -
 .../oswego/concurrent/TimedCallable.java        |   68 -
 .../oswego/concurrent/TimeoutException.java     |   53 -
 .../jgroups/oswego/concurrent/TimeoutSync.java  |   75 -
 .../concurrent/VetoableChangeMulticaster.java   |  577 ---
 .../oswego/concurrent/WaitFreeQueue.java        |  208 -
 .../oswego/concurrent/WaitableBoolean.java      |  141 -
 .../jgroups/oswego/concurrent/WaitableByte.java |  238 -
 .../jgroups/oswego/concurrent/WaitableChar.java |  170 -
 .../oswego/concurrent/WaitableDouble.java       |  173 -
 .../oswego/concurrent/WaitableFloat.java        |  173 -
 .../jgroups/oswego/concurrent/WaitableInt.java  |  239 -
 .../jgroups/oswego/concurrent/WaitableLong.java |  239 -
 .../jgroups/oswego/concurrent/WaitableRef.java  |  112 -
 .../oswego/concurrent/WaitableShort.java        |  238 -
 .../concurrent/WaiterPreferenceSemaphore.java   |  155 -
 .../WriterPreferenceReadWriteLock.java          |  337 --
 .../org/jgroups/oswego/concurrent/package.html  |  998 ----
 .../java/com/gemstone/org/jgroups/overview.html |   15 -
 .../java/com/gemstone/org/jgroups/package.html  |    5 -
 .../persistence/CannotConnectException.java     |   55 -
 .../CannotCreateSchemaException.java            |   45 -
 .../persistence/CannotPersistException.java     |   44 -
 .../persistence/CannotRemoveException.java      |   45 -
 .../persistence/CannotRetrieveException.java    |   44 -
 .../persistence/DBPersistenceManager.java       |  877 ----
 .../persistence/FilePersistenceManager.java     |  173 -
 .../jgroups/persistence/PersistenceFactory.java |  207 -
 .../jgroups/persistence/PersistenceManager.java |   69 -
 .../org/jgroups/persistence/package.html        |    5 -
 .../com/gemstone/org/jgroups/primarychanges.txt |   80 -
 .../gemstone/org/jgroups/protocols/AUTH.java    |  454 --
 .../org/jgroups/protocols/AUTOCONF.java         |  249 -
 .../org/jgroups/protocols/AuthHeader.java       |  108 -
 .../gemstone/org/jgroups/protocols/CAUSAL.java  |  296 --
 .../org/jgroups/protocols/COMPRESS.java         |  188 -
 .../org/jgroups/protocols/DEADLOCK.java         |  250 -
 .../gemstone/org/jgroups/protocols/DELAY.java   |  116 -
 .../com/gemstone/org/jgroups/protocols/DESIGN   |  283 --
 .../gemstone/org/jgroups/protocols/DISCARD.java |  150 -
 .../gemstone/org/jgroups/protocols/DUMMY.java   |   85 -
 .../org/jgroups/protocols/DUMMY_TP.java         |   84 -
 .../gemstone/org/jgroups/protocols/Digest.java  |   38 -
 .../org/jgroups/protocols/Discovery.java        |  484 --
 .../gemstone/org/jgroups/protocols/ENCRYPT.java | 1390 ------
 .../org/jgroups/protocols/ENCRYPT1_4.java       |  566 ---
 .../gemstone/org/jgroups/protocols/EXAMPLE.java |  104 -
 .../com/gemstone/org/jgroups/protocols/FC.java  | 1025 ----
 .../com/gemstone/org/jgroups/protocols/FD.java  | 1100 -----
 .../gemstone/org/jgroups/protocols/FD_PID.java  |  640 ---
 .../gemstone/org/jgroups/protocols/FD_PROB.java |  628 ---
 .../org/jgroups/protocols/FD_SIMPLE.java        |  357 --
 .../gemstone/org/jgroups/protocols/FD_SOCK.java | 2654 ----------
 .../org/jgroups/protocols/FD_SOCK.java.new      | 1153 -----
 .../org/jgroups/protocols/FLOWCONTROL.java      |   89 -
 .../org/jgroups/protocols/FLOW_CONTROL.java     |  317 --
 .../gemstone/org/jgroups/protocols/FLUSH.java   |  466 --
 .../gemstone/org/jgroups/protocols/FRAG.java    |  572 ---
 .../gemstone/org/jgroups/protocols/FRAG2.java   |  773 ---
 .../gemstone/org/jgroups/protocols/FRAG3.java   |   48 -
 .../org/jgroups/protocols/FlushRsp.java         |   31 -
 .../org/jgroups/protocols/FragHeader.java       |   80 -
 .../gemstone/org/jgroups/protocols/GMS.java.rmi |  219 -
 .../org/jgroups/protocols/GemFireTimeSync.java  |  720 ---
 .../gemstone/org/jgroups/protocols/HDRS.java    |   53 -
 .../gemstone/org/jgroups/protocols/HTOTAL.java  |  207 -
 .../org/jgroups/protocols/LOOPBACK.java         |  115 -
 .../gemstone/org/jgroups/protocols/LOSS.java    |  118 -
 .../gemstone/org/jgroups/protocols/MERGE.java   |  376 --
 .../gemstone/org/jgroups/protocols/MERGE2.java  |  362 --
 .../gemstone/org/jgroups/protocols/MERGE3.java  |  312 --
 .../org/jgroups/protocols/MERGEFAST.java        |  118 -
 .../protocols/MessageProtocolEXAMPLE.java       |   64 -
 .../protocols/NAKACK.java.MessageProtocol       |  422 --
 .../org/jgroups/protocols/NAKACK.java.separate  |  484 --
 .../org/jgroups/protocols/NakAckHeader.java     |  113 -
 .../org/jgroups/protocols/PARTITIONER.java      |  185 -
 .../gemstone/org/jgroups/protocols/PERF.java    |  284 --
 .../gemstone/org/jgroups/protocols/PERF_TP.java |  172 -
 .../org/jgroups/protocols/PIGGYBACK.java        |  271 --
 .../gemstone/org/jgroups/protocols/PING.java    |  297 --
 .../org/jgroups/protocols/PRINTMETHODS.java     |   64 -
 .../org/jgroups/protocols/PRINTOBJS.java        |  120 -
 .../org/jgroups/protocols/PerfHeader.java       |  451 --
 .../org/jgroups/protocols/PingHeader.java       |   79 -
 .../gemstone/org/jgroups/protocols/PingRsp.java |  107 -
 .../org/jgroups/protocols/PingSender.java       |  109 -
 .../org/jgroups/protocols/PingWaiter.java       |  301 --
 .../gemstone/org/jgroups/protocols/QUEUE.java   |  184 -
 .../jgroups/protocols/RpcProtocolEXAMPLE.java   |   64 -
 .../gemstone/org/jgroups/protocols/SHUFFLE.java |  146 -
 .../gemstone/org/jgroups/protocols/SIZE.java    |  186 -
 .../gemstone/org/jgroups/protocols/SMACK.java   |  392 --
 .../org/jgroups/protocols/STATE_TRANSFER.java   |  448 --
 .../gemstone/org/jgroups/protocols/STATS.java   |  211 -
 .../com/gemstone/org/jgroups/protocols/TCP.java |  308 --
 .../org/jgroups/protocols/TCPGOSSIP.java        |  429 --
 .../gemstone/org/jgroups/protocols/TCPPING.java |  144 -
 .../gemstone/org/jgroups/protocols/TCP_NIO.java |  118 -
 .../gemstone/org/jgroups/protocols/TOTAL.java   | 1055 ----
 .../com/gemstone/org/jgroups/protocols/TP.java  | 2012 --------
 .../gemstone/org/jgroups/protocols/TP.java.mt   | 1522 ------
 .../gemstone/org/jgroups/protocols/TRACE.java   |   47 -
 .../gemstone/org/jgroups/protocols/TUNNEL.java  |  459 --
 .../org/jgroups/protocols/TcpHeader.java        |   55 -
 .../org/jgroups/protocols/TpHeader.java         |   64 -
 .../protocols/TransportedVectorTime.java        |  185 -
 .../org/jgroups/protocols/TunnelHeader.java     |   47 -
 .../com/gemstone/org/jgroups/protocols/UDP.java | 1462 ------
 .../gemstone/org/jgroups/protocols/UDP.java.mt  | 1005 ----
 .../jgroups/protocols/UDP.java.packethandler    |  592 ---
 .../gemstone/org/jgroups/protocols/UDP_NIO.java | 1567 ------
 .../gemstone/org/jgroups/protocols/UNICAST.java |  977 ----
 .../org/jgroups/protocols/UdpHeader.java        |   62 -
 .../org/jgroups/protocols/VERIFY_SUSPECT.java   |  470 --
 .../org/jgroups/protocols/VIEW_ENFORCER.java    |   81 -
 .../org/jgroups/protocols/VIEW_SYNC.java        |  499 --
 .../org/jgroups/protocols/VectorTime.java       |  270 --
 .../gemstone/org/jgroups/protocols/WANPING.java |  106 -
 .../gemstone/org/jgroups/protocols/WANPIPE.java |  441 --
 .../org/jgroups/protocols/WanPipeAddress.java   |  140 -
 .../gemstone/org/jgroups/protocols/dump2.log    |    0
 .../jgroups/protocols/obsolete/ENCRYPT.java.txt |  408 --
 .../org/jgroups/protocols/obsolete/FC.java.txt  |  643 ---
 .../jgroups/protocols/obsolete/FD_RAND.java.txt |  287 --
 .../jgroups/protocols/obsolete/FD_SHUN.java.txt |  323 --
 .../org/jgroups/protocols/obsolete/TCP.java.txt |  493 --
 .../org/jgroups/protocols/obsolete/UDP.java.txt | 1921 --------
 .../jgroups/protocols/obsolete/UNIFORM.java.txt |  349 --
 .../gemstone/org/jgroups/protocols/package.html |    6 -
 .../jgroups/protocols/pbcast/ClientGmsImpl.java |  907 ----
 .../jgroups/protocols/pbcast/CoordGmsImpl.java  | 1103 -----
 .../org/jgroups/protocols/pbcast/DESIGN         |  478 --
 .../org/jgroups/protocols/pbcast/Digest.java    |  534 ---
 .../jgroups/protocols/pbcast/Digest.java.old    |  558 ---
 .../org/jgroups/protocols/pbcast/FD.java        |  273 --
 .../org/jgroups/protocols/pbcast/GMS.java       | 2732 -----------
 .../org/jgroups/protocols/pbcast/GmsImpl.java   |  111 -
 .../org/jgroups/protocols/pbcast/Gossip.java    |  134 -
 .../org/jgroups/protocols/pbcast/JoinRsp.java   |  126 -
 .../org/jgroups/protocols/pbcast/MergeData.java |  118 -
 .../org/jgroups/protocols/pbcast/NAKACK.java    | 1631 -------
 .../jgroups/protocols/pbcast/NakAckHeader.java  |  148 -
 .../org/jgroups/protocols/pbcast/PBCAST.java    | 1043 ----
 .../protocols/pbcast/ParticipantGmsImpl.java    |  371 --
 .../jgroups/protocols/pbcast/PbcastHeader.java  |  110 -
 .../org/jgroups/protocols/pbcast/README         |  140 -
 .../org/jgroups/protocols/pbcast/STABLE.java    |  907 ----
 .../jgroups/protocols/pbcast/STABLE.java.latest |  897 ----
 .../jgroups/protocols/pbcast/STABLE.java.new    |  890 ----
 .../jgroups/protocols/pbcast/STABLE.java.old    |  855 ----
 .../protocols/pbcast/STATE_TRANSFER.java        |  461 --
 .../org/jgroups/protocols/pbcast/package.html   |    5 -
 .../org/jgroups/protocols/ring/RingNode.java    |   26 -
 .../protocols/ring/RingNodeFlowControl.java     |  135 -
 .../org/jgroups/protocols/ring/RingToken.java   |  245 -
 .../org/jgroups/protocols/ring/TcpRingNode.java |  205 -
 .../protocols/ring/TokenLostException.java      |   63 -
 .../org/jgroups/protocols/ring/package.html     |    5 -
 .../org/jgroups/spi/GFBasicAdapter.java         |  112 -
 .../gemstone/org/jgroups/spi/GFPeerAdapter.java |  185 -
 .../jgroups/stack/AckMcastReceiverWindow.java   |  169 -
 .../org/jgroups/stack/AckMcastSenderWindow.java |  601 ---
 .../org/jgroups/stack/AckReceiverWindow.java    |  184 -
 .../org/jgroups/stack/AckSenderWindow.java      |  354 --
 .../org/jgroups/stack/BoundedLinkedHashMap.java |   91 -
 .../org/jgroups/stack/Configurator.java         |  764 ---
 .../org/jgroups/stack/GFBasicAdapterImpl.java   |  596 ---
 .../org/jgroups/stack/GFPeerAdapterImpl.java    |  338 --
 .../org/jgroups/stack/GossipClient.java         |  817 ----
 .../gemstone/org/jgroups/stack/GossipData.java  |  232 -
 .../org/jgroups/stack/GossipServer.java         |  633 ---
 .../gemstone/org/jgroups/stack/Interval.java    |   40 -
 .../gemstone/org/jgroups/stack/IpAddress.java   |  780 ---
 .../org/jgroups/stack/LogicalAddress.java       |  370 --
 .../org/jgroups/stack/MessageProtocol.java      |  243 -
 .../org/jgroups/stack/NakReceiverWindow.java    |  914 ----
 .../gemstone/org/jgroups/stack/Protocol.java    |  837 ----
 .../org/jgroups/stack/ProtocolObserver.java     |   81 -
 .../org/jgroups/stack/ProtocolStack.java        |  506 --
 .../org/jgroups/stack/Retransmitter.java        |  480 --
 .../com/gemstone/org/jgroups/stack/Router.java  |  577 ---
 .../gemstone/org/jgroups/stack/RouterStub.java  |  419 --
 .../gemstone/org/jgroups/stack/RpcProtocol.java |  166 -
 .../org/jgroups/stack/SockCreatorImpl.java      |   59 -
 .../org/jgroups/stack/StateTransferInfo.java    |   64 -
 .../com/gemstone/org/jgroups/stack/package.html |    5 -
 .../gemstone/org/jgroups/util/AckCollector.java |  149 -
 .../gemstone/org/jgroups/util/BoundedList.java  |   53 -
 .../com/gemstone/org/jgroups/util/Buffer.java   |   64 -
 .../com/gemstone/org/jgroups/util/Command.java  |   16 -
 .../com/gemstone/org/jgroups/util/CondVar.java  |  139 -
 .../org/jgroups/util/ConnectionWatcher.java     |   41 -
 .../jgroups/util/ContextObjectInputStream.java  |   91 -
 .../util/ExposedBufferedInputStream.java        |   61 -
 .../util/ExposedBufferedOutputStream.java       |   44 -
 .../util/ExposedByteArrayInputStream.java       |   58 -
 .../util/ExposedByteArrayOutputStream.java      |   31 -
 .../jgroups/util/ExposedDataOutputStream.java   |   31 -
 .../org/jgroups/util/ExternalStrings.java       |  832 ----
 .../gemstone/org/jgroups/util/GFLogWriter.java  |   73 -
 .../org/jgroups/util/GFStringIdImpl.java        |   84 -
 .../org/jgroups/util/GemFireTracer.java         |  473 --
 .../org/jgroups/util/GetNetworkInterfaces.java  |   34 -
 .../org/jgroups/util/LinkedListQueue.java       |  422 --
 .../com/gemstone/org/jgroups/util/List.java     |  462 --
 .../jgroups/util/MagicObjectInputStream.java    |   55 -
 .../jgroups/util/MagicObjectOutputStream.java   |   60 -
 .../gemstone/org/jgroups/util/Marshaller.java   |  152 -
 .../org/jgroups/util/NullReadWriteLock.java     |   25 -
 .../com/gemstone/org/jgroups/util/NullSync.java |   26 -
 .../gemstone/org/jgroups/util/PrintXMLTree.java |  168 -
 .../com/gemstone/org/jgroups/util/Promise.java  |  162 -
 .../com/gemstone/org/jgroups/util/Proxy.java    |  870 ----
 .../com/gemstone/org/jgroups/util/Queue.java    |  653 ---
 .../org/jgroups/util/Queue.java.concurrent      |  113 -
 .../com/gemstone/org/jgroups/util/Queue2.java   |  715 ---
 .../org/jgroups/util/QueueClosedException.java  |   29 -
 .../com/gemstone/org/jgroups/util/Range.java    |   58 -
 .../org/jgroups/util/ReentrantLatch.java        |   65 -
 .../org/jgroups/util/ReusableThread.java        |  295 --
 .../java/com/gemstone/org/jgroups/util/Rsp.java |   82 -
 .../com/gemstone/org/jgroups/util/RspList.java  |  193 -
 .../gemstone/org/jgroups/util/Scheduler.java    |  270 --
 .../org/jgroups/util/SchedulerListener.java     |   29 -
 .../gemstone/org/jgroups/util/SockCreator.java  |   40 -
 .../com/gemstone/org/jgroups/util/Stack.java    |  108 -
 .../gemstone/org/jgroups/util/Streamable.java   |   26 -
 .../org/jgroups/util/StreamableFixedID.java     |   35 -
 .../com/gemstone/org/jgroups/util/StringId.java |   58 -
 .../gemstone/org/jgroups/util/ThreadPool.java   |  105 -
 .../org/jgroups/util/TimeScheduler.java         |  720 ---
 .../gemstone/org/jgroups/util/TimedWriter.java  |  295 --
 .../com/gemstone/org/jgroups/util/Util.java     | 1869 --------
 .../org/jgroups/util/VersionedStreamable.java   |   34 -
 .../com/gemstone/org/jgroups/util/package.html  |    5 -
 .../java/com/gemstone/org/jgroups/util/todo.txt |   80 -
 .../gemstone/org/jgroups/conf/jg-magic-map.dtd  |   55 -
 .../gemstone/org/jgroups/conf/jg-magic-map.xml  |  269 --
 .../com/gemstone/org/jgroups/log4j2-default.xml |   21 -
 .../org/jgroups/stack/jboss-service.xml         |  146 -
 .../gemstone/org/jgroups/JChannelJUnitTest.java |  287 --
 gemfire-lucene/build.gradle                     |   29 +
 .../gemfire/cache/lucene/LuceneIndex.java       |   60 +
 .../gemfire/cache/lucene/LuceneQuery.java       |   48 +
 .../cache/lucene/LuceneQueryFactory.java        |  101 +
 .../cache/lucene/LuceneQueryProvider.java       |   45 +
 .../cache/lucene/LuceneQueryResults.java        |   58 +
 .../cache/lucene/LuceneResultStruct.java        |   62 +
 .../gemfire/cache/lucene/LuceneService.java     |  125 +
 .../cache/lucene/LuceneServiceProvider.java     |   46 +
 .../lucene/internal/InternalLuceneIndex.java    |   29 +
 .../lucene/internal/InternalLuceneService.java  |   29 +
 .../lucene/internal/LuceneEventListener.java    |   99 +
 .../LuceneIndexForPartitionedRegion.java        |  136 +
 .../LuceneIndexForReplicatedRegion.java         |   48 +
 .../cache/lucene/internal/LuceneIndexImpl.java  |  107 +
 .../lucene/internal/LuceneQueryFactoryImpl.java |   67 +
 .../cache/lucene/internal/LuceneQueryImpl.java  |   87 +
 .../lucene/internal/LuceneQueryResultsImpl.java |  120 +
 .../lucene/internal/LuceneResultStructImpl.java |   94 +
 .../lucene/internal/LuceneServiceImpl.java      |  273 ++
 .../internal/PartitionedRepositoryManager.java  |  163 +
 .../lucene/internal/StringQueryProvider.java    |  106 +
 .../internal/directory/FileIndexInput.java      |  131 +
 .../internal/directory/RegionDirectory.java     |  119 +
 .../internal/distributed/CollectorManager.java  |   55 +
 .../lucene/internal/distributed/EntryScore.java |   82 +
 .../internal/distributed/LuceneFunction.java    |  137 +
 .../distributed/LuceneFunctionContext.java      |  115 +
 .../lucene/internal/distributed/TopEntries.java |  133 +
 .../distributed/TopEntriesCollector.java        |  102 +
 .../distributed/TopEntriesCollectorManager.java |  178 +
 .../TopEntriesFunctionCollector.java            |  163 +
 .../lucene/internal/filesystem/ChunkKey.java    |  123 +
 .../cache/lucene/internal/filesystem/File.java  |  155 +
 .../internal/filesystem/FileInputStream.java    |  166 +
 .../internal/filesystem/FileOutputStream.java   |  103 +
 .../lucene/internal/filesystem/FileSystem.java  |  156 +
 .../filesystem/SeekableInputStream.java         |   43 +
 .../internal/repository/IndexRepository.java    |   74 +
 .../repository/IndexRepositoryImpl.java         |  113 +
 .../repository/IndexResultCollector.java        |   47 +
 .../internal/repository/RepositoryManager.java  |   45 +
 .../HeterogenousLuceneSerializer.java           |   83 +
 .../repository/serializer/LuceneSerializer.java |   35 +
 .../serializer/PdxLuceneSerializer.java         |   47 +
 .../serializer/ReflectionLuceneSerializer.java  |   74 +
 .../repository/serializer/SerializerUtil.java   |  168 +
 .../internal/xml/LuceneIndexCreation.java       |  111 +
 .../internal/xml/LuceneIndexXmlGenerator.java   |   65 +
 .../internal/xml/LuceneServiceXmlGenerator.java |   39 +
 .../lucene/internal/xml/LuceneXmlConstants.java |   31 +
 .../lucene/internal/xml/LuceneXmlParser.java    |   97 +
 .../lucene/lucene-1.0.xsd                       |   42 +
 ...gemstone.gemfire.internal.cache.CacheService |    1 +
 ...ne.gemfire.internal.cache.xmlcache.XmlParser |    1 +
 .../internal/LuceneEventListenerJUnitTest.java  |  109 +
 .../LuceneIndexRecoveryHAJUnitTest.java         |  201 +
 .../LuceneQueryFactoryImplJUnitTest.java        |   50 +
 .../internal/LuceneQueryImplJUnitTest.java      |  123 +
 .../LuceneQueryResultsImplJUnitTest.java        |  126 +
 .../LuceneResultStructImpJUnitTest.java         |   51 +
 .../internal/LuceneServiceImplJUnitTest.java    |  226 +
 .../PartitionedRepositoryManagerJUnitTest.java  |  230 +
 .../internal/StringQueryProviderJUnitTest.java  |   90 +
 .../directory/RegionDirectoryJUnitTest.java     |   56 +
 .../DistributedScoringJUnitTest.java            |  155 +
 .../distributed/EntryScoreJUnitTest.java        |   40 +
 .../LuceneFunctionContextJUnitTest.java         |   64 +
 .../distributed/LuceneFunctionJUnitTest.java    |  423 ++
 .../LuceneFunctionReadPathDUnitTest.java        |  241 +
 .../TopEntriesCollectorJUnitTest.java           |  139 +
 .../TopEntriesFunctionCollectorJUnitTest.java   |  323 ++
 .../distributed/TopEntriesJUnitTest.java        |  146 +
 .../internal/filesystem/ChunkKeyJUnitTest.java  |   48 +
 .../internal/filesystem/FileJUnitTest.java      |   53 +
 .../filesystem/FileSystemJUnitTest.java         |  578 +++
 ...IndexRepositoryImplJUnitPerformanceTest.java |  437 ++
 .../IndexRepositoryImplJUnitTest.java           |  208 +
 .../HeterogenousLuceneSerializerJUnitTest.java  |   90 +
 .../serializer/PdxFieldMapperJUnitTest.java     |   85 +
 .../ReflectionFieldMapperJUnitTest.java         |   85 +
 .../internal/repository/serializer/Type1.java   |   48 +
 .../internal/repository/serializer/Type2.java   |   34 +
 ...neIndexXmlGeneratorIntegrationJUnitTest.java |   78 +
 .../xml/LuceneIndexXmlGeneratorJUnitTest.java   |   80 +
 ...uceneIndexXmlParserIntegrationJUnitTest.java |  107 +
 .../xml/LuceneIndexXmlParserJUnitTest.java      |   72 +
 ...erIntegrationJUnitTest.createIndex.cache.xml |   24 +
 ...serIntegrationJUnitTest.parseIndex.cache.xml |   24 +
 gradle/dependency-versions.properties           |    6 +-
 settings.gradle                                 |    2 +-
 923 files changed, 34946 insertions(+), 150432 deletions(-)
----------------------------------------------------------------------



[33/50] [abbrv] incubator-geode git commit: GEODE-331: Update Jetty version in order to avoid security vulnerability

Posted by ma...@apache.org.
GEODE-331: Update Jetty version in order to avoid security vulnerability


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

Branch: refs/heads/feature/GEODE-53
Commit: 6df4b10b3b5c5a9b6fba397e66f198973f5d55e7
Parents: e8ddd33
Author: Jinmei Liao <ji...@pivotal.io>
Authored: Tue Nov 17 08:42:10 2015 -0800
Committer: Jinmei Liao <ji...@pivotal.io>
Committed: Tue Nov 17 08:42:10 2015 -0800

----------------------------------------------------------------------
 gradle/dependency-versions.properties | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6df4b10b/gradle/dependency-versions.properties
----------------------------------------------------------------------
diff --git a/gradle/dependency-versions.properties b/gradle/dependency-versions.properties
index c86d45d..4c3c16e 100644
--- a/gradle/dependency-versions.properties
+++ b/gradle/dependency-versions.properties
@@ -32,7 +32,7 @@ javax.resource-api.version = 1.7
 javax.servlet-api.version = 3.1.0
 javax.transaction-api.version = 1.2
 jedis.version = 2.7.2
-jetty.version = 9.2.3.v20140905
+jetty.version = 9.3.6.v20151106
 jline.version = 1.0.S2-B
 jmock.version = 2.8.1
 jna.version = 4.0.0


[27/50] [abbrv] incubator-geode git commit: GEM-131 Not throwing forcedDisconnect exception

Posted by ma...@apache.org.
GEM-131 Not throwing forcedDisconnect exception


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

Branch: refs/heads/feature/GEODE-53
Commit: 53c199bf529286cc04447ca067bd3b717d08706f
Parents: f57eb8b
Author: Hitesh Khamesra <hk...@pivotal.io>
Authored: Fri Nov 13 10:12:10 2015 -0800
Committer: Hitesh Khamesra <hk...@pivotal.io>
Committed: Fri Nov 13 14:07:16 2015 -0800

----------------------------------------------------------------------
 .../distributed/internal/membership/gms/Services.java        | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/53c199bf/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/Services.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/Services.java b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/Services.java
index d87ec8c..26f65be 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/Services.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/Services.java
@@ -333,7 +333,7 @@ public class Services {
     return !getConfig().getDistributionConfig().getDisableAutoReconnect();
   }
   
-  public static class Stopper extends CancelCriterion {
+  public class Stopper extends CancelCriterion {
     volatile String reasonForStopping = null;
     
     public void cancel(String reason) {
@@ -342,6 +342,8 @@ public class Services {
 
     @Override
     public String cancelInProgress() {
+      if(Services.this.shutdownCause != null)
+        return Services.this.shutdownCause.toString();
       return reasonForStopping;
     }
     
@@ -357,9 +359,9 @@ public class Services {
       }
       else {
         if (e == null) {
-          return new DistributedSystemDisconnectedException(reasonForStopping);
+          return new DistributedSystemDisconnectedException(reason);
         } else {
-          return new DistributedSystemDisconnectedException(reasonForStopping, e);
+          return new DistributedSystemDisconnectedException(reason, e);
         }
       }
     }


[11/50] [abbrv] incubator-geode git commit: GEODE-524 enque -> enqueue correction in comments

Posted by ma...@apache.org.
GEODE-524 enque -> enqueue correction in comments


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

Branch: refs/heads/feature/GEODE-53
Commit: 9dc7587a45cc18e10e9c58159bcc52b7e412eb41
Parents: 12cadbe
Author: shtykh_roman <rs...@yahoo.com>
Authored: Wed Nov 11 12:39:46 2015 +0900
Committer: shtykh_roman <rs...@yahoo.com>
Committed: Wed Nov 11 12:39:46 2015 +0900

----------------------------------------------------------------------
 .../cache/wan/parallel/ParallelGatewaySenderQueue.java       | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/9dc7587a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelGatewaySenderQueue.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelGatewaySenderQueue.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelGatewaySenderQueue.java
index c82e9e5..2321272 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelGatewaySenderQueue.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelGatewaySenderQueue.java
@@ -420,10 +420,10 @@ public class ParallelGatewaySenderQueue implements RegionQueue {
         	handleShadowPRExistsScenario(cache, prQ);
       }
       /*
-       * Here, enqueTempEvents need to be invoked when a sender is already
+         * Here, enqueueTempEvents need to be invoked when a sender is already
        * running and userPR is created later. When the flow comes here through
        * start() method of sender i.e. userPR already exists and sender is
-       * started later, the enqueTempEvents is done in the start() method of
+       * started later, the enqueueTempEvents is done in the start() method of
        * ParallelGatewaySender
        */
       if ((this.index == this.nDispatcher - 1) && this.sender.isRunning()) {
@@ -576,10 +576,10 @@ public class ParallelGatewaySenderQueue implements RegionQueue {
         this.userRegionNameToshadowPRMap.put(userPR.getFullPath(), prQ);
       }
       /*
-       * Here, enqueTempEvents need to be invoked when a sender is already
+       * Here, enqueueTempEvents need to be invoked when a sender is already
        * running and userPR is created later. When the flow comes here through
        * start() method of sender i.e. userPR already exists and sender is
-       * started later, the enqueTempEvents is done in the start() method of
+       * started later, the enqueueTempEvents is done in the start() method of
        * ParallelGatewaySender
        */
       if ((this.index == this.nDispatcher - 1) && this.sender.isRunning()) {


[02/50] [abbrv] incubator-geode git commit: GEODE-77: changing names of expected idle threads

Posted by ma...@apache.org.
GEODE-77: changing names of expected idle threads


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

Branch: refs/heads/feature/GEODE-53
Commit: 4eb09ad43f47a4a0cef83c4d71acdb87554ab0ec
Parents: 1441789
Author: Bruce Schuchardt <bs...@pivotal.io>
Authored: Mon Nov 9 08:10:45 2015 -0800
Committer: Bruce Schuchardt <bs...@pivotal.io>
Committed: Mon Nov 9 08:10:45 2015 -0800

----------------------------------------------------------------------
 .../com/gemstone/gemfire/internal/util/PluckStacks.java | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4eb09ad4/gemfire-core/src/main/java/com/gemstone/gemfire/internal/util/PluckStacks.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/util/PluckStacks.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/util/PluckStacks.java
index f9f29e0..c1efbcc 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/util/PluckStacks.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/util/PluckStacks.java
@@ -198,21 +198,19 @@ public class PluckStacks {
     if (threadName.startsWith("Function Execution Processor")) {
       return isIdleExecutor(thread);
     }
-    if (threadName.startsWith("Geode Failure Detection Server thread")) {
-      return stackSize < 11 && thread.get(1).contains("Thread.State: WAITING");
+    if (threadName.startsWith("Geode Failure Detection Server")) {
+      return stackSize < 11 && thread.getFirstFrame().contains("socketAccept");
     }
     if (threadName.startsWith("Geode Membership Timer")) {
 //      System.out.println("gf timer stack size = " + stackSize + "; frame = " + thread.get(1));
-      return stackSize < 9 &&
-          (thread.get(1).contains("Thread.State: WAITING")
-              || thread.get(1).contains("Thread.State: TIMED_WAITING"));
+      return stackSize < 9 && !thread.isRunnable();
     }
     if (threadName.startsWith("Geode Membership View Creator")) {
 //    System.out.println("gf view creator stack size = " + stackSize + "; frame = " + thread.get(1));
-    return stackSize < 8 && thread.get(1).contains("Thread.State: WAITING");
+    return stackSize < 8 && !thread.isRunnable();
     }
     if (threadName.startsWith("Geode Heartbeat Sender")) {
-      return stackSize <= 8 && thread.get(1).contains("Thread.State: WAITING");
+      return stackSize <= 8 && !thread.isRunnable();
     }
     // thread currently disabled
 //    if (threadName.startsWith("Geode Suspect Message Collector")) {


[05/50] [abbrv] incubator-geode git commit: GEODE-77: members unfairly forced out of the distributed system

Posted by ma...@apache.org.
GEODE-77: members unfairly forced out of the distributed system

n integration testing members were, under heavy load, being forced out
of the distributed system in spite of the new tcp/ip final-checks.

This change set adds a recent-activity check to the doTCPCheckMember method
of GMSHealthMonitor.  It also corrects this method to use SocketCreator with
a background timeout task in case the tcp/ip socket timeout fails to work
(as it sometimes does).

During testing I also saw that GMSJoinLeave was not initiating a forced-
disconnect if it received a membership view showing that it was no longer
in the distributed system and modified it to do so.


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

Branch: refs/heads/feature/GEODE-53
Commit: 28d273cb0f19ff2d6b2b506b1d82b91b5ce2ce36
Parents: 026d149
Author: Bruce Schuchardt <bs...@pivotal.io>
Authored: Mon Nov 9 08:44:17 2015 -0800
Committer: Bruce Schuchardt <bs...@pivotal.io>
Committed: Mon Nov 9 08:44:17 2015 -0800

----------------------------------------------------------------------
 .../membership/gms/fd/GMSHealthMonitor.java     | 107 ++++++++++++++-----
 .../membership/gms/membership/GMSJoinLeave.java |   6 +-
 .../gms/membership/GMSJoinLeaveJUnitTest.java   |  19 +++-
 3 files changed, 99 insertions(+), 33 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/28d273cb/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/fd/GMSHealthMonitor.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/fd/GMSHealthMonitor.java b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/fd/GMSHealthMonitor.java
index 0307f5b..9e410e2 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/fd/GMSHealthMonitor.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/fd/GMSHealthMonitor.java
@@ -24,6 +24,8 @@ import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
+import java.util.Timer;
+import java.util.TimerTask;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.ConcurrentMap;
 import java.util.concurrent.ExecutorService;
@@ -54,6 +56,8 @@ import com.gemstone.gemfire.distributed.internal.membership.gms.messages.Heartbe
 import com.gemstone.gemfire.distributed.internal.membership.gms.messages.SuspectMembersMessage;
 import com.gemstone.gemfire.distributed.internal.membership.gms.messages.SuspectRequest;
 import com.gemstone.gemfire.internal.AvailablePort;
+import com.gemstone.gemfire.internal.ConnectionWatcher;
+import com.gemstone.gemfire.internal.SocketCreator;
 import com.gemstone.gemfire.internal.Version;
 
 /**
@@ -262,6 +266,7 @@ public class GMSHealthMonitor implements HealthMonitor, MessageHandler {
       try {
         DataInputStream in = new DataInputStream(socket.getInputStream());
         OutputStream out = socket.getOutputStream();
+        @SuppressWarnings("unused")
         short version = in.readShort();
         int  vmViewId = in.readInt();
         long uuidLSBs = in.readLong();
@@ -309,7 +314,13 @@ public class GMSHealthMonitor implements HealthMonitor, MessageHandler {
           }
         }
       } catch (IOException e) {
-        logger.trace("Unexpected exception", e);
+        logger.debug("Unexpected exception", e);
+      } catch (RuntimeException e) {
+        logger.debug("Unexpected runtime exception", e);
+        throw e;
+      } catch (Error e) {
+        logger.debug("Unexpected error", e);
+        throw e;
       } finally {
         if (socket != null) {
           try {
@@ -369,7 +380,7 @@ public class GMSHealthMonitor implements HealthMonitor, MessageHandler {
         if (!pinged) {
           suspectedMemberInView.put(mbr, currentView);
           String reason = "Member isn't responding to heartbeat requests";
-          GMSHealthMonitor.this.sendSuspectMessage(mbr, reason);
+          GMSHealthMonitor.this.initiateSuspicion(mbr, reason);
         } else {
           logger.trace("Setting next neighbor as member {} has responded.", mbr);
           suspectedMemberInView.remove(mbr);
@@ -381,7 +392,7 @@ public class GMSHealthMonitor implements HealthMonitor, MessageHandler {
 
   }
 
-  private void sendSuspectMessage(InternalDistributedMember mbr, String reason) {
+  private void initiateSuspicion(InternalDistributedMember mbr, String reason) {
     SuspectRequest sr = new SuspectRequest(mbr, reason);
     List<SuspectRequest> sl = new ArrayList<SuspectRequest>();
     sl.add(sr);
@@ -418,16 +429,13 @@ public class GMSHealthMonitor implements HealthMonitor, MessageHandler {
           TimeStamp ts = memberTimeStamps.get(member);
           if (pingResp.getResponseMsg() == null) {
             // double check the activity map
-            long now = System.currentTimeMillis();
             if (isStopping) {
               return true;
             }
-            if (ts != null && (now - ts.getTime()) <= memberTimeout) {
-              logger.trace("detected message traffic from member {}ms ago.  member-timeout is {}", now - ts.getTime(),
-                  memberTimeout);
+            if (checkRecentActivity(member)) {
               return true;
             }
-            logger.trace("no heartbeat response received from {}", member);
+            logger.trace("no heartbeat response received from {} and no recent activity", member);
             return false;
           } else {
             logger.trace("received heartbeat from {}", member);
@@ -447,6 +455,16 @@ public class GMSHealthMonitor implements HealthMonitor, MessageHandler {
   }
 
   /**
+   * Check for recent messaging activity from the given member
+   * @param suspectMember
+   * @return whether there has been activity within memberTimeout ms
+   */
+  private boolean checkRecentActivity(InternalDistributedMember suspectMember) {
+    TimeStamp ts = memberTimeStamps.get(suspectMember);
+    return (ts != null && (System.currentTimeMillis() - ts.getTime()) <= memberTimeout);
+  }
+
+  /**
    * During final check, establish TCP connection between current member and suspect member.
    * And exchange PING/PONG message to see if the suspect member is still alive.
    * 
@@ -454,15 +472,19 @@ public class GMSHealthMonitor implements HealthMonitor, MessageHandler {
    * @return true if successfully exchanged PING/PONG with TCP connection, otherwise false.
    */
   private boolean doTCPCheckMember(InternalDistributedMember suspectMember, int port) {
-    Socket clientSocket = new Socket();
+    Socket clientSocket = null;
+    // first check for a recent timestamp
+    if (checkRecentActivity(suspectMember)) {
+      return true;
+    }
     try {
       // establish TCP connection
 //      for (Map.Entry<InternalDistributedMember, InetSocketAddress> entry : socketInfo.entrySet()) {
 //        logger.info("socketInfo member:" + entry.getKey() + " port:" + entry.getValue().getPort());
 //      }
       logger.debug("Checking member {} with TCP socket connection {}:{}.", suspectMember, suspectMember.getInetAddress(), port);
-      InetSocketAddress addr = new InetSocketAddress(suspectMember.getInetAddress(), port);
-      clientSocket.connect(addr, (int) services.getConfig().getMemberTimeout());
+      clientSocket = SocketCreator.getDefaultInstance().connect(suspectMember.getInetAddress(), port,
+          (int)memberTimeout, new ConnectTimeoutTask(services.getTimer(), memberTimeout), false, -1, false);
       if (clientSocket.isConnected()) {
         clientSocket.setSoTimeout((int) services.getConfig().getMemberTimeout());
         InputStream in = clientSocket.getInputStream();
@@ -485,15 +507,16 @@ public class GMSHealthMonitor implements HealthMonitor, MessageHandler {
           return true;
         } else {
           //received ERROR
-          return false;
+          return checkRecentActivity(suspectMember);
         }
       } else {// cannot establish TCP connection with suspect member
-        return false;
+        return checkRecentActivity(suspectMember);
       }
     } catch (SocketTimeoutException e) {
+      logger.debug("tcp/ip connection timed out");
       return false;
     } catch (IOException e) {
-      logger.trace("Unexpected exception", e);
+      logger.debug("Unexpected exception", e);
     } finally {
       try {
         if (clientSocket != null) {
@@ -515,7 +538,7 @@ public class GMSHealthMonitor implements HealthMonitor, MessageHandler {
    */
   @Override
   public void suspect(InternalDistributedMember mbr, String reason) {
-    sendSuspectMessage(mbr, reason);
+    initiateSuspicion(mbr, reason);
     // Background suspect-collecting thread is currently disabled - it takes too long
 //    synchronized (suspectRequests) {
 //      SuspectRequest sr = new SuspectRequest((InternalDistributedMember) mbr, reason);
@@ -898,13 +921,13 @@ public class GMSHealthMonitor implements HealthMonitor, MessageHandler {
   @Override
   public void beSick() {
     this.beingSick = true;
-    sendSuspectMessage(localAddress, "beSick invoked on GMSHealthMonitor");
+    initiateSuspicion(localAddress, "beSick invoked on GMSHealthMonitor");
   }
 
   @Override
   public void playDead() {
     this.playingDead = true;
-    sendSuspectMessage(localAddress, "playDead invoked on GMSHealthMonitor");
+    initiateSuspicion(localAddress, "playDead invoked on GMSHealthMonitor");
   }
 
   @Override
@@ -1163,11 +1186,11 @@ public class GMSHealthMonitor implements HealthMonitor, MessageHandler {
               }
               if (!failed) {
                 logger.info("Final check passed");
+                contactedBy(mbr);
               }
               // whether it's alive or not, at this point we allow it to
               // be watched again
               suspectedMemberInView.remove(mbr);
-              contactedBy(mbr);
             } catch (DistributedSystemDisconnectedException e) {
               return;
             } catch (Exception e) {
@@ -1183,6 +1206,14 @@ public class GMSHealthMonitor implements HealthMonitor, MessageHandler {
       membersInFinalCheck.removeAll(membersChecked);
     }
   }
+  @Override
+  public void memberShutdown(DistributedMember mbr, String reason) {
+  }
+  
+  @Override
+  public int getFailureDetectionPort() {
+    return this.socketPort;
+  }
 
   interface Callback<T> {
     public void process(List<T> requests);
@@ -1318,13 +1349,37 @@ public class GMSHealthMonitor implements HealthMonitor, MessageHandler {
     }
   }
 
-  @Override
-  public void memberShutdown(DistributedMember mbr, String reason) {
-  }
-  
-  @Override
-  public int getFailureDetectionPort() {
-    return this.socketPort;
+  private static class ConnectTimeoutTask extends TimerTask implements ConnectionWatcher {
+    Timer scheduler;
+    Socket socket;
+    long timeout;
+    
+    ConnectTimeoutTask(Timer scheduler, long timeout) {
+      this.scheduler = scheduler;
+      this.timeout = timeout;
+    }
+    
+    @Override
+    public void beforeConnect(Socket socket) {
+      this.socket = socket;
+      scheduler.schedule(this, timeout);
+    }
+
+    @Override
+    public void afterConnect(Socket socket) {
+      cancel();
+    }
+    
+    @Override
+    public void run() {
+      try {
+        if (socket != null) {
+          socket.close();
+        }
+      } catch (IOException e) {
+        // ignored - nothing useful to do here
+      }
+    }
+    
   }
-  
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/28d273cb/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeave.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeave.java b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeave.java
index 4b1993f..a6121dd 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeave.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeave.java
@@ -782,10 +782,8 @@ public class GMSJoinLeave implements JoinLeave, MessageHandler {
         }
       }
     } else { // !preparing
-      if (currentView != null && !view.contains(this.localAddress)) {
-        if (quorumRequired) {
-          forceDisconnect("This node is no longer in the membership view");
-        }
+      if (isJoined && currentView != null && !view.contains(this.localAddress)) {
+        forceDisconnect("This node is no longer in the membership view");
       } else {
         if (!m.isRebroadcast()) { // no need to ack a rebroadcast view
           ackView(m);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/28d273cb/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeaveJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeaveJUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeaveJUnitTest.java
index 89282c0..562fd70 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeaveJUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeaveJUnitTest.java
@@ -1,5 +1,6 @@
 package com.gemstone.gemfire.distributed.internal.membership.gms.membership;
 
+import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
 import static org.mockito.Matchers.any;
 import static org.mockito.Mockito.mock;
@@ -7,12 +8,12 @@ import static org.mockito.Mockito.never;
 import static org.mockito.Mockito.times;
 import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.assertFalse;
 
 import java.io.IOException;
 import java.net.UnknownHostException;
 import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
 import java.util.HashSet;
 import java.util.LinkedList;
 import java.util.List;
@@ -170,7 +171,19 @@ public class GMSJoinLeaveJUnitTest {
     assertTrue("JoinRequest should not have been added to view request", gmsJoinLeave.getViewRequests().size() == 0);
     verify(messenger).send(any(JoinResponseMessage.class));
   }
-  
+  @Test
+  public void testViewWithoutMemberInitiatesForcedDisconnect() throws Exception {
+    initMocks();
+    gmsJoinLeave.becomeCoordinatorForTest();
+    List<InternalDistributedMember> members = Arrays.asList(mockMembers);
+    Set<InternalDistributedMember> empty = Collections.<InternalDistributedMember>emptySet();
+    NetView v = new NetView(mockMembers[0], 2, members, empty, empty);
+    InstallViewMessage message = new InstallViewMessage(v, null);
+    gmsJoinLeave.processMessage(message);
+    verify(manager).forceDisconnect(any(String.class));
+  }
+
+
   @Test
   public void testProcessJoinMessageWithBadAuthentication() throws IOException {
     initMocks();


[13/50] [abbrv] incubator-geode git commit: Merge remote-tracking branch 'origin/develop' into feature/GEODE-11

Posted by ma...@apache.org.
Merge remote-tracking branch 'origin/develop' into feature/GEODE-11


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

Branch: refs/heads/feature/GEODE-53
Commit: 3af1540f6ab3555744b794c74a131cf75aa1f969
Parents: 2cf4fb1 79aa0be
Author: Ashvin Agrawal <as...@apache.org>
Authored: Wed Nov 11 13:19:51 2015 -0800
Committer: Ashvin Agrawal <as...@apache.org>
Committed: Wed Nov 11 13:19:51 2015 -0800

----------------------------------------------------------------------
 .../cache/partition/PartitionManager.java       |  2 +-
 .../com/gemstone/gemfire/internal/Version.java  |  5 ++
 .../cache/tier/sockets/CommandInitializer.java  |  4 ++
 .../tier/sockets/command/CommitCommand.java     |  4 +-
 .../tier/sockets/command/ExecuteFunction66.java |  2 +-
 .../command/ExecuteRegionFunction66.java        |  2 +-
 .../command/ExecuteRegionFunctionSingleHop.java |  2 +-
 .../partition/PartitionManagerDUnitTest.java    | 75 --------------------
 .../tier/sockets/command/CommitCommandTest.java | 39 ++++++++++
 .../management/DistributedSystemDUnitTest.java  | 12 ++--
 10 files changed, 59 insertions(+), 88 deletions(-)
----------------------------------------------------------------------



[14/50] [abbrv] incubator-geode git commit: Merge branch 'feature/GEODE-11' into develop

Posted by ma...@apache.org.
Merge branch 'feature/GEODE-11' into develop


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

Branch: refs/heads/feature/GEODE-53
Commit: 05e047cafdfa76100b92ae2239ef1f839552f5ea
Parents: 79aa0be 3af1540
Author: Ashvin Agrawal <as...@apache.org>
Authored: Wed Nov 11 13:22:31 2015 -0800
Committer: Ashvin Agrawal <as...@apache.org>
Committed: Wed Nov 11 13:22:31 2015 -0800

----------------------------------------------------------------------
 gemfire-core/build.gradle                       |   4 -
 .../gemstone/gemfire/cache/GemFireCache.java    |   7 -
 .../internal/AsyncEventQueueFactoryImpl.java    |   9 +-
 .../internal/AsyncEventQueueImpl.java           |   3 +
 .../gemfire/cache/lucene/LuceneIndex.java       |  59 --
 .../gemfire/cache/lucene/LuceneQuery.java       |  53 --
 .../cache/lucene/LuceneQueryFactory.java        | 137 -----
 .../cache/lucene/LuceneQueryResults.java        |  45 --
 .../cache/lucene/LuceneResultStruct.java        |  75 ---
 .../gemfire/cache/lucene/LuceneService.java     | 119 ----
 .../cache/lucene/LuceneServiceFactory.java      |  30 -
 .../cache/lucene/LuceneServiceProvider.java     |  52 --
 .../cache/lucene/internal/LuceneIndexImpl.java  |  70 ---
 .../lucene/internal/LuceneQueryFactoryImpl.java | 104 ----
 .../cache/lucene/internal/LuceneQueryImpl.java  |  78 ---
 .../lucene/internal/LuceneQueryResultsImpl.java |  82 ---
 .../lucene/internal/LuceneResultStructImpl.java |  61 --
 .../internal/LuceneServiceFactoryImpl.java      |  32 -
 .../lucene/internal/LuceneServiceImpl.java      | 106 ----
 .../internal/DataSerializableFixedID.java       |   9 +
 .../gemfire/internal/cache/BucketRegion.java    |   2 +-
 .../gemfire/internal/cache/CacheService.java    |  26 +
 .../internal/cache/GemFireCacheImpl.java        |  79 ++-
 .../gemfire/internal/cache/InternalCache.java   |   5 +-
 .../gemfire/internal/cache/LocalRegion.java     |   8 +-
 .../cache/PartitionedRegionDataStore.java       |   2 +-
 .../gemfire/internal/cache/RegionListener.java  |  30 +
 .../cache/extension/SimpleExtensionPoint.java   |   2 +-
 .../cache/wan/AbstractGatewaySender.java        |   7 +
 .../cache/wan/GatewaySenderAttributes.java      |   5 +
 .../internal/cache/xmlcache/CacheCreation.java  |  14 +-
 .../cache/xmlcache/DefaultEntityResolver2.java  |   2 +-
 .../cache/xmlcache/GeodeEntityResolver.java     |  49 ++
 .../cache/xmlcache/PivotalEntityResolver.java   |   2 +-
 .../util/concurrent/CopyOnWriteHashMap.java     |  46 +-
 .../util/concurrent/CopyOnWriteWeakHashMap.java |  12 +
 .../services/org.xml.sax.ext.EntityResolver2    |   1 +
 .../internal/cache/CacheServiceJUnitTest.java   |  43 ++
 .../internal/cache/MockCacheService.java        |   8 +
 .../internal/cache/MockCacheServiceImpl.java    |  23 +
 .../internal/cache/RegionListenerJUnitTest.java |  47 ++
 .../mock/DestroyMockCacheExtensionFunction.java |   2 +-
 .../concurrent/CopyOnWriteHashMapJUnitTest.java | 496 ++++++++++++++++
 ...gemstone.gemfire.internal.cache.CacheService |   1 +
 .../codeAnalysis/sanctionedSerializables.txt    |   2 +-
 gemfire-lucene/build.gradle                     |  29 +
 .../gemfire/cache/lucene/LuceneIndex.java       |  60 ++
 .../gemfire/cache/lucene/LuceneQuery.java       |  48 ++
 .../cache/lucene/LuceneQueryFactory.java        | 101 ++++
 .../cache/lucene/LuceneQueryProvider.java       |  45 ++
 .../cache/lucene/LuceneQueryResults.java        |  58 ++
 .../cache/lucene/LuceneResultStruct.java        |  62 ++
 .../gemfire/cache/lucene/LuceneService.java     | 125 ++++
 .../cache/lucene/LuceneServiceProvider.java     |  46 ++
 .../lucene/internal/InternalLuceneIndex.java    |  29 +
 .../lucene/internal/InternalLuceneService.java  |  29 +
 .../lucene/internal/LuceneEventListener.java    |  99 ++++
 .../LuceneIndexForPartitionedRegion.java        | 136 +++++
 .../LuceneIndexForReplicatedRegion.java         |  48 ++
 .../cache/lucene/internal/LuceneIndexImpl.java  | 107 ++++
 .../lucene/internal/LuceneQueryFactoryImpl.java |  67 +++
 .../cache/lucene/internal/LuceneQueryImpl.java  |  87 +++
 .../lucene/internal/LuceneQueryResultsImpl.java | 120 ++++
 .../lucene/internal/LuceneResultStructImpl.java |  94 +++
 .../lucene/internal/LuceneServiceImpl.java      | 273 +++++++++
 .../internal/PartitionedRepositoryManager.java  | 163 ++++++
 .../lucene/internal/StringQueryProvider.java    | 106 ++++
 .../internal/directory/FileIndexInput.java      | 131 +++++
 .../internal/directory/RegionDirectory.java     | 119 ++++
 .../internal/distributed/CollectorManager.java  |  55 ++
 .../lucene/internal/distributed/EntryScore.java |  82 +++
 .../internal/distributed/LuceneFunction.java    | 137 +++++
 .../distributed/LuceneFunctionContext.java      | 115 ++++
 .../lucene/internal/distributed/TopEntries.java | 133 +++++
 .../distributed/TopEntriesCollector.java        | 102 ++++
 .../distributed/TopEntriesCollectorManager.java | 178 ++++++
 .../TopEntriesFunctionCollector.java            | 163 ++++++
 .../lucene/internal/filesystem/ChunkKey.java    | 123 ++++
 .../cache/lucene/internal/filesystem/File.java  | 155 +++++
 .../internal/filesystem/FileInputStream.java    | 166 ++++++
 .../internal/filesystem/FileOutputStream.java   | 103 ++++
 .../lucene/internal/filesystem/FileSystem.java  | 156 +++++
 .../filesystem/SeekableInputStream.java         |  43 ++
 .../internal/repository/IndexRepository.java    |  74 +++
 .../repository/IndexRepositoryImpl.java         | 113 ++++
 .../repository/IndexResultCollector.java        |  47 ++
 .../internal/repository/RepositoryManager.java  |  45 ++
 .../HeterogenousLuceneSerializer.java           |  83 +++
 .../repository/serializer/LuceneSerializer.java |  35 ++
 .../serializer/PdxLuceneSerializer.java         |  47 ++
 .../serializer/ReflectionLuceneSerializer.java  |  74 +++
 .../repository/serializer/SerializerUtil.java   | 168 ++++++
 .../internal/xml/LuceneIndexCreation.java       | 111 ++++
 .../internal/xml/LuceneIndexXmlGenerator.java   |  65 +++
 .../internal/xml/LuceneServiceXmlGenerator.java |  39 ++
 .../lucene/internal/xml/LuceneXmlConstants.java |  31 +
 .../lucene/internal/xml/LuceneXmlParser.java    |  97 ++++
 .../lucene/lucene-1.0.xsd                       |  42 ++
 ...gemstone.gemfire.internal.cache.CacheService |   1 +
 ...ne.gemfire.internal.cache.xmlcache.XmlParser |   1 +
 .../internal/LuceneEventListenerJUnitTest.java  | 109 ++++
 .../LuceneIndexRecoveryHAJUnitTest.java         | 201 +++++++
 .../LuceneQueryFactoryImplJUnitTest.java        |  50 ++
 .../internal/LuceneQueryImplJUnitTest.java      | 123 ++++
 .../LuceneQueryResultsImplJUnitTest.java        | 126 ++++
 .../LuceneResultStructImpJUnitTest.java         |  51 ++
 .../internal/LuceneServiceImplJUnitTest.java    | 226 ++++++++
 .../PartitionedRepositoryManagerJUnitTest.java  | 230 ++++++++
 .../internal/StringQueryProviderJUnitTest.java  |  90 +++
 .../directory/RegionDirectoryJUnitTest.java     |  56 ++
 .../DistributedScoringJUnitTest.java            | 155 +++++
 .../distributed/EntryScoreJUnitTest.java        |  40 ++
 .../LuceneFunctionContextJUnitTest.java         |  64 ++
 .../distributed/LuceneFunctionJUnitTest.java    | 423 ++++++++++++++
 .../LuceneFunctionReadPathDUnitTest.java        | 241 ++++++++
 .../TopEntriesCollectorJUnitTest.java           | 139 +++++
 .../TopEntriesFunctionCollectorJUnitTest.java   | 323 +++++++++++
 .../distributed/TopEntriesJUnitTest.java        | 146 +++++
 .../internal/filesystem/ChunkKeyJUnitTest.java  |  48 ++
 .../internal/filesystem/FileJUnitTest.java      |  53 ++
 .../filesystem/FileSystemJUnitTest.java         | 578 +++++++++++++++++++
 ...IndexRepositoryImplJUnitPerformanceTest.java | 437 ++++++++++++++
 .../IndexRepositoryImplJUnitTest.java           | 208 +++++++
 .../HeterogenousLuceneSerializerJUnitTest.java  |  90 +++
 .../serializer/PdxFieldMapperJUnitTest.java     |  85 +++
 .../ReflectionFieldMapperJUnitTest.java         |  85 +++
 .../internal/repository/serializer/Type1.java   |  48 ++
 .../internal/repository/serializer/Type2.java   |  34 ++
 ...neIndexXmlGeneratorIntegrationJUnitTest.java |  78 +++
 .../xml/LuceneIndexXmlGeneratorJUnitTest.java   |  80 +++
 ...uceneIndexXmlParserIntegrationJUnitTest.java | 107 ++++
 .../xml/LuceneIndexXmlParserJUnitTest.java      |  72 +++
 ...erIntegrationJUnitTest.createIndex.cache.xml |  24 +
 ...serIntegrationJUnitTest.parseIndex.cache.xml |  24 +
 gradle/dependency-versions.properties           |   2 +-
 settings.gradle                                 |   1 +
 136 files changed, 10705 insertions(+), 1157 deletions(-)
----------------------------------------------------------------------



[18/50] [abbrv] incubator-geode git commit: GEODE-545: fix race in testCustomEntryIdleReset

Posted by ma...@apache.org.
GEODE-545: fix race in testCustomEntryIdleReset


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

Branch: refs/heads/feature/GEODE-53
Commit: 355a2d35df846b675e25f05d797f9787bd77042a
Parents: 8b04c3d
Author: Darrel Schneider <ds...@pivotal.io>
Authored: Thu Nov 12 16:07:56 2015 -0800
Committer: Darrel Schneider <ds...@pivotal.io>
Committed: Thu Nov 12 16:13:23 2015 -0800

----------------------------------------------------------------------
 .../gemfire/cache30/RegionTestCase.java         | 54 +++++++-------------
 1 file changed, 18 insertions(+), 36 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/355a2d35/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/RegionTestCase.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/RegionTestCase.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/RegionTestCase.java
index 35be2d0..0bc0ec0 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/RegionTestCase.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/RegionTestCase.java
@@ -3457,7 +3457,7 @@ public abstract class RegionTestCase extends CacheTestCase {
   public void testCustomEntryIdleReset() {
 
     final String name = this.getUniqueName();
-    final int timeout = 200; // ms
+    final int timeout = 200*1000; // ms
     final String key1 = "KEY1";
     final String value = "VALUE";
     
@@ -3475,55 +3475,37 @@ public abstract class RegionTestCase extends CacheTestCase {
     factory.addCacheListener(list);
     RegionAttributes attrs = factory.create();
     
-    Region region = null;
     System.setProperty(LocalRegion.EXPIRY_MS_PROPERTY, "true");
     try {
-      region = createRegion(name, attrs);
+      LocalRegion region = (LocalRegion) createRegion(name, attrs);
 
     // DebuggerSupport.waitForJavaDebugger(getLogWriter(), "Set breakpoint in invalidate");
     ExpiryTask.suspendExpiration();
-    Region.Entry entry = null;
-    long tilt;
     try {
       region.create(key1, value);
-      tilt = System.currentTimeMillis() + timeout;
       assertTrue(list.waitForInvocation(5000));
-      entry = region.getEntry(key1);
+      Region.Entry entry = region.getEntry(key1);
       assertNotNull(entry.getValue());
-    } 
-    finally {
-      ExpiryTask.permitExpiration();
-    }
-    
-    pause(timeout / 2);
-    long now = System.currentTimeMillis();
-    if (entry.getValue() == null && now < tilt) {
-      fail("Entry invalidated " + (tilt - now) + " ms prematurely");
-    }
-    region.get(key1); // touch again
-    
-    waitForInvalidate(entry, tilt);
-
-    // Do it again with a put (I guess)
-    ExpiryTask.suspendExpiration();
-    try {
+      EntryExpiryTask eet = region.getEntryExpiryTask(key1);
+      final long createExpiryTime = eet.getExpirationTime();
+      waitForExpiryClockToChange(region);
+      region.get(key1);
+      assertSame(eet, region.getEntryExpiryTask(key1));
+      final long getExpiryTime = eet.getExpirationTime();
+      if (getExpiryTime - createExpiryTime <= 0L) {
+        fail("get did not reset the expiration time. createExpiryTime=" + createExpiryTime + " getExpiryTime=" + getExpiryTime);
+      }
+      waitForExpiryClockToChange(region);
       region.put(key1, value);
-      tilt = System.currentTimeMillis() + timeout;
-      entry = region.getEntry(key1);
-      assertNotNull(entry.getValue());
+      assertSame(eet, region.getEntryExpiryTask(key1));
+      final long putExpiryTime = eet.getExpirationTime();
+      if (putExpiryTime - getExpiryTime <= 0L) {
+        fail("put did not reset the expiration time. getExpiryTime=" + getExpiryTime + " putExpiryTime=" + putExpiryTime);
+      }
     } 
     finally {
       ExpiryTask.permitExpiration();
     }
-    
-    pause(timeout / 2);
-    now = System.currentTimeMillis();
-    if (entry.getValue() == null && now < tilt) {
-      fail("entry invalidated " + (tilt - now) + " ms prematurely");
-    }
-    region.put(key1, value); // touch
-    
-    waitForInvalidate(entry, tilt);
     } 
     finally {
       System.getProperties().remove(LocalRegion.EXPIRY_MS_PROPERTY);


[15/50] [abbrv] incubator-geode git commit: GEODE-540: prevent hang by not joining while synchronized

Posted by ma...@apache.org.
GEODE-540: prevent hang by not joining while synchronized


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

Branch: refs/heads/feature/GEODE-53
Commit: 8b04c3d7f24cc5d3cb6ab9739c698c5996e17381
Parents: 05e047c
Author: Darrel Schneider <ds...@pivotal.io>
Authored: Wed Nov 11 16:09:41 2015 -0800
Committer: Darrel Schneider <ds...@pivotal.io>
Committed: Wed Nov 11 16:32:02 2015 -0800

----------------------------------------------------------------------
 .../cache/control/OffHeapMemoryMonitor.java        | 17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8b04c3d7/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/control/OffHeapMemoryMonitor.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/control/OffHeapMemoryMonitor.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/control/OffHeapMemoryMonitor.java
index 0a6674c..721e9a6 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/control/OffHeapMemoryMonitor.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/control/OffHeapMemoryMonitor.java
@@ -115,6 +115,7 @@ public class OffHeapMemoryMonitor implements ResourceMonitor, MemoryUsageListene
     stopMonitoring(false);
   }
   public void stopMonitoring(boolean waitForThread) {
+    Thread threadToWaitFor = null;
     synchronized (this) {
       if (!this.started) {
         return;
@@ -126,17 +127,19 @@ public class OffHeapMemoryMonitor implements ResourceMonitor, MemoryUsageListene
       synchronized (this.offHeapMemoryUsageListener) {
         this.offHeapMemoryUsageListener.notifyAll();
       }
-
-      if (waitForThread && this.memoryListenerThread != null) {
-        try {
-          this.memoryListenerThread.join();
-        } catch (InterruptedException e) {
-          Thread.currentThread().interrupt();
-        }
+      if (waitForThread) {
+        threadToWaitFor = this.memoryListenerThread;
       }
       this.memoryListenerThread = null;
       this.started = false;
     }
+    if (threadToWaitFor != null) {
+      try {
+        threadToWaitFor.join();
+      } catch (InterruptedException e) {
+        Thread.currentThread().interrupt();
+      }
+    }
   }
 
   public volatile OffHeapMemoryMonitorObserver testHook;


[39/50] [abbrv] incubator-geode git commit: Merge branch 'feature/GEODE-524' of https://github.com/shroman/incubator-geode into develop

Posted by ma...@apache.org.
Merge branch 'feature/GEODE-524' of https://github.com/shroman/incubator-geode into develop

This closes #33


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

Branch: refs/heads/feature/GEODE-53
Commit: 4b904ce62c56b9613bcd7df301ef2e40f256496b
Parents: b2e0142 9dc7587
Author: Ashvin Agrawal <as...@apache.org>
Authored: Wed Nov 18 11:07:55 2015 -0800
Committer: Ashvin Agrawal <as...@apache.org>
Committed: Wed Nov 18 11:19:45 2015 -0800

----------------------------------------------------------------------
 .../internal/ParallelAsyncEventQueueImpl.java   |  2 +-
 .../internal/SerialAsyncEventQueueImpl.java     |  2 +-
 .../cache/wan/AbstractGatewaySender.java        | 20 ++++++++++----------
 ...rentParallelGatewaySenderEventProcessor.java |  2 +-
 .../ParallelGatewaySenderEventProcessor.java    |  2 +-
 .../parallel/ParallelGatewaySenderQueue.java    | 12 ++++++------
 .../SerialGatewaySenderEventProcessor.java      |  4 ++--
 7 files changed, 22 insertions(+), 22 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4b904ce6/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/wan/AbstractGatewaySender.java
----------------------------------------------------------------------


[10/50] [abbrv] incubator-geode git commit: GEODE-524 enque -> enqueue correction

Posted by ma...@apache.org.
GEODE-524 enque -> enqueue correction


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

Branch: refs/heads/feature/GEODE-53
Commit: 12cadbee57a650bc100eb738008497ed12f0b09b
Parents: cfbeaf2
Author: shtykh_roman <rs...@yahoo.com>
Authored: Wed Nov 11 12:28:28 2015 +0900
Committer: shtykh_roman <rs...@yahoo.com>
Committed: Wed Nov 11 12:28:28 2015 +0900

----------------------------------------------------------------------
 .../internal/ParallelAsyncEventQueueImpl.java   |  2 +-
 .../internal/SerialAsyncEventQueueImpl.java     |  2 +-
 .../cache/wan/AbstractGatewaySender.java        | 20 ++++++++++----------
 ...rentParallelGatewaySenderEventProcessor.java |  2 +-
 .../ParallelGatewaySenderEventProcessor.java    |  2 +-
 .../parallel/ParallelGatewaySenderQueue.java    |  4 ++--
 .../SerialGatewaySenderEventProcessor.java      |  4 ++--
 7 files changed, 18 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/12cadbee/gemfire-core/src/main/java/com/gemstone/gemfire/cache/asyncqueue/internal/ParallelAsyncEventQueueImpl.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/asyncqueue/internal/ParallelAsyncEventQueueImpl.java b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/asyncqueue/internal/ParallelAsyncEventQueueImpl.java
index f73b90f..377f8e2 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/asyncqueue/internal/ParallelAsyncEventQueueImpl.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/asyncqueue/internal/ParallelAsyncEventQueueImpl.java
@@ -113,7 +113,7 @@ public class ParallelAsyncEventQueueImpl extends AbstractGatewaySender {
       logger.info(LocalizedMessage.create(LocalizedStrings.ParallelGatewaySenderImpl_STARTED__0, this));
       
       if (!tmpQueuedEvents.isEmpty()) {
-        enqueTempEvents();
+        enqueueTempEvents();
       }
     }
     finally {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/12cadbee/gemfire-core/src/main/java/com/gemstone/gemfire/cache/asyncqueue/internal/SerialAsyncEventQueueImpl.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/asyncqueue/internal/SerialAsyncEventQueueImpl.java b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/asyncqueue/internal/SerialAsyncEventQueueImpl.java
index 71f839e..8c8342c 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/asyncqueue/internal/SerialAsyncEventQueueImpl.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/asyncqueue/internal/SerialAsyncEventQueueImpl.java
@@ -121,7 +121,7 @@ public class SerialAsyncEventQueueImpl extends AbstractGatewaySender {
       
       logger.info(LocalizedMessage.create(LocalizedStrings.SerialGatewaySenderImpl_STARTED__0, this));
   
-      enqueTempEvents();
+      enqueueTempEvents();
     } finally {
       this.lifeCycleLock.writeLock().unlock();
     }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/12cadbee/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/wan/AbstractGatewaySender.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/wan/AbstractGatewaySender.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/wan/AbstractGatewaySender.java
index f1613a3..aef2a4b 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/wan/AbstractGatewaySender.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/wan/AbstractGatewaySender.java
@@ -78,7 +78,7 @@ import com.gemstone.gemfire.internal.offheap.annotations.Retained;
 import com.gemstone.gemfire.internal.offheap.annotations.Unretained;
 
 /**
- * Abstract implementation of both Serial and Parallel GatewaySener. It handles
+ * Abstract implementation of both Serial and Parallel GatewaySender. It handles
  * common functionality like initializing proxy.
  * 
  * @author Suranjan Kumar
@@ -640,15 +640,15 @@ public abstract class AbstractGatewaySender implements GatewaySender,
     logger.info(LocalizedMessage.create(LocalizedStrings.GatewayImpl_GATEWAY_0_HAS_BEEN_REBALANCED, this));
   }
 
-  public boolean beforeEnque(GatewayQueueEvent gatewayEvent) {
-    boolean enque = true;
+  public boolean beforeEnqueue(GatewayQueueEvent gatewayEvent) {
+    boolean enqueue = true;
     for (GatewayEventFilter filter : getGatewayEventFilters()) {
-      enque = filter.beforeEnqueue(gatewayEvent);
-      if (!enque) {
-        return enque;
+      enqueue = filter.beforeEnqueue(gatewayEvent);
+      if (!enqueue) {
+        return enqueue;
       }
     }
-    return enque;
+    return enqueue;
   }
   
   protected void stompProxyDead() {
@@ -809,7 +809,7 @@ public abstract class AbstractGatewaySender implements GatewaySender,
         
         logger.info(LocalizedMessage.create(LocalizedStrings.GatewaySender_PAUSED__0, this));
 
-        enqueTempEvents();
+        enqueueTempEvents();
       } finally {
         this.lifeCycleLock.writeLock().unlock();
       }
@@ -832,7 +832,7 @@ public abstract class AbstractGatewaySender implements GatewaySender,
         
         logger.info(LocalizedMessage.create(LocalizedStrings.GatewaySender_RESUMED__0, this));
         
-        enqueTempEvents();
+        enqueueTempEvents();
       } finally {
         this.lifeCycleLock.writeLock().unlock();
       }
@@ -1021,7 +1021,7 @@ public abstract class AbstractGatewaySender implements GatewaySender,
    * The eventProcessor can be null when the method gets invoked through this flow: 
    * ParallelGatewaySenderImpl.start() -> ParallelGatewaySenderQueue.<init> -> ParallelGatewaySenderQueue.addPartitionedRegionForRegion 
    */
-  public void enqueTempEvents() {
+  public void enqueueTempEvents() {
     if (this.eventProcessor != null) {//Fix for defect #47308
       TmpQueueEvent nextEvent = null;
       final GatewaySenderStats stats = getStatistics();

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/12cadbee/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/wan/parallel/ConcurrentParallelGatewaySenderEventProcessor.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/wan/parallel/ConcurrentParallelGatewaySenderEventProcessor.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/wan/parallel/ConcurrentParallelGatewaySenderEventProcessor.java
index 970afe3..dd6ffc5 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/wan/parallel/ConcurrentParallelGatewaySenderEventProcessor.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/wan/parallel/ConcurrentParallelGatewaySenderEventProcessor.java
@@ -156,7 +156,7 @@ public class ConcurrentParallelGatewaySenderEventProcessor extends AbstractGatew
     int pId = bucketId % this.nDispatcher;
     this.processors[pId].enqueueEvent(operation, event, substituteValue);
     
-   /* if (getSender().beforeEnque(gatewayQueueEvent)) {
+   /* if (getSender().beforeEnqueue(gatewayQueueEvent)) {
       long start = getSender().getStatistics().startTime();
       try {
         this.parallelQueue.put(gatewayQueueEvent);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/12cadbee/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelGatewaySenderEventProcessor.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelGatewaySenderEventProcessor.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelGatewaySenderEventProcessor.java
index f8780f4..8d11079 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelGatewaySenderEventProcessor.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelGatewaySenderEventProcessor.java
@@ -149,7 +149,7 @@ public class ParallelGatewaySenderEventProcessor extends
       gatewayQueueEvent = new HDFSGatewayEventImpl(operation,
           event, substituteValue, true, eventID.getBucketID());
 
-      if (getSender().beforeEnque(gatewayQueueEvent)) {
+      if (getSender().beforeEnqueue(gatewayQueueEvent)) {
         long start = getSender().getStatistics().startTime();
         try {
           this.queue.put(gatewayQueueEvent);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/12cadbee/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelGatewaySenderQueue.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelGatewaySenderQueue.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelGatewaySenderQueue.java
index 882a99a..c82e9e5 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelGatewaySenderQueue.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelGatewaySenderQueue.java
@@ -427,7 +427,7 @@ public class ParallelGatewaySenderQueue implements RegionQueue {
        * ParallelGatewaySender
        */
       if ((this.index == this.nDispatcher - 1) && this.sender.isRunning()) {
-        ((AbstractGatewaySender)sender).enqueTempEvents();
+        ((AbstractGatewaySender)sender).enqueueTempEvents();
       }
     }
     finally {
@@ -583,7 +583,7 @@ public class ParallelGatewaySenderQueue implements RegionQueue {
        * ParallelGatewaySender
        */
       if ((this.index == this.nDispatcher - 1) && this.sender.isRunning()) {
-        ((AbstractGatewaySender)sender).enqueTempEvents();
+        ((AbstractGatewaySender)sender).enqueueTempEvents();
       }
       afterRegionAdd(userPR);
       this.sender.lifeCycleLock.writeLock().unlock();

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/12cadbee/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/wan/serial/SerialGatewaySenderEventProcessor.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/wan/serial/SerialGatewaySenderEventProcessor.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/wan/serial/SerialGatewaySenderEventProcessor.java
index 55e9668..a04ddd2 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/wan/serial/SerialGatewaySenderEventProcessor.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/wan/serial/SerialGatewaySenderEventProcessor.java
@@ -444,7 +444,7 @@ public class SerialGatewaySenderEventProcessor extends AbstractGatewaySenderEven
     if (logger.isDebugEnabled()) {
       logger.debug("{}: Queueing event ({}): {}", sender.getId(), (statistics.getEventsQueued() + 1), gatewayEvent);
     }
-    if (!sender.beforeEnque(gatewayEvent)) {
+    if (!sender.beforeEnqueue(gatewayEvent)) {
       if (logger.isDebugEnabled()) {
         logger.debug("Event {} is not added to queue.", gatewayEvent);
       }
@@ -683,7 +683,7 @@ public class SerialGatewaySenderEventProcessor extends AbstractGatewaySenderEven
       catch (Exception e) {
         logger.warn(LocalizedMessage.create(LocalizedStrings.GatewayImpl_EVENT_FAILED_TO_BE_INITIALIZED_0, gatewayEvent), e);
       }
-      if (!sender.beforeEnque(gatewayEvent)) {
+      if (!sender.beforeEnqueue(gatewayEvent)) {
         statistics.incEventsFiltered();
         return;
       }


[20/50] [abbrv] incubator-geode git commit: GEODE-539: remove XD off-heap artifacts

Posted by ma...@apache.org.
GEODE-539: remove XD off-heap artifacts

The OffHeapReference interface has been removed.
Use the StoredObject interface instead.

The XD SRC_TYPE constants have been renamed to
unused and a comment added explaining why we might
want to keep the SRC_TYPE/ChunkType feature around
for future off-heap extensions.


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

Branch: refs/heads/feature/GEODE-53
Commit: 781bd8d74e4ffcfbb12b286dd7a582a1de586f78
Parents: 5118ad0
Author: Darrel Schneider <ds...@pivotal.io>
Authored: Thu Nov 12 16:24:40 2015 -0800
Committer: Darrel Schneider <ds...@pivotal.io>
Committed: Thu Nov 12 16:35:54 2015 -0800

----------------------------------------------------------------------
 .../gemfire/internal/cache/EntryEventImpl.java  |  1 -
 .../gemfire/internal/offheap/OffHeapHelper.java |  4 +-
 .../internal/offheap/OffHeapReference.java      | 72 --------------------
 .../offheap/SimpleMemoryAllocatorImpl.java      | 28 +++++---
 .../gemfire/internal/offheap/StoredObject.java  | 42 +++++++++++-
 5 files changed, 63 insertions(+), 84 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/781bd8d7/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/EntryEventImpl.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/EntryEventImpl.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/EntryEventImpl.java
index b7fbf1e..0786a69 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/EntryEventImpl.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/EntryEventImpl.java
@@ -73,7 +73,6 @@ import com.gemstone.gemfire.internal.logging.LogService;
 import com.gemstone.gemfire.internal.logging.log4j.LocalizedMessage;
 import com.gemstone.gemfire.internal.logging.log4j.LogMarker;
 import com.gemstone.gemfire.internal.offheap.OffHeapHelper;
-import com.gemstone.gemfire.internal.offheap.OffHeapReference;
 import com.gemstone.gemfire.internal.offheap.OffHeapRegionEntryHelper;
 import com.gemstone.gemfire.internal.offheap.Releasable;
 import com.gemstone.gemfire.internal.offheap.SimpleMemoryAllocatorImpl;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/781bd8d7/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/OffHeapHelper.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/OffHeapHelper.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/OffHeapHelper.java
index 3d62fdf..b5677cd 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/OffHeapHelper.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/OffHeapHelper.java
@@ -37,8 +37,8 @@ public class OffHeapHelper {
    * Note even if o is sqlf off-heap byte[] or byte[][] the heap form will be created.
    */
   public static Object getHeapForm(Object o) {
-    if (o instanceof OffHeapReference) {
-      return ((OffHeapReference) o).getValueAsDeserializedHeapObject();
+    if (o instanceof StoredObject) {
+      return ((StoredObject) o).getValueAsDeserializedHeapObject();
     } else {
       return o;
     }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/781bd8d7/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/OffHeapReference.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/OffHeapReference.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/OffHeapReference.java
deleted file mode 100644
index 1507273..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/OffHeapReference.java
+++ /dev/null
@@ -1,72 +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.
- */
-package com.gemstone.gemfire.internal.offheap;
-
-import com.gemstone.gemfire.internal.Sendable;
-import com.gemstone.gemfire.internal.offheap.annotations.Retained;
-
-/**
- * Instances of this interface are references to off-heap.
- * Note: this interface is part of building the odbc drivers. Any classes or interfaces it references
- * need to be added to SQLFire.xml -sqlf-odbc-java-list.
- * Because of odbc we do not want this interface to extend CachedDeserializable because it pulls in too many of the GemFire code base.
- * 
- * @author darrel
- * @since 9.0
- */
-public interface OffHeapReference extends Releasable, Sendable {
-
-  /**
-   * Call to indicate that this object's memory is in use by the caller.
-   * The memory will stay allocated until {@link #release()} is called.
-   * It is ok for a thread other than the one that called this method to call release.
-   * This method is called implicitly at the time the chunk is allocated.
-   * Note: @Retained tells you that "this" is retained by this method.
-   * 
-   * @throws IllegalStateException if the max ref count is exceeded.
-   * @return true if we are able to retain this chunk; false if we need to retry
-   */
-  @Retained
-  public boolean retain();
-
-  /**
-   * Returns true if the value stored in this memory chunk is a serialized object. Returns false if it is a byte array.
-   */
-  public boolean isSerialized();
-
-  /**
-   * Returns true if the value stored in this memory chunk is compressed. Returns false if it is uncompressed.
-   */
-  public boolean isCompressed();
-
-  /**
-   * Returns the data stored in this object as a deserialized heap object.
-   * If it is not serialized then the result will be a byte[].
-   * Otherwise the deserialized heap form of the stored object is returned.
-   * @return the data stored in this object as a deserialized heap object.
-   */
-  public Object getValueAsDeserializedHeapObject();
-
-  /**
-   * Returns the data stored in this object as a heap byte array.
-   * If it is not serialized then the result will only contain the raw bytes stored in this object.
-   * Otherwise the serialized heap form of the stored object is returned.
-   * @return the data stored in this object as a heap byte array.
-   */
-  public byte[] getValueAsHeapByteArray();
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/781bd8d7/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/SimpleMemoryAllocatorImpl.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/SimpleMemoryAllocatorImpl.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/SimpleMemoryAllocatorImpl.java
index a38daa6..c800335 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/SimpleMemoryAllocatorImpl.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/SimpleMemoryAllocatorImpl.java
@@ -1729,15 +1729,27 @@ public final class SimpleMemoryAllocatorImpl implements MemoryAllocator, MemoryI
     final static long FILL_PATTERN = 0x3c3c3c3c3c3c3c3cL;
     final static byte FILL_BYTE = 0x3c;
     
-    public final static int SRC_TYPE_NO_LOB_NO_DELTA = 0 << SRC_TYPE_SHIFT;
-    public final static int SRC_TYPE_WITH_LOBS = 1 << SRC_TYPE_SHIFT;
-    public final static int SRC_TYPE_WITH_SINGLE_DELTA = 2 << SRC_TYPE_SHIFT;
-    public final static int SRC_TYPE_WITH_MULTIPLE_DELTAS = 3 << SRC_TYPE_SHIFT;
-    //public final static int SRC_TYPE_IS_LOB = 4 << SRC_TYPE_SHIFT;
+    // The 8 bits reserved for SRC_TYPE are basically no longer used.
+    // So we could free up these 8 bits for some other use or we could
+    // keep them for future extensions.
+    // If we ever want to allocate other "types" into a chunk of off-heap
+    // memory then the SRC_TYPE would be the way to go.
+    // For example we may want to allocate the memory for the off-heap
+    // RegionEntry in off-heap memory without it being of type GFE.
+    // When it is of type GFE then it either needs to be the bytes
+    // of a byte array or it needs to be a serialized java object.
+    // For the RegionEntry we may want all the primitive fields of
+    // the entry at certain offsets in the off-heap memory so we could
+    // access them directly in native byte format (i.e. no serialization).
+    // Note that for every SRC_TYPE we should have a ChunkType subclass.
+    public final static int SRC_TYPE_UNUSED0 = 0 << SRC_TYPE_SHIFT;
+    public final static int SRC_TYPE_UNUSED1 = 1 << SRC_TYPE_SHIFT;
+    public final static int SRC_TYPE_UNUSED2 = 2 << SRC_TYPE_SHIFT;
+    public final static int SRC_TYPE_UNUSED3 = 3 << SRC_TYPE_SHIFT;
     public final static int SRC_TYPE_GFE = 4 << SRC_TYPE_SHIFT;
-    public final static int SRC_TYPE_UNUSED1 = 5 << SRC_TYPE_SHIFT;
-    public final static int SRC_TYPE_UNUSED2 = 6 << SRC_TYPE_SHIFT;
-    public final static int SRC_TYPE_UNUSED3 = 7 << SRC_TYPE_SHIFT;
+    public final static int SRC_TYPE_UNUSED5 = 5 << SRC_TYPE_SHIFT;
+    public final static int SRC_TYPE_UNUSED6 = 6 << SRC_TYPE_SHIFT;
+    public final static int SRC_TYPE_UNUSED7 = 7 << SRC_TYPE_SHIFT;
     
     protected Chunk(long memoryAddress, int chunkSize, ChunkType chunkType) {
       validateAddressAndSize(memoryAddress, chunkSize);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/781bd8d7/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/StoredObject.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/StoredObject.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/StoredObject.java
index 083c5ff..4d93a07 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/StoredObject.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/StoredObject.java
@@ -19,7 +19,9 @@ package com.gemstone.gemfire.internal.offheap;
 import java.io.DataOutput;
 import java.io.IOException;
 
+import com.gemstone.gemfire.internal.Sendable;
 import com.gemstone.gemfire.internal.cache.CachedDeserializable;
+import com.gemstone.gemfire.internal.offheap.annotations.Retained;
 
 /**
  * Represents an object stored in the cache.
@@ -29,7 +31,45 @@ import com.gemstone.gemfire.internal.cache.CachedDeserializable;
  * @author darrel
  * @since 9.0
  */
-public interface StoredObject extends OffHeapReference, CachedDeserializable {
+public interface StoredObject extends Releasable, Sendable, CachedDeserializable {
+  /**
+   * Call to indicate that this object's memory is in use by the caller.
+   * The memory will stay allocated until {@link #release()} is called.
+   * It is ok for a thread other than the one that called this method to call release.
+   * This method is called implicitly at the time the chunk is allocated.
+   * Note: @Retained tells you that "this" is retained by this method.
+   * 
+   * @throws IllegalStateException if the max ref count is exceeded.
+   * @return true if we are able to retain this chunk; false if we need to retry
+   */
+  @Retained
+  public boolean retain();
+
+  /**
+   * Returns true if the value stored in this memory chunk is a serialized object. Returns false if it is a byte array.
+   */
+  public boolean isSerialized();
+
+  /**
+   * Returns true if the value stored in this memory chunk is compressed. Returns false if it is uncompressed.
+   */
+  public boolean isCompressed();
+
+  /**
+   * Returns the data stored in this object as a deserialized heap object.
+   * If it is not serialized then the result will be a byte[].
+   * Otherwise the deserialized heap form of the stored object is returned.
+   * @return the data stored in this object as a deserialized heap object.
+   */
+  public Object getValueAsDeserializedHeapObject();
+
+  /**
+   * Returns the data stored in this object as a heap byte array.
+   * If it is not serialized then the result will only contain the raw bytes stored in this object.
+   * Otherwise the serialized heap form of the stored object is returned.
+   * @return the data stored in this object as a heap byte array.
+   */
+  public byte[] getValueAsHeapByteArray();
   /**
    * Take all the bytes in the object and write them to the data output as a byte array.
    * If the StoredObject is not serialized then its raw byte array is sent.


[23/50] [abbrv] incubator-geode git commit: GEODE-544: Removes soplog code and tests

Posted by ma...@apache.org.
GEODE-544: Removes soplog code and tests

The "soplog" code was a partial implementation of a concurrent
LSM tree stored on local disk. This is not currently used anywhere
so is being cleaned up.  The interfaces used by the HDFS feature
have not been deleted.


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

Branch: refs/heads/feature/GEODE-53
Commit: 9438c8b18dcbc1e903780efdeff5928be175c8b1
Parents: 781bd8d
Author: Anthony Baker <ab...@pivotal.io>
Authored: Thu Nov 12 14:39:48 2015 -0800
Committer: Anthony Baker <ab...@pivotal.io>
Committed: Thu Nov 12 21:22:48 2015 -0800

----------------------------------------------------------------------
 .../persistence/soplog/AbstractCompactor.java   | 533 -------------
 .../soplog/AbstractKeyValueIterator.java        |  76 --
 .../soplog/AbstractSortedReader.java            | 135 ----
 .../soplog/ArraySerializedComparator.java       | 144 ----
 .../cache/persistence/soplog/Compactor.java     | 174 -----
 .../soplog/CompositeSerializedComparator.java   |  57 --
 .../soplog/IndexSerializedComparator.java       | 127 ---
 .../cache/persistence/soplog/LevelTracker.java  | 120 ---
 .../soplog/LexicographicalComparator.java       | 460 -----------
 .../cache/persistence/soplog/NonCompactor.java  | 110 ---
 .../soplog/ReversingSerializedComparator.java   |  67 --
 .../persistence/soplog/SizeTieredCompactor.java | 198 -----
 .../cache/persistence/soplog/SoplogToken.java   | 116 ---
 .../cache/persistence/soplog/SortedBuffer.java  | 367 ---------
 .../cache/persistence/soplog/SortedOplog.java   | 158 ----
 .../persistence/soplog/SortedOplogFactory.java  | 278 -------
 .../persistence/soplog/SortedOplogSet.java      | 118 ---
 .../persistence/soplog/SortedOplogSetImpl.java  | 780 -------------------
 .../soplog/hfile/BlockCacheHolder.java          |  39 -
 .../soplog/hfile/HFileSortedOplog.java          | 694 -----------------
 .../soplog/hfile/HFileSortedOplogFactory.java   |  80 --
 .../soplog/nofile/NoFileSortedOplog.java        | 244 ------
 .../soplog/nofile/NoFileSortedOplogFactory.java |  41 -
 .../cache/persistence/soplog/AppendLog.java     |  65 --
 .../ArraySerializedComparatorJUnitTest.java     |  95 ---
 .../CompactionSortedOplogSetTestCase.java       | 134 ----
 .../persistence/soplog/CompactionTestCase.java  | 206 -----
 .../persistence/soplog/ComparisonTestCase.java  |  77 --
 .../soplog/IndexComparatorJUnitTest.java        |  79 --
 .../LexicographicalComparatorJUnitTest.java     | 204 -----
 .../soplog/RecoverableSortedOplogSet.java       | 221 ------
 .../soplog/SizeTieredCompactorJUnitTest.java    | 110 ---
 .../SizeTieredSortedOplogSetJUnitTest.java      |  43 -
 .../soplog/SortedBufferJUnitTest.java           |  39 -
 .../soplog/SortedOplogSetJUnitTest.java         | 273 -------
 .../soplog/SortedReaderTestCase.java            | 295 -------
 .../nofile/NoFileSortedOplogJUnitTest.java      |  48 --
 37 files changed, 7005 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/9438c8b1/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/persistence/soplog/AbstractCompactor.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/persistence/soplog/AbstractCompactor.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/persistence/soplog/AbstractCompactor.java
deleted file mode 100644
index 0b62313..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/persistence/soplog/AbstractCompactor.java
+++ /dev/null
@@ -1,533 +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.
- */
-package com.gemstone.gemfire.internal.cache.persistence.soplog;
-
-import java.io.File;
-import java.io.IOException;
-import java.io.InterruptedIOException;
-import java.nio.ByteBuffer;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.EnumMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Queue;
-import java.util.concurrent.ConcurrentLinkedQueue;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.Executor;
-import java.util.concurrent.atomic.AtomicBoolean;
-import java.util.concurrent.atomic.AtomicReference;
-import java.util.concurrent.locks.ReadWriteLock;
-import java.util.concurrent.locks.ReentrantReadWriteLock;
-
-import org.apache.logging.log4j.Logger;
-
-import com.gemstone.gemfire.internal.cache.persistence.soplog.SortedOplog.SortedOplogReader;
-import com.gemstone.gemfire.internal.cache.persistence.soplog.SortedOplog.SortedOplogWriter;
-import com.gemstone.gemfire.internal.cache.persistence.soplog.SortedOplogSetImpl.MergedIterator;
-import com.gemstone.gemfire.internal.cache.persistence.soplog.SortedReader.Metadata;
-import com.gemstone.gemfire.internal.cache.persistence.soplog.SortedReader.SerializedComparator;
-import com.gemstone.gemfire.internal.cache.persistence.soplog.SortedReader.SortedIterator;
-import com.gemstone.gemfire.internal.logging.LogService;
-import com.gemstone.gemfire.internal.util.AbortableTaskService;
-import com.gemstone.gemfire.internal.util.AbortableTaskService.AbortableTask;
-
-public abstract class AbstractCompactor<T extends Comparable<T>> implements Compactor {
-  protected static final Logger logger = LogService.getLogger();
-  
-  /** the soplog factory */
-  protected final SortedOplogFactory factory;
-  
-  /** the fileset */
-  protected final Fileset<T> fileset;
-  
-  /** the soplog tracker */
-  protected final CompactionTracker<T> tracker;
-
-  /** thread for background compaction */
-  protected final AbortableTaskService compactor;
-  
-  /** inactive files waiting to be deleted */
-  private final Queue<TrackedReference<SortedOplogReader>> inactive;
-  
-  /** the soplogs */
-  protected final List<Level> levels;
-  
-  /** provides consistent view of all levels */
-  private final ReadWriteLock levelLock;
-
-  /** test flag to abort compaction */
-  volatile boolean testAbortDuringCompaction;
-  
-  /** test flag to delay compaction */
-  volatile CountDownLatch testDelayDuringCompaction;
-  
-  protected final String logPrefix;
-  
-  public AbstractCompactor(SortedOplogFactory factory, 
-      Fileset<T> fileset, CompactionTracker<T> tracker,
-      Executor exec) {
-    assert factory != null;
-    assert fileset != null;
-    assert tracker != null;
-    assert exec != null;
-    
-    this.factory = factory;
-    this.fileset = fileset;
-    this.tracker = tracker;
-    
-    compactor = new AbortableTaskService(exec);
-    inactive = new ConcurrentLinkedQueue<TrackedReference<SortedOplogReader>>();
-
-    levelLock = new ReentrantReadWriteLock();
-    levels = new ArrayList<Level>();
-    
-    this.logPrefix = "<" + factory.getConfiguration().getName() + "> ";
-  }
-  
-  @Override
-  public final void add(SortedOplog soplog) throws IOException {
-    levels.get(0).add(soplog);
-  }
-  
-  @Override
-  public final boolean compact() throws IOException {
-    final CountDownLatch done = new CountDownLatch(1);
-    final AtomicReference<Object> result = new AtomicReference<Object>(null);
-    
-    compact(true, new CompactionHandler() {
-      @Override
-      public void complete(boolean compacted) {
-        result.set(compacted);
-        done.countDown();
-      }
-
-      @Override
-      public void failed(Throwable ex) {
-        result.set(ex);
-        done.countDown();
-      }
-    });
-    
-    try {
-      done.await();
-    } catch (InterruptedException e) {
-      Thread.currentThread().interrupt();
-      throw new InterruptedIOException();
-    }
-    
-    Object val = result.get();
-    if (val instanceof Throwable) {
-      throw new IOException((Throwable) val);
-    }
-    
-    assert val != null;
-    return (Boolean) val;
-  }
-  
-  @Override
-  public final void compact(final boolean force, final CompactionHandler ch) {
-    // TODO implement force=true, results in a single soplog
-    AbortableTask task = new AbortableTask() {
-      @Override
-      public void runOrAbort(AtomicBoolean aborted) {
-        final boolean isDebugEnabled = logger.isDebugEnabled();
-        if (isDebugEnabled) {
-          logger.debug("{}Beginning compaction", AbstractCompactor.this.logPrefix);
-        }
-
-        // TODO could do this in one go instead of level-by-level
-        try {
-          boolean compacted = false;
-          for (Level level : levels) {
-            if (aborted.get()) {
-              if (isDebugEnabled) {
-                logger.debug("{}Aborting compaction", AbstractCompactor.this.logPrefix);
-              }
-              break;
-            }
-      
-            checkTestDelay();
-            if (force || level.needsCompaction()) {
-              if (isDebugEnabled) {
-                logger.debug("{}Compacting level {}", AbstractCompactor.this.logPrefix, level);
-              }
-              
-              long start = factory.getConfiguration().getStatistics().getMinorCompaction().begin();
-              try {
-                compacted |= level.compact(aborted);
-                factory.getConfiguration().getStatistics().getMinorCompaction().end(start);
-                
-              } catch (IOException e) {
-                factory.getConfiguration().getStatistics().getMinorCompaction().error(start);
-              }
-            }
-          }
-          
-          cleanupInactive();
-          if (ch != null) {
-            if (isDebugEnabled) {
-              logger.debug("{}Completed compaction", AbstractCompactor.this.logPrefix);
-            }
-            ch.complete(compacted);
-          }
-        } catch (Exception e) {
-          if (isDebugEnabled) {
-            logger.debug("{}Encountered an error during compaction", AbstractCompactor.this.logPrefix, e);
-          }
-          if (ch != null) {
-            ch.failed(e);
-          }
-        }
-      }
-      
-      @Override
-      public void abortBeforeRun() {
-        if (ch != null) {
-          ch.complete(false);
-        }
-      }
-    };
-    compactor.execute(task);
-  }
-  
-  @Override
-  public final CompactionTracker<?> getTracker() {
-    return tracker;
-  }
-
-  @Override
-  public final Fileset<?> getFileset() {
-    return fileset;
-  }
-  
-  @Override
-  public final Collection<TrackedReference<SortedOplogReader>> getActiveReaders(
-      byte[] start, byte[] end) {
-    
-    // need to coordinate with clear() so we can get a consistent snapshot
-    // across levels
-    levelLock.readLock().lock();
-    try {
-      // TODO this seems very garbage-y
-      List<TrackedReference<SortedOplogReader>> soplogs = new ArrayList<TrackedReference<SortedOplogReader>>();
-      for (Level level : levels) {
-        soplogs.addAll(level.getSnapshot(start, end));
-      }
-      return soplogs;
-    } finally {
-      levelLock.readLock().unlock();
-    }
-  }
-  
-  @Override
-  public final void clear() throws IOException {
-    if (logger.isDebugEnabled()) {
-      logger.debug("{}Clearing compactor", this.logPrefix);
-    }
-    
-    compactor.abortAll();
-    releaseTestDelay();
-    compactor.waitForCompletion();
-
-    levelLock.writeLock().lock();
-    try {
-      for (Level l : levels) {
-        l.clear();
-      }
-    } finally {
-      levelLock.writeLock().unlock();
-    }
-    
-    cleanupInactive();
-  }
-
-  @Override
-  public final void close() throws IOException {
-    if (logger.isDebugEnabled()) {
-      logger.debug("{}Closing compactor", this.logPrefix);
-    }
-
-    compactor.abortAll();
-    releaseTestDelay();
-    compactor.waitForCompletion();
-    
-    levelLock.writeLock().lock();
-    try {
-      for (Level l : levels) {
-        l.close();
-      }
-    } finally {
-      levelLock.writeLock().unlock();
-    }
-    
-    TrackedReference<SortedOplogReader> tr;
-    while ((tr = inactive.poll()) != null) {
-      deleteInactive(tr);
-    }
-    inactive.clear();
-  }
-  
-  /**
-   * Creates a new soplog by merging the supplied soplog readers.
-   * 
-   * @param readers the readers to merge
-   * @param collect true if deleted entries should be removed
-   * @return the merged soplog
-   * 
-   * @throws IOException error during merge operation
-   */
-  protected SortedOplog merge(
-      Collection<TrackedReference<SortedOplogReader>> readers, 
-      boolean collect,
-      AtomicBoolean aborted) throws IOException {
-    
-    SerializedComparator sc = null;
-    List<SortedIterator<ByteBuffer>> iters = new ArrayList<SortedIterator<ByteBuffer>>();
-    for (TrackedReference<SortedOplogReader> tr : readers) {
-      iters.add(tr.get().scan());
-      sc = tr.get().getComparator();
-    }
-    
-    SortedIterator<ByteBuffer> scan = new MergedIterator(sc, readers, iters);
-    try {
-      if (!scan.hasNext()) {
-        checkAbort(aborted);
-        if (logger.isDebugEnabled()) {
-          logger.debug("{}No entries left after compaction with readers {} ", this.logPrefix, readers);
-        }
-        return null;
-      }
-
-      File f = fileset.getNextFilename();
-      if (logger.isDebugEnabled()) {
-        logger.debug("{}Compacting soplogs {} into {}", this.logPrefix, readers, f);
-      }
-
-      if (testAbortDuringCompaction) {
-        aborted.set(true);
-      }
-
-      SortedOplog soplog = factory.createSortedOplog(f);
-      SortedOplogWriter wtr = soplog.createWriter();
-      try {
-        while (scan.hasNext()) {
-          checkAbort(aborted);
-          scan.next();
-          if (!(collect && isDeleted(scan.value()))) {
-            wtr.append(scan.key(), scan.value());
-          }
-        }
-
-        EnumMap<Metadata, byte[]> metadata = mergeMetadata(readers);
-        wtr.close(metadata);
-        return soplog;
-        
-      } catch (IOException e) {
-        wtr.closeAndDelete();
-        throw e;
-      }
-    } finally {
-      scan.close();
-    }
-  }
-  
-  protected EnumMap<Metadata, byte[]> mergeMetadata(
-      Collection<TrackedReference<SortedOplogReader>> readers)
-      throws IOException {
-    // merge the metadata into the compacted file
-    EnumMap<Metadata, byte[]> metadata = new EnumMap<Metadata, byte[]>(Metadata.class);
-    for (Metadata meta : Metadata.values()) {
-      byte[] val = null;
-      for (TrackedReference<SortedOplogReader> tr : readers) {
-        byte[] tmp = tr.get().getMetadata(meta);
-        if (val == null) {
-          val = tmp;
-          
-        } else if (tmp != null) {
-          val = factory.getConfiguration().getMetadataCompactor(meta).compact(val, tmp);
-        }
-      }
-      if (val != null) {
-        metadata.put(meta, val);
-      }
-    }
-    return metadata;
-  }
-  
-  protected void releaseTestDelay() {
-    if (testDelayDuringCompaction != null) {
-      if (logger.isDebugEnabled()) {
-        logger.debug("{}Releasing testDelayDuringCompaction", this.logPrefix);
-      }
-      testDelayDuringCompaction.countDown();
-    }
-  }
-
-  protected void checkTestDelay() {
-    if (testDelayDuringCompaction != null) {
-      try {
-        if (logger.isDebugEnabled()) {
-          logger.debug("{}Waiting for testDelayDuringCompaction", this.logPrefix);
-        }
-        testDelayDuringCompaction.await();
-        
-      } catch (InterruptedException e) {
-        Thread.currentThread().interrupt();
-      }
-    }
-  }
-
-  
-  /**
-   * Returns the number of inactive readers.
-   * @return the inactive readers
-   */
-  protected int countInactiveReaders() {
-    return inactive.size();
-  }
-  
-  /**
-   * Returns the requested level for testing purposes.
-   * @param level the level ordinal
-   * @return the level
-   */
-  protected Level getLevel(int level) {
-    return levels.get(level);
-  }
-
-  protected void cleanupInactive() throws IOException {
-    for (Iterator<TrackedReference<SortedOplogReader>> iter = inactive.iterator(); iter.hasNext(); ) {
-      TrackedReference<SortedOplogReader> tr = iter.next();
-      if (!tr.inUse() && inactive.remove(tr)) {
-        deleteInactive(tr);
-      }
-    }
-  }
-
-  protected void markAsInactive(Iterable<TrackedReference<SortedOplogReader>> snapshot, T attach) throws IOException {
-    final boolean isDebugEnabled = logger.isDebugEnabled();
-    for (Iterator<TrackedReference<SortedOplogReader>> iter = snapshot.iterator(); iter.hasNext(); ) {
-      TrackedReference<SortedOplogReader> tr = iter.next();
-      if (isDebugEnabled) {
-        logger.debug("{}Marking {} as inactive", this.logPrefix, tr);
-      }
-      
-      inactive.add(tr);
-      tracker.fileRemoved(tr.get().getFile(), attach);
-      
-      factory.getConfiguration().getStatistics().incActiveFiles(-1);
-      factory.getConfiguration().getStatistics().incInactiveFiles(1);
-    }
-  }
-
-  private boolean isDeleted(ByteBuffer value) {
-    //first byte determines the value type
-    byte valType = value.get(value.position());
-    return SoplogToken.isTombstone(valType) || SoplogToken.isRemovedPhase2(valType);
-  }
-  
-  private void checkAbort(AtomicBoolean aborted)
-      throws InterruptedIOException {
-    if (aborted.get()) {
-      throw new InterruptedIOException();
-    }
-  }
-
-  private void deleteInactive(TrackedReference<SortedOplogReader> tr)
-      throws IOException {
-    tr.get().close();
-    if (tr.get().getFile().delete()) {
-      if (logger.isDebugEnabled()) {
-        logger.debug("{}Deleted inactive soplog {}", this.logPrefix, tr.get().getFile());
-      }
-      
-      tracker.fileDeleted(tr.get().getFile());
-      factory.getConfiguration().getStatistics().incInactiveFiles(-1);
-    }
-  }
-  
-  /**
-   * Organizes a set of soplogs for a given level.
-   */
-  protected static abstract class Level {
-    /** the level ordinal position */
-    protected final int level;
-    
-    public Level(int level) {
-      this.level = level;
-    }
-    
-    @Override
-    public String toString() {
-      return String.valueOf(level);
-    }
-    
-    /**
-     * Returns true if the level needs compaction.
-     * @return true if compaction is needed
-     */
-    protected abstract boolean needsCompaction();
-
-    /**
-     * Obtains the current set of active soplogs for this level.
-     * @return the soplog snapshot
-     */
-    protected List<TrackedReference<SortedOplogReader>> getSnapshot() {
-      return getSnapshot(null, null);
-    }
-
-    /**
-     * Obtains the current set of active soplogs for this level, optionally 
-     * bounded by the start and end keys.
-     * 
-     * @param start the start key
-     * @param end the end key
-     * @return the soplog snapshot
-     */
-    protected abstract List<TrackedReference<SortedOplogReader>> getSnapshot(byte[] start, byte[] end);
-    
-    /**
-     * Clears the soplogs that match the metadata filter.
-     * @throws IOException error during close
-     */
-    protected abstract void clear() throws IOException;
-    
-    /**
-     * Closes the soplogs managed by this level.
-     * @throws IOException error closing soplogs
-     */
-    protected abstract void close() throws IOException;
-    
-    /**
-     * Adds a new soplog to this level.
-     * 
-     * @param soplog the soplog
-     * @throws IOException error creating reader
-     */
-    protected abstract void add(SortedOplog soplog) throws IOException;
-    
-    /**
-     * Merges the current soplogs into a new soplog and promotes it to the next
-     * level.  The previous soplogs are marked for deletion.
-     * 
-     * @param aborted true if the compaction should be aborted
-     * @throws IOException error unable to perform compaction
-     */
-    protected abstract boolean compact(AtomicBoolean aborted) throws IOException;    
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/9438c8b1/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/persistence/soplog/AbstractKeyValueIterator.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/persistence/soplog/AbstractKeyValueIterator.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/persistence/soplog/AbstractKeyValueIterator.java
deleted file mode 100644
index 1326d5c..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/persistence/soplog/AbstractKeyValueIterator.java
+++ /dev/null
@@ -1,76 +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.
- */
-package com.gemstone.gemfire.internal.cache.persistence.soplog;
-
-import java.util.Iterator;
-import java.util.NoSuchElementException;
-
-/**
- * Provides an {@link Iterator} view over a collection of keys and values.  The
- * implementor must provide access to the current key/value as well as a means
- * to move to the next pair.
- * 
- * @author bakera
- *
- * @param <K> the key type
- * @param <V> the value type
- */
-public abstract class AbstractKeyValueIterator<K, V> implements KeyValueIterator<K, V> {
-  /** true if the iterator has been advanced to the next element */
-  private boolean foundNext = false;
-  
-  @Override
-  public boolean hasNext() {
-    if (!foundNext) {
-      foundNext = step();
-    }
-    return foundNext;
-  }
-
-  @Override
-  public K next() {
-    if (!foundNext && !step()) {
-      throw new NoSuchElementException();
-    }
-
-    foundNext = false;
-    return key();
-  }
-  
-  @Override
-  public void remove() {
-    throw new UnsupportedOperationException();
-  }
-  
-  /**
-   * Returns the key at the current position.
-   * @return the key
-   */
-  public abstract K key();
-  
-  /**
-   * Returns the value at the current position.
-   * @return the value
-   */
-  public abstract V value();
-  
-  /**
-   * Steps the iteration to the next position.
-   * @return true if the step succeeded
-   */
-  protected abstract boolean step();
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/9438c8b1/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/persistence/soplog/AbstractSortedReader.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/persistence/soplog/AbstractSortedReader.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/persistence/soplog/AbstractSortedReader.java
deleted file mode 100644
index c11e1e0..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/persistence/soplog/AbstractSortedReader.java
+++ /dev/null
@@ -1,135 +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.
- */
-package com.gemstone.gemfire.internal.cache.persistence.soplog;
-
-import java.io.IOException;
-import java.nio.ByteBuffer;
-
-
-/**
- * Provides default behavior for range scans.
- *  
- * @author bakera
- */
-public abstract class AbstractSortedReader implements SortedReader<ByteBuffer> {
-  @Override
-  public final SortedIterator<ByteBuffer> scan() throws IOException {
-    return scan(null, true, null, true);
-  }
-
-  @Override
-  public final SortedIterator<ByteBuffer> head(byte[] to, boolean inclusive)  throws IOException{
-    return scan(null, true, to, inclusive);
-  }
-
-  @Override
-  public final SortedIterator<ByteBuffer> tail(byte[] from, boolean inclusive)  throws IOException{
-    return scan(from, inclusive, null, true);
-  }
-
-  @Override
-  public final SortedIterator<ByteBuffer> scan(byte[] from, byte[] to)  throws IOException{
-    return scan(from, true, to, false);
-  }
-
-  @Override
-  public final SortedIterator<ByteBuffer> scan(byte[] equalTo)  throws IOException{
-    return scan(equalTo, true, equalTo, true);
-  }
-
-  @Override
-  public SortedIterator<ByteBuffer> scan(byte[] from, boolean fromInclusive, byte[] to,
-      boolean toInclusive)  throws IOException{
-    return scan(from, fromInclusive, to, toInclusive, true, null);
-  }
-
-  @Override
-  public final SortedReader<ByteBuffer> withAscending(boolean ascending) {
-    if (this instanceof DelegateSortedReader) {
-      DelegateSortedReader tmp = (DelegateSortedReader) this;
-      return new DelegateSortedReader(tmp.delegate, ascending, tmp.filter);
-    }
-    return new DelegateSortedReader(this, ascending, null);
-  }
-
-  @Override
-  public final SortedReader<ByteBuffer> withFilter(MetadataFilter filter) {
-    if (this instanceof DelegateSortedReader) {
-      DelegateSortedReader tmp = (DelegateSortedReader) this;
-      return new DelegateSortedReader(tmp.delegate, tmp.ascending, filter);
-    }
-    return new DelegateSortedReader(this, true, filter);
-  }
-  
-  protected class DelegateSortedReader extends AbstractSortedReader {
-    /** the embedded reader */
-    private final AbstractSortedReader delegate;
-    
-    /** true if ascending */
-    private final boolean ascending;
-    
-    /** the filter */
-    private final MetadataFilter filter;
-    
-    public DelegateSortedReader(AbstractSortedReader reader, boolean ascending, MetadataFilter filter) {
-      this.delegate = reader;
-      this.ascending = ascending;
-      this.filter = filter;
-    }
-    
-    @Override
-    public boolean mightContain(byte[] key) throws IOException {
-      return delegate.mightContain(key);
-    }
-
-    @Override
-    public ByteBuffer read(byte[] key) throws IOException {
-      return delegate.read(key);
-    }
-
-    @Override
-    public SerializedComparator getComparator() {
-      return delegate.getComparator();
-    }
-
-    @Override
-    public SortedStatistics getStatistics() throws IOException {
-      return delegate.getStatistics();
-    }
-
-    @Override
-    public void close() throws IOException {
-      delegate.close();
-    }
-
-    @Override
-    public SortedIterator<ByteBuffer> scan(
-        byte[] from, boolean fromInclusive, 
-        byte[] to, boolean toInclusive) throws IOException {
-      return scan(from, fromInclusive, to, toInclusive, ascending, filter);
-    }
-
-    @Override
-    public SortedIterator<ByteBuffer> scan(
-        byte[] from, boolean fromInclusive,
-        byte[] to, boolean toInclusive, 
-        boolean ascending, 
-        MetadataFilter filter) throws IOException {
-      return delegate.scan(from, fromInclusive, to, toInclusive, ascending, filter);
-    }
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/9438c8b1/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/persistence/soplog/ArraySerializedComparator.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/persistence/soplog/ArraySerializedComparator.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/persistence/soplog/ArraySerializedComparator.java
deleted file mode 100644
index 139b3cb..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/persistence/soplog/ArraySerializedComparator.java
+++ /dev/null
@@ -1,144 +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.
- */
-package com.gemstone.gemfire.internal.cache.persistence.soplog;
-
-import java.nio.ByteBuffer;
-
-import com.gemstone.gemfire.internal.cache.persistence.soplog.SortedReader.SerializedComparator;
-import com.gemstone.gemfire.internal.util.Bytes;
-
-/**
- * Provides comparisons of composite keys by comparing each of the constituent
- * parts of the key in order.  A subkey will only be evaluated if the preceeding
- * keys have compared as equal.
- * <p>
- * Prior to use, an instance must be configured with the ordered list of
- * comparators to apply.
- * <p>
- * The keys for an N-composite are stored as follows:
- * <pre>
- * | len[0] | key[0] | len[1] | key[1] | ... | len[N-2] | key[N-2] | key[N-1] |
- * </pre>
- * where the key length is stored as a protobuf varint.
- * 
- * @author bakera
- */
-public class ArraySerializedComparator implements CompositeSerializedComparator, 
-DelegatingSerializedComparator {
-
-  /** the comparators */
-  private volatile SerializedComparator[] comparators;
-  
-  /**
-   * Injects the comparators to be used on composite keys.  The number and order
-   * must match the key.
-   * 
-   * @param comparators the comparators
-   */
-  public void setComparators(SerializedComparator[] comparators) {
-    this.comparators = comparators;
-  }
-  
-  @Override
-  public int compare(byte[] o1, byte[] o2) {
-    return compare(o1, 0, o1.length, o2, 0, o2.length);
-  }
-
-  @Override
-  public int compare(byte[] b1, int o1, int l1, byte[] b2, int o2, int l2) {
-    SerializedComparator[] sc = comparators;
-    
-    int off1 = o1;
-    int off2 = o2;
-    for (int i = 0; i < sc.length - 1; i++) {
-      int klen1 = Bytes.getVarInt(b1, off1);
-      int klen2 = Bytes.getVarInt(b2, off2);
-
-      off1 += Bytes.sizeofVarInt(klen1);
-      off2 += Bytes.sizeofVarInt(klen2);
-      
-      if (!SoplogToken.isWildcard(b1, off1, b2, off2)) {
-        int diff = sc[i].compare(b1, off1, klen1, b2, off2, klen2);
-        if (diff != 0) {
-          return diff;
-        }
-      }
-      off1 += klen1;
-      off2 += klen2;
-    }
-    
-    if (!SoplogToken.isWildcard(b1, off1, b2, off2)) {
-      l1 -= (off1 - o1);
-      l2 -= (off2 - o2);
-      return sc[sc.length - 1].compare(b1, off1, l1, b2, off2, l2);
-    }
-    return 0;
-  }
-
-  @Override
-  public SerializedComparator[] getComparators() {
-    return comparators;
-  }
-
-  @Override
-  public byte[] createCompositeKey(byte[] key1, byte[] key2) {
-    return createCompositeKey(new byte[][] { key1, key2 });
-  }
-  
-  @Override
-  public byte[] createCompositeKey(byte[]... keys) {
-    assert comparators.length == keys.length;
-    
-    int size = 0;
-    for (int i = 0; i < keys.length - 1; i++) {
-      size += keys[i].length + Bytes.sizeofVarInt(keys[i].length);
-    }
-    size += keys[keys.length - 1].length;
-    
-    // TODO do we have to do a copy here or can we delay until the disk write?
-    int off = 0;
-    byte[] buf = new byte[size];
-    for (int i = 0; i < keys.length - 1; i++) {
-      off = Bytes.putVarInt(keys[i].length, buf, off);
-      System.arraycopy(keys[i], 0, buf, off, keys[i].length);
-      off += keys[i].length;
-    }
-    System.arraycopy(keys[keys.length - 1], 0, buf, off, keys[keys.length - 1].length);
-    return buf;
-  }
-
-  @Override
-  public ByteBuffer getKey(ByteBuffer key, int ordinal) {
-    assert ordinal < comparators.length;
-    
-    for (int i = 0; i < comparators.length - 1; i++) {
-      int klen = Bytes.getVarInt(key);
-      if (i == ordinal) {
-        ByteBuffer subkey = (ByteBuffer) key.slice().limit(klen);
-        key.rewind();
-        
-        return subkey;
-      }
-      key.position(key.position() + klen);
-    }
-    
-    ByteBuffer subkey = key.slice();
-    key.rewind();
-    
-    return subkey;
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/9438c8b1/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/persistence/soplog/Compactor.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/persistence/soplog/Compactor.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/persistence/soplog/Compactor.java
deleted file mode 100644
index c80f118..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/persistence/soplog/Compactor.java
+++ /dev/null
@@ -1,174 +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.
- */
-package com.gemstone.gemfire.internal.cache.persistence.soplog;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.Collection;
-import java.util.SortedMap;
-
-import com.gemstone.gemfire.internal.cache.persistence.soplog.SortedOplog.SortedOplogReader;
-
-/**
- * Defines a mechanism to track and compact soplogs.
- * 
- * @author bakera
- */
-public interface Compactor {
-  /**
-   * Compares metadata values.
-   */
-  public interface MetadataCompactor {
-    /**
-     * Combines two metadata values into a single value.  Used during compaction
-     * to merge metadata between soplog files.
-     * 
-     * @param metadata1 the first value
-     * @param metadata2 the second value
-     * @return the combined metadata
-     */
-    byte[] compact(byte[] metadata1, byte[] metadata2);
-  }
-
-  /**
-   * Provides notification on the status of a compaction.
-   */
-  public interface CompactionHandler {
-    /**
-     * Invoked when a compaction operation has completed successfully.
-     * @param compacted true if any files were compacted
-     */
-    void complete(boolean compacted);
-    
-    /**
-     * Invoked when a compaction operation has failed.
-     * @param ex the failure
-     */
-    void failed(Throwable ex);
-  }
-
-  /**
-   * Provides external configuration of file operations for recovering and
-   * new file creation.
-   *
-   * @param <T> the compaction info
-   */
-  public interface Fileset<T extends Comparable<T>> {
-    /**
-     * Returns the set of active soplogs.
-     * @return the active files
-     */
-    SortedMap<T, ? extends Iterable<File>> recover();
-    
-    /**
-     * Returns the pathname for the next soplog.
-     * @return the soplog filename
-     */
-    File getNextFilename();
-  }
-  
-  /**
-   * Provides a mechanism to coordinate file changes to the levels managed
-   * by the compactor.
-   * 
-   * @param T the attachment type
-   */
-  public interface CompactionTracker<T extends Comparable<T>> {
-    /**
-     * Invoked when a new file is added.
-     * @param f the file
-     * @param attach the attachment
-     */
-    void fileAdded(File f, T attach);
-    
-    /**
-     * Invoked when a file is removed.
-     * @param f the file
-     * @param attach the attachment
-     */
-    void fileRemoved(File f, T attach);
-    
-    /**
-     * Invoked when a file is deleted.
-     * @param f the attachment
-     */
-    void fileDeleted(File f);
-  }
-  
-  /**
-   * Synchronously invokes the force compaction operation and waits for completion.
-   * 
-   * @return true if any files were compacted
-   * @throws IOException error during compaction
-   */
-  boolean compact() throws IOException;
-
-  /**
-   * Requests a compaction operation be performed on the soplogs.  This invocation
-   * may block if there are too many outstanding write requests.
-   * 
-   * @param force if false, compaction will only be performed if necessary
-   * @param ch invoked when the compaction is complete, optionally null
-   * @throws IOException error during compaction
-   */
-  void compact(boolean force, CompactionHandler ch);
-  
-  /**
-   * Returns the active readers for the given key range.  The caller is responsible
-   * for decrementing the use count of each reader when finished.
-   * 
-   * @param start the start key inclusive, or null for beginning
-   * @param end the end key inclusive, or null for last
-   * @return the readers
-   * 
-   * @see TrackedReference
-   */
-  Collection<TrackedReference<SortedOplogReader>> getActiveReaders(
-      byte[] start, byte[] end);
-  
-  /**
-   * Adds a new soplog to the active set.
-   * @param soplog the soplog
-   * @throws IOException unable to add soplog 
-   */
-  void add(SortedOplog soplog) throws IOException;
-  
-  /**
-   * Returns the compaction tracker for coordinating changes to the file set.
-   * @return the tracker
-   */
-  CompactionTracker<?> getTracker();
-  
-  /**
-   * Returns the file manager for managing the soplog files.
-   * @return the fileset
-   */
-  Fileset<?> getFileset();
-  
-  /**
-   * Clears the active files managed by the compactor.  Files will be marked as
-   * inactive and eventually deleted.
-   * 
-   * @throws IOException unable to clear
-   */
-  void clear() throws IOException;
-  /**
-   * Closes the compactor.
-   * @throws IOException unable to close
-   */
-  void close() throws IOException;
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/9438c8b1/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/persistence/soplog/CompositeSerializedComparator.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/persistence/soplog/CompositeSerializedComparator.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/persistence/soplog/CompositeSerializedComparator.java
deleted file mode 100644
index 8d9aae5..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/persistence/soplog/CompositeSerializedComparator.java
+++ /dev/null
@@ -1,57 +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.
- */
-package com.gemstone.gemfire.internal.cache.persistence.soplog;
-
-import java.nio.ByteBuffer;
-
-import com.gemstone.gemfire.internal.cache.persistence.soplog.SortedReader.SerializedComparator;
-
-/**
- * Creates and compares composite keys.
- * 
- * @author bakera
- */
-public interface CompositeSerializedComparator extends SerializedComparator  {
-  /**
-   * Constructs a composite key consisting of a primary key and a secondary key.
-   * 
-   * @param key1 the primary key
-   * @param key2 the secondary key
-   * @return the composite key
-   */
-  public byte[] createCompositeKey(byte[] key1, byte[] key2);
-  
-  /**
-   * Constructs a composite key by combining the supplied keys.  The number of
-   * keys and their order must match the comparator set.
-   * <p>
-   * The <code>WILDCARD_KEY</code> token may be used to match all subkeys in the
-   * given ordinal position.  This is useful when constructing a search key to
-   * retrieve all keys for a given primary key, ignoring the remaining subkeys.
-   * 
-   * @param keys the keys, ordered by sort priority
-   * @return the composite key
-   */
-  public byte[] createCompositeKey(byte[]... keys);
-  
-  /**
-   * Returns subkey for the given ordinal position.
-   * @param key the composite key
-   * @return the subkey
-   */
-  public ByteBuffer getKey(ByteBuffer key, int ordinal);
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/9438c8b1/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/persistence/soplog/IndexSerializedComparator.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/persistence/soplog/IndexSerializedComparator.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/persistence/soplog/IndexSerializedComparator.java
deleted file mode 100644
index 816eea0..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/persistence/soplog/IndexSerializedComparator.java
+++ /dev/null
@@ -1,127 +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.
- */
-package com.gemstone.gemfire.internal.cache.persistence.soplog;
-
-import java.nio.ByteBuffer;
-
-import com.gemstone.gemfire.internal.cache.persistence.soplog.SortedReader.SerializedComparator;
-import com.gemstone.gemfire.internal.util.Bytes;
-
-/**
- * Provides a comparator for composite keys of the form (k0, k1).  The primary 
- * keys are compared lexicographically while the secondary keys are compared 
- * bitwise.  The key format includes the primary key length to avoid deserialization 
- * the secondary key when reading:
- * <pre>
- * | varint | primary key | secondary key |
- * </pre>
- * The key length is encoded using a protobuf-style varint.
- * <p>
- * 
- * @author bakera
- */
-public class IndexSerializedComparator implements CompositeSerializedComparator, 
-DelegatingSerializedComparator {
-  
-  private volatile SerializedComparator primary;
-  private volatile SerializedComparator secondary;
-  
-  public IndexSerializedComparator() {
-    primary = new LexicographicalComparator();
-    secondary = new ByteComparator();
-  }
-  
-  @Override
-  public void setComparators(SerializedComparator[] comparators) {
-    assert comparators.length == 2;
-    
-    primary = comparators[0];
-    secondary = comparators[1];
-  }
-
-  @Override
-  public SerializedComparator[] getComparators() {
-    return new SerializedComparator[] { primary, secondary };
-  }
-
-  @Override
-  public int compare(byte[] o1, byte[] o2) {
-    return compare(o1, 0, o1.length, o2, 0, o2.length);
-  }
-  
-  @Override
-  public int compare(byte[] b1, int o1, int l1, byte[] b2, int o2, int l2) {
-    int klen1 = Bytes.getVarInt(b1, o1);
-    int klen2 = Bytes.getVarInt(b2, o2);
-    
-    int off1 = o1 + Bytes.sizeofVarInt(klen1);
-    int off2 = o2 + Bytes.sizeofVarInt(klen2);
-    
-    // skip the comparison operation if there is a SearchToken.WILDCARD
-    if (!SoplogToken.isWildcard(b1, off1, b2, off2)) {
-      int diff = primary.compare(b1, off1, klen1, b2, off2, klen2);
-      if (diff != 0) {
-        return diff;
-      }
-    }
-    off1 += klen1;
-    off2 += klen2;
-
-    if (!SoplogToken.isWildcard(b1, off1, b2, off2)) {
-      l1 -= (off1 - o1);
-      l2 -= (off2 - o2);
-      return secondary.compare(b1, off1, l1, b2, off2, l2);
-    }
-    return 0;
-  }
-
-  @Override
-  public ByteBuffer getKey(ByteBuffer key, int ordinal) {
-    assert ordinal < 2;
-    
-    ByteBuffer subkey;
-    int klen = Bytes.getVarInt(key);
-    if (ordinal == 0) {
-      subkey = (ByteBuffer) key.slice().limit(klen);
-      
-    } else {
-      subkey = ((ByteBuffer) key.position(key.position() + klen)).slice();
-    }
-    
-    key.rewind();
-    return subkey;
-  }
-
-  @Override
-  public byte[] createCompositeKey(byte[] key1, byte[] key2) {
-    int vlen = Bytes.sizeofVarInt(key1.length);
-    byte[] buf = new byte[vlen + key1.length + key2.length];
-    
-    Bytes.putVarInt(key1.length, buf, 0);
-    System.arraycopy(key1, 0, buf, vlen, key1.length);
-    System.arraycopy(key2, 0, buf, vlen + key1.length, key2.length);
-    
-    return buf;
-  }
-
-  @Override
-  public byte[] createCompositeKey(byte[]... keys) {
-    assert keys.length == 2;
-    
-    return createCompositeKey(keys[0], keys[1]);
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/9438c8b1/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/persistence/soplog/LevelTracker.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/persistence/soplog/LevelTracker.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/persistence/soplog/LevelTracker.java
deleted file mode 100644
index a590283..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/persistence/soplog/LevelTracker.java
+++ /dev/null
@@ -1,120 +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.
- */
-package com.gemstone.gemfire.internal.cache.persistence.soplog;
-
-import java.io.Closeable;
-import java.io.File;
-import java.io.FileReader;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.io.LineNumberReader;
-import java.io.Writer;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
-import java.util.SortedMap;
-import java.util.TreeMap;
-import java.util.concurrent.atomic.AtomicLong;
-
-import com.gemstone.gemfire.internal.cache.persistence.soplog.Compactor.CompactionTracker;
-import com.gemstone.gemfire.internal.cache.persistence.soplog.Compactor.Fileset;
-
-/**
- * A simple, non-robust file tracker for tracking soplogs by level.
- * 
- * @author bakera
- */
-public class LevelTracker implements Fileset<Integer>, CompactionTracker<Integer>, Closeable {
-  private final String name;
-  private final File manifest;
-  
-  private final SortedMap<Integer, Set<File>> levels;
-  private final AtomicLong file;
-  
-  public LevelTracker(String name, File manifest) throws IOException {
-    this.name = name;
-    this.manifest = manifest;
-    file = new AtomicLong(0);
-    
-    levels = new TreeMap<Integer, Set<File>>();
-    if (!manifest.exists()) {
-      return;
-    }
-    
-    LineNumberReader rdr = new LineNumberReader(new FileReader(manifest));
-    try {
-      String line;
-      while ((line = rdr.readLine()) != null) {
-        String[] parts = line.split(",");
-        int level = Integer.parseInt(parts[0]);
-        File f = new File(parts[1]);
-        add(f, level);
-      }
-    } finally {
-      rdr.close();
-    }
-  }
-  
-  @Override
-  public SortedMap<Integer, ? extends Iterable<File>> recover() {
-    return levels;
-  }
-
-  @Override
-  public File getNextFilename() {
-    return new File(manifest.getParentFile(),  name + "-" + System.currentTimeMillis() 
-        + "-" + file.getAndIncrement() + ".soplog");
-  }
-
-  @Override
-  public void fileAdded(File f, Integer attach) {
-    add(f, attach);
-  }
-
-  @Override
-  public void fileRemoved(File f, Integer attach) {
-    levels.get(attach).remove(f);
-  }
-
-  @Override
-  public void fileDeleted(File f) {
-  }
-
-  @Override
-  public void close() throws IOException {
-    Writer wtr = new FileWriter(manifest);
-    try {
-      for (Map.Entry<Integer, Set<File>> entry : levels.entrySet()) {
-        for (File f : entry.getValue()) {
-          wtr.write(entry.getKey() + "," + f + "\n");
-        }
-      }
-    } finally {
-      wtr.flush();
-      wtr.close();
-    }
-  }
-  
-  private void add(File f, int level) {
-    Set<File> files = levels.get(level);
-    if (files == null) {
-      files = new HashSet<File>();
-      levels.put(level, files);
-    }
-    files.add(f);
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/9438c8b1/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/persistence/soplog/LexicographicalComparator.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/persistence/soplog/LexicographicalComparator.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/persistence/soplog/LexicographicalComparator.java
deleted file mode 100644
index 24fba50..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/persistence/soplog/LexicographicalComparator.java
+++ /dev/null
@@ -1,460 +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.
- */
-package com.gemstone.gemfire.internal.cache.persistence.soplog;
-
-import java.io.ByteArrayInputStream;
-import java.io.DataInput;
-import java.io.DataInputStream;
-
-import com.gemstone.gemfire.DataSerializer;
-import com.gemstone.gemfire.internal.DSCODE;
-import com.gemstone.gemfire.internal.cache.persistence.soplog.SortedReader.SerializedComparator;
-import com.gemstone.gemfire.internal.util.Bytes;
-
-/**
- * Provides type-optimized comparisons for serialized objects.  All data is
- * assumed to have been serialized via a call to 
- * {@link DataSerializer#writeObject(Object, java.io.DataOutput) }.  The following
- * data types have optimized comparisons:
- * <ul>
- *  <li>boolean
- *  <li>byte
- *  <li>short
- *  <li>char
- *  <li>int
- *  <li>long
- *  <li>float
- *  <li>double
- *  <li>String (not {@link DSCODE#HUGE_STRING} or {@link DSCODE#HUGE_STRING_BYTES})
- * </ul>
- * Types that are not listed above fallback to deserialization and comparison
- * via the {@link Comparable} API.
- * <p>
- * Any numeric type may be compared against another numeric type (e.g. double
- * to int).
- * <p>
- * <strong>Any changes to the serialized format may cause version incompatibilities.
- * In addition, the comparison operations will need to be updated.</strong>
- * <p>
- * 
- * @author bakera
- */
-public class LexicographicalComparator implements SerializedComparator {
-
-  //////////////////////////////////////////////////////////////////////////////
-  //
-  // constants for any-to-any numeric comparisons 
-  //
-  //////////////////////////////////////////////////////////////////////////////
-
-  private static final int BYTE_TO_BYTE     = DSCODE.BYTE   << 8 | DSCODE.BYTE;
-  private static final int BYTE_TO_SHORT    = DSCODE.BYTE   << 8 | DSCODE.SHORT;
-  private static final int BYTE_TO_INT      = DSCODE.BYTE   << 8 | DSCODE.INTEGER;
-  private static final int BYTE_TO_LONG     = DSCODE.BYTE   << 8 | DSCODE.LONG;
-  private static final int BYTE_TO_FLOAT    = DSCODE.BYTE   << 8 | DSCODE.FLOAT;
-  private static final int BYTE_TO_DOUBLE   = DSCODE.BYTE   << 8 | DSCODE.DOUBLE;
-
-  private static final int SHORT_TO_BYTE    = DSCODE.SHORT  << 8 | DSCODE.BYTE;
-  private static final int SHORT_TO_SHORT   = DSCODE.SHORT  << 8 | DSCODE.SHORT;
-  private static final int SHORT_TO_INT     = DSCODE.SHORT  << 8 | DSCODE.INTEGER;
-  private static final int SHORT_TO_LONG    = DSCODE.SHORT  << 8 | DSCODE.LONG;
-  private static final int SHORT_TO_FLOAT   = DSCODE.SHORT  << 8 | DSCODE.FLOAT;
-  private static final int SHORT_TO_DOUBLE  = DSCODE.SHORT  << 8 | DSCODE.DOUBLE;
-
-  private static final int LONG_TO_BYTE     = DSCODE.LONG   << 8 | DSCODE.BYTE;
-  private static final int LONG_TO_SHORT    = DSCODE.LONG   << 8 | DSCODE.SHORT;
-  private static final int LONG_TO_INT      = DSCODE.LONG   << 8 | DSCODE.INTEGER;
-  private static final int LONG_TO_LONG     = DSCODE.LONG   << 8 | DSCODE.LONG;
-  private static final int LONG_TO_FLOAT    = DSCODE.LONG   << 8 | DSCODE.FLOAT;
-  private static final int LONG_TO_DOUBLE   = DSCODE.LONG   << 8 | DSCODE.DOUBLE;
-  
-  private static final int INT_TO_BYTE      = DSCODE.INTEGER<< 8 | DSCODE.BYTE;
-  private static final int INT_TO_SHORT     = DSCODE.INTEGER<< 8 | DSCODE.SHORT;
-  private static final int INT_TO_INT       = DSCODE.INTEGER<< 8 | DSCODE.INTEGER;
-  private static final int INT_TO_LONG      = DSCODE.INTEGER<< 8 | DSCODE.LONG;
-  private static final int INT_TO_FLOAT     = DSCODE.INTEGER<< 8 | DSCODE.FLOAT;
-  private static final int INT_TO_DOUBLE    = DSCODE.INTEGER<< 8 | DSCODE.DOUBLE;
-
-  private static final int FLOAT_TO_BYTE    = DSCODE.FLOAT  << 8 | DSCODE.BYTE;
-  private static final int FLOAT_TO_SHORT   = DSCODE.FLOAT  << 8 | DSCODE.SHORT;
-  private static final int FLOAT_TO_INT     = DSCODE.FLOAT  << 8 | DSCODE.INTEGER;
-  private static final int FLOAT_TO_LONG    = DSCODE.FLOAT  << 8 | DSCODE.LONG;
-  private static final int FLOAT_TO_FLOAT   = DSCODE.FLOAT  << 8 | DSCODE.FLOAT;
-  private static final int FLOAT_TO_DOUBLE  = DSCODE.FLOAT  << 8 | DSCODE.DOUBLE;
-
-  private static final int DOUBLE_TO_BYTE   = DSCODE.DOUBLE << 8 | DSCODE.BYTE;
-  private static final int DOUBLE_TO_SHORT  = DSCODE.DOUBLE << 8 | DSCODE.SHORT;
-  private static final int DOUBLE_TO_INT    = DSCODE.DOUBLE << 8 | DSCODE.INTEGER;
-  private static final int DOUBLE_TO_LONG   = DSCODE.DOUBLE << 8 | DSCODE.LONG;
-  private static final int DOUBLE_TO_FLOAT  = DSCODE.DOUBLE << 8 | DSCODE.FLOAT;
-  private static final int DOUBLE_TO_DOUBLE = DSCODE.DOUBLE << 8 | DSCODE.DOUBLE;
-  
-  //////////////////////////////////////////////////////////////////////////////
-  //
-  // constants for any-to-any string comparisons 
-  //
-  //////////////////////////////////////////////////////////////////////////////
-
-  private static final int STRING_TO_STRING             = DSCODE.STRING       << 8 | DSCODE.STRING;
-  private static final int STRING_TO_STRING_BYTES       = DSCODE.STRING       << 8 | DSCODE.STRING_BYTES;
-  private static final int STRING_BYTES_TO_STRING       = DSCODE.STRING_BYTES << 8 | DSCODE.STRING;
-  private static final int STRING_BYTES_TO_STRING_BYTES = DSCODE.STRING_BYTES << 8 | DSCODE.STRING_BYTES;
-  
-  @Override
-  public int compare(byte[] o1, byte[] o2) {
-    return compare(o1, 0, o1.length, o2, 0, o2.length);
-  }
-  
-  @Override
-  public int compare(byte[] b1, int o1, int l1, byte[] b2, int o2, int l2) {
-    byte type1 = b1[o1];
-    byte type2 = b2[o2];
-
-    // optimized comparisons
-    if (isString(type1) && isString(type2)) {
-      return compareAsString(type1, b1, o1, type2, b2, o2);
-      
-    } else if (isNumeric(type1) && isNumeric(type2)) {
-      return compareAsNumeric(type1, b1, o1, type2, b2, o2);
-      
-    } else if (type1 == DSCODE.BOOLEAN && type2 == DSCODE.BOOLEAN) {
-      return compareAsBoolean(getBoolean(b1, o1), getBoolean(b2, o2));
-
-    } else if (type1 == DSCODE.CHARACTER && type2 == DSCODE.CHARACTER) {
-      return compareAsChar(getChar(b1, o1), getChar(b2, o2));
-
-    } else if (type1 == DSCODE.NULL || type2 == DSCODE.NULL) {
-      // null check, assumes NULLs sort last
-      return type1 == type2 ? 0 : type1 == DSCODE.NULL ? 1 : -1;
-    }
-    
-    // fallback, will deserialize to Comparable 
-    return compareAsObject(b1, o1, l1, b2, o2, l2);
-  }
-
-  private static boolean isNumeric(int type) {
-    return type == DSCODE.BYTE 
-        || type == DSCODE.SHORT 
-        || type == DSCODE.INTEGER 
-        || type == DSCODE.LONG 
-        || type == DSCODE.FLOAT 
-        || type == DSCODE.DOUBLE;
-  }
-  
-  private static boolean isString(int type) {
-    return type == DSCODE.STRING 
-        || type == DSCODE.STRING_BYTES;
-  }
-  
-  //////////////////////////////////////////////////////////////////////////////
-  //
-  // type comparisons
-  //
-  //////////////////////////////////////////////////////////////////////////////
-  
-  private static int compareAsString(byte type1, byte[] b1, int o1, byte type2, byte[] b2, int o2) {
-    // TODO these comparisons do not provide true alphabetical collation 
-    // support (for example upper case sort before lower case).  Need to use a
-    // collation key instead of unicode ordinal number comparison
-    switch (type1 << 8 | type2) {
-    case STRING_TO_STRING:
-      return compareAsStringOfUtf(b1, o1, b2, o2);
-    
-    case STRING_TO_STRING_BYTES:
-      return -compareAsStringOfByteToUtf(b2, o2, b1, o1);
-    
-    case STRING_BYTES_TO_STRING:
-      return compareAsStringOfByteToUtf(b1, o1, b2, o2);
-
-    case STRING_BYTES_TO_STRING_BYTES:
-      return compareAsStringOfByte(b1, o1, b2, o2);
-
-    default:
-      throw new ClassCastException(String.format("Incomparable types: %d %d", type1, type2));
-    }
-  }
-  
-  private static int compareAsNumeric(byte type1, byte[] b1, int o1, byte type2, byte[] b2, int o2) {
-    switch (type1 << 8 | type2) {
-    case BYTE_TO_BYTE:     return compareAsShort (getByte  (b1, o1), getByte  (b2, o2));
-    case BYTE_TO_SHORT:    return compareAsShort (getByte  (b1, o1), getShort (b2, o2));
-    case BYTE_TO_INT:      return compareAsInt   (getByte  (b1, o1), getInt   (b2, o2));
-    case BYTE_TO_LONG:     return compareAsLong  (getByte  (b1, o1), getLong  (b2, o2));
-    case BYTE_TO_FLOAT:    return compareAsFloat (getByte  (b1, o1), getFloat (b2, o2));
-    case BYTE_TO_DOUBLE:   return compareAsDouble(getByte  (b1, o1), getDouble(b2, o2));
-
-    case SHORT_TO_BYTE:    return compareAsShort (getShort (b1, o1), getByte  (b2, o2));
-    case SHORT_TO_SHORT:   return compareAsShort (getShort (b1, o1), getShort (b2, o2));
-    case SHORT_TO_INT:     return compareAsInt   (getShort (b1, o1), getInt   (b2, o2));
-    case SHORT_TO_LONG:    return compareAsLong  (getShort (b1, o1), getLong  (b2, o2));
-    case SHORT_TO_FLOAT:   return compareAsFloat (getShort (b1, o1), getFloat (b2, o2));
-    case SHORT_TO_DOUBLE:  return compareAsDouble(getShort (b1, o1), getDouble(b2, o2));
-
-    case INT_TO_BYTE:      return compareAsInt   (getInt   (b1, o1), getByte  (b2, o2));
-    case INT_TO_SHORT:     return compareAsInt   (getInt   (b1, o1), getShort (b2, o2));
-    case INT_TO_INT:       return compareAsInt   (getInt   (b1, o1), getInt   (b2, o2));
-    case INT_TO_LONG:      return compareAsLong  (getInt   (b1, o1), getLong  (b2, o2));
-    case INT_TO_FLOAT:     return compareAsFloat (getInt   (b1, o1), getFloat (b2, o2));
-    case INT_TO_DOUBLE:    return compareAsDouble(getInt   (b1, o1), getDouble(b2, o2));
-
-    case LONG_TO_BYTE:     return compareAsLong  (getLong  (b1, o1), getByte  (b2, o2));
-    case LONG_TO_SHORT:    return compareAsLong  (getLong  (b1, o1), getShort (b2, o2));
-    case LONG_TO_INT:      return compareAsLong  (getLong  (b1, o1), getInt   (b2, o2));
-    case LONG_TO_LONG:     return compareAsLong  (getLong  (b1, o1), getLong  (b2, o2));
-    case LONG_TO_FLOAT:    return compareAsDouble(getLong  (b1, o1), getFloat (b2, o2));
-    case LONG_TO_DOUBLE:   return compareAsDouble(getLong  (b1, o1), getDouble(b2, o2));
-
-    case FLOAT_TO_BYTE:    return compareAsFloat (getFloat (b1, o1), getByte  (b2, o2));
-    case FLOAT_TO_SHORT:   return compareAsFloat (getFloat (b1, o1), getShort (b2, o2));
-    case FLOAT_TO_INT:     return compareAsFloat (getFloat (b1, o1), getInt   (b2, o2));
-    case FLOAT_TO_LONG:    return compareAsFloat (getFloat (b1, o1), getLong  (b2, o2));
-    case FLOAT_TO_FLOAT:   return compareAsFloat (getFloat (b1, o1), getFloat (b2, o2));
-    case FLOAT_TO_DOUBLE:  return compareAsDouble(getFloat (b1, o1), getDouble(b2, o2));
-
-    case DOUBLE_TO_BYTE:   return compareAsDouble(getDouble(b1, o1), getByte  (b2, o2));
-    case DOUBLE_TO_SHORT:  return compareAsDouble(getDouble(b1, o1), getShort (b2, o2));
-    case DOUBLE_TO_INT:    return compareAsDouble(getDouble(b1, o1), getInt   (b2, o2));
-    case DOUBLE_TO_LONG:   return compareAsDouble(getDouble(b1, o1), getLong  (b2, o2));
-    case DOUBLE_TO_FLOAT:  return compareAsDouble(getDouble(b1, o1), getFloat (b2, o2));
-    case DOUBLE_TO_DOUBLE: return compareAsDouble(getDouble(b1, o1), getDouble(b2, o2));
-    
-    default:
-      throw new ClassCastException(String.format("Incomparable types: %d %d", type1, type2));
-    }
-  }
-  
-  private static int compareAsBoolean(boolean b1, boolean b2) {
-    return (b1 == b2) ? 0 : (b1 ? 1 : -1);
-  }
-  
-  private static int compareAsShort(short s1, short s2) {
-    return s1 - s2;
-  }
-  
-  private static int compareAsChar(char c1, char c2) {
-    // TODO non-collating sort
-    return c1 - c2;
-  }
-  
-  private static int compareAsInt(long l1, long l2) {
-    return (int) (l1 - l2);
-  }
-  
-  private static int compareAsLong(long l1, long l2) {
-    return (l1 < l2) ? -1 : ((l1 == l2) ? 0 : 1);
-  }
-  
-  private static int compareAsFloat(float f1, float f2) {
-    return Float.compare(f1, f2);
-  }
-
-  private static int compareAsDouble(double d1, double d2) {
-    return Double.compare(d1, d2);
-  }
-
-  private static int compareAsStringOfByte(byte[] b1, int o1, byte[] b2, int o2) {
-    int offset = 3;
-    int l1 = Bytes.toUnsignedShort(b1[o1 + 1], b1[o1 + 2]);
-    int l2 = Bytes.toUnsignedShort(b2[o1 + 1], b2[o1 + 2]);
-    
-    assert b1.length >= o1 + offset + l1;
-    assert b2.length >= o2 + offset + l2;
-    
-    int end = o1 + offset + Math.min(l1, l2);
-    for (int i = o1 + offset, j = o2 + offset; i < end; i++, j++) {
-      int diff = b1[i] - b2[j];
-      if (diff != 0) {
-        return diff;
-      }
-    }
-    return l1 - l2;
-  }
-
-  private static int compareAsStringOfUtf(byte[] b1, int o1, byte[] b2, int o2) {
-    int offset = 3;
-    int l1 = Bytes.toUnsignedShort(b1[o1 + 1], b1[o1 + 2]);
-    int l2 = Bytes.toUnsignedShort(b2[o1 + 1], b2[o1 + 2]);
-
-    assert b1.length >= o1 + offset + l1;
-    assert b2.length >= o2 + offset + l2;
-    
-    int i = 0;
-    int j = 0;
-    while (i < l1 && j < l2) {
-      final int idx = o1 + offset + i;
-      final int ilen = getUtfLength(b1[idx]);
-      final char c1 = getUtfChar(b1, idx, ilen);
-      i += ilen;
-      
-      final int jdx = o2 + offset + j;
-      final int jlen = getUtfLength(b2[jdx]);
-      char c2 = getUtfChar(b2, jdx, jlen);
-      j += jlen;
-      
-      int diff = compareAsChar(c1, c2);
-      if (diff != 0) {
-        return diff;
-      }
-    }
-    return (l1 - i) - (l2 - j);
-  }
-
-  private static int compareAsStringOfByteToUtf(byte[] b1, int o1, byte[] b2, int o2) {
-    int offset = 3;
-    int l1 = Bytes.toUnsignedShort(b1[o1 + 1], b1[o1 + 2]);
-    int l2 = Bytes.toUnsignedShort(b2[o1 + 1], b2[o1 + 2]);
-
-    assert b1.length >= o1 + offset + l1;
-    assert b2.length >= o2 + offset + l2;
-    
-    int i = 0;
-    int j = 0;
-    while (i < l1 && j < l2) {
-      final int idx = o1 + offset + i;
-      final char c1 = (char) b1[idx];
-      i++;
-      
-      final int jdx = o2 + offset + j;
-      final int jlen = getUtfLength(b2[jdx]);
-      char c2 = getUtfChar(b2, jdx, jlen);
-      j += jlen;
-      
-      int diff = compareAsChar(c1, c2);
-      if (diff != 0) {
-        return diff;
-      }
-    }
-    return (l1 - i) - (l2 - j);
-  }
-  
-  private static int compareAsObject(byte[] b1, int o1, int l1, byte[] b2, int o2, int l2) {
-    DataInput in1 = new DataInputStream(new ByteArrayInputStream(b1, o1, l1));
-    DataInput in2 = new DataInputStream(new ByteArrayInputStream(b2, o2, l2));
-  
-    try {
-      Comparable<Object> obj1 = DataSerializer.readObject(in1);
-      Comparable<Object> obj2 = DataSerializer.readObject(in2);
-  
-      return obj1.compareTo(obj2);
-      
-    } catch (Exception e) {
-      throw (RuntimeException) new ClassCastException().initCause(e);
-    }
-  }
-  
-  //////////////////////////////////////////////////////////////////////////////
-  //
-  //
-  // Get a char from modified UTF8, as defined by DataInput.readUTF().
-  //
-  //////////////////////////////////////////////////////////////////////////////
-
-  private static int getUtfLength(byte b) {
-    int c = b & 0xff;
-    
-    // 0xxxxxxx
-    if (c < 0x80) {
-      return 1;
-    
-    // 110xxxxx 10xxxxxx
-    } else if (c < 0xe0) {
-      return 2;
-    } 
-
-    // 1110xxxx 10xxxxxx 10xxxxxx
-    return 3;
-  }
-  
-  private static char getUtfChar(byte[] b, int off, int len) {
-    assert b.length >= off + len;
-    switch (len) {
-    case 1: 
-      return (char) b[off];
-    case 2: 
-      return getUtf2(b, off);
-    case 3: 
-    default:
-      return getUtf3(b, off);
-    }
-  }
-
-  private static char getUtf2(byte[] b, int off) {
-    assert b.length >= off + 2;
-    assert (b[off] & 0xff) >= 0xc0;
-    assert (b[off] & 0xff) < 0xe0;
-    assert (b[off + 1] & 0xff) >= 0x80;
-    
-    return (char) (((b[off] & 0x1f) << 6) | (b[off + 1] & 0x3f));
-  }
-  
-  private static char getUtf3(byte[] b, int off) {
-    assert b.length >= off + 3;
-    assert (b[off]     & 0xff) >= 0xe0;
-    assert (b[off + 1] & 0xff) >= 0x80;
-    assert (b[off + 2] & 0xff) >= 0x80;
-    
-    return (char) (((b[off] & 0x0f) << 12) | ((b[off + 1] & 0x3f) << 6) | (b[off + 2] & 0x3f));
-  }
-
-
-  //////////////////////////////////////////////////////////////////////////////
-  //
-  // Get a serialized primitive from byte[];  b[0] is the DSCODE.
-  //
-  //////////////////////////////////////////////////////////////////////////////
-  
-  private static boolean getBoolean(byte[] b, int off) {
-    assert b.length >= off + 2;
-    return b[off + 1] != 0;  
-  }
-  
-  private static byte getByte(byte[] b, int off) {
-    assert b.length >= off + 2;
-    return b[off + 1];
-  }
-
-  private static short getShort(byte[] b, int off) {
-    assert b.length >= off + 3;
-    return Bytes.toShort(b[off + 1], b[off + 2]);
-  }
-  
-  private static char getChar(byte[] b, int off) {
-    assert b.length >= off + 3;
-    return Bytes.toChar(b[off + 1], b[off + 2]);
-  }
-
-  private static int getInt(byte[] b, int off) {
-    assert b.length >= off + 5;
-    return Bytes.toInt(b[off + 1], b[off + 2], b[off + 3], b[off + 4]);
-  }
-
-  private static long getLong(byte[] b, int off) {
-    assert b.length >= off + 9;
-    return Bytes.toLong(b[off + 1], b[off + 2], b[off + 3], b[off + 4], 
-                        b[off + 5], b[off + 6], b[off + 7], b[off + 8]);
-  }
-
-  private static float getFloat(byte[] b, int off) {
-    assert b.length >= off + 5;
-    return Float.intBitsToFloat(getInt(b, off));
-  }
-
-  private static double getDouble(byte[] b, int off) {
-    assert b.length >= off + 9;
-    return Double.longBitsToDouble(getLong(b, off));
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/9438c8b1/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/persistence/soplog/NonCompactor.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/persistence/soplog/NonCompactor.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/persistence/soplog/NonCompactor.java
deleted file mode 100644
index 697ac18..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/persistence/soplog/NonCompactor.java
+++ /dev/null
@@ -1,110 +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.
- */
-package com.gemstone.gemfire.internal.cache.persistence.soplog;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.ArrayDeque;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Deque;
-import java.util.SortedMap;
-import java.util.TreeMap;
-import java.util.concurrent.atomic.AtomicLong;
-
-import com.gemstone.gemfire.internal.cache.persistence.soplog.SortedOplog.SortedOplogReader;
-
-/**
- * Provides a compactor that does no compaction, primarily for testing purposes.
- *  
- * @author bakera
- */
-public class NonCompactor implements Compactor {
-  /** the fileset */
-  private final Fileset<Integer> fileset;
-  
-  /** the current readers */
-  private final Deque<TrackedReference<SortedOplogReader>> readers;
-  
-  public static Fileset<Integer> createFileset(final String name, final File dir) {
-    return new Fileset<Integer>() {
-      private final AtomicLong file = new AtomicLong(0);
-      
-      @Override
-      public SortedMap<Integer, ? extends Iterable<File>> recover() {
-        return new TreeMap<Integer, Iterable<File>>();
-      }
-
-      @Override
-      public File getNextFilename() {
-        return new File(dir, name + "-" + System.currentTimeMillis() + "-" 
-            + file.getAndIncrement() + ".soplog");
-      }
-    };
-  }
-  public NonCompactor(String name, File dir) {
-    fileset = createFileset(name, dir);
-    readers = new ArrayDeque<TrackedReference<SortedOplogReader>>();
-  }
-  
-  @Override
-  public boolean compact() throws IOException {
-    // liar!
-    return true;
-  }
-
-  @Override
-  public void compact(boolean force, CompactionHandler cd) {
-  }
-
-  @Override
-  public synchronized Collection<TrackedReference<SortedOplogReader>> getActiveReaders(
-      byte[] start, byte[] end) {
-    for (TrackedReference<SortedOplogReader> tr : readers) {
-      tr.increment();
-    }
-    return new ArrayList<TrackedReference<SortedOplogReader>>(readers);
-  }
-
-  @Override
-  public void add(SortedOplog soplog) throws IOException {
-    readers.addFirst(new TrackedReference<SortedOplogReader>(soplog.createReader()));
-  }
-
-  @Override
-  public synchronized void clear() throws IOException {
-    for (TrackedReference<SortedOplogReader> tr : readers) {
-      tr.get().close();
-      readers.remove(tr);
-    }
-  }
-
-  @Override
-  public synchronized void close() throws IOException {
-    clear();
-  }
-
-  @Override
-  public CompactionTracker<Integer> getTracker() {
-    return null;
-  }
-  
-  @Override
-  public Fileset<Integer> getFileset() {
-    return fileset;
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/9438c8b1/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/persistence/soplog/ReversingSerializedComparator.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/persistence/soplog/ReversingSerializedComparator.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/persistence/soplog/ReversingSerializedComparator.java
deleted file mode 100644
index b18919d..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/persistence/soplog/ReversingSerializedComparator.java
+++ /dev/null
@@ -1,67 +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.
- */
-package com.gemstone.gemfire.internal.cache.persistence.soplog;
-
-import com.gemstone.gemfire.internal.cache.persistence.soplog.SortedReader.SerializedComparator;
-
-/**
- * Reverses the ordering imposed by the underlying comparator.  Use this to 
- * change from an ascending to a descending order or vice versa.
- * <p>
- * Prior to use, an instance must be configured with a comparator for delegation
- * of the comparison operations.
- *  
- * @author bakera
- */
-public class ReversingSerializedComparator implements DelegatingSerializedComparator {
-  private volatile SerializedComparator delegate;
-
-  @Override
-  public void setComparators(SerializedComparator[] sc) {
-    assert sc.length == 0;
-    delegate = sc[0];
-  }
-  
-  @Override
-  public SerializedComparator[] getComparators() {
-    return new SerializedComparator[] { delegate };
-  }
-  
-  @Override
-  public int compare(byte[] o1, byte[] o2) {
-    return compare(o1, 0, o1.length, o2, 0, o2.length);
-  }
-  
-  @Override
-  public int compare(byte[] b1, int o1, int l1, byte[] b2, int o2, int l2) {
-    return delegate.compare(b2, o2, l2, b1, o1, l1);
-  }
-  
-  /**
-   * Returns a comparator that reverses the ordering imposed by the supplied
-   * comparator.
-   * 
-   * @param sc the original comparator
-   * @return the reversed comparator
-   */
-  public static SerializedComparator reverse(SerializedComparator sc) {
-    ReversingSerializedComparator rev = new ReversingSerializedComparator();
-    rev.delegate = sc;
-    
-    return rev;
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/9438c8b1/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/persistence/soplog/SizeTieredCompactor.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/persistence/soplog/SizeTieredCompactor.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/persistence/soplog/SizeTieredCompactor.java
deleted file mode 100644
index 5976ad0..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/persistence/soplog/SizeTieredCompactor.java
+++ /dev/null
@@ -1,198 +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.
- */
-package com.gemstone.gemfire.internal.cache.persistence.soplog;
-
-import java.io.File;
-import java.io.IOException;
-import java.io.InterruptedIOException;
-import java.util.ArrayDeque;
-import java.util.ArrayList;
-import java.util.Deque;
-import java.util.List;
-import java.util.Map;
-import java.util.concurrent.Executor;
-import java.util.concurrent.atomic.AtomicBoolean;
-
-import com.gemstone.gemfire.internal.cache.persistence.soplog.SortedOplog.SortedOplogReader;
-
-/**
- * Implements a size-tiered compaction scheme in which the soplogs are organized
- * by levels of increasing size.  Each level is limited to a fixed number of 
- * files, <code>M</code>. Given an initial size of <code>N</code> the amount of
- * disk space consumed by a level <code>L</code> is <code>M * N^(L+1)</code>.
- * <p>
- * During compaction, this approach will temporarily double the amount of space
- * consumed by the level.  Compactions are performed on a background thread.
- * <p>
- * Soplogs that have been compacted will be moved to the inactive list where they
- * will be deleted once they are no longer in use.
- * 
- * @author bakera
- */
-public class SizeTieredCompactor extends AbstractCompactor<Integer> {
-  /** restricts the number of soplogs per level */
-  private final int maxFilesPerLevel;
-  
-  // TODO consider relaxing the upper bound so the levels are created dynamically
-  /** restricts the number of levels; files in maxLevel are not compacted */
-  private final int maxLevels;
-  
-  public SizeTieredCompactor(SortedOplogFactory factory, 
-      Fileset<Integer> fileset, CompactionTracker<Integer> tracker,
-      Executor exec, int maxFilesPerLevel, int maxLevels)
-      throws IOException {
-    super(factory, fileset, tracker, exec);
-
-    assert maxFilesPerLevel > 0;
-    assert maxLevels > 0;
-    
-    this.maxFilesPerLevel = maxFilesPerLevel;
-    this.maxLevels = maxLevels;
-    
-    final boolean isDebugEnabled = logger.isDebugEnabled();
-    if (isDebugEnabled) {
-      logger.debug("{}Creating size-tiered compactor", super.logPrefix);
-    }
-
-    for (int i = 0; i < maxLevels; i++) {
-      levels.add(new OrderedLevel(i));
-    }
-    
-    for (Map.Entry<Integer, ? extends Iterable<File>> entry : fileset.recover().entrySet()) {
-      int level = Math.min(maxLevels - 1, entry.getKey());
-      for (File f : entry.getValue()) {
-        if (isDebugEnabled) {
-          logger.debug("{}Adding {} to level {}", super.logPrefix, f, level);
-        }
-        levels.get(level).add(factory.createSortedOplog(f));
-      }
-    }
-  }
-
-  @Override
-  public String toString() {
-    return String.format("%s <%d/%d>", factory.getConfiguration().getName(), maxFilesPerLevel, maxLevels);
-  }
-  
-  /**
-   * Organizes a set of soplogs for a given level.  All operations on the 
-   * soplogs are synchronized via the instance monitor.
-   */
-  protected class OrderedLevel extends Level {
-    /** the ordered set of soplog readers */
-    private final Deque<TrackedReference<SortedOplogReader>> soplogs;
-    
-    /** true if the level is being compacted */
-    private final AtomicBoolean isCompacting;
-    
-    public OrderedLevel(int level) {
-      super(level);
-      soplogs = new ArrayDeque<TrackedReference<SortedOplogReader>>(maxFilesPerLevel);
-      isCompacting = new AtomicBoolean(false);
-    }
-    
-    @Override
-    protected synchronized boolean needsCompaction() {
-      // TODO this is safe but overly conservative...we need to allow parallel
-      // compaction of a level such that we guarantee completion order and handle
-      // errors
-      return !isCompacting.get() 
-          && soplogs.size() >= maxFilesPerLevel 
-          && level != maxLevels - 1;
-    }
-    
-    @Override
-    protected List<TrackedReference<SortedOplogReader>> getSnapshot(byte[] start, byte[] end) {
-      // ignoring range limits since keys are stored in overlapping files
-      List<TrackedReference<SortedOplogReader>> snap;
-      synchronized (this) {
-        snap = new ArrayList<TrackedReference<SortedOplogReader>>(soplogs);
-      }
-
-      for (TrackedReference<SortedOplogReader> tr : snap) {
-        tr.increment();
-      }
-      return snap; 
-    }
-
-    @Override
-    protected synchronized void clear() throws IOException {
-      for (TrackedReference<SortedOplogReader> tr : soplogs) {
-        tr.get().close();
-      }
-      markAsInactive(soplogs, level);
-      soplogs.clear();
-    }
-    
-    @Override
-    protected synchronized void close() throws IOException {
-      for (TrackedReference<SortedOplogReader> tr : soplogs) {
-        tr.get().close();
-        factory.getConfiguration().getStatistics().incActiveFiles(-1);
-      }
-      soplogs.clear();
-    }
-
-    @Override
-    protected void add(SortedOplog soplog) throws IOException {
-      SortedOplogReader rdr = soplog.createReader();
-      synchronized (this) {
-        soplogs.addFirst(new TrackedReference<SortedOplogReader>(rdr));
-      }
-      
-      if (logger.isDebugEnabled()) {
-        logger.debug("{}Added file {} to level {}", SizeTieredCompactor.super.logPrefix, rdr, level);
-      }
-      tracker.fileAdded(rdr.getFile(), level);
-      factory.getConfiguration().getStatistics().incActiveFiles(1);
-    }
-
-    @Override
-    protected boolean compact(AtomicBoolean aborted) throws IOException {
-      assert level < maxLevels : "Can't compact level: " + level;
-      
-      if (!isCompacting.compareAndSet(false, true)) {
-        // another thread won so gracefully bow out
-        return false;
-      }
-      
-      try {
-        List<TrackedReference<SortedOplogReader>> snapshot = getSnapshot(null, null);
-        try {
-          SortedOplog merged = merge(snapshot, level == maxLevels - 1, aborted);
-          
-          synchronized (this) {
-            if (merged != null) {
-              levels.get(Math.min(level + 1, maxLevels - 1)).add(merged);
-            }
-            markAsInactive(snapshot, level);
-            soplogs.removeAll(snapshot);
-          }
-        } catch (InterruptedIOException e) {
-          if (logger.isDebugEnabled()) {
-            logger.debug("{}Aborting compaction of level {}", SizeTieredCompactor.super.logPrefix, level);
-          }
-          return false;
-        }
-        return true;
-      } finally {
-        boolean set = isCompacting.compareAndSet(true, false);
-        assert set;
-      }
-    }
-  }
-}


[12/50] [abbrv] incubator-geode git commit: Fix AnalyzeSerializablesJUnitTest, add CopyOnWriteHashMap to sanctionedSerializables.txt

Posted by ma...@apache.org.
Fix AnalyzeSerializablesJUnitTest, add CopyOnWriteHashMap to sanctionedSerializables.txt


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

Branch: refs/heads/feature/GEODE-53
Commit: 2cf4fb1ab5fe899b5bfe01b2e8b22e4eb67157ef
Parents: 37cc70e
Author: Ashvin Agrawal <as...@apache.org>
Authored: Wed Nov 11 13:07:06 2015 -0800
Committer: Ashvin Agrawal <as...@apache.org>
Committed: Wed Nov 11 13:07:06 2015 -0800

----------------------------------------------------------------------
 .../com/gemstone/gemfire/codeAnalysis/sanctionedSerializables.txt  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/2cf4fb1a/gemfire-core/src/test/resources/com/gemstone/gemfire/codeAnalysis/sanctionedSerializables.txt
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/resources/com/gemstone/gemfire/codeAnalysis/sanctionedSerializables.txt b/gemfire-core/src/test/resources/com/gemstone/gemfire/codeAnalysis/sanctionedSerializables.txt
index 25e8813..b9252f7 100644
--- a/gemfire-core/src/test/resources/com/gemstone/gemfire/codeAnalysis/sanctionedSerializables.txt
+++ b/gemfire-core/src/test/resources/com/gemstone/gemfire/codeAnalysis/sanctionedSerializables.txt
@@ -143,7 +143,6 @@ com/gemstone/gemfire/cache/hdfs/internal/hoplog/HdfsSortedOplogOrganizer$HoplogR
 com/gemstone/gemfire/cache/hdfs/internal/hoplog/Hoplog$HoplogVersion,false
 com/gemstone/gemfire/cache/hdfs/internal/hoplog/Hoplog$Meta,false
 com/gemstone/gemfire/cache/hdfs/internal/org/apache/hadoop/io/SequenceFile$CompressionType,false
-com/gemstone/gemfire/cache/lucene/LuceneQueryFactory$ResultType,false
 com/gemstone/gemfire/cache/operations/PutAllOperationContext$UpdateOnlyMap,true,-1034234728574286014,m:java/util/Map
 com/gemstone/gemfire/cache/partition/PartitionNotAvailableException,true,1
 com/gemstone/gemfire/cache/persistence/ConflictingPersistentDataException,true,-2629287782021455875
@@ -635,6 +634,7 @@ com/gemstone/gemfire/internal/tcp/VersionedByteBufferInputStream,false,version:c
 com/gemstone/gemfire/internal/util/Breadcrumbs$CrumbType,false
 com/gemstone/gemfire/internal/util/SingletonValue$ValueState,false
 com/gemstone/gemfire/internal/util/SunAPINotFoundException,false
+com/gemstone/gemfire/internal/util/concurrent/CopyOnWriteHashMap,false,map:java/util/Map
 com/gemstone/gemfire/internal/util/concurrent/CustomEntryConcurrentHashMap,true,-7056732555635108300,compareValues:boolean,entryCreator:com/gemstone/gemfire/internal/util/concurrent/CustomEntryConcurrentHashMap$HashEntryCreator,segmentMask:int,segmentShift:int,segments:com/gemstone/gemfire/internal/util/concurrent/CustomEntryConcurrentHashMap$Segment[]
 com/gemstone/gemfire/internal/util/concurrent/CustomEntryConcurrentHashMap$DefaultHashEntryCreator,true,3765680607280951726
 com/gemstone/gemfire/internal/util/concurrent/CustomEntryConcurrentHashMap$IdentitySegment,true,3086228147110819882


[48/50] [abbrv] incubator-geode git commit: GEODE-587: Publish lucene jar to distribution and maven

Posted by ma...@apache.org.
GEODE-587: Publish lucene jar to distribution and maven


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

Branch: refs/heads/feature/GEODE-53
Commit: 25c8f0cc48e831d6afb459767a42c1c98fb47996
Parents: ac0b68e
Author: Anthony Baker <ab...@pivotal.io>
Authored: Fri Nov 20 16:23:57 2015 -0800
Committer: Anthony Baker <ab...@pivotal.io>
Committed: Fri Nov 20 21:03:20 2015 -0800

----------------------------------------------------------------------
 gemfire-assembly/build.gradle | 7 ++++++-
 gemfire-lucene/build.gradle   | 4 ++--
 2 files changed, 8 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/25c8f0cc/gemfire-assembly/build.gradle
----------------------------------------------------------------------
diff --git a/gemfire-assembly/build.gradle b/gemfire-assembly/build.gradle
index dd7b9fa..5f82905 100755
--- a/gemfire-assembly/build.gradle
+++ b/gemfire-assembly/build.gradle
@@ -25,6 +25,7 @@ dependencies {
   archives project(':gemfire-json')  
   archives project(':gemfire-joptsimple')  
   archives project(':gemfire-core')  
+  archives project(':gemfire-lucene')
   archives project(':gemfire-web')
   archives project(':gemfire-web-api')
 
@@ -181,6 +182,9 @@ distributions {
         }
         from project(":gemfire-core").configurations.archives.allArtifacts.files
 
+        from project(":gemfire-lucene").configurations.runtime
+        from project(":gemfire-lucene").configurations.archives.allArtifacts.files
+
         // include this jar        
         from project(":gemfire-web-api").jar.outputs.files.getFiles()
         
@@ -216,7 +220,8 @@ def commonJar = [publicationName:'commonJar', project:project(":gemfire-common")
 def coreJar = [publicationName:'coreJar', project:project(":gemfire-core").name]
 def jsonJar = [publicationName:'jsonJar', project:project(":gemfire-json").name]
 def joptsimpleJar = [publicationName:'joptsimpleJar', project:project(":gemfire-joptsimple").name]
-def MavenJars = [ coreJar, jsonJar, joptsimpleJar, commonJar ]
+def luceneJar = [publicationName:'luceneJar', project:project(":gemfire-lucene").name]
+def MavenJars = [ coreJar, jsonJar, joptsimpleJar, commonJar, luceneJar ]
 
 afterEvaluate {
   publishing {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/25c8f0cc/gemfire-lucene/build.gradle
----------------------------------------------------------------------
diff --git a/gemfire-lucene/build.gradle b/gemfire-lucene/build.gradle
index 6c3adda..ff47748 100644
--- a/gemfire-lucene/build.gradle
+++ b/gemfire-lucene/build.gradle
@@ -1,6 +1,6 @@
 dependencies {
-    provided project(':gemfire-core')
-    provided project(':gemfire-common')
+    compile project(':gemfire-core')
+    compile project(':gemfire-common')
 
     compile 'org.apache.lucene:lucene-analyzers-common:' + project.'lucene.version'
     compile 'org.apache.lucene:lucene-core:' + project.'lucene.version'


[32/50] [abbrv] incubator-geode git commit: Revert "GEODE-543: upgrade the Jline and Spring Shell libraries and fix the compilation erros"

Posted by ma...@apache.org.
Revert "GEODE-543: upgrade the Jline and Spring Shell libraries and fix the compilation erros"

This reverts commit 058aad3663cb00de3ac83f76b9c9b72a32952ca3.


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

Branch: refs/heads/feature/GEODE-53
Commit: e8ddd3398d90818f552dcec00eff29d01bc93795
Parents: 058aad3
Author: Jens Deppe <jd...@pivotal.io>
Authored: Mon Nov 16 16:07:39 2015 -0800
Committer: Jens Deppe <jd...@pivotal.io>
Committed: Mon Nov 16 16:07:39 2015 -0800

----------------------------------------------------------------------
 gemfire-core/build.gradle                       |   2 +-
 .../management/internal/cli/CliUtil.java        |   2 +-
 .../management/internal/cli/Launcher.java       |   4 +-
 .../internal/cli/commands/ShellCommands.java    |   4 +-
 .../management/internal/cli/shell/Gfsh.java     |  15 +-
 .../internal/cli/shell/jline/ANSIBuffer.java    | 433 -------------------
 .../internal/cli/shell/jline/ANSIHandler.java   |   5 +-
 .../cli/shell/jline/CygwinMinttyTerminal.java   | 137 +++++-
 .../internal/cli/shell/jline/GfshHistory.java   |  13 +-
 .../shell/jline/GfshUnsupportedTerminal.java    |   2 +-
 .../internal/cli/util/CLIConsoleBufferUtil.java |   8 +-
 .../PersistentPartitionedRegionTestBase.java    |   2 +-
 gradle/dependency-versions.properties           |   4 +-
 13 files changed, 163 insertions(+), 468 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/e8ddd339/gemfire-core/build.gradle
----------------------------------------------------------------------
diff --git a/gemfire-core/build.gradle b/gemfire-core/build.gradle
index aa83bb9..f03066f 100755
--- a/gemfire-core/build.gradle
+++ b/gemfire-core/build.gradle
@@ -35,7 +35,7 @@ dependencies {
   compile 'mx4j:mx4j-remote:' + project.'mx4j.version'
   compile 'mx4j:mx4j-tools:' + project.'mx4j.version'
   compile 'net.java.dev.jna:jna:' + project.'jna.version'
-  compile 'jline:jline:' + project.'jline.version'
+  compile 'net.sourceforge.jline:jline:' + project.'jline.version'
   provided 'org.apache.hadoop:hadoop-common:' + project.'hadoop.version'
   provided 'org.apache.hadoop:hadoop-annotations:' + project.'hadoop.version'
   provided 'org.apache.hadoop:hadoop-hdfs:' + project.'hadoop.version'

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/e8ddd339/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/CliUtil.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/CliUtil.java b/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/CliUtil.java
index 09f8bd8..bc1f7b7 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/CliUtil.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/CliUtil.java
@@ -105,7 +105,7 @@ public class CliUtil {
 
     if (includeGfshDependencies) {
       // ConsoleReader from jline
-      jarProductName = checkLibraryByLoadingClass("jline.console.ConsoleReader", "JLine");
+      jarProductName = checkLibraryByLoadingClass("jline.ConsoleReader", "JLine");
       if (jarProductName != null) {
         return jarProductName;
       }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/e8ddd339/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/Launcher.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/Launcher.java b/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/Launcher.java
index 12e2c50..8bf1ce1 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/Launcher.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/Launcher.java
@@ -166,7 +166,7 @@ public final class Launcher {
           System.err.println(CliStrings.format(MSG_INVALID_COMMAND_OR_OPTION, CliUtil.arrayToString(args)));
           exitRequest = ExitShellRequest.FATAL_EXIT;
         } else {
-          if (!gfsh.executeScriptLine(commandLineCommand)) {
+          if (!gfsh.executeCommand(commandLineCommand)) {
               if (gfsh.getLastExecutionStatus() != 0) 
                 exitRequest = ExitShellRequest.FATAL_EXIT;
           } else if (gfsh.getLastExecutionStatus() != 0) {
@@ -224,7 +224,7 @@ public final class Launcher {
             String command = commandsToExecute.get(i);
             System.out.println(GfshParser.LINE_SEPARATOR + "(" + (i + 1) + ") Executing - " + command
                 + GfshParser.LINE_SEPARATOR);
-            if (!gfsh.executeScriptLine(command) || gfsh.getLastExecutionStatus() != 0) {
+            if (!gfsh.executeCommand(command) || gfsh.getLastExecutionStatus() != 0) {
               exitRequest = ExitShellRequest.FATAL_EXIT;
             }
           }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/e8ddd339/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/commands/ShellCommands.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/commands/ShellCommands.java b/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/commands/ShellCommands.java
index 1bd7692..edab207 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/commands/ShellCommands.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/commands/ShellCommands.java
@@ -853,8 +853,8 @@ private void configureHttpsURLConnection(Map<String, String> sslConfigProps) thr
       int historySizeWordLength = historySizeString.length();
 
       GfshHistory gfshHistory = gfsh.getGfshHistory();
-      //List<?> gfshHistoryList = gfshHistory.getHistoryList();
-      Iterator<?> it = gfshHistory.entries();
+      List<?> gfshHistoryList = gfshHistory.getHistoryList();
+      Iterator<?> it = gfshHistoryList.iterator();
       boolean flagForLineNumbers = (saveHistoryTo != null && saveHistoryTo
           .length() > 0) ? false : true;
       long lineNumber = 0;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/e8ddd339/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/shell/Gfsh.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/shell/Gfsh.java b/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/shell/Gfsh.java
index 67a8ccb..1d14c5b 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/shell/Gfsh.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/shell/Gfsh.java
@@ -36,9 +36,9 @@ import java.util.logging.Level;
 import java.util.logging.LogManager;
 import java.util.logging.Logger;
 
+import jline.ConsoleReader;
 import jline.Terminal;
 
-import jline.console.ConsoleReader;
 import org.springframework.shell.core.AbstractShell;
 import org.springframework.shell.core.CommandMarker;
 import org.springframework.shell.core.Converter;
@@ -380,6 +380,7 @@ public class Gfsh extends JLineShell {
   /**
    * See findResources in {@link AbstractShell}
    */
+  @Override
   protected Collection<URL> findResources(String resourceName) {
 //    return Collections.singleton(ClassPathLoader.getLatest().getResource(resourceName));
     return null;
@@ -419,7 +420,7 @@ public class Gfsh extends JLineShell {
    * @return true if execution is successful; false otherwise
    */
   @Override
-  public boolean executeScriptLine(final String line) {
+  public boolean executeCommand(final String line) {
     boolean success = false;
     String withPropsExpanded = line;
 
@@ -439,7 +440,7 @@ public class Gfsh extends JLineShell {
       if (gfshFileLogger.fineEnabled()) {
         gfshFileLogger.fine(logMessage + withPropsExpanded);
       }
-      success = super.executeScriptLine(withPropsExpanded);
+      success = super.executeCommand(withPropsExpanded);
     } catch (Exception e) {
       //TODO: should there be a way to differentiate error in shell & error on
       //server. May be by exception type.
@@ -632,12 +633,12 @@ public class Gfsh extends JLineShell {
   ///////////////////// JLineShell Class Methods End  //////////////////////////
 
   public int getTerminalHeight() {
-    return terminal != null ? terminal.getHeight() : DEFAULT_HEIGHT;
+    return terminal != null ? terminal.getTerminalHeight() : DEFAULT_HEIGHT;
   }
 
   public int getTerminalWidth() {
     if (terminal != null) {
-      return terminal.getWidth();
+      return terminal.getTerminalWidth();
     }
 
     Map<String, String> env = System.getenv();
@@ -804,7 +805,7 @@ public class Gfsh extends JLineShell {
                 ++commandSrNum;
                 Gfsh.println(commandSrNum+". Executing - " + cmdLet);                
                 Gfsh.println();
-                boolean executeSuccess = executeScriptLine(cmdLet);
+                boolean executeSuccess = executeCommand(cmdLet);
                 if (!executeSuccess) {
                   setLastExecutionStatus(-1);
                 }
@@ -921,7 +922,7 @@ public class Gfsh extends JLineShell {
       readLine = reader.readLine(prompt);
     } catch (IndexOutOfBoundsException e) {
       if (earlierLine.length() == 0) {
-        reader.println();
+        reader.printNewline();
         readLine = LINE_SEPARATOR;
         reader.getCursorBuffer().cursor = 0;
       } else {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/e8ddd339/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/shell/jline/ANSIBuffer.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/shell/jline/ANSIBuffer.java b/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/shell/jline/ANSIBuffer.java
deleted file mode 100644
index 572f899..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/shell/jline/ANSIBuffer.java
+++ /dev/null
@@ -1,433 +0,0 @@
-/*
- * Copyright (c) 2002-2007, Marc Prud'hommeaux. All rights reserved.
- *
- * This software is distributable under the BSD license. See the terms of the
- * BSD license in the documentation provided with this software.
- */
-package com.gemstone.gemfire.management.internal.cli.shell.jline;
-
-import org.springframework.shell.support.util.OsUtils;
-
-import java.io.BufferedReader;
-import java.io.InputStreamReader;
-
-/**
- *  A buffer that can contain ANSI text.
- *
- *  @author  <a href="mailto:mwp1@cornell.edu">Marc Prud'hommeaux</a>
- */
-public class ANSIBuffer {
-    private boolean ansiEnabled = true;
-    private final StringBuffer ansiBuffer = new StringBuffer();
-    private final StringBuffer plainBuffer = new StringBuffer();
-
-    public ANSIBuffer() {
-    }
-
-    public ANSIBuffer(final String str) {
-        append(str);
-    }
-
-    public void setAnsiEnabled(final boolean ansi) {
-        this.ansiEnabled = ansi;
-    }
-
-    public boolean getAnsiEnabled() {
-        return this.ansiEnabled;
-    }
-
-    public String getAnsiBuffer() {
-        return ansiBuffer.toString();
-    }
-
-    public String getPlainBuffer() {
-        return plainBuffer.toString();
-    }
-
-    public String toString(final boolean ansi) {
-        return ansi ? getAnsiBuffer() : getPlainBuffer();
-    }
-
-    public String toString() {
-        return toString(ansiEnabled);
-    }
-
-    public ANSIBuffer append(final String str) {
-        ansiBuffer.append(str);
-        plainBuffer.append(str);
-
-        return this;
-    }
-
-    public ANSIBuffer attrib(final String str, final int code) {
-        ansiBuffer.append(ANSICodes.attrib(code)).append(str)
-                  .append(ANSICodes.attrib(ANSICodes.OFF));
-        plainBuffer.append(str);
-
-        return this;
-    }
-
-    public ANSIBuffer red(final String str) {
-        return attrib(str, ANSICodes.FG_RED);
-    }
-
-    public ANSIBuffer blue(final String str) {
-        return attrib(str, ANSICodes.FG_BLUE);
-    }
-
-    public ANSIBuffer green(final String str) {
-        return attrib(str, ANSICodes.FG_GREEN);
-    }
-
-    public ANSIBuffer black(final String str) {
-        return attrib(str, ANSICodes.FG_BLACK);
-    }
-
-    public ANSIBuffer yellow(final String str) {
-        return attrib(str, ANSICodes.FG_YELLOW);
-    }
-
-    public ANSIBuffer magenta(final String str) {
-        return attrib(str, ANSICodes.FG_MAGENTA);
-    }
-
-    public ANSIBuffer cyan(final String str) {
-        return attrib(str, ANSICodes.FG_CYAN);
-    }
-
-    public ANSIBuffer bold(final String str) {
-        return attrib(str, ANSICodes.BOLD);
-    }
-
-    public ANSIBuffer underscore(final String str) {
-        return attrib(str, ANSICodes.UNDERSCORE);
-    }
-
-    public ANSIBuffer blink(final String str) {
-        return attrib(str, ANSICodes.BLINK);
-    }
-
-    public ANSIBuffer reverse(final String str) {
-        return attrib(str, ANSICodes.REVERSE);
-    }
-
-    public static class ANSICodes {
-        static final int OFF = 0;
-        static final int BOLD = 1;
-        static final int UNDERSCORE = 4;
-        static final int BLINK = 5;
-        static final int REVERSE = 7;
-        static final int CONCEALED = 8;
-        static final int FG_BLACK = 30;
-        static final int FG_RED = 31;
-        static final int FG_GREEN = 32;
-        static final int FG_YELLOW = 33;
-        static final int FG_BLUE = 34;
-        static final int FG_MAGENTA = 35;
-        static final int FG_CYAN = 36;
-        static final int FG_WHITE = 37;
-        static final char ESC = 27;
-
-        /**
-         *  Constructor is private since this is a utility class.
-         */
-        private ANSICodes() {
-        }
-
-        /**
-          * Sets the screen mode. The mode will be one of the following values:
-          * <pre>
-          * mode     description
-          * ----------------------------------------
-          *   0      40 x 148 x 25 monochrome (text)
-          *   1      40 x 148 x 25 color (text)
-          *   2      80 x 148 x 25 monochrome (text)
-          *   3      80 x 148 x 25 color (text)
-          *   4      320 x 148 x 200 4-color (graphics)
-          *   5      320 x 148 x 200 monochrome (graphics)
-          *   6      640 x 148 x 200 monochrome (graphics)
-          *   7      Enables line wrapping
-          *  13      320 x 148 x 200 color (graphics)
-          *  14      640 x 148 x 200 color (16-color graphics)
-          *  15      640 x 148 x 350 monochrome (2-color graphics)
-          *  16      640 x 148 x 350 color (16-color graphics)
-          *  17      640 x 148 x 480 monochrome (2-color graphics)
-          *  18      640 x 148 x 480 color (16-color graphics)
-          *  19      320 x 148 x 200 color (256-color graphics)
-          * </pre>
-          */
-        public static String setmode(final int mode) {
-            return ESC + "[=" + mode + "h";
-        }
-
-        /**
-          * Same as setmode () except for mode = 7, which disables line
-          * wrapping (useful for writing the right-most column without
-          * scrolling to the next line).
-          */
-        public static String resetmode(final int mode) {
-            return ESC + "[=" + mode + "l";
-        }
-
-        /**
-          * Clears the screen and moves the cursor to the home postition.
-          */
-        public static String clrscr() {
-            return ESC + "[2J";
-        }
-
-        /**
-          * Removes all characters from the current cursor position until
-          * the end of the line.
-          */
-        public static String clreol() {
-            return ESC + "[K";
-        }
-
-        /**
-          * Moves the cursor n positions to the left. If n is greater or
-          * equal to the current cursor column, the cursor is moved to the
-          * first column.
-          */
-        public static String left(final int n) {
-            return ESC + "[" + n + "D";
-        }
-
-        /**
-          * Moves the cursor n positions to the right. If n plus the current
-          * cursor column is greater than the rightmost column, the cursor
-          * is moved to the rightmost column.
-          */
-        public static String right(final int n) {
-            return ESC + "[" + n + "C";
-        }
-
-        /**
-          * Moves the cursor n rows up without changing the current column.
-          * If n is greater than or equal to the current row, the cursor is
-          * placed in the first row.
-          */
-        public static String up(final int n) {
-            return ESC + "[" + n + "A";
-        }
-
-        /**
-          * Moves the cursor n rows down. If n plus the current row is greater
-          * than the bottom row, the cursor is moved to the bottom row.
-          */
-        public static String down(final int n) {
-            return ESC + "[" + n + "B";
-        }
-
-        /*
-          * Moves the cursor to the given row and column. (1,1) represents
-          * the upper left corner. The lower right corner of a usual DOS
-          * screen is (25, 80).
-          */
-        public static String gotoxy(final int row, final int column) {
-            return ESC + "[" + row + ";" + column + "H";
-        }
-
-        /**
-          * Saves the current cursor position.
-          */
-        public static String save() {
-            return ESC + "[s";
-        }
-
-        /**
-          * Restores the saved cursor position.
-          */
-        public static String restore() {
-            return ESC + "[u";
-        }
-
-        /**
-          * Sets the character attribute. It will be
-         * one of the following character attributes:
-          *
-          * <pre>
-          * Text attributes
-          *    0    All attributes off
-          *    1    Bold on
-          *    4    Underscore (on monochrome display adapter only)
-          *    5    Blink on
-          *    7    Reverse video on
-          *    8    Concealed on
-          *
-          *   Foreground colors
-          *    30    Black
-          *    31    Red
-          *    32    Green
-          *    33    Yellow
-          *    34    Blue
-          *    35    Magenta
-          *    36    Cyan
-          *    37    White
-          *
-          *   Background colors
-          *    40    Black
-          *    41    Red
-          *    42    Green
-          *    43    Yellow
-          *    44    Blue
-          *    45    Magenta
-          *    46    Cyan
-          *    47    White
-          * </pre>
-          *
-          * The attributes remain in effect until the next attribute command
-          * is sent.
-          */
-        public static String attrib(final int attr) {
-            return ESC + "[" + attr + "m";
-        }
-
-        /**
-          * Sets the key with the given code to the given value. code must be
-          * derived from the following table, value must
-         * be any semicolon-separated
-          * combination of String (enclosed in double quotes) and numeric values.
-          * For example, to set F1 to the String "Hello F1", followed by a CRLF
-          * sequence, one can use: ANSI.setkey ("0;59", "\"Hello F1\";13;10").
-          * Heres's the table of key values:
-          * <pre>
-          * Key                       Code      SHIFT+code  CTRL+code  ALT+code
-          * ---------------------------------------------------------------
-          * F1                        0;59      0;84        0;94       0;104
-          * F2                        0;60      0;85        0;95       0;105
-          * F3                        0;61      0;86        0;96       0;106
-          * F4                        0;62      0;87        0;97       0;107
-          * F5                        0;63      0;88        0;98       0;108
-          * F6                        0;64      0;89        0;99       0;109
-          * F7                        0;65      0;90        0;100      0;110
-          * F8                        0;66      0;91        0;101      0;111
-          * F9                        0;67      0;92        0;102      0;112
-          * F10                       0;68      0;93        0;103      0;113
-          * F11                       0;133     0;135       0;137      0;139
-          * F12                       0;134     0;136       0;138      0;140
-          * HOME (num keypad)         0;71      55          0;119      --
-          * UP ARROW (num keypad)     0;72      56          (0;141)    --
-          * PAGE UP (num keypad)      0;73      57          0;132      --
-          * LEFT ARROW (num keypad)   0;75      52          0;115      --
-          * RIGHT ARROW (num keypad)  0;77      54          0;116      --
-          * END (num keypad)          0;79      49          0;117      --
-          * DOWN ARROW (num keypad)   0;80      50          (0;145)    --
-          * PAGE DOWN (num keypad)    0;81      51          0;118      --
-          * INSERT (num keypad)       0;82      48          (0;146)    --
-          * DELETE  (num keypad)      0;83      46          (0;147)    --
-          * HOME                      (224;71)  (224;71)    (224;119)  (224;151)
-          * UP ARROW                  (224;72)  (224;72)    (224;141)  (224;152)
-          * PAGE UP                   (224;73)  (224;73)    (224;132)  (224;153)
-          * LEFT ARROW                (224;75)  (224;75)    (224;115)  (224;155)
-          * RIGHT ARROW               (224;77)  (224;77)    (224;116)  (224;157)
-          * END                       (224;79)  (224;79)    (224;117)  (224;159)
-          * DOWN ARROW                (224;80)  (224;80)    (224;145)  (224;154)
-          * PAGE DOWN                 (224;81)  (224;81)    (224;118)  (224;161)
-          * INSERT                    (224;82)  (224;82)    (224;146)  (224;162)
-          * DELETE                    (224;83)  (224;83)    (224;147)  (224;163)
-          * PRINT SCREEN              --        --          0;114      --
-          * PAUSE/BREAK               --        --          0;0        --
-          * BACKSPACE                 8         8           127        (0)
-          * ENTER                     13        --          10         (0
-          * TAB                       9         0;15        (0;148)    (0;165)
-          * NULL                      0;3       --          --         --
-          * A                         97        65          1          0;30
-          * B                         98        66          2          0;48
-          * C                         99        66          3          0;46
-          * D                         100       68          4          0;32
-          * E                         101       69          5          0;18
-          * F                         102       70          6          0;33
-          * G                         103       71          7          0;34
-          * H                         104       72          8          0;35
-          * I                         105       73          9          0;23
-          * J                         106       74          10         0;36
-          * K                         107       75          11         0;37
-          * L                         108       76          12         0;38
-          * M                         109       77          13         0;50
-          * N                         110       78          14         0;49
-          * O                         111       79          15         0;24
-          * P                         112       80          16         0;25
-          * Q                         113       81          17         0;16
-          * R                         114       82          18         0;19
-          * S                         115       83          19         0;31
-          * T                         116       84          20         0;20
-          * U                         117       85          21         0;22
-          * V                         118       86          22         0;47
-          * W                         119       87          23         0;17
-          * X                         120       88          24         0;45
-          * Y                         121       89          25         0;21
-          * Z                         122       90          26         0;44
-          * 1                         49        33          --         0;120
-          * 2                         50        64          0          0;121
-          * 3                         51        35          --         0;122
-          * 4                         52        36          --         0;123
-          * 5                         53        37          --         0;124
-          * 6                         54        94          30         0;125
-          * 7                         55        38          --         0;126
-          * 8                         56        42          --         0;126
-          * 9                         57        40          --         0;127
-          * 0                         48        41          --         0;129
-          * -                         45        95          31         0;130
-          * =                         61        43          ---        0;131
-          * [                         91        123         27         0;26
-          * ]                         93        125         29         0;27
-          *                           92        124         28         0;43
-          * ;                         59        58          --         0;39
-          * '                         39        34          --         0;40
-          * ,                         44        60          --         0;51
-          * .                         46        62          --         0;52
-          * /                         47        63          --         0;53
-          * `                         96        126         --         (0;41)
-          * ENTER (keypad)            13        --          10         (0;166)
-          * / (keypad)                47        47          (0;142)    (0;74)
-          * * (keypad)                42        (0;144)     (0;78)     --
-          * - (keypad)                45        45          (0;149)    (0;164)
-          * + (keypad)                43        43          (0;150)    (0;55)
-          * 5 (keypad)                (0;76)    53          (0;143)    --
-          */
-        public static String setkey(final String code, final String value) {
-            return ESC + "[" + code + ";" + value + "p";
-        }
-    }
-
-    public static void main(final String[] args) throws Exception {
-        // sequence, one can use: ANSI.setkey ("0;59", "\"Hello F1\";13;10").
-        BufferedReader reader =
-            new BufferedReader(new InputStreamReader(System.in));
-        System.out.print(ANSICodes.setkey("97", "97;98;99;13")
-                         + ANSICodes.attrib(ANSICodes.OFF));
-        System.out.flush();
-
-        String line;
-
-        while ((line = reader.readLine()) != null) {
-            System.out.println("GOT: " + line);
-        }
-    }
-
-    private static final boolean ROO_BRIGHT_COLORS = Boolean.getBoolean("roo.bright");
-    private static final boolean SHELL_BRIGHT_COLORS = Boolean.getBoolean("spring.shell.bright");
-    private static final boolean BRIGHT_COLORS = ROO_BRIGHT_COLORS || SHELL_BRIGHT_COLORS;
-
-    public static ANSIBuffer getANSIBuffer() {
-        final char esc = (char) 27;
-        return new ANSIBuffer() {
-            @Override
-            public ANSIBuffer reverse(final String str) {
-                if (OsUtils.isWindows()) {
-                    return super.reverse(str).append(ANSICodes.attrib(esc));
-                }
-                return super.reverse(str);
-            };
-            @Override
-            public ANSIBuffer attrib(final String str, final int code) {
-                if (BRIGHT_COLORS && 30 <= code && code <= 37) {
-                    // This is a color code: add a 'bright' code
-                    return append(esc + "[" + code + ";1m").append(str).append(ANSICodes.attrib(0));
-                }
-                return super.attrib(str, code);
-            }
-        };
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/e8ddd339/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/shell/jline/ANSIHandler.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/shell/jline/ANSIHandler.java b/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/shell/jline/ANSIHandler.java
index c8102ae..ccd9864 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/shell/jline/ANSIHandler.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/shell/jline/ANSIHandler.java
@@ -18,6 +18,8 @@ package com.gemstone.gemfire.management.internal.cli.shell.jline;
 
 import org.springframework.shell.core.JLineLogHandler;
 
+import jline.ANSIBuffer;
+
 /**
  * Overrides jline.History to add History without newline characters.
  * 
@@ -48,8 +50,7 @@ public class ANSIHandler {
     String decoratedInput = input;
     
     if (isAnsiEnabled()) {
-      ANSIBuffer ansiBuffer = ANSIBuffer.getANSIBuffer();
-
+      ANSIBuffer ansiBuffer = JLineLogHandler.getANSIBuffer();
 
       for (ANSIStyle ansiStyle : styles) {
         switch (ansiStyle) {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/e8ddd339/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/shell/jline/CygwinMinttyTerminal.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/shell/jline/CygwinMinttyTerminal.java b/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/shell/jline/CygwinMinttyTerminal.java
index f486774..d84bbe7 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/shell/jline/CygwinMinttyTerminal.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/shell/jline/CygwinMinttyTerminal.java
@@ -39,18 +39,147 @@ public class CygwinMinttyTerminal extends UnixTerminal {
   
   
   String encoding = System.getProperty("input.encoding", "UTF-8");
+  ReplayPrefixOneCharInputStream replayStream = new ReplayPrefixOneCharInputStream(encoding);
   InputStreamReader replayReader;
 
-  public CygwinMinttyTerminal() throws Exception{
+  public CygwinMinttyTerminal() {
+      try {
+          replayReader = new InputStreamReader(replayStream, encoding);
+      } catch (Exception e) {
+          throw new RuntimeException(e);
+      }
   }
 
   @Override
-  public void init() throws Exception{
+  public void initializeTerminal() throws IOException, InterruptedException {
 
   }
 
   @Override
-  public void restore() throws Exception {
-    reset();
+  public void restoreTerminal() throws Exception {
+    resetTerminal();
   }
+
+  @Override
+  public int readVirtualKey(InputStream in) throws IOException {
+    int c = readCharacter(in);
+
+    //if (backspaceDeleteSwitched)
+        if (c == DELETE)
+            c = BACKSPACE;
+        else if (c == BACKSPACE)
+            c = DELETE;
+
+    // in Unix terminals, arrow keys are represented by
+    // a sequence of 3 characters. E.g., the up arrow
+    // key yields 27, 91, 68
+    if (c == ARROW_START && in.available() > 0) {
+        // Escape key is also 27, so we use InputStream.available()
+        // to distinguish those. If 27 represents an arrow, there
+        // should be two more chars immediately available.
+        while (c == ARROW_START) {
+            c = readCharacter(in);
+        }
+        if (c == ARROW_PREFIX || c == O_PREFIX) {
+            c = readCharacter(in);
+            if (c == ARROW_UP) {
+                return CTRL_P;
+            } else if (c == ARROW_DOWN) {
+                return CTRL_N;
+            } else if (c == ARROW_LEFT) {
+                return CTRL_B;
+            } else if (c == ARROW_RIGHT) {
+                return CTRL_F;
+            } else if (c == HOME_CODE) {
+                return CTRL_A;
+            } else if (c == END_CODE) {
+                return CTRL_E;
+            } else if (c == DEL_THIRD) {
+                c = readCharacter(in); // read 4th
+                return DELETE;
+            }
+        } 
+    } 
+    // handle unicode characters, thanks for a patch from amyi@inf.ed.ac.uk
+    if (c > 128) {      
+      // handle unicode characters longer than 2 bytes,
+      // thanks to Marc.Herbert@continuent.com        
+        replayStream.setInput(c, in);
+//      replayReader = new InputStreamReader(replayStream, encoding);
+        c = replayReader.read();
+        
+    }
+    return c;
+  }
+  
+  /**
+   * This is awkward and inefficient, but probably the minimal way to add
+   * UTF-8 support to JLine
+   *
+   * @author <a href="mailto:Marc.Herbert@continuent.com">Marc Herbert</a>
+   */
+  static class ReplayPrefixOneCharInputStream extends InputStream {
+      byte firstByte;
+      int byteLength;
+      InputStream wrappedStream;
+      int byteRead;
+
+      final String encoding;
+      
+      public ReplayPrefixOneCharInputStream(String encoding) {
+          this.encoding = encoding;
+      }
+      
+      public void setInput(int recorded, InputStream wrapped) throws IOException {
+          this.byteRead = 0;
+          this.firstByte = (byte) recorded;
+          this.wrappedStream = wrapped;
+
+          byteLength = 1;
+          if (encoding.equalsIgnoreCase("UTF-8"))
+              setInputUTF8(recorded, wrapped);
+          else if (encoding.equalsIgnoreCase("UTF-16"))
+              byteLength = 2;
+          else if (encoding.equalsIgnoreCase("UTF-32"))
+              byteLength = 4;
+      }
+          
+          
+      public void setInputUTF8(int recorded, InputStream wrapped) throws IOException {
+          // 110yyyyy 10zzzzzz
+          if ((firstByte & (byte) 0xE0) == (byte) 0xC0)
+              this.byteLength = 2;
+          // 1110xxxx 10yyyyyy 10zzzzzz
+          else if ((firstByte & (byte) 0xF0) == (byte) 0xE0)
+              this.byteLength = 3;
+          // 11110www 10xxxxxx 10yyyyyy 10zzzzzz
+          else if ((firstByte & (byte) 0xF8) == (byte) 0xF0)
+              this.byteLength = 4;
+          else
+              throw new IOException("invalid UTF-8 first byte: " + firstByte);
+      }
+
+      public int read() throws IOException {
+          if (available() == 0)
+              return -1;
+
+          byteRead++;
+
+          if (byteRead == 1)
+              return firstByte;
+
+          return wrappedStream.read();
+      }
+
+      /**
+      * InputStreamReader is greedy and will try to read bytes in advance. We
+      * do NOT want this to happen since we use a temporary/"losing bytes"
+      * InputStreamReader above, that's why we hide the real
+      * wrappedStream.available() here.
+      */
+      public int available() {
+          return byteLength - byteRead;
+      }
+  }
+
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/e8ddd339/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/shell/jline/GfshHistory.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/shell/jline/GfshHistory.java b/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/shell/jline/GfshHistory.java
index dc3fbe1..9f18cae 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/shell/jline/GfshHistory.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/shell/jline/GfshHistory.java
@@ -18,10 +18,7 @@ package com.gemstone.gemfire.management.internal.cli.shell.jline;
 
 import com.gemstone.gemfire.management.internal.cli.parser.preprocessor.PreprocessorUtils;
 
-import jline.console.history.MemoryHistory;
-
-import java.io.File;
-import java.io.IOException;
+import jline.History;
 
 /**
  * Overrides jline.History to add History without newline characters.
@@ -29,14 +26,14 @@ import java.io.IOException;
  * @author Abhishek Chaudhari
  * @since 7.0
  */
-public class GfshHistory extends MemoryHistory {
-
+public class GfshHistory extends History {
   // let the history from history file get added initially
   private boolean autoFlush = true;
-
+  
+  @Override
   public void addToHistory(String buffer) {
     if (isAutoFlush()) {
-      super.add(toHistoryLoggable(buffer));
+      super.addToHistory(toHistoryLoggable(buffer));
     }
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/e8ddd339/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/shell/jline/GfshUnsupportedTerminal.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/shell/jline/GfshUnsupportedTerminal.java b/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/shell/jline/GfshUnsupportedTerminal.java
index 3bc839e..59609ba 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/shell/jline/GfshUnsupportedTerminal.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/shell/jline/GfshUnsupportedTerminal.java
@@ -27,7 +27,7 @@ import jline.UnsupportedTerminal;
  */
 public class GfshUnsupportedTerminal extends UnsupportedTerminal {
   @Override
-  public synchronized boolean isAnsiSupported() {
+  public boolean isANSISupported() {
     return false;
   }
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/e8ddd339/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/util/CLIConsoleBufferUtil.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/util/CLIConsoleBufferUtil.java b/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/util/CLIConsoleBufferUtil.java
index 9d1bdbe..70a00a1 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/util/CLIConsoleBufferUtil.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/util/CLIConsoleBufferUtil.java
@@ -16,7 +16,7 @@
  */
 package com.gemstone.gemfire.management.internal.cli.util;
 
-import jline.console.ConsoleReader;
+import jline.ConsoleReader;
 import com.gemstone.gemfire.management.internal.cli.shell.Gfsh;
 
 public class CLIConsoleBufferUtil {
@@ -24,9 +24,9 @@ public class CLIConsoleBufferUtil {
     
     ConsoleReader reader = Gfsh.getConsoleReader();    
     if (reader != null) {
-      int bufferLength = reader.getCursorBuffer().length();
-      if(bufferLength > messege.length()){
-        int appendSpaces = bufferLength - messege.length();
+      StringBuffer buffer = reader.getCursorBuffer().getBuffer();    
+      if(buffer.length() > messege.length()){
+        int appendSpaces = buffer.length() - messege.length();
         for(int i = 0; i < appendSpaces; i++){
           messege = messege + " ";
         }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/e8ddd339/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/PersistentPartitionedRegionTestBase.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/PersistentPartitionedRegionTestBase.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/PersistentPartitionedRegionTestBase.java
index 057be81..6ce1a13 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/PersistentPartitionedRegionTestBase.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/PersistentPartitionedRegionTestBase.java
@@ -172,7 +172,7 @@ public abstract class PersistentPartitionedRegionTestBase extends CacheTestCase
           public void run() {
             Cache cache = getCache();
             Region region = cache.getRegion(regionName);
-
+            
             for(int i =startKey; i < endKey; i++) {
               assertEquals("For key " + i, value, region.get(i));
             }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/e8ddd339/gradle/dependency-versions.properties
----------------------------------------------------------------------
diff --git a/gradle/dependency-versions.properties b/gradle/dependency-versions.properties
index 9c47763..c86d45d 100644
--- a/gradle/dependency-versions.properties
+++ b/gradle/dependency-versions.properties
@@ -33,7 +33,7 @@ javax.servlet-api.version = 3.1.0
 javax.transaction-api.version = 1.2
 jedis.version = 2.7.2
 jetty.version = 9.2.3.v20140905
-jline.version = 2.12
+jline.version = 1.0.S2-B
 jmock.version = 2.8.1
 jna.version = 4.0.0
 json4s.version = 3.2.4
@@ -56,7 +56,7 @@ snappy-java.version = 1.1.1.6
 spring-data-commons.version = 1.9.1.RELEASE
 spring-data-gemfire.version = 1.5.1.RELEASE
 spring-hateos.version = 0.16.0.RELEASE
-spring-shell.version = 1.1.0.RELEASE
+spring-shell.version = 1.0.0.RELEASE
 springframework.version = 3.2.12.RELEASE
 spymemcached.version = 2.9.0
 swagger.version = 1.3.2



[42/50] [abbrv] incubator-geode git commit: GEODE-416: Fix test issue where messages are arriving out of order

Posted by ma...@apache.org.
GEODE-416: Fix test issue where messages are arriving out of order

- Updating the alert level is changed from a pooled message to a serial
  message. This ensures that consecutive alert level changes are
  processed in the correct order.


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

Branch: refs/heads/feature/GEODE-53
Commit: 855246198f26f16d3a115760860f69f2c8674445
Parents: 59ab8cf
Author: Jens Deppe <jd...@pivotal.io>
Authored: Mon Nov 16 13:43:00 2015 -0800
Committer: Jens Deppe <jd...@pivotal.io>
Committed: Fri Nov 20 06:16:20 2015 -0800

----------------------------------------------------------------------
 .../admin/remote/AlertLevelChangeMessage.java   |  5 +-
 .../internal/logging/log4j/AlertAppender.java   | 15 +++++-
 .../management/DistributedSystemDUnitTest.java  | 51 ++++++++++----------
 3 files changed, 40 insertions(+), 31 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/85524619/gemfire-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/AlertLevelChangeMessage.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/AlertLevelChangeMessage.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/AlertLevelChangeMessage.java
index 7e6c0a4..d7b6fc9 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/AlertLevelChangeMessage.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/AlertLevelChangeMessage.java
@@ -20,11 +20,11 @@ import java.io.DataInput;
 import java.io.DataOutput;
 import java.io.IOException;
 
+import com.gemstone.gemfire.distributed.internal.SerialDistributionMessage;
 import org.apache.logging.log4j.Logger;
 
 import com.gemstone.gemfire.admin.AlertLevel;
 import com.gemstone.gemfire.distributed.internal.DistributionManager;
-import com.gemstone.gemfire.distributed.internal.PooledDistributionMessage;
 import com.gemstone.gemfire.internal.admin.Alert;
 import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
 import com.gemstone.gemfire.internal.logging.LogService;
@@ -40,8 +40,7 @@ import com.gemstone.gemfire.internal.logging.log4j.LogMarker;
  * @author David Whitlock
  * @since 3.5
  */
-public final class AlertLevelChangeMessage
-  extends PooledDistributionMessage  {
+public final class AlertLevelChangeMessage extends SerialDistributionMessage {
   
   private static final Logger logger = LogService.getLogger();
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/85524619/gemfire-core/src/main/java/com/gemstone/gemfire/internal/logging/log4j/AlertAppender.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/logging/log4j/AlertAppender.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/logging/log4j/AlertAppender.java
index bd1ad92..e071511 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/logging/log4j/AlertAppender.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/logging/log4j/AlertAppender.java
@@ -199,11 +199,22 @@ public final class AlertAppender extends AbstractAppender implements PropertyCha
     final Level level = LogService.toLevel(alertLevelToLogLevel(alertLevel));
     
     for (Listener listener: this.listeners) {
-      if(listener.getMember().equals(member) && listener.getLevel().equals(level)) {
+      if (listener.getMember().equals(member) && listener.getLevel().equals(level)) {
         return true;
       }
     }
-    
+
+    // Special case for alert level Alert.OFF (NONE_LEVEL), because we can never have an actual listener with
+    // this level (see AlertLevelChangeMessage.process()).
+    if (alertLevel == Alert.OFF) {
+      for (Listener listener: this.listeners) {
+        if (listener.getMember().equals(member)) {
+          return false;
+        }
+      }
+      return true;
+    }
+
     return false;
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/85524619/gemfire-core/src/test/java/com/gemstone/gemfire/management/DistributedSystemDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/management/DistributedSystemDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/management/DistributedSystemDUnitTest.java
index 193dd12..005ed1c 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/management/DistributedSystemDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/management/DistributedSystemDUnitTest.java
@@ -17,7 +17,6 @@
 package com.gemstone.gemfire.management;
 
 import java.util.ArrayList;
-import java.util.Collections;
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
@@ -149,7 +148,6 @@ public class DistributedSystemDUnitTest extends ManagementTestBase {
    * @throws Exception
    */
   public void testAlertManagedNodeFirst() throws Exception {
-    
 
     for (VM vm : getManagedNodeList()) {
       createCache(vm);
@@ -158,39 +156,46 @@ public class DistributedSystemDUnitTest extends ManagementTestBase {
     }
 
     VM managingNode = getManagingNode();
+
     createManagementCache(managingNode);
     startManagingNode(managingNode);
-    
     addAlertListener(managingNode);
-      
     checkAlertCount(managingNode, 0, 0);
-    
+
     final DistributedMember managingMember = getMember(managingNode);
-    
+
+    // Before we start we need to ensure that the initial (implicit) SEVERE alert has propagated everywhere.
     for (VM vm : getManagedNodeList()) {
       ensureLoggerState(vm, managingMember, Alert.SEVERE);
-      warnLevelAlert(vm);
-      severeLevelAlert(vm);
     }
-    checkAlertCount(managingNode, 3, 0);
-    resetAlertCounts(managingNode);
+
     setAlertLevel(managingNode, AlertDetails.getAlertLevelAsString(Alert.WARNING));
- 
+
     for (VM vm : getManagedNodeList()) {
       ensureLoggerState(vm, managingMember, Alert.WARNING);
       warnLevelAlert(vm);
       severeLevelAlert(vm);
     }
-    
+
     checkAlertCount(managingNode, 3, 3);
     resetAlertCounts(managingNode);
+
+    setAlertLevel(managingNode, AlertDetails.getAlertLevelAsString(Alert.SEVERE));
+
+    for (VM vm : getManagedNodeList()) {
+      ensureLoggerState(vm, managingMember, Alert.SEVERE);
+      warnLevelAlert(vm);
+      severeLevelAlert(vm);
+    }
+
+    checkAlertCount(managingNode, 3, 0);
+    resetAlertCounts(managingNode);
     
     for (VM vm : getManagedNodeList()) {
       closeCache(vm);
     }
 
     closeCache(managingNode);
-
   }
   
   @SuppressWarnings("serial")
@@ -223,7 +228,6 @@ public class DistributedSystemDUnitTest extends ManagementTestBase {
     }
   }
   
-  
   /**
    * Tests each and every operations that is defined on the MemberMXBean
    * 
@@ -268,6 +272,7 @@ public class DistributedSystemDUnitTest extends ManagementTestBase {
     class NotificationHubTestListener implements NotificationListener {
       @Override
       public synchronized void handleNotification(Notification notification, Object handback) {
+        logger.info("Notification received {}", notification);
         notifList.add(notification);
       }
     }
@@ -329,7 +334,6 @@ public class DistributedSystemDUnitTest extends ManagementTestBase {
            * added for each member mbean by distributed system mbean One for the
            * added listener in test
            */
-
           assertEquals(2, listener.getNumCounter());
 
           // Raise some notifications
@@ -410,11 +414,9 @@ public class DistributedSystemDUnitTest extends ManagementTestBase {
               .get(memberMBeanName);
 
           /*
-           * Counter of listener should be 2 . One for default Listener which is
-           * added for each member mbean by distributed system mbean One for the
-           * added listener in test
+           * Counter of listener should be 1 for the default Listener which is
+           * added for each member mbean by distributed system mbean.
            */
-
           assertEquals(1, listener.getNumCounter());
 
         }
@@ -484,7 +486,6 @@ public class DistributedSystemDUnitTest extends ManagementTestBase {
         }
       });
     }
-
   }
   
   /**
@@ -539,7 +540,7 @@ public class DistributedSystemDUnitTest extends ManagementTestBase {
     setAlertLevel(managingNode, AlertDetails.getAlertLevelAsString(Alert.OFF));
     
     for (VM vm : getManagedNodeList()) {
-     // ensureLoggerState(vm, managingMember, Alert.OFF);
+      ensureLoggerState(vm, managingMember, Alert.OFF);
       warnLevelAlert(vm);
       severeLevelAlert(vm);
     }
@@ -605,9 +606,6 @@ public class DistributedSystemDUnitTest extends ManagementTestBase {
       });
 
     }
-    // Two Seconds for each member
-    //sleeps to avoid false failures
-    pause(1000 *10);
   }
   
   @SuppressWarnings("serial")
@@ -630,7 +628,7 @@ public class DistributedSystemDUnitTest extends ManagementTestBase {
   @SuppressWarnings("serial")
   public void resetAlertCounts(VM vm1) throws Exception {
     {
-      vm1.invoke(new SerializableCallable("Reset Alert Ccount") {
+      vm1.invoke(new SerializableCallable("Reset Alert Count") {
 
         public Object call() throws Exception {
           AlertNotifListener nt =  AlertNotifListener.getInstance();
@@ -864,8 +862,9 @@ public class DistributedSystemDUnitTest extends ManagementTestBase {
     private int severAlertCount = 0;
 
     @Override
-    public void handleNotification(Notification notification, Object handback) {
+    public synchronized void handleNotification(Notification notification, Object handback) {
       assertNotNull(notification);
+      logger.info("Notification received {}", notification);
       Map<String,String> notifUserData = (Map<String,String>)notification.getUserData();
       if (notifUserData.get(JMXNotificationUserData.ALERT_LEVEL).equalsIgnoreCase("warning")) {
         assertEquals(WARNING_LEVEL_MESSAGE,notification.getMessage());


[16/50] [abbrv] incubator-geode git commit: GEODE-77: faster network-partition detection, bugfixes for auto-reconnect

Posted by ma...@apache.org.
GEODE-77: faster network-partition detection, bugfixes for auto-reconnect

network-partition-detection was taking too long to initiate.  This adds checks for IOExceptions to the Transport class to initiate member checks, shrinking the time to detect partitions.

There were still problems with auto-reconnect not being able to join while the old member ID was still in the view.  It would also sometimes install a view and think it had joined when it had not, causing other members to reject messages from the new "member" and resulting in a hung test.  GMSJoinLeave now rejects view messages that don't contain an appropriate member ID during the join process, and installView is smarter about what views it will accept as well.

The view creator was being stubborn about exiting during shutdown.  I've added additional checks to it so that it won't accidentally create another view when GMSJoinLeave is in the process of stopping.


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

Branch: refs/heads/feature/GEODE-53
Commit: 21274f9c943a7f8cd99833a3b1f7f91ad12cbf48
Parents: 0ee416f
Author: Bruce Schuchardt <bs...@pivotal.io>
Authored: Thu Nov 12 08:52:23 2015 -0800
Committer: Bruce Schuchardt <bs...@pivotal.io>
Committed: Thu Nov 12 08:52:23 2015 -0800

----------------------------------------------------------------------
 .../internal/InternalDistributedSystem.java     |  4 +-
 .../internal/membership/QuorumChecker.java      |  5 ++
 .../membership/gms/fd/GMSHealthMonitor.java     | 14 ++--
 .../membership/gms/membership/GMSJoinLeave.java | 67 ++++++++++++++------
 .../gms/messenger/GMSQuorumChecker.java         |  9 +++
 .../gms/messenger/JGroupsMessenger.java         | 59 ++++++++++++++++-
 .../membership/gms/messenger/Transport.java     | 55 ++++++++++++++--
 .../gemfire/cache30/ReconnectDUnitTest.java     |  4 ++
 .../sanctionedDataSerializables.txt             |  4 +-
 9 files changed, 183 insertions(+), 38 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/21274f9c/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/InternalDistributedSystem.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/InternalDistributedSystem.java b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/InternalDistributedSystem.java
index 287205f..956fe8b 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/InternalDistributedSystem.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/InternalDistributedSystem.java
@@ -2812,9 +2812,7 @@ public final class InternalDistributedSystem
             }
             if (cache.getCachePerfStats().getReliableRegionsMissing() == 0){
               reconnectAttemptCounter = 0;
-              if (isDebugEnabled) {
-                logger.debug("Reconnected properly");
-              }  
+              logger.info("Reconnected properly");
             }
             else {
               // this try failed. The new cache will call reconnect again

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/21274f9c/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/QuorumChecker.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/QuorumChecker.java b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/QuorumChecker.java
index 0cde503..3d8d261 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/QuorumChecker.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/QuorumChecker.java
@@ -48,4 +48,9 @@ public interface QuorumChecker {
    * to the one that is reconnecting.
    */
   public Object getMembershipInfo();
+  
+  /**
+   * Returns the membership view that is being used to establish a quorum
+   */
+  public NetView getView();
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/21274f9c/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/fd/GMSHealthMonitor.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/fd/GMSHealthMonitor.java b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/fd/GMSHealthMonitor.java
index 9e410e2..b9ec83a 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/fd/GMSHealthMonitor.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/fd/GMSHealthMonitor.java
@@ -478,10 +478,6 @@ public class GMSHealthMonitor implements HealthMonitor, MessageHandler {
       return true;
     }
     try {
-      // establish TCP connection
-//      for (Map.Entry<InternalDistributedMember, InetSocketAddress> entry : socketInfo.entrySet()) {
-//        logger.info("socketInfo member:" + entry.getKey() + " port:" + entry.getValue().getPort());
-//      }
       logger.debug("Checking member {} with TCP socket connection {}:{}.", suspectMember, suspectMember.getInetAddress(), port);
       clientSocket = SocketCreator.getDefaultInstance().connect(suspectMember.getInetAddress(), port,
           (int)memberTimeout, new ConnectTimeoutTask(services.getTimer(), memberTimeout), false, -1, false);
@@ -626,7 +622,7 @@ public class GMSHealthMonitor implements HealthMonitor, MessageHandler {
       serverSocket = new ServerSocket();
       serverSocket.bind(new InetSocketAddress(socketAddress, socketPort));
     } catch (IOException e) {
-      throw new GemFireConfigException("Unable to allocate a failure detection port in the membership-port range");
+      throw new GemFireConfigException("Unable to allocate a failure detection port in the membership-port range", e);
     }
 
     serverSocketExecutor.execute(new Runnable() {
@@ -712,6 +708,9 @@ public class GMSHealthMonitor implements HealthMonitor, MessageHandler {
           HeartbeatMessage message = new HeartbeatMessage(-1);
           message.setRecipient(coordinator);
           try {
+            if (isStopping) {
+              return;
+            }
             services.getMessenger().sendUnreliably(message);
           } catch (CancelException e) {
             return;
@@ -732,6 +731,9 @@ public class GMSHealthMonitor implements HealthMonitor, MessageHandler {
           if (mbr.equals(coordinator)) {
             continue;
           }
+          if (isStopping) {
+            return;
+          }
           HeartbeatMessage message = new HeartbeatMessage(-1);
           message.setRecipient(mbr);
           try {
@@ -921,13 +923,11 @@ public class GMSHealthMonitor implements HealthMonitor, MessageHandler {
   @Override
   public void beSick() {
     this.beingSick = true;
-    initiateSuspicion(localAddress, "beSick invoked on GMSHealthMonitor");
   }
 
   @Override
   public void playDead() {
     this.playingDead = true;
-    initiateSuspicion(localAddress, "playDead invoked on GMSHealthMonitor");
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/21274f9c/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeave.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeave.java b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeave.java
index a6121dd..500131b 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeave.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeave.java
@@ -13,7 +13,6 @@ import static com.gemstone.gemfire.internal.DataSerializableFixedID.VIEW_ACK_MES
 import java.io.IOException;
 import java.net.InetSocketAddress;
 import java.util.ArrayList;
-import java.util.Arrays;
 import java.util.Collection;
 import java.util.Collections;
 import java.util.HashMap;
@@ -676,6 +675,9 @@ public class GMSJoinLeave implements JoinLeave, MessageHandler {
   }
 
   boolean sendView(NetView view, List<InternalDistributedMember> newMembers, boolean preparing, ViewReplyProcessor rp) {
+
+    boolean isNetworkPartition = isNetworkPartition(view, false);
+    
     int id = view.getViewId();
     InstallViewMessage msg = new InstallViewMessage(view, services.getAuthenticator().getCredentials(this.localAddress), preparing);
     Set<InternalDistributedMember> recips = new HashSet<>(view.getMembers());
@@ -726,8 +728,7 @@ public class GMSJoinLeave implements JoinLeave, MessageHandler {
     if (preparing) {
       // send join responses after other members at least have
       // a prepared view announcing the new member
-      if (!(isNetworkPartition(view) && quorumRequired)) {
-        List<Integer> newPorts = new ArrayList<Integer>(view.size());
+      if (!(isNetworkPartition && quorumRequired)) {
         sendJoinResponses(newMembers, view);
       }
 
@@ -764,21 +765,26 @@ public class GMSJoinLeave implements JoinLeave, MessageHandler {
       return;
     }
 
+    boolean viewContainsMyUnjoinedAddress = false;
+    if (!this.isJoined) {
+      // if we're still waiting for a join response and we're in this view we
+      // should install the view so join() can finish its work
+      for (InternalDistributedMember mbr: view.getMembers()) {
+        if (localAddress.compareTo(mbr) == 0) {
+          viewContainsMyUnjoinedAddress = true;
+          break;
+        }
+      }
+    }
+
     if (m.isPreparing()) {
       if (this.preparedView != null && this.preparedView.getViewId() >= view.getViewId()) {
         services.getMessenger().send(new ViewAckMessage(m.getSender(), this.preparedView));
       } else {
         this.preparedView = view;
         ackView(m);
-        if (!this.isJoined) {
-          // if we're still waiting for a join response and we're in this view we
-          // should install the view so join() can finish its work
-          for (InternalDistributedMember mbr: view.getMembers()) {
-            if (localAddress.compareTo(mbr) == 0) {
-              installView(view);
-              break;
-            }
-          }
+        if (viewContainsMyUnjoinedAddress) {
+          installView(view);
         }
       }
     } else { // !preparing
@@ -788,7 +794,9 @@ public class GMSJoinLeave implements JoinLeave, MessageHandler {
         if (!m.isRebroadcast()) { // no need to ack a rebroadcast view
           ackView(m);
         }
-        installView(view);
+        if (isJoined || viewContainsMyUnjoinedAddress) {
+          installView(view);
+        }
       }
     }
   }
@@ -1078,8 +1086,10 @@ public class GMSJoinLeave implements JoinLeave, MessageHandler {
       logger.info("received new view: {}\nold view is: {}", newView, currentView);
 
       if (currentView == null && !this.isJoined) {
+        boolean found = false;
         for (InternalDistributedMember mbr : newView.getMembers()) {
           if (this.localAddress.equals(mbr)) {
+            found = true;
             this.birthViewId = mbr.getVmViewId();
             this.localAddress.setVmViewId(this.birthViewId);
             GMSMember me = (GMSMember) this.localAddress.getNetMember();
@@ -1088,15 +1098,20 @@ public class GMSJoinLeave implements JoinLeave, MessageHandler {
             break;
           }
         }
+        if (!found) {
+          logger.info("rejecting view (not yet joined)");
+          return;
+        }
       }
 
-      if (isJoined && isNetworkPartition(newView)) {
+      if (isJoined && isNetworkPartition(newView, true)) {
         if (quorumRequired) {
           Set<InternalDistributedMember> crashes = newView.getActualCrashedMembers(currentView);
           forceDisconnect(LocalizedStrings.Network_partition_detected.toLocalizedString(crashes.size(), crashes));
           return;
         }
       }
+      
       previousView = currentView;
       currentView = newView;
       preparedView = null;
@@ -1198,13 +1213,13 @@ public class GMSJoinLeave implements JoinLeave, MessageHandler {
   /**
    * check to see if the new view shows a drop of 51% or more
    */
-  private boolean isNetworkPartition(NetView newView) {
+  private boolean isNetworkPartition(NetView newView, boolean logWeights) {
     if (currentView == null) {
       return false;
     }
     int oldWeight = currentView.memberWeight();
     int failedWeight = newView.getCrashedMemberWeight(currentView);
-    if (failedWeight > 0) {
+    if (failedWeight > 0 && logWeights) {
       if (logger.isInfoEnabled()
           && newView.getCreator().equals(localAddress)) { // view-creator logs this
         newView.logCrashedMemberWeights(currentView, logger);
@@ -1693,6 +1708,9 @@ public class GMSJoinLeave implements JoinLeave, MessageHandler {
               } finally {
                 waiting = false;
               }
+              if (shutdown || Thread.currentThread().isInterrupted()) {
+                return;
+              }
               if (viewRequests.size() == 1) {
                 // start the timer when we have only one request because
                 // concurrent startup / shutdown of multiple members is
@@ -1725,6 +1743,9 @@ public class GMSJoinLeave implements JoinLeave, MessageHandler {
             logger.info("View Creator is processing {} requests for the next membership view", requests.size());
             try {
               createAndSendView(requests);
+              if (shutdown) {
+                return;
+              }
             } catch (DistributedSystemDisconnectedException e) {
               shutdown = true;
             }
@@ -1876,10 +1897,14 @@ public class GMSJoinLeave implements JoinLeave, MessageHandler {
         mbr.setVmViewId(newView.getViewId());
         mbr.getNetMember().setSplitBrainEnabled(services.getConfig().isNetworkPartitionDetectionEnabled());
       }
+      
+      if (isShutdown()) {
+        return;
+      }
       // send removal messages before installing the view so we stop
       // getting messages from members that have been kicked out
       sendRemoveMessages(removalReqs, removalReasons, newView);
-
+      
       prepareAndSendView(newView, joinReqs, leaveReqs, newView.getCrashedMembers());
 
       return;
@@ -1896,7 +1921,7 @@ public class GMSJoinLeave implements JoinLeave, MessageHandler {
           return;
         }
 
-        if (quorumRequired && isNetworkPartition(newView)) {
+        if (quorumRequired && isNetworkPartition(newView, true)) {
           sendNetworkPartitionMessage(newView);
           try {
             Thread.sleep(LEAVE_MESSAGE_SLEEP_TIME);
@@ -1995,6 +2020,12 @@ public class GMSJoinLeave implements JoinLeave, MessageHandler {
       lastConflictingView = null;
 
       sendView(newView, joinReqs);
+      
+      // after sending a final view we need to stop this thread if
+      // the GMS is shutting down
+      if (isStopping()) {
+        shutdown = true;
+      }
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/21274f9c/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/GMSQuorumChecker.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/GMSQuorumChecker.java b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/GMSQuorumChecker.java
index 13153a4..cf3fc6b 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/GMSQuorumChecker.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/GMSQuorumChecker.java
@@ -100,6 +100,11 @@ public class GMSQuorumChecker implements QuorumChecker {
     channel.setReceiver(null);
     channel.setReceiver(new QuorumCheckerReceiver());
   }
+  
+  @Override
+  public NetView getView() {
+    return this.lastView;
+  }
 
   @Override
   public Object getMembershipInfo() {
@@ -239,5 +244,9 @@ public class GMSQuorumChecker implements QuorumChecker {
       }
     }
   }
+  
+  public String toString() {
+    return getClass().getSimpleName() + " on view " + this.lastView;
+  }
 
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/21274f9c/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/JGroupsMessenger.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/JGroupsMessenger.java b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/JGroupsMessenger.java
index 65d6f05..8ac8f77 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/JGroupsMessenger.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/JGroupsMessenger.java
@@ -1,6 +1,7 @@
 package com.gemstone.gemfire.distributed.internal.membership.gms.messenger;
 
 import static com.gemstone.gemfire.distributed.internal.membership.gms.GMSUtil.replaceStrings;
+import static com.gemstone.gemfire.internal.DataSerializableFixedID.JOIN_REQUEST;
 import static com.gemstone.gemfire.internal.DataSerializableFixedID.JOIN_RESPONSE;
 import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap;
 
@@ -63,6 +64,7 @@ import com.gemstone.gemfire.distributed.internal.membership.gms.GMSMember;
 import com.gemstone.gemfire.distributed.internal.membership.gms.Services;
 import com.gemstone.gemfire.distributed.internal.membership.gms.interfaces.MessageHandler;
 import com.gemstone.gemfire.distributed.internal.membership.gms.interfaces.Messenger;
+import com.gemstone.gemfire.distributed.internal.membership.gms.messages.JoinRequestMessage;
 import com.gemstone.gemfire.distributed.internal.membership.gms.messages.JoinResponseMessage;
 import com.gemstone.gemfire.internal.ClassPathLoader;
 import com.gemstone.gemfire.internal.HeapDataOutputStream;
@@ -122,8 +124,13 @@ public class JGroupsMessenger implements Messenger {
   
   private volatile long pongsReceived;
   
-  private byte[] serializedNetMember;
-  
+  /**
+   * A set that contains addresses that we have logged JGroups IOExceptions for in the
+   * current membership view and possibly initiated suspect processing.  This
+   * reduces the amount of suspect processing initiated by IOExceptions and the
+   * amount of exceptions logged
+   */
+  private Set<Address> addressesWithioExceptionsProcessed = Collections.synchronizedSet(new HashSet<Address>());
   
   static {
     // register classes that we've added to jgroups that are put on the wire
@@ -282,6 +289,9 @@ public class JGroupsMessenger implements Messenger {
     if (sr != null) {
       sr.setDMStats(services.getStatistics());
     }
+    
+    Transport transport = (Transport)myChannel.getProtocolStack().getTransport();
+    transport.setMessenger(this);
 
     try {
       myChannel.setReceiver(null);
@@ -360,9 +370,43 @@ public class JGroupsMessenger implements Messenger {
     View jgv = new View(vid, new ArrayList<Address>(mbrs));
     logger.trace("installing JGroups view: {}", jgv);
     this.myChannel.down(new Event(Event.VIEW_CHANGE, jgv));
+
+    addressesWithioExceptionsProcessed.clear();
   }
   
 
+  /**
+   * If JGroups is unable to send a message it may mean that the network
+   * is down.  If so we need to initiate suspect processing on the
+   * recipient.<p>
+   * see Transport._send()
+   */
+  public void handleJGroupsIOException(IOException e, Message msg, Address dest) {
+    if (addressesWithioExceptionsProcessed.contains(dest)) {
+      return;
+    }
+    addressesWithioExceptionsProcessed.add(dest);
+    logger.info("processing JGroups IOException: " + e.getMessage());
+    NetView v = this.view;
+    JGAddress jgMbr = (JGAddress)dest;
+    if (v != null) {
+      List<InternalDistributedMember> members = v.getMembers();
+      InternalDistributedMember recipient = null;
+      for (InternalDistributedMember mbr: members) {
+        GMSMember gmsMbr = ((GMSMember)mbr.getNetMember());
+        if (jgMbr.getUUIDLsbs() == gmsMbr.getUuidLSBs()
+            && jgMbr.getUUIDMsbs() == gmsMbr.getUuidMSBs()
+            && jgMbr.getVmViewId() == gmsMbr.getVmViewId()) {
+          recipient = mbr;
+          break;
+        }
+      }
+      if (recipient != null) {
+        services.getHealthMonitor().checkIfAvailable(recipient,
+            "Unable to send messages to this member via JGroups", true);
+      }
+    }
+  }
   
   private void establishLocalAddress() {
     UUID logicalAddress = (UUID)myChannel.getAddress();
@@ -753,10 +797,19 @@ public class JGroupsMessenger implements Messenger {
       }
       
       GMSMember m = DataSerializer.readObject(dis);
-      sender = getMemberFromView(m, ordinal);
 
       result = DataSerializer.readObject(dis);
       if (result instanceof DistributionMessage) {
+        DistributionMessage dm = (DistributionMessage)result;
+        // JoinRequestMessages are sent with an ID that may have been
+        // reused from a previous life by way of auto-reconnect,
+        // so we don't want to find a canonical reference for the
+        // request's sender ID
+        if (dm.getDSFID() == JOIN_REQUEST) {
+          sender = ((JoinRequestMessage)dm).getMemberID();
+        } else {
+          sender = getMemberFromView(m, ordinal);
+        }
         ((DistributionMessage)result).setSender(sender);
       }
       

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/21274f9c/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/Transport.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/Transport.java b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/Transport.java
index 9f91a74..8fcac7d 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/Transport.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/Transport.java
@@ -1,17 +1,29 @@
 package com.gemstone.gemfire.distributed.internal.membership.gms.messenger;
 
+import java.io.IOException;
+import java.io.InterruptedIOException;
 import java.lang.reflect.InvocationTargetException;
+import java.net.SocketException;
 
+import org.jgroups.Address;
+import org.jgroups.Message;
 import org.jgroups.protocols.UDP;
 import org.jgroups.util.DefaultThreadFactory;
 import org.jgroups.util.LazyThreadFactory;
+import org.jgroups.util.Util;
 
 public class Transport extends UDP {
 
   /**
    * This is the initial part of the name of all JGroups threads that deliver messages
    */
-  public static final String PRECIOUS_THREAD_NAME_PREFIX = "Geode UDP";
+  public static final String THREAD_POOL_NAME_PREFIX = "Geode UDP";
+  
+  private JGroupsMessenger messenger;
+  
+  public void setMessenger(JGroupsMessenger m) {
+    messenger = m;
+  }
   
   /*
    * (non-Javadoc)
@@ -43,6 +55,39 @@ public class Transport extends UDP {
     }
   }
 
+  /*
+   * (non-Javadoc)
+   * copied from JGroups to perform Geode-specific error handling when there
+   * is a network partition
+   * @see org.jgroups.protocols.TP#_send(org.jgroups.Message, org.jgroups.Address)
+   */
+  @Override
+  protected void _send(Message msg, Address dest) {
+    try {
+        send(msg, dest);
+    }
+    catch(InterruptedIOException iex) {
+    }
+    catch(InterruptedException interruptedEx) {
+        Thread.currentThread().interrupt(); // let someone else handle the interrupt
+    }
+    catch(SocketException e) {
+      log.error("Exception caught while sending message", e);
+//        log.trace(Util.getMessage("SendFailure"),
+//                  local_addr, (dest == null? "cluster" : dest), msg.size(), e.toString(), msg.printHeaders());
+    }
+    catch (IOException e) {
+      if (messenger != null
+          /*&& e.getMessage().contains("Operation not permitted")*/) { // this is the english Oracle JDK exception condition we really want to catch
+        messenger.handleJGroupsIOException(e, msg, dest);
+      }
+    }
+    catch(Throwable e) {
+        log.error("Exception caught while sending message", e);
+//        Util.getMessage("SendFailure"),
+//                  local_addr, (dest == null? "cluster" : dest), msg.size(), e.toString(), msg.printHeaders());
+    }
+}
     
   /*
    * (non-Javadoc)
@@ -54,10 +99,10 @@ public class Transport extends UDP {
   @Override
   public void init() throws Exception {
     global_thread_factory=new DefaultThreadFactory("Geode ", true);
-    timer_thread_factory=new LazyThreadFactory(PRECIOUS_THREAD_NAME_PREFIX + " Timer", true, true);
-    default_thread_factory=new DefaultThreadFactory(PRECIOUS_THREAD_NAME_PREFIX + " Incoming", true, true);
-    oob_thread_factory=new DefaultThreadFactory(PRECIOUS_THREAD_NAME_PREFIX + " OOB", true, true);
-    internal_thread_factory=new DefaultThreadFactory(PRECIOUS_THREAD_NAME_PREFIX + " INT", true, true);
+    timer_thread_factory=new LazyThreadFactory(THREAD_POOL_NAME_PREFIX + " Timer", true, true);
+    default_thread_factory=new DefaultThreadFactory(THREAD_POOL_NAME_PREFIX + " Incoming", true, true);
+    oob_thread_factory=new DefaultThreadFactory(THREAD_POOL_NAME_PREFIX + " OOB", true, true);
+    internal_thread_factory=new DefaultThreadFactory(THREAD_POOL_NAME_PREFIX + " INT", true, true);
     super.init();
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/21274f9c/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/ReconnectDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/ReconnectDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/ReconnectDUnitTest.java
index 46cbbc3..5b53159 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/ReconnectDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/ReconnectDUnitTest.java
@@ -48,6 +48,7 @@ import com.gemstone.gemfire.distributed.internal.DistributionConfig;
 import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
 import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem.ReconnectListener;
 import com.gemstone.gemfire.distributed.internal.InternalLocator;
+import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
 import com.gemstone.gemfire.distributed.internal.membership.gms.MembershipManagerHelper;
 import com.gemstone.gemfire.distributed.internal.membership.gms.mgr.GMSMembershipManager;
 import com.gemstone.gemfire.internal.AvailablePort;
@@ -432,6 +433,9 @@ public class ReconnectDUnitTest extends CacheTestCase
           fail("interrupted while waiting for reconnect");
         }
         assertTrue("expected system to be reconnected", ds.getReconnectedSystem() != null);
+        int viewId = MembershipManagerHelper.getMembershipManager(ds.getReconnectedSystem()).getView().getViewId();
+        int memberViewId = ((InternalDistributedMember)ds.getReconnectedSystem().getDistributedMember()).getVmViewId();
+        assertEquals("expected a new ID to be assigned", viewId, memberViewId);
         return ds.getReconnectedSystem().getDistributedMember();
       }
     });

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/21274f9c/gemfire-core/src/test/resources/com/gemstone/gemfire/codeAnalysis/sanctionedDataSerializables.txt
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/resources/com/gemstone/gemfire/codeAnalysis/sanctionedDataSerializables.txt b/gemfire-core/src/test/resources/com/gemstone/gemfire/codeAnalysis/sanctionedDataSerializables.txt
index eb798d8..137850f 100644
--- a/gemfire-core/src/test/resources/com/gemstone/gemfire/codeAnalysis/sanctionedDataSerializables.txt
+++ b/gemfire-core/src/test/resources/com/gemstone/gemfire/codeAnalysis/sanctionedDataSerializables.txt
@@ -1966,8 +1966,8 @@ fromData,1,b1
 toData,1,b1
 
 com/gemstone/gemfire/internal/cache/tier/sockets/ClientProxyMembershipID,2
-fromData,49,2a2bb80054b500502ab40050b2004eb6004f9b000c2a2b03b80055b500502a2bb80056b500082a2bb900570100b5000ab1
-toData,57,2bb8004d4d2cb2004eb6004f9b001a2ab40050c7000a2ab20018b500502ab400502b04b600512ab400082bb800522b2ab4000ab900530200b1
+fromData,19,2a2bb8004fb500082a2bb900500100b5000ab1
+toData,19,2ab400082bb8004d2b2ab4000ab9004e0200b1
 
 com/gemstone/gemfire/internal/cache/tier/sockets/ClientTombstoneMessage,2
 fromData,63,2ab800222bb90023010032b500072a2bb900230100b80024b5001c2a2bb80025b6000a2a2bb80026b500082a2bb80027b500202a2bb80026c00028b50021b1


[36/50] [abbrv] incubator-geode git commit: merge of develop to feature/GEODE-77

Posted by ma...@apache.org.
merge of develop to feature/GEODE-77

Merge remote-tracking branch 'origin/develop' into feature/GEODE-77

Conflicts:
	gemfire-core/build.gradle
	gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/LocalRegion.java
	gemfire-jgroups/build.gradle


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

Branch: refs/heads/feature/GEODE-53
Commit: 766dfd05b378abc981b83a5372551c6df01bcda4
Parents: fd98f62 3fc2992
Author: Bruce Schuchardt <bs...@pivotal.io>
Authored: Tue Nov 17 12:44:50 2015 -0800
Committer: Bruce Schuchardt <bs...@pivotal.io>
Committed: Tue Nov 17 12:44:50 2015 -0800

----------------------------------------------------------------------
 build.gradle                                    |  63 +-
 gemfire-assembly/build.gradle                   |   2 +-
 gemfire-core/build.gradle                       | 186 ++---
 .../gemstone/gemfire/cache/GemFireCache.java    |   7 -
 .../internal/AsyncEventQueueFactoryImpl.java    |   9 +-
 .../internal/AsyncEventQueueImpl.java           |   3 +
 .../client/internal/EndpointManagerImpl.java    |   2 -
 .../internal/pooling/ConnectionManagerImpl.java |   5 +
 .../gemfire/cache/lucene/LuceneIndex.java       |  59 --
 .../gemfire/cache/lucene/LuceneQuery.java       |  53 --
 .../cache/lucene/LuceneQueryFactory.java        | 137 ----
 .../cache/lucene/LuceneQueryResults.java        |  45 --
 .../cache/lucene/LuceneResultStruct.java        |  75 --
 .../gemfire/cache/lucene/LuceneService.java     | 119 ---
 .../cache/lucene/LuceneServiceFactory.java      |  30 -
 .../cache/lucene/LuceneServiceProvider.java     |  52 --
 .../cache/lucene/internal/LuceneIndexImpl.java  |  70 --
 .../lucene/internal/LuceneQueryFactoryImpl.java | 104 ---
 .../cache/lucene/internal/LuceneQueryImpl.java  |  78 --
 .../lucene/internal/LuceneQueryResultsImpl.java |  82 --
 .../lucene/internal/LuceneResultStructImpl.java |  61 --
 .../internal/LuceneServiceFactoryImpl.java      |  32 -
 .../lucene/internal/LuceneServiceImpl.java      | 106 ---
 .../cache/partition/PartitionManager.java       |   2 +-
 .../internal/DistributionManager.java           | 322 ++------
 .../internal/DataSerializableFixedID.java       |   9 +
 .../com/gemstone/gemfire/internal/Version.java  |   5 +
 .../gemfire/internal/cache/BucketRegion.java    |   2 +-
 .../gemfire/internal/cache/CacheService.java    |  26 +
 .../gemfire/internal/cache/EntryEventImpl.java  |   1 -
 .../internal/cache/GemFireCacheImpl.java        |  79 +-
 .../gemfire/internal/cache/InternalCache.java   |   5 +-
 .../gemfire/internal/cache/LocalRegion.java     |   8 +-
 .../cache/MemberFunctionStreamingMessage.java   |   9 +-
 .../gemstone/gemfire/internal/cache/Oplog.java  |   1 -
 .../cache/PartitionedRegionDataStore.java       |   2 +-
 .../gemfire/internal/cache/RegionListener.java  |  30 +
 .../cache/control/OffHeapMemoryMonitor.java     |  34 +-
 .../cache/execute/ServerFunctionExecutor.java   |  18 -
 .../execute/TransactionFunctionService.java     | 193 -----
 .../cache/execute/util/CommitFunction.java      |   1 -
 .../cache/execute/util/RollbackFunction.java    |   1 -
 .../cache/extension/SimpleExtensionPoint.java   |   2 +-
 .../persistence/soplog/AbstractCompactor.java   | 533 -------------
 .../soplog/AbstractKeyValueIterator.java        |  76 --
 .../soplog/AbstractSortedReader.java            | 135 ----
 .../soplog/ArraySerializedComparator.java       | 144 ----
 .../cache/persistence/soplog/Compactor.java     | 174 -----
 .../soplog/CompositeSerializedComparator.java   |  57 --
 .../soplog/IndexSerializedComparator.java       | 127 ---
 .../cache/persistence/soplog/LevelTracker.java  | 120 ---
 .../soplog/LexicographicalComparator.java       | 460 -----------
 .../cache/persistence/soplog/NonCompactor.java  | 110 ---
 .../soplog/ReversingSerializedComparator.java   |  67 --
 .../persistence/soplog/SizeTieredCompactor.java | 198 -----
 .../cache/persistence/soplog/SoplogToken.java   | 116 ---
 .../cache/persistence/soplog/SortedBuffer.java  | 367 ---------
 .../cache/persistence/soplog/SortedOplog.java   | 158 ----
 .../persistence/soplog/SortedOplogFactory.java  | 278 -------
 .../persistence/soplog/SortedOplogSet.java      | 118 ---
 .../persistence/soplog/SortedOplogSetImpl.java  | 780 -------------------
 .../soplog/hfile/BlockCacheHolder.java          |  39 -
 .../soplog/hfile/HFileSortedOplog.java          | 694 -----------------
 .../soplog/hfile/HFileSortedOplogFactory.java   |  80 --
 .../soplog/nofile/NoFileSortedOplog.java        | 244 ------
 .../soplog/nofile/NoFileSortedOplogFactory.java |  41 -
 .../cache/tier/sockets/CommandInitializer.java  |   4 +
 .../tier/sockets/command/CommitCommand.java     |   4 +-
 .../tier/sockets/command/ExecuteFunction66.java |   2 +-
 .../command/ExecuteRegionFunction66.java        |   2 +-
 .../command/ExecuteRegionFunctionSingleHop.java |   2 +-
 .../cache/wan/AbstractGatewaySender.java        |  10 +
 .../cache/wan/GatewaySenderAttributes.java      |   5 +
 .../internal/cache/xmlcache/CacheCreation.java  |  14 +-
 .../cache/xmlcache/DefaultEntityResolver2.java  |   2 +-
 .../cache/xmlcache/GeodeEntityResolver.java     |  49 ++
 .../cache/xmlcache/PivotalEntityResolver.java   |   2 +-
 .../gemfire/internal/offheap/OffHeapHelper.java |   4 +-
 .../internal/offheap/OffHeapReference.java      |  72 --
 .../offheap/SimpleMemoryAllocatorImpl.java      |  28 +-
 .../gemfire/internal/offheap/StoredObject.java  |  42 +-
 .../util/concurrent/CopyOnWriteHashMap.java     |  46 +-
 .../util/concurrent/CopyOnWriteWeakHashMap.java |  12 +
 .../services/org.xml.sax.ext.EntityResolver2    |   1 +
 .../SerialAsyncEventQueueImplJUnitTest.java     |  46 ++
 .../management/MemoryThresholdsDUnitTest.java   |  46 +-
 .../partition/PartitionManagerDUnitTest.java    |  75 --
 .../gemfire/cache30/RegionTestCase.java         |  54 +-
 .../internal/ProductUseLogDUnitTest.java        |   3 +-
 .../GemFireDeadlockDetectorDUnitTest.java       |   2 +-
 .../gemfire/internal/JSSESocketJUnitTest.java   |   2 +-
 .../internal/cache/CacheServiceJUnitTest.java   |  43 +
 .../cache/ClientServerTransactionDUnitTest.java |  31 +-
 .../internal/cache/MockCacheService.java        |   8 +
 .../internal/cache/MockCacheServiceImpl.java    |  23 +
 .../gemfire/internal/cache/OplogJUnitTest.java  |  46 +-
 .../internal/cache/RegionListenerJUnitTest.java |  47 ++
 .../control/TestMemoryThresholdListener.java    |  13 +
 .../MemberFunctionExecutionDUnitTest.java       |  49 ++
 .../mock/DestroyMockCacheExtensionFunction.java |   2 +-
 .../cache/persistence/soplog/AppendLog.java     |  65 --
 .../ArraySerializedComparatorJUnitTest.java     |  95 ---
 .../CompactionSortedOplogSetTestCase.java       | 134 ----
 .../persistence/soplog/CompactionTestCase.java  | 206 -----
 .../persistence/soplog/ComparisonTestCase.java  |  77 --
 .../soplog/IndexComparatorJUnitTest.java        |  79 --
 .../LexicographicalComparatorJUnitTest.java     | 204 -----
 .../soplog/RecoverableSortedOplogSet.java       | 221 ------
 .../soplog/SizeTieredCompactorJUnitTest.java    | 110 ---
 .../SizeTieredSortedOplogSetJUnitTest.java      |  43 -
 .../soplog/SortedBufferJUnitTest.java           |  39 -
 .../soplog/SortedOplogSetJUnitTest.java         | 273 -------
 .../soplog/SortedReaderTestCase.java            | 295 -------
 .../nofile/NoFileSortedOplogJUnitTest.java      |  48 --
 .../tier/sockets/command/CommitCommandTest.java |  39 +
 .../internal/i18n/BasicI18nJUnitTest.java       |  12 -
 .../concurrent/CopyOnWriteHashMapJUnitTest.java | 496 ++++++++++++
 .../management/DistributedSystemDUnitTest.java  |  12 +-
 ...gemstone.gemfire.internal.cache.CacheService |   1 +
 .../codeAnalysis/sanctionedSerializables.txt    |   2 +-
 .../src/main/java/org/json/JSONObject.java      |   2 +
 gemfire-lucene/build.gradle                     |  29 +
 .../gemfire/cache/lucene/LuceneIndex.java       |  60 ++
 .../gemfire/cache/lucene/LuceneQuery.java       |  48 ++
 .../cache/lucene/LuceneQueryFactory.java        | 101 +++
 .../cache/lucene/LuceneQueryProvider.java       |  45 ++
 .../cache/lucene/LuceneQueryResults.java        |  58 ++
 .../cache/lucene/LuceneResultStruct.java        |  62 ++
 .../gemfire/cache/lucene/LuceneService.java     | 125 +++
 .../cache/lucene/LuceneServiceProvider.java     |  46 ++
 .../lucene/internal/InternalLuceneIndex.java    |  29 +
 .../lucene/internal/InternalLuceneService.java  |  29 +
 .../lucene/internal/LuceneEventListener.java    |  99 +++
 .../LuceneIndexForPartitionedRegion.java        | 136 ++++
 .../LuceneIndexForReplicatedRegion.java         |  48 ++
 .../cache/lucene/internal/LuceneIndexImpl.java  | 107 +++
 .../lucene/internal/LuceneQueryFactoryImpl.java |  67 ++
 .../cache/lucene/internal/LuceneQueryImpl.java  |  87 +++
 .../lucene/internal/LuceneQueryResultsImpl.java | 120 +++
 .../lucene/internal/LuceneResultStructImpl.java |  94 +++
 .../lucene/internal/LuceneServiceImpl.java      | 273 +++++++
 .../internal/PartitionedRepositoryManager.java  | 163 ++++
 .../lucene/internal/StringQueryProvider.java    | 106 +++
 .../internal/directory/FileIndexInput.java      | 131 ++++
 .../internal/directory/RegionDirectory.java     | 119 +++
 .../internal/distributed/CollectorManager.java  |  55 ++
 .../lucene/internal/distributed/EntryScore.java |  82 ++
 .../internal/distributed/LuceneFunction.java    | 137 ++++
 .../distributed/LuceneFunctionContext.java      | 115 +++
 .../lucene/internal/distributed/TopEntries.java | 133 ++++
 .../distributed/TopEntriesCollector.java        | 102 +++
 .../distributed/TopEntriesCollectorManager.java | 178 +++++
 .../TopEntriesFunctionCollector.java            | 163 ++++
 .../lucene/internal/filesystem/ChunkKey.java    | 123 +++
 .../cache/lucene/internal/filesystem/File.java  | 155 ++++
 .../internal/filesystem/FileInputStream.java    | 166 ++++
 .../internal/filesystem/FileOutputStream.java   | 103 +++
 .../lucene/internal/filesystem/FileSystem.java  | 156 ++++
 .../filesystem/SeekableInputStream.java         |  43 +
 .../internal/repository/IndexRepository.java    |  74 ++
 .../repository/IndexRepositoryImpl.java         | 113 +++
 .../repository/IndexResultCollector.java        |  47 ++
 .../internal/repository/RepositoryManager.java  |  45 ++
 .../HeterogenousLuceneSerializer.java           |  83 ++
 .../repository/serializer/LuceneSerializer.java |  35 +
 .../serializer/PdxLuceneSerializer.java         |  47 ++
 .../serializer/ReflectionLuceneSerializer.java  |  74 ++
 .../repository/serializer/SerializerUtil.java   | 168 ++++
 .../internal/xml/LuceneIndexCreation.java       | 111 +++
 .../internal/xml/LuceneIndexXmlGenerator.java   |  65 ++
 .../internal/xml/LuceneServiceXmlGenerator.java |  39 +
 .../lucene/internal/xml/LuceneXmlConstants.java |  31 +
 .../lucene/internal/xml/LuceneXmlParser.java    |  97 +++
 .../lucene/lucene-1.0.xsd                       |  42 +
 ...gemstone.gemfire.internal.cache.CacheService |   1 +
 ...ne.gemfire.internal.cache.xmlcache.XmlParser |   1 +
 .../internal/LuceneEventListenerJUnitTest.java  | 109 +++
 .../LuceneIndexRecoveryHAJUnitTest.java         | 201 +++++
 .../LuceneQueryFactoryImplJUnitTest.java        |  50 ++
 .../internal/LuceneQueryImplJUnitTest.java      | 123 +++
 .../LuceneQueryResultsImplJUnitTest.java        | 126 +++
 .../LuceneResultStructImpJUnitTest.java         |  51 ++
 .../internal/LuceneServiceImplJUnitTest.java    | 226 ++++++
 .../PartitionedRepositoryManagerJUnitTest.java  | 230 ++++++
 .../internal/StringQueryProviderJUnitTest.java  |  90 +++
 .../directory/RegionDirectoryJUnitTest.java     |  56 ++
 .../DistributedScoringJUnitTest.java            | 155 ++++
 .../distributed/EntryScoreJUnitTest.java        |  40 +
 .../LuceneFunctionContextJUnitTest.java         |  64 ++
 .../distributed/LuceneFunctionJUnitTest.java    | 423 ++++++++++
 .../LuceneFunctionReadPathDUnitTest.java        | 241 ++++++
 .../TopEntriesCollectorJUnitTest.java           | 139 ++++
 .../TopEntriesFunctionCollectorJUnitTest.java   | 323 ++++++++
 .../distributed/TopEntriesJUnitTest.java        | 146 ++++
 .../internal/filesystem/ChunkKeyJUnitTest.java  |  48 ++
 .../internal/filesystem/FileJUnitTest.java      |  53 ++
 .../filesystem/FileSystemJUnitTest.java         | 578 ++++++++++++++
 ...IndexRepositoryImplJUnitPerformanceTest.java | 437 +++++++++++
 .../IndexRepositoryImplJUnitTest.java           | 208 +++++
 .../HeterogenousLuceneSerializerJUnitTest.java  |  90 +++
 .../serializer/PdxFieldMapperJUnitTest.java     |  85 ++
 .../ReflectionFieldMapperJUnitTest.java         |  85 ++
 .../internal/repository/serializer/Type1.java   |  48 ++
 .../internal/repository/serializer/Type2.java   |  34 +
 ...neIndexXmlGeneratorIntegrationJUnitTest.java |  78 ++
 .../xml/LuceneIndexXmlGeneratorJUnitTest.java   |  80 ++
 ...uceneIndexXmlParserIntegrationJUnitTest.java | 107 +++
 .../xml/LuceneIndexXmlParserJUnitTest.java      |  72 ++
 ...erIntegrationJUnitTest.createIndex.cache.xml |  24 +
 ...serIntegrationJUnitTest.parseIndex.cache.xml |  24 +
 gemfire-rebalancer/build.gradle                 |  10 +-
 gemfire-web-api/build.gradle                    |  46 +-
 gemfire-web/build.gradle                        |  12 +-
 gradle/dependency-versions.properties           |  64 ++
 settings.gradle                                 |   1 +
 215 files changed, 11345 insertions(+), 9088 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/766dfd05/build.gradle
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/766dfd05/gemfire-assembly/build.gradle
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/766dfd05/gemfire-core/build.gradle
----------------------------------------------------------------------
diff --cc gemfire-core/build.gradle
index d44a649,f03066f..aa143b1
--- a/gemfire-core/build.gradle
+++ b/gemfire-core/build.gradle
@@@ -11,79 -11,77 +11,78 @@@ configurations 
  }
  
  dependencies {
+    // Source Dependencies
+   // External 
    provided files("${System.getProperty('java.home')}/../lib/tools.jar")
 +  compile 'org.jgroups:jgroups:3.6.6.Final'
-   compile 'antlr:antlr:2.7.7'
-   compile 'com.fasterxml.jackson.core:jackson-annotations:2.2.0'
-   compile 'com.fasterxml.jackson.core:jackson-core:2.2.0'
-   compile 'com.fasterxml.jackson.core:jackson-databind:2.2.0'
-   compile 'com.google.code.findbugs:annotations:3.0.0'
-   compile 'commons-io:commons-io:2.3'
-   compile 'commons-logging:commons-logging:1.1.1'
-   compile 'commons-modeler:commons-modeler:2.0'
-   compile 'org.apache.lucene:lucene-analyzers-common:5.0.0'
-   compile 'org.apache.lucene:lucene-core:5.0.0'
-   compile 'org.apache.lucene:lucene-queries:5.0.0'
-   compile 'org.apache.lucene:lucene-queryparser:5.0.0'
-   compile 'it.unimi.dsi:fastutil:7.0.2'
-   compile 'javax.activation:activation:1.1.1'
-   compile 'javax.mail:javax.mail-api:1.4.5'
-   compile 'javax.resource:javax.resource-api:1.7'
-   compile 'javax.servlet:javax.servlet-api:3.1.0'
-   compile 'javax.transaction:javax.transaction-api:1.2'
-   compile 'mx4j:mx4j:3.0.1'
-   compile 'mx4j:mx4j-remote:3.0.1'
-   compile 'mx4j:mx4j-tools:3.0.1'
-   compile 'net.java.dev.jna:jna:4.0.0'
-   compile 'net.sourceforge.jline:jline:1.0.S2-B'
-   compile 'org.eclipse.jetty:jetty-http:9.2.3.v20140905'
-   compile 'org.eclipse.jetty:jetty-io:9.2.3.v20140905'
-   compile 'org.eclipse.jetty:jetty-security:9.2.3.v20140905'
-   compile 'org.eclipse.jetty:jetty-server:9.2.3.v20140905'
-   compile 'org.eclipse.jetty:jetty-servlet:9.2.3.v20140905'
-   compile 'org.eclipse.jetty:jetty-util:9.2.3.v20140905'
-   compile 'org.eclipse.jetty:jetty-webapp:9.2.3.v20140905'
-   compile 'org.eclipse.jetty:jetty-xml:9.2.3.v20140905'
-   compile 'org.fusesource.jansi:jansi:1.8'
-   compile 'org.apache.logging.log4j:log4j-api:2.1'
-   compile 'org.apache.logging.log4j:log4j-core:2.1'
-   runtime 'org.apache.logging.log4j:log4j-slf4j-impl:2.1'
-   runtime 'org.apache.logging.log4j:log4j-jcl:2.1'
-   runtime 'org.apache.logging.log4j:log4j-jul:2.1'
-   compile 'org.slf4j:slf4j-api:1.7.7'
-   compile 'org.springframework.data:spring-data-commons:1.9.1.RELEASE'
-   provided 'org.springframework.data:spring-data-gemfire:1.5.1.RELEASE'
-   compile 'org.springframework:spring-tx:3.2.12.RELEASE'
-   compile 'org.springframework.shell:spring-shell:1.0.0.RELEASE'
-   compile 'org.xerial.snappy:snappy-java:1.1.1.6'
-   provided 'org.apache.hadoop:hadoop-common:2.4.1'
-   provided 'org.apache.hadoop:hadoop-annotations:2.4.1'
-   provided 'org.apache.hadoop:hadoop-hdfs:2.4.1'
-   provided 'org.apache.hadoop:hadoop-mapreduce-client-core:2.4.1'
-   compile 'org.apache.hbase:hbase:0.94.27'
-   provided 'commons-lang:commons-lang:2.5'
-   provided 'com.google.guava:guava:11.0.2'
-   compile 'io.netty:netty-all:4.0.4.Final'
- 
-   testRuntime 'org.apache.hadoop:hadoop-auth:2.4.1'
-   testRuntime 'commons-collections:commons-collections:3.2.1'
-   testRuntime 'commons-configuration:commons-configuration:1.6'
-   testRuntime 'commons-io:commons-io:2.1'
-   testRuntime 'log4j:log4j:1.2.17'
-   
+   compile 'antlr:antlr:' + project.'antlr.version'
+   compile 'com.fasterxml.jackson.core:jackson-annotations:' + project.'jackson.version'
+   compile 'com.fasterxml.jackson.core:jackson-core:' + project.'jackson.version'
+   compile 'com.fasterxml.jackson.core:jackson-databind:' + project.'jackson.version'
+   compile 'com.google.code.findbugs:annotations:' + project.'annotations.version'
+   provided 'com.google.guava:guava:' + project.'guava.version'
+   compile 'commons-io:commons-io:' + project.'commons-io.version'
+   provided 'commons-lang:commons-lang:' + project.'commons-lang.version'
+   compile 'commons-logging:commons-logging:' + project.'commons-logging.version'
+   compile 'commons-modeler:commons-modeler:' + project.'commons-modeler.version'
+   compile 'io.netty:netty-all:' + project.'netty-all.version'
+   compile 'it.unimi.dsi:fastutil:' + project.'fastutil.version'
+   compile 'javax.activation:activation:' + project.'activation.version'
+   compile 'javax.mail:javax.mail-api:' + project.'javax.mail-api.version'
+   compile 'javax.resource:javax.resource-api:' + project.'javax.resource-api.version'
+   compile 'javax.servlet:javax.servlet-api:' + project.'javax.servlet-api.version'
+   compile 'javax.transaction:javax.transaction-api:' + project.'javax.transaction-api.version'
+   compile 'mx4j:mx4j:' + project.'mx4j.version'
+   compile 'mx4j:mx4j-remote:' + project.'mx4j.version'
+   compile 'mx4j:mx4j-tools:' + project.'mx4j.version'
+   compile 'net.java.dev.jna:jna:' + project.'jna.version'
+   compile 'net.sourceforge.jline:jline:' + project.'jline.version'
+   provided 'org.apache.hadoop:hadoop-common:' + project.'hadoop.version'
+   provided 'org.apache.hadoop:hadoop-annotations:' + project.'hadoop.version'
+   provided 'org.apache.hadoop:hadoop-hdfs:' + project.'hadoop.version'
+   provided 'org.apache.hadoop:hadoop-mapreduce-client-core:' + project.'hadoop.version'
+   compile 'org.apache.hbase:hbase:' + project.'hbase.version'
+   compile 'org.apache.logging.log4j:log4j-api:' + project.'log4j.version'
+   compile 'org.apache.logging.log4j:log4j-core:' + project.'log4j.version'
+   runtime 'org.apache.logging.log4j:log4j-slf4j-impl:' + project.'log4j.version'
+   runtime 'org.apache.logging.log4j:log4j-jcl:' + project.'log4j.version'
+   runtime 'org.apache.logging.log4j:log4j-jul:' + project.'log4j.version'
+   compile 'org.eclipse.jetty:jetty-http:' + project.'jetty.version'
+   compile 'org.eclipse.jetty:jetty-io:' + project.'jetty.version'
+   compile 'org.eclipse.jetty:jetty-security:' + project.'jetty.version'
+   compile 'org.eclipse.jetty:jetty-server:' + project.'jetty.version'
+   compile 'org.eclipse.jetty:jetty-servlet:' + project.'jetty.version'
+   compile 'org.eclipse.jetty:jetty-util:' + project.'jetty.version'
+   compile 'org.eclipse.jetty:jetty-webapp:' + project.'jetty.version'
+   compile 'org.eclipse.jetty:jetty-xml:' + project.'jetty.version'
+   compile 'org.fusesource.jansi:jansi:' + project.'jansi.version'
+   compile 'org.slf4j:slf4j-api:' + project.'slf4j-api.version'
+   compile 'org.springframework.data:spring-data-commons:' + project.'spring-data-commons.version'
+   provided 'org.springframework.data:spring-data-gemfire:' + project.'spring-data-gemfire.version'
+   compile 'org.springframework:spring-tx:' + project.'springframework.version'
+   compile 'org.springframework.shell:spring-shell:' + project.'spring-shell.version'
+   compile 'org.xerial.snappy:snappy-java:' + project.'snappy-java.version'
+   compile 'org.apache.hbase:hbase:' + project.'hbase.version'
+  
    compile project(':gemfire-common')
 -  compile project(':gemfire-jgroups')
    compile project(':gemfire-joptsimple')
    compile project(':gemfire-json')
    
    jcaCompile sourceSets.main.output
  
    provided project(path: ':gemfire-junit', configuration: 'testOutput')
+ 
+   // Test Dependencies
+   // External
+   testCompile 'org.apache.bcel:bcel:' + project.'bcel.version'
+   testRuntime 'org.apache.derby:derby:' + project.'derby.version'
+   testRuntime 'org.apache.hadoop:hadoop-auth:' + project.'hadoop.version'
++  testCompile 'org.mockito:mockito-core:' + project.'mockito-core.version'
+   testRuntime 'commons-collections:commons-collections:' + project.'commons-collections.version'
+   testRuntime 'commons-configuration:commons-configuration:' + project.'commons-configuration.version'
+   testRuntime 'commons-io:commons-io:' + project.'commons-io.version'
+   testCompile 'net.spy:spymemcached:' + project.'spymemcached.version'
+   testCompile 'redis.clients:jedis:' + project.'jedis.version'
  }
  
  def generatedResources = "$buildDir/generated-resources/main"

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/766dfd05/gemfire-core/src/main/java/com/gemstone/gemfire/cache/client/internal/pooling/ConnectionManagerImpl.java
----------------------------------------------------------------------
diff --cc gemfire-core/src/main/java/com/gemstone/gemfire/cache/client/internal/pooling/ConnectionManagerImpl.java
index cb09643,83e4878..d31ff3c
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/client/internal/pooling/ConnectionManagerImpl.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/client/internal/pooling/ConnectionManagerImpl.java
@@@ -41,8 -41,9 +41,9 @@@ import com.gemstone.gemfire.internal.lo
  import com.gemstone.gemfire.internal.logging.LogService;
  import com.gemstone.gemfire.internal.logging.log4j.LocalizedMessage;
  import com.gemstone.gemfire.security.GemFireSecurityException;
 -import com.gemstone.org.jgroups.util.StringId;
 +import com.gemstone.gemfire.i18n.StringId;
  
+ import java.net.SocketException;
  import java.util.ArrayList;
  import java.util.Collections;
  import java.util.HashMap;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/766dfd05/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionManager.java
----------------------------------------------------------------------
diff --cc gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionManager.java
index 882358e,9c06fa1..247775d
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionManager.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionManager.java
@@@ -4800,13 -4688,9 +4606,9 @@@ public class DistributionManage
        this.view = view;
      }
      public long getViewId() {
 -      return view.getViewNumber();
 +      return view.getViewId();
      }
      @Override
-     public int eventType() {
-       return VIEW_INSTALLED;
-     }
-     @Override
      public String toString() {
        return "view installed: " + this.view;
      }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/766dfd05/gemfire-core/src/main/java/com/gemstone/gemfire/internal/DataSerializableFixedID.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/766dfd05/gemfire-core/src/main/java/com/gemstone/gemfire/internal/Version.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/766dfd05/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/LocalRegion.java
----------------------------------------------------------------------
diff --cc gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/LocalRegion.java
index 5232dc9,1900297..c17caa2
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/LocalRegion.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/LocalRegion.java
@@@ -214,8 -213,7 +213,7 @@@ import com.gemstone.gemfire.internal.se
  import com.gemstone.gemfire.internal.util.concurrent.FutureResult;
  import com.gemstone.gemfire.internal.util.concurrent.StoppableCountDownLatch;
  import com.gemstone.gemfire.internal.util.concurrent.StoppableReadWriteLock;
- import com.gemstone.gemfire.internal.util.concurrent.StoppableReentrantReadWriteLock.StoppableWriteLock;
 -import com.gemstone.org.jgroups.util.StringId;
 +import com.gemstone.gemfire.i18n.StringId;
  
  /**
   * Implementation of a local scoped-region. Note that this class has a different

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/766dfd05/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/PartitionedRegionDataStore.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/766dfd05/gemfire-core/src/test/java/com/gemstone/gemfire/cache/management/MemoryThresholdsDUnitTest.java
----------------------------------------------------------------------
diff --cc gemfire-core/src/test/java/com/gemstone/gemfire/cache/management/MemoryThresholdsDUnitTest.java
index b2adc64,4edab28..2f8f7c0
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/management/MemoryThresholdsDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/management/MemoryThresholdsDUnitTest.java
@@@ -402,10 -402,10 +402,10 @@@ public class MemoryThresholdsDUnitTest 
      final String regionName = "testEventDelivery";
  
      ServerPorts ports1 = startCacheServer(server1, 0f, 0f, regionName, false/*createPR*/, false/*notifyBySubscription*/, 0);
 -    ServerPorts ports2 = startCacheServer(server2, ports1.getMcastPort(), 80f, 90f,
 +    ServerPorts ports2 = startCacheServer(server2, 80f, 90f,
          regionName, false/*createPR*/, false/*notifyBySubscription*/, 0);
  
-     registerTestMemoryThresholdListener(server1);
+     registerLoggingTestMemoryThresholdListener(server1);
      registerTestMemoryThresholdListener(server2);
  
      //NORMAL -> CRITICAL

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/766dfd05/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/ProductUseLogDUnitTest.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/766dfd05/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ClientServerTransactionDUnitTest.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/766dfd05/gemfire-core/src/test/java/com/gemstone/gemfire/internal/i18n/BasicI18nJUnitTest.java
----------------------------------------------------------------------
diff --cc gemfire-core/src/test/java/com/gemstone/gemfire/internal/i18n/BasicI18nJUnitTest.java
index fcae123,28934b3..3e1efd8
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/i18n/BasicI18nJUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/i18n/BasicI18nJUnitTest.java
@@@ -205,21 -206,9 +205,9 @@@ public class BasicI18nJUnitTest extend
    @Override
    public void tearDown() {
      //reset to the original
 -    StringIdImpl.setLocale(DEFAULT_LOCALE);
 +    StringId.setLocale(DEFAULT_LOCALE);
    }
  
-   public void testDefaults() {
-     Locale l = getCurrentLocale();
-     AbstractStringIdResourceBundle r = getActiveResourceBundle();
-     assertNotNull(l);
-     assertNotNull(r);
-     final String currentLang = l.getLanguage();
-     final String expectedLang = new Locale("en", "", "").getLanguage();
-     final String frenchLang = new Locale("fr", "", "").getLanguage();
-     // TODO this will fail if run under a locale with a language other than french or english
-     assertTrue(currentLang.equals(expectedLang) || currentLang.equals(frenchLang));
-   }
- 
    public void testSetLocale() {
      //Verify we are starting in a known state
      assertTrue(DEFAULT_LOCALE.equals(getCurrentLocale()));

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/766dfd05/gemfire-core/src/test/resources/com/gemstone/gemfire/codeAnalysis/sanctionedSerializables.txt
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/766dfd05/settings.gradle
----------------------------------------------------------------------


[35/50] [abbrv] incubator-geode git commit: GEODE-77: initiation of member verification on loss of shared/ordered connection

Posted by ma...@apache.org.
GEODE-77: initiation of member verification on loss of shared/ordered connection

The initiation of member verification wasn't working correctly.  It wasn't
being triggered most of the time and when it was the check passed because
it was done so soon after the other member crashed that the timestamp
checks in GMSJoinLeave didn't think enough time had passed to declare the
member dead.  This changes the check to request a heartbeat first.


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

Branch: refs/heads/feature/GEODE-53
Commit: fd98f62f8a1d2eaa41c001f04cc95751f1bea636
Parents: 53c199b
Author: Bruce Schuchardt <bs...@pivotal.io>
Authored: Tue Nov 17 12:32:50 2015 -0800
Committer: Bruce Schuchardt <bs...@pivotal.io>
Committed: Tue Nov 17 12:32:50 2015 -0800

----------------------------------------------------------------------
 .../internal/DistributionMessage.java           |  2 +-
 .../membership/gms/messenger/Transport.java     |  4 +-
 .../gms/mgr/GMSMembershipManager.java           | 10 +--
 .../gemfire/internal/cache/LocalRegion.java     |  2 +-
 .../gemfire/internal/tcp/Connection.java        | 22 +++---
 .../gemfire/internal/tcp/ConnectionTable.java   |  2 +-
 .../gms/membership/GMSJoinLeaveJUnitTest.java   | 23 +++++++
 .../internal/tcp/ConnectionJUnitTest.java       | 71 ++++++++++++++++++++
 8 files changed, 118 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/fd98f62f/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionMessage.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionMessage.java b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionMessage.java
index 551e47d..23f9dee 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionMessage.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionMessage.java
@@ -230,7 +230,7 @@ public abstract class DistributionMessage
     return this.multicast;
   }
   /**
-   * Return true of this message should be sent through JGroups instead of the
+   * Return true of this message should be sent via UDP instead of the
    * direct-channel.  This is typically only done for messages that are
    * broadcast to the full membership set.
    */

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/fd98f62f/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/Transport.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/Transport.java b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/Transport.java
index 8fcac7d..b25b363 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/Transport.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/Transport.java
@@ -72,7 +72,9 @@ public class Transport extends UDP {
         Thread.currentThread().interrupt(); // let someone else handle the interrupt
     }
     catch(SocketException e) {
-      log.error("Exception caught while sending message", e);
+      if (!stack.getChannel().isClosed()) {
+        log.error("Exception caught while sending message", e);
+      }
 //        log.trace(Util.getMessage("SendFailure"),
 //                  local_addr, (dest == null? "cluster" : dest), msg.size(), e.toString(), msg.printHeaders());
     }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/fd98f62f/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/mgr/GMSMembershipManager.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/mgr/GMSMembershipManager.java b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/mgr/GMSMembershipManager.java
index 79af74e..977d090 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/mgr/GMSMembershipManager.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/mgr/GMSMembershipManager.java
@@ -1891,20 +1891,20 @@ public class GMSMembershipManager implements MembershipManager, Manager
   
   public void suspectMembers(Set members, String reason) {
     for (Iterator it=members.iterator(); it.hasNext(); ) {
-      suspectMember((DistributedMember)it.next(), reason);
+      verifyMember((DistributedMember)it.next(), reason);
     }
   }
   
   public void suspectMember(DistributedMember mbr, String reason) {
     if (!this.shutdownInProgress && !this.shutdownMembers.containsKey(mbr)) {
-      this.services.getHealthMonitor().suspect((InternalDistributedMember)mbr, reason);
+      verifyMember(mbr, reason);
     }
   }
 
   /* like memberExists() this checks to see if the given ID is in the current
-   * membership view.  If it is in the view though we try to connect to it
-   * port to see if it's still around.  If we can't then
-   * suspect processing is initiated on the member with the given reason string.
+   * membership view.  If it is in the view though we try to contact it
+   * to see if it's still around.  If we can't contact it then
+   * suspect messages are sent to initiate final checks
    * @param mbr the member to verify
    * @param reason why the check is being done (must not be blank/null)
    * @return true if the member checks out

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/fd98f62f/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/LocalRegion.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/LocalRegion.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/LocalRegion.java
index 782be28..5232dc9 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/LocalRegion.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/LocalRegion.java
@@ -4664,7 +4664,7 @@ public class LocalRegion extends AbstractRegion
               continue;
             } else {
               if(logger.isDebugEnabled()) {
-                logger.debug("refreshEntries key={} value={}", currentKey, entry);
+                logger.debug("refreshEntries key={} value={} version={}", currentKey, entry, tag);
               }
               if (tag == null) { // no version checks
                 localDestroyNoCallbacks(currentKey);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/fd98f62f/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tcp/Connection.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tcp/Connection.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tcp/Connection.java
index b6b1f8b..c592133 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tcp/Connection.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tcp/Connection.java
@@ -557,7 +557,7 @@ public class Connection implements Runnable {
   /** creates a connection that we accepted (it was initiated by
    * an explicit connect being done on the other side).
    */
-  private Connection(ConnectionTable t, Socket s)
+  protected Connection(ConnectionTable t, Socket s)
     throws IOException, ConnectionException
   {
     if (t == null) {
@@ -1745,6 +1745,7 @@ public class Connection implements Runnable {
       if (logger.isDebugEnabled()) {
         logger.debug("Stopping {} for {}", p2pReaderName(), remoteId);
       }
+      initiateSuspicionIfSharedUnordered();
       if (this.isReceiver) {
         if (!this.sharedResource) {
           this.owner.owner.stats.incThreadOwnedReceivers(-1L, dominoCount.get());
@@ -1856,7 +1857,6 @@ public class Connection implements Runnable {
             continue;
           }
           if (amt < 0) {
-            initiateSuspicionIfSharedUnordered();
             this.readerShuttingDown = true;
             try {
               requestClose("SocketChannel.read returned EOF");
@@ -1894,14 +1894,12 @@ public class Connection implements Runnable {
         }
         catch (ClosedChannelException e) {
           this.readerShuttingDown = true;
-          initiateSuspicionIfSharedUnordered();
           try { 
             requestClose(LocalizedStrings.Connection_CLOSEDCHANNELEXCEPTION_IN_CHANNEL_READ_0.toLocalizedString(e));
           } catch (Exception ex) {}
           return;
         }
         catch (IOException e) {
-          initiateSuspicionIfSharedUnordered();
           if (! isSocketClosed()
                 && !"Socket closed".equalsIgnoreCase(e.getMessage()) // needed for Solaris jdk 1.4.2_08
                 ) {
@@ -1925,7 +1923,6 @@ public class Connection implements Runnable {
           if (!stopped && ! isSocketClosed() ) {
             logger.fatal(LocalizedMessage.create(LocalizedStrings.Connection_0_EXCEPTION_IN_CHANNEL_READ, p2pReaderName()), e);
           }
-          initiateSuspicionIfSharedUnordered();
           this.readerShuttingDown = true;
           try { 
             requestClose(LocalizedStrings.Connection_0_EXCEPTION_IN_CHANNEL_READ.toLocalizedString(e)); 
@@ -1950,7 +1947,7 @@ public class Connection implements Runnable {
   private void initiateSuspicionIfSharedUnordered() {
     if (this.isReceiver && this.handshakeRead && !this.preserveOrder && this.sharedResource) {
       if (this.owner.getConduit().getCancelCriterion().cancelInProgress() == null) {
-        String reason = "member shut down shared unordered connection";
+        String reason = "member unexpectedly shut down shared, unordered connection";
         this.owner.getDM().getMembershipManager().suspectMember(this.getRemoteAddress(),
             reason);
       }
@@ -2091,7 +2088,6 @@ public class Connection implements Runnable {
         }
         int len = 0;
         if (readFully(input, lenbytes, lenbytes.length) < 0) {
-          initiateSuspicionIfSharedUnordered();
           stopped = true;
           continue;
         }
@@ -2448,7 +2444,6 @@ public class Connection implements Runnable {
         this.stopped = true;
       }
       catch (IOException io) {
-        initiateSuspicionIfSharedUnordered();
         boolean closed = isSocketClosed()
                 || "Socket closed".equalsIgnoreCase(io.getMessage()); // needed for Solaris jdk 1.4.2_08
         if (!closed) {
@@ -2482,7 +2477,6 @@ public class Connection implements Runnable {
         if (!stopped && !(e instanceof InterruptedException) ) {
           logger.fatal(LocalizedMessage.create(LocalizedStrings.Connection_0_EXCEPTION_RECEIVED, p2pReaderName()), e);
         }
-        initiateSuspicionIfSharedUnordered();
         if (isSocketClosed()) {
           stopped = true;
         }
@@ -2634,6 +2628,16 @@ public class Connection implements Runnable {
     return origSocketInUse;
   }
   
+  /**
+   * For testing we want to configure the connection without having
+   * to read a handshake
+   */
+  protected void setSharedUnorderedForTest() {
+    this.preserveOrder = false;
+    this.sharedResource = true;
+    this.handshakeRead = true;
+  }
+  
 
   /** ensure that a task is running to monitor transmission and reading of acks */
   public synchronized void scheduleAckTimeouts() {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/fd98f62f/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tcp/ConnectionTable.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tcp/ConnectionTable.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tcp/ConnectionTable.java
index fc14e01..c866797 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tcp/ConnectionTable.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tcp/ConnectionTable.java
@@ -690,7 +690,7 @@ public class ConnectionTable  {
     }
   }
 
-  protected final TCPConduit getConduit() {
+  protected TCPConduit getConduit() {
     return owner;
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/fd98f62f/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeaveJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeaveJUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeaveJUnitTest.java
index 562fd70..f846916 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeaveJUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeaveJUnitTest.java
@@ -3,6 +3,7 @@ package com.gemstone.gemfire.distributed.internal.membership.gms.membership;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
 import static org.mockito.Matchers.any;
+import static org.mockito.Mockito.isA;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.never;
 import static org.mockito.Mockito.times;
@@ -20,6 +21,7 @@ import java.util.List;
 import java.util.Set;
 import java.util.Timer;
 
+import org.junit.After;
 import org.junit.Assert;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
@@ -116,6 +118,14 @@ public class GMSJoinLeaveJUnitTest {
     gmsJoinLeave.started();
   }
   
+  @After
+  public void tearDown() throws Exception {
+    if (gmsJoinLeave != null) {
+      gmsJoinLeave.stop();
+      gmsJoinLeave.stopped();
+    }
+  }
+  
   @Test
   public void testFindCoordinatorInView() throws Exception {
     initMocks();
@@ -754,5 +764,18 @@ public class GMSJoinLeaveJUnitTest {
     Assert.assertFalse(nextView.getMembers().contains(mockMembers[2]));
     assertTrue(nextView.getMembers().contains(mockMembers[3]));
   }
+  
+  @Test
+  public void testViewBroadcaster() throws Exception {
+    initMocks();
+    List<InternalDistributedMember> members = new ArrayList<>(Arrays.asList(mockMembers));
+    gmsJoinLeaveMemberId.setVmViewId(1);
+    members.add(gmsJoinLeaveMemberId);
+    prepareAndInstallView(gmsJoinLeaveMemberId, members);
+    gmsJoinLeave.becomeCoordinatorForTest();
+    GMSJoinLeave.ViewBroadcaster b = gmsJoinLeave.new ViewBroadcaster();
+    b.run();
+    verify(messenger).sendUnreliably(isA(InstallViewMessage.class));
+  }
 }
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/fd98f62f/gemfire-core/src/test/java/com/gemstone/gemfire/internal/tcp/ConnectionJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/tcp/ConnectionJUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/tcp/ConnectionJUnitTest.java
new file mode 100755
index 0000000..f19a9aa
--- /dev/null
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/tcp/ConnectionJUnitTest.java
@@ -0,0 +1,71 @@
+package com.gemstone.gemfire.internal.tcp;
+
+import static org.mockito.Mockito.any;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.when;
+import static org.mockito.Mockito.verify;
+
+import java.io.InputStream;
+import java.net.Socket;
+
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import com.gemstone.gemfire.CancelCriterion;
+import com.gemstone.gemfire.distributed.internal.DM;
+import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
+import com.gemstone.gemfire.distributed.internal.membership.MembershipManager;
+import com.gemstone.gemfire.internal.SocketCloser;
+import com.gemstone.gemfire.internal.SocketCreator;
+import com.gemstone.gemfire.test.junit.categories.UnitTest;
+
+@Category(UnitTest.class)
+public class ConnectionJUnitTest {
+
+  /**
+   * Test whether suspicion is raised about a member that
+   * closes its shared/unordered TCPConduit connection
+   */
+  @Test
+  public void testSuspicionRaised() throws Exception {
+    // this test has to create a lot of mocks because Connection
+    // uses a lot of objects
+    
+    // mock the socket
+    ConnectionTable table = mock(ConnectionTable.class);
+    DM distMgr = mock(DM.class);
+    MembershipManager membership = mock(MembershipManager.class);
+    TCPConduit conduit = mock(TCPConduit.class);
+
+    // mock the connection table and conduit
+    
+    when(table.getConduit()).thenReturn(conduit);
+
+    CancelCriterion stopper = mock(CancelCriterion.class);
+    when(stopper.cancelInProgress()).thenReturn(null);
+    when(conduit.getCancelCriterion()).thenReturn(stopper);
+
+    when(conduit.getId()).thenReturn(new Stub(SocketCreator.getLocalHost(), 10337, 1));
+    
+    // NIO can't be mocked because SocketChannel has a final method that
+    // is used by Connection - configureBlocking
+    when(conduit.useNIO()).thenReturn(false);
+    
+    // mock the distribution manager and membership manager
+    when(distMgr.getMembershipManager()).thenReturn(membership);
+    when(conduit.getDM()).thenReturn(distMgr);
+    when(table.getDM()).thenReturn(distMgr);
+    SocketCloser closer = mock(SocketCloser.class);
+    when(table.getSocketCloser()).thenReturn(closer);
+
+    InputStream instream = mock(InputStream.class);
+    when(instream.read()).thenReturn(-1);
+    Socket socket = mock(Socket.class);
+    when(socket.getInputStream()).thenReturn(instream);
+    
+    Connection conn = new Connection(table, socket);
+    conn.setSharedUnorderedForTest();
+    conn.run();
+    verify(membership).suspectMember(any(InternalDistributedMember.class), any(String.class));
+  }
+}


[37/50] [abbrv] incubator-geode git commit: GEODE-570 Fix javadoc to ignore strict checking with JDK 8

Posted by ma...@apache.org.
GEODE-570 Fix javadoc to ignore strict checking with JDK 8


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

Branch: refs/heads/feature/GEODE-53
Commit: 90b9a632b9738319fc7a7fddb93b6bef9ff57f7d
Parents: 3fc2992
Author: Nitin Lamba <ni...@ampool.io>
Authored: Tue Nov 17 11:54:57 2015 -0800
Committer: Dan Smith <up...@apache.org>
Committed: Tue Nov 17 16:45:57 2015 -0800

----------------------------------------------------------------------
 build.gradle | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/90b9a632/build.gradle
----------------------------------------------------------------------
diff --git a/build.gradle b/build.gradle
index a186710..e51a79b 100755
--- a/build.gradle
+++ b/build.gradle
@@ -290,7 +290,11 @@ subprojects {
   }
 
   javadoc.classpath += configurations.provided
-  
+
+  javadoc {
+    options.addStringOption('Xdoclint:none', '-quiet')
+  }
+
   dependencies {
     compile 'org.springframework:spring-aop:' + project.'springframework.version'
     compile 'org.springframework:spring-beans:' + project.'springframework.version'


[43/50] [abbrv] incubator-geode git commit: picking up one other pending change that fixes random suspect strings during unit tests

Posted by ma...@apache.org.
picking up one other pending change that fixes random suspect strings during unit tests


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

Branch: refs/heads/feature/GEODE-53
Commit: 2e9af891e759b33909c8dc7dcc06f8d0cff177d6
Parents: d63113c
Author: Bruce Schuchardt <bs...@pivotal.io>
Authored: Fri Nov 20 09:08:11 2015 -0800
Committer: Bruce Schuchardt <bs...@pivotal.io>
Committed: Fri Nov 20 09:08:11 2015 -0800

----------------------------------------------------------------------
 .../distributed/internal/membership/gms/messenger/Transport.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/2e9af891/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/Transport.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/Transport.java b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/Transport.java
index b25b363..8958fb6 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/Transport.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/Transport.java
@@ -72,7 +72,7 @@ public class Transport extends UDP {
         Thread.currentThread().interrupt(); // let someone else handle the interrupt
     }
     catch(SocketException e) {
-      if (!stack.getChannel().isClosed()) {
+      if (!this.sock.isClosed() && !stack.getChannel().isClosed()) {
         log.error("Exception caught while sending message", e);
       }
 //        log.trace(Util.getMessage("SendFailure"),


[41/50] [abbrv] incubator-geode git commit: Merge branch 'feature/GEODE-77' into develop

Posted by ma...@apache.org.
Merge branch 'feature/GEODE-77' into develop

Conflicts:
	gemfire-core/src/test/java/com/gemstone/gemfire/cache/management/MemoryThresholdsOffHeapDUnitTest.java


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

Branch: refs/heads/feature/GEODE-53
Commit: d63113c6ac02efbbd7e20a7d3c93bb2e1084e012
Parents: 59ab8cf 766dfd0
Author: Bruce Schuchardt <bs...@pivotal.io>
Authored: Thu Nov 19 15:20:19 2015 -0800
Committer: Bruce Schuchardt <bs...@pivotal.io>
Committed: Thu Nov 19 15:20:19 2015 -0800

----------------------------------------------------------------------
 build.gradle                                    |    3 +
 gemfire-assembly/build.gradle                   |    8 +-
 gemfire-core/build.gradle                       |    3 +-
 .../com/gemstone/gemfire/DataSerializer.java    |    2 +-
 .../gemfire/admin/AdminDistributedSystem.java   |    5 -
 .../internal/AdminDistributedSystemImpl.java    |   24 +-
 .../internal/DistributedSystemConfigImpl.java   |    1 -
 .../gemfire/admin/internal/InetAddressUtil.java |    2 +-
 .../ManagedEntityConfigXmlGenerator.java        |   21 +-
 .../gemfire/admin/jmx/internal/AgentImpl.java   |    2 +-
 .../client/internal/AuthenticateUserOp.java     |    2 +
 .../gemfire/cache/client/internal/PingOp.java   |   16 -
 .../cache/client/internal/QueueManagerImpl.java |    2 +-
 .../internal/pooling/ConnectionManagerImpl.java |    4 +-
 .../cache/hdfs/internal/HDFSEventListener.java  |    4 +-
 .../cache/util/BoundedLinkedHashMap.java        |    3 -
 .../gemfire/distributed/DistributedSystem.java  |   39 +-
 .../gemstone/gemfire/distributed/Locator.java   |    5 +-
 .../gemfire/distributed/internal/DM.java        |    9 +-
 .../gemfire/distributed/internal/DMStats.java   |  123 +-
 .../internal/DistributionChannel.java           |    2 +
 .../internal/DistributionConfig.java            |    8 +-
 .../internal/DistributionConfigImpl.java        |   16 +-
 .../internal/DistributionManager.java           |  162 +-
 .../internal/DistributionManagerConfig.java     |  102 -
 .../internal/DistributionMessage.java           |   15 +-
 .../distributed/internal/DistributionStats.java |  333 +-
 .../internal/HighPriorityAckedMessage.java      |    4 +-
 .../internal/InternalDistributedSystem.java     |  152 +-
 .../distributed/internal/InternalLocator.java   |  151 +-
 .../internal/LonerDistributionManager.java      |  238 +-
 .../internal/PooledExecutorWithDMStats.java     |   12 +-
 .../distributed/internal/ReplyMessage.java      |    2 +-
 .../distributed/internal/ReplyProcessor21.java  |    5 +-
 .../distributed/internal/ShutdownMessage.java   |    2 +-
 .../distributed/internal/StartupMessage.java    |   15 +-
 .../distributed/internal/StartupOperation.java  |    5 -
 .../internal/StartupResponseMessage.java        |    2 +-
 .../internal/WaitForViewInstallation.java       |    4 +-
 .../internal/deadlock/DeadlockDetector.java     |  185 +-
 .../internal/deadlock/DependencyGraph.java      |  172 +-
 .../internal/deadlock/LocalThread.java          |    2 +-
 .../deadlock/MessageDependencyMonitor.java      |    4 +-
 .../internal/direct/DirectChannel.java          |   34 +-
 .../membership/InternalDistributedMember.java   |  316 +-
 .../internal/membership/MemberAttributes.java   |   20 +-
 .../internal/membership/MemberFactory.java      |   25 +-
 .../internal/membership/MemberServices.java     |   22 +-
 .../internal/membership/MembershipManager.java  |   27 +-
 .../internal/membership/NetMember.java          |   59 +-
 .../internal/membership/NetView.java            |  543 ++-
 .../internal/membership/QuorumChecker.java      |   12 +
 .../internal/membership/gms/GMSMember.java      |  460 ++
 .../membership/gms/GMSMemberFactory.java        |  143 +
 .../internal/membership/gms/GMSUtil.java        |  124 +
 .../internal/membership/gms/NetLocator.java     |   16 +
 .../internal/membership/gms/ServiceConfig.java  |  158 +
 .../internal/membership/gms/Services.java       |  371 ++
 .../internal/membership/gms/SuspectMember.java  |   53 +
 .../membership/gms/auth/GMSAuthenticator.java   |  219 +
 .../membership/gms/fd/GMSHealthMonitor.java     | 1375 ++++++
 .../gms/interfaces/Authenticator.java           |   11 +
 .../gms/interfaces/HealthMonitor.java           |   49 +
 .../membership/gms/interfaces/JoinLeave.java    |   51 +
 .../membership/gms/interfaces/Locator.java      |   16 +
 .../membership/gms/interfaces/Manager.java      |  105 +
 .../gms/interfaces/MessageHandler.java          |   14 +
 .../membership/gms/interfaces/Messenger.java    |   43 +
 .../membership/gms/interfaces/Service.java      |   66 +
 .../gms/locator/FindCoordinatorRequest.java     |   99 +
 .../gms/locator/FindCoordinatorResponse.java    |  146 +
 .../membership/gms/locator/GMSLocator.java      |  357 ++
 .../membership/gms/locator/GetViewRequest.java  |   33 +
 .../membership/gms/locator/GetViewResponse.java |   48 +
 .../gms/locator/PeerLocatorRequest.java         |    9 +
 .../membership/gms/membership/GMSJoinLeave.java | 2141 +++++++++
 .../membership/gms/messages/HasMemberID.java    |    9 +
 .../gms/messages/HeartbeatMessage.java          |   58 +
 .../gms/messages/HeartbeatRequestMessage.java   |   64 +
 .../gms/messages/InstallViewMessage.java        |   90 +
 .../gms/messages/JoinRequestMessage.java        |   81 +
 .../gms/messages/JoinResponseMessage.java       |  113 +
 .../gms/messages/LeaveRequestMessage.java       |   78 +
 .../gms/messages/NetworkPartitionMessage.java   |   28 +
 .../gms/messages/RemoveMemberMessage.java       |   80 +
 .../gms/messages/SuspectMembersMessage.java     |   75 +
 .../membership/gms/messages/SuspectRequest.java |   56 +
 .../membership/gms/messages/ViewAckMessage.java |   87 +
 .../gms/messenger/AddressManager.java           |  114 +
 .../membership/gms/messenger/GMSPingPonger.java |   41 +
 .../gms/messenger/GMSQuorumChecker.java         |  258 +
 .../membership/gms/messenger/JGAddress.java     |  214 +
 .../gms/messenger/JGroupsMessenger.java         | 1075 +++++
 .../membership/gms/messenger/StatRecorder.java  |  146 +
 .../membership/gms/messenger/Transport.java     |  126 +
 .../gms/mgr/GMSMembershipManager.java           | 3018 ++++++++++++
 .../membership/gms/mgr/LocalViewMessage.java    |   85 +
 .../internal/membership/gms/package.html        |   41 +
 .../membership/jgroup/GFJGBasicAdapter.java     |  618 ---
 .../membership/jgroup/GFJGPeerAdapter.java      |  500 --
 .../membership/jgroup/JGroupMember.java         |  260 -
 .../membership/jgroup/JGroupMemberFactory.java  |  128 -
 .../jgroup/JGroupMembershipManager.java         | 4241 ----------------
 .../internal/membership/jgroup/LocatorImpl.java |  490 --
 .../membership/jgroup/QuorumCheckerImpl.java    |  300 --
 .../internal/membership/jgroup/ViewMessage.java |   82 -
 .../internal/membership/jgroup/package.html     |   43 -
 .../internal/tcpserver/TcpClient.java           |   60 +-
 .../internal/tcpserver/TcpServer.java           |  105 +-
 .../gemstone/gemfire/i18n/LogWriterI18n.java    |    8 +-
 .../com/gemstone/gemfire/i18n/StringId.java     |  161 +
 .../com/gemstone/gemfire/i18n/StringIdImpl.java |  162 -
 .../gemfire/internal/AvailablePort.java         |   73 +-
 .../gemfire/internal/ConnectionWatcher.java     |   41 +
 .../gemstone/gemfire/internal/DSFIDFactory.java |   38 +-
 .../internal/DataSerializableFixedID.java       |   34 +-
 .../internal/InternalDataSerializer.java        |  140 +-
 .../gemfire/internal/InternalInstantiator.java  |    2 +-
 .../gemfire/internal/SocketCreator.java         |    3 +-
 .../gemstone/gemfire/internal/SystemAdmin.java  |   15 +-
 .../com/gemstone/gemfire/internal/Version.java  |   19 +-
 .../internal/admin/remote/AdminResponse.java    |    2 +-
 .../admin/remote/AlertListenerMessage.java      |    2 +-
 .../admin/remote/FetchStatsResponse.java        |    2 +-
 .../admin/remote/FetchSysCfgRequest.java        |    2 +-
 .../admin/remote/HealthListenerMessage.java     |    2 +-
 .../admin/remote/RemoteGfManagerAgent.java      |   37 +-
 .../admin/remote/RemoteTransportConfig.java     |  127 +-
 .../admin/remote/ShutdownAllRequest.java        |    6 +-
 .../admin/remote/ShutdownAllResponse.java       |    2 +-
 .../admin/remote/SnapshotResultMessage.java     |    2 +-
 .../admin/remote/StatListenerMessage.java       |    2 +-
 .../internal/cache/CloseCacheMessage.java       |    2 +-
 .../internal/cache/CreateRegionProcessor.java   |    6 +-
 .../gemfire/internal/cache/DiskStoreImpl.java   |    6 +-
 .../cache/DistributedCacheOperation.java        |    6 +-
 .../internal/cache/DistributedRegion.java       |    2 +-
 .../internal/cache/FindRemoteTXMessage.java     |    2 +-
 .../internal/cache/InitialImageFlowControl.java |    2 +-
 .../internal/cache/LoaderHelperImpl.java        |    2 +-
 .../gemfire/internal/cache/LocalRegion.java     |    9 +-
 .../internal/cache/PRHARedundancyProvider.java  |    2 +-
 .../internal/cache/PartitionedRegion.java       |    2 +-
 .../cache/PartitionedRegionDataStore.java       |    2 +-
 .../internal/cache/StateFlushOperation.java     |    5 +-
 .../gemfire/internal/cache/TXState.java         |    2 +-
 .../cache/UpdateAttributesProcessor.java        |    2 +-
 .../internal/cache/doc-files/properties.html    |   22 -
 .../internal/cache/ha/HARegionQueue.java        |    2 +-
 .../partitioned/BucketProfileUpdateMessage.java |    2 +-
 .../cache/partitioned/FetchEntriesMessage.java  |   11 +-
 .../cache/partitioned/PRTombstoneMessage.java   |    3 +-
 .../cache/tier/sockets/BaseCommand.java         |    1 +
 .../cache/tier/sockets/CacheClientNotifier.java |    8 +-
 .../cache/tier/sockets/CacheClientProxy.java    |    2 +-
 .../tier/sockets/ClientProxyMembershipID.java   |    6 +-
 .../internal/cache/tier/sockets/HandShake.java  |   18 +-
 .../internal/cache/tier/sockets/Message.java    |   23 +-
 .../cache/tier/sockets/ServerConnection.java    |    2 +-
 .../sockets/command/GatewayReceiverCommand.java |    2 +-
 .../cache/tier/sockets/command/Get70.java       |    2 +-
 .../cache/tier/sockets/command/Ping.java        |   15 +-
 .../cache/tier/sockets/command/Put.java         |    2 +-
 .../tier/sockets/command/RegisterInterest.java  |    2 +-
 .../sockets/command/RegisterInterest61.java     |    2 +-
 .../sockets/command/RegisterInterestList.java   |    2 +-
 .../sockets/command/RegisterInterestList61.java |    2 +-
 .../sockets/command/RegisterInterestList66.java |    2 +-
 .../cache/tier/sockets/command/Request.java     |    2 +-
 .../sockets/command/UnregisterInterest.java     |    2 +-
 .../sockets/command/UnregisterInterestList.java |    2 +-
 .../GatewaySenderEventCallbackDispatcher.java   |    2 +-
 .../parallel/ParallelGatewaySenderQueue.java    |   51 +-
 .../datasource/GemFireBasicDataSource.java      |    2 +-
 .../datasource/GemFireConnPooledDataSource.java |    2 +-
 .../i18n/AbstractStringIdResourceBundle.java    |    5 +-
 .../gemfire/internal/i18n/LocalizedStrings.java | 3985 +++++++--------
 .../internal/i18n/ParentLocalizedStrings.java   | 4517 +++++++++---------
 .../gemfire/internal/i18n/StringId.java         |   58 +
 .../internal/logging/DebugLogWriter.java        |    4 +-
 .../internal/logging/InternalLogWriter.java     |    5 +-
 .../gemfire/internal/logging/LogFileParser.java |    8 +
 .../gemfire/internal/logging/LogWriterImpl.java |    2 +-
 .../internal/logging/LoggingThreadGroup.java    |    2 +-
 .../gemfire/internal/logging/PureLogWriter.java |    2 +-
 .../logging/SecurityLocalLogWriter.java         |    2 +-
 .../internal/logging/SecurityLogWriter.java     |    2 +-
 .../logging/SecurityManagerLogWriter.java       |    2 +-
 .../logging/log4j/LocalizedMessage.java         |    3 +-
 .../internal/logging/log4j/LogWriterLogger.java |    2 +-
 .../gemfire/internal/process/StartupStatus.java |    2 +-
 .../gemfire/internal/redis/RegionProvider.java  |    2 +-
 .../gemfire/internal/tcp/Connection.java        |   53 +-
 .../gemfire/internal/tcp/ConnectionTable.java   |   10 +-
 .../gemfire/internal/tcp/TCPConduit.java        |    4 +-
 .../gemfire/internal/util/Breadcrumbs.java      |    2 +-
 .../gemfire/internal/util/PluckStacks.java      |   74 +-
 .../management/internal/JmxManagerAdvisor.java  |    2 +-
 .../internal/JmxManagerLocatorRequest.java      |   11 -
 .../management/internal/MBeanJMXAdapter.java    |    2 +-
 .../management/internal/ManagementStrings.java  |  113 +-
 .../internal/beans/MemberMBeanBridge.java       |    4 +-
 .../internal/cli/commands/ClientCommands.java   |   44 +-
 .../CreateAlterDestroyRegionCommands.java       |   13 +-
 .../cli/commands/DiskStoreCommands.java         |    7 +-
 .../cli/commands/MiscellaneousCommands.java     |   38 +-
 .../cli/functions/RegionCreateFunction.java     |    5 +
 .../cli/functions/RegionFunctionArgs.java       |   27 +-
 .../internal/cli/i18n/CliStrings.java           |   59 +-
 .../internal/cli/result/ResultBuilder.java      |    0
 .../distributed/internal/javagroups-config.txt  |  101 -
 .../distributed/internal/javagroups-mcast.txt   |   97 -
 .../membership/gms/messenger/jgroups-config.xml |   56 +
 .../membership/gms/messenger/jgroups-mcast.xml  |   82 +
 gemfire-core/src/main/resources/log4j2.xml      |    1 +
 .../BindDistributedSystemJUnitTest.java         |  156 +-
 .../gemfire/cache/Bug42039JUnitTest.java        |   23 +-
 .../cache/ClientServerTimeSyncDUnitTest.java    |    2 +-
 .../ClientServerRegisterInterestsDUnitTest.java |    5 +-
 .../internal/AutoConnectionSourceDUnitTest.java |    6 +-
 .../AutoConnectionSourceWithUDPDUnitTest.java   |  149 -
 .../management/MemoryThresholdsDUnitTest.java   |  105 +-
 .../MemoryThresholdsOffHeapDUnitTest.java       |   77 +-
 .../gemfire/cache/query/data/PortfolioPdx.java  |    3 +
 .../query/dunit/QueryUsingPoolDUnitTest.java    |   30 +-
 .../cache/query/dunit/RemoteQueryDUnitTest.java |   27 +-
 ...esourceManagerWithQueryMonitorDUnitTest.java |   37 +-
 .../functional/IndexCreationJUnitTest.java      |    2 -
 .../index/CopyOnReadIndexDUnitTest.java         |    9 +-
 .../index/MultiIndexCreationDUnitTest.java      |    7 +-
 .../index/PdxCopyOnReadQueryJUnitTest.java      |    1 +
 .../PutAllWithIndexPerfDUnitDisabledTest.java   |    3 +-
 .../gemstone/gemfire/cache30/CacheTestCase.java |   54 -
 .../cache30/ClientMembershipDUnitTest.java      |    2 +
 .../gemfire/cache30/ClientServerTestCase.java   |    4 +-
 ...ckOverflowRegionCCECompressionDUnitTest.java |   70 -
 ...PersistentRegionCCECompressionDUnitTest.java |   71 -
 .../DistributedAckRegionCCEDUnitTest.java       |    8 +-
 .../DistributedNoAckRegionCCEDUnitTest.java     |    5 -
 ...tributedNoAckRegionCompressionDUnitTest.java |   71 -
 .../cache30/GlobalRegionCCEDUnitTest.java       |    3 -
 .../GlobalRegionCompressionDUnitTest.java       |   70 -
 .../gemfire/cache30/MultiVMRegionTestCase.java  |  216 -
 .../PRBucketSynchronizationDUnitTest.java       |    5 +-
 .../gemfire/cache30/ReconnectDUnitTest.java     |  146 +-
 .../ReconnectedCacheServerDUnitTest.java        |   10 +-
 .../RegionMembershipListenerDUnitTest.java      |   21 +-
 .../gemfire/cache30/TXDistributedDUnitTest.java |   98 +-
 .../AnalyzeSerializablesJUnitTest.java          |   29 -
 .../codeAnalysis/decode/CompiledClass.java      |    4 +-
 .../distributed/DistributedSystemDUnitTest.java |  118 +-
 .../gemfire/distributed/JGroupsJUnitTest.java   |  180 -
 .../gemfire/distributed/LocatorDUnitTest.java   |  539 +--
 .../gemfire/distributed/LocatorJUnitTest.java   |   96 +-
 .../ConsoleDistributionManagerDUnitTest.java    |    2 +-
 .../internal/DistributionManagerDUnitTest.java  |   95 +-
 ...istributionManagerTimeDUnitDisabledTest.java |  220 -
 .../GemFireTimeSyncServiceDUnitTest.java        |  269 --
 .../InternalDistributedSystemJUnitTest.java     |    7 +-
 .../internal/LocalDistributionManagerTest.java  |  484 --
 .../internal/ProductUseLogDUnitTest.java        |    2 +-
 .../membership/MembershipJUnitTest.java         |  233 +-
 .../membership/gms/MembershipManagerHelper.java |  171 +
 .../gms/auth/GMSAuthenticatorJUnitTest.java     |  300 ++
 .../locator/GMSLocatorRecoveryJUnitTest.java    |  170 +
 .../gms/membership/GMSJoinLeaveJUnitTest.java   |  781 +++
 .../gms/membership/StatRecorderJUnitTest.java   |  211 +
 .../fd/GMSHealthMonitorJUnitTest.java           |  444 ++
 .../messenger/GMSQuorumCheckerJUnitTest.java    |  345 ++
 .../membership/gms/messenger/InterceptUDP.java  |   93 +
 .../messenger/JGroupsMessengerJUnitTest.java    |  433 ++
 .../jgroup/MembershipManagerHelper.java         |  189 -
 .../tcpserver/LocatorVersioningJUnitTest.java   |  218 -
 ...cpServerBackwardCompatDUnitDisabledTest.java |   63 +-
 .../tcpserver/TcpServerJUnitDisabledTest.java   |  219 -
 .../internal/tcpserver/TcpServerJUnitTest.java  |  221 +
 .../gemfire/internal/AvailablePortHelper.java   |    2 +-
 ...wardCompatibilitySerializationDUnitTest.java |  307 ++
 ...wardCompatibilitySerializationJUnitTest.java |  315 --
 .../gemstone/gemfire/internal/FDDUnitTest.java  |   18 +-
 .../internal/PdxDeleteFieldDUnitTest.java       |   13 +-
 .../gemfire/internal/PdxRenameDUnitTest.java    |   15 +-
 .../internal/cache/Bug33726JUnitTest.java       |    2 +
 .../internal/cache/Bug41957DUnitTest.java       |    8 +-
 ...ssagesRegionCreationAndDestroyJUnitTest.java |    4 +-
 .../cache/ClientServerGetAllDUnitTest.java      |   38 +-
 .../cache/ClientServerTransactionDUnitTest.java |    2 +-
 .../cache/ConcurrentMapOpsDUnitTest.java        |    2 +-
 .../cache/ConnectDisconnectDUnitTest.java       |   41 +-
 .../cache/execute/Bug51193DUnitTest.java        |    8 +-
 .../PRFunctionExecutionTimeOutDUnitTest.java    |    1 +
 .../internal/cache/ha/Bug48571DUnitTest.java    |    4 +-
 .../internal/cache/ha/Bug48879DUnitTest.java    |    7 +-
 .../cache/partitioned/Bug43684DUnitTest.java    |   32 +-
 .../cache/partitioned/Bug51400DUnitTest.java    |    6 +-
 .../PartitionedRegionLoadModelJUnitTest.java    |    8 +-
 .../cache/partitioned/ShutdownAllDUnitTest.java |   12 +-
 .../cache/tier/sockets/Bug36829DUnitTest.java   |    5 +-
 .../cache/tier/sockets/Bug37805DUnitTest.java   |    3 +-
 .../cache/tier/sockets/CacheServerTestUtil.java |   10 +-
 .../DurableClientQueueSizeDUnitTest.java        |   20 +-
 .../DurableClientReconnectDUnitTest.java        |    2 +-
 .../sockets/DurableClientStatsDUnitTest.java    |   12 +-
 .../sockets/DurableRegistrationDUnitTest.java   |   34 +-
 .../sockets/InterestListFailoverDUnitTest.java  |    5 +-
 .../sockets/UnregisterInterestDUnitTest.java    |    3 +-
 .../versions/RegionVersionVectorJUnitTest.java  |  231 +-
 .../internal/i18n/BasicI18nJUnitTest.java       |   49 +-
 .../log4j/LocalizedMessageJUnitTest.java        |    9 +-
 .../internal/stats50/AtomicStatsJUnitTest.java  |   16 +-
 .../internal/tcp/ConnectionJUnitTest.java       |   71 +
 .../concurrent/ReentrantSemaphoreJUnitTest.java |    1 -
 .../management/ClientHealthStatsDUnitTest.java  |    1 +
 .../management/LocatorManagementDUnitTest.java  |    4 -
 .../gemfire/memcached/IntegrationJUnitTest.java |    3 +
 .../gemfire/redis/RedisDistDUnitTest.java       |   29 +-
 .../protocols/CacheTimeSlowDownDUnitTest.java   |  217 -
 .../GemFireTimeSyncProtocolDUnitTest.java       |  490 --
 .../JGroupsFailureDetectionJUnitTest.java       |  504 --
 .../protocols/JGroupsVersioningJUnitTest.java   |  352 --
 .../test/java/dunit/DistributedTestCase.java    |   58 +-
 .../java/dunit/standalone/DUnitLauncher.java    |   16 +-
 .../java/dunit/standalone/ProcessManager.java   |   12 +-
 .../src/test/java/hydra/log/AnyLogWriter.java   |    2 +-
 .../sanctionedDataSerializables.txt             |  132 +-
 .../codeAnalysis/sanctionedSerializables.txt    |  121 +-
 gemfire-jgroups/build.gradle                    |   39 -
 .../java/com/gemstone/org/jgroups/Address.java  |   46 -
 .../com/gemstone/org/jgroups/BlockEvent.java    |   15 -
 .../java/com/gemstone/org/jgroups/Channel.java  |  508 --
 .../org/jgroups/ChannelClosedException.java     |   27 -
 .../gemstone/org/jgroups/ChannelException.java  |   28 -
 .../gemstone/org/jgroups/ChannelFactory.java    |   38 -
 .../gemstone/org/jgroups/ChannelListener.java   |   20 -
 .../jgroups/ChannelNotConnectedException.java   |   26 -
 .../java/com/gemstone/org/jgroups/Event.java    |  225 -
 .../com/gemstone/org/jgroups/ExitEvent.java     |   14 -
 .../com/gemstone/org/jgroups/GetStateEvent.java |   22 -
 .../java/com/gemstone/org/jgroups/Global.java   |   44 -
 .../java/com/gemstone/org/jgroups/Header.java   |   51 -
 .../java/com/gemstone/org/jgroups/JChannel.java | 1725 -------
 .../gemstone/org/jgroups/JChannelFactory.java   |  129 -
 .../gemstone/org/jgroups/JGroupsVersion.java    |   95 -
 .../com/gemstone/org/jgroups/Membership.java    |  358 --
 .../org/jgroups/MembershipListener.java         |   53 -
 .../com/gemstone/org/jgroups/MergeView.java     |  166 -
 .../java/com/gemstone/org/jgroups/Message.java  |  784 ---
 .../com/gemstone/org/jgroups/Message.java.old   |  711 ---
 .../gemstone/org/jgroups/MessageListener.java   |   34 -
 .../java/com/gemstone/org/jgroups/Receiver.java |   13 -
 .../gemstone/org/jgroups/ReceiverAdapter.java   |   35 -
 .../com/gemstone/org/jgroups/SetStateEvent.java |   37 -
 .../org/jgroups/ShunnedAddressException.java    |   30 -
 .../com/gemstone/org/jgroups/SuspectEvent.java  |   26 -
 .../com/gemstone/org/jgroups/SuspectMember.java |   56 -
 .../org/jgroups/SuspectedException.java         |   21 -
 .../gemstone/org/jgroups/TimeoutException.java  |   43 -
 .../com/gemstone/org/jgroups/Transport.java     |   22 -
 .../com/gemstone/org/jgroups/UpHandler.java     |   18 -
 .../java/com/gemstone/org/jgroups/View.java     |  528 --
 .../java/com/gemstone/org/jgroups/ViewId.java   |  174 -
 .../org/jgroups/blocks/ConnectionTable.java     | 1051 ----
 .../org/jgroups/blocks/ConnectionTableNIO.java  | 1519 ------
 .../jgroups/blocks/DistributedHashtable.java    |  656 ---
 .../jgroups/blocks/DistributedLockManager.java  |  742 ---
 .../org/jgroups/blocks/DistributedQueue.java    |  758 ---
 .../org/jgroups/blocks/DistributedTree.java     |  756 ---
 .../org/jgroups/blocks/GroupRequest.java        |  636 ---
 .../org/jgroups/blocks/GroupRequest.java.old    |  641 ---
 .../com/gemstone/org/jgroups/blocks/Link.java   |  680 ---
 .../com/gemstone/org/jgroups/blocks/Link.txt    |   48 -
 .../org/jgroups/blocks/LockManager.java         |   87 -
 .../blocks/LockMultiLockedException.java        |   26 -
 .../jgroups/blocks/LockNotGrantedException.java |   24 -
 .../blocks/LockNotReleasedException.java        |   24 -
 .../org/jgroups/blocks/LockingException.java    |   38 -
 .../org/jgroups/blocks/LogicalLink.java         |  340 --
 .../blocks/MembershipListenerAdapter.java       |   91 -
 .../org/jgroups/blocks/MessageDispatcher.java   |  845 ----
 .../jgroups/blocks/MessageListenerAdapter.java  |  123 -
 .../gemstone/org/jgroups/blocks/MethodCall.java |  529 --
 .../org/jgroups/blocks/MethodLookup.java        |   15 -
 .../org/jgroups/blocks/NBMessageForm_NIO.java   |   94 -
 .../org/jgroups/blocks/NotificationBus.java     |  458 --
 .../org/jgroups/blocks/PullPushAdapter.java     |  434 --
 .../org/jgroups/blocks/ReplicatedHashtable.java |  530 --
 .../org/jgroups/blocks/ReplicatedTree.java      | 1121 -----
 .../org/jgroups/blocks/ReplicationData.java     |  148 -
 .../org/jgroups/blocks/ReplicationManager.java  |  345 --
 .../org/jgroups/blocks/ReplicationReceiver.java |   69 -
 .../org/jgroups/blocks/RequestCorrelator.java   |  911 ----
 .../org/jgroups/blocks/RequestHandler.java      |   15 -
 .../org/jgroups/blocks/RpcDispatcher.java       |  392 --
 .../org/jgroups/blocks/RspCollector.java        |   18 -
 .../jgroups/blocks/TwoPhaseVotingAdapter.java   |  173 -
 .../jgroups/blocks/TwoPhaseVotingListener.java  |   35 -
 .../org/jgroups/blocks/UpdateException.java     |   19 -
 .../org/jgroups/blocks/VoteException.java       |   19 -
 .../jgroups/blocks/VoteResponseProcessor.java   |   31 -
 .../org/jgroups/blocks/VotingAdapter.java       |  472 --
 .../org/jgroups/blocks/VotingListener.java      |   26 -
 .../com/gemstone/org/jgroups/blocks/Xid.java    |  164 -
 .../gemstone/org/jgroups/blocks/package.html    |   13 -
 .../org/jgroups/conf/ClassConfigurator.java     |  228 -
 .../com/gemstone/org/jgroups/conf/ClassMap.java |   75 -
 .../jgroups/conf/ClassPathEntityResolver.java   |   63 -
 .../org/jgroups/conf/ConfiguratorFactory.java   |  449 --
 .../org/jgroups/conf/MagicNumberReader.java     |  402 --
 .../org/jgroups/conf/PlainConfigurator.java     |   48 -
 .../gemstone/org/jgroups/conf/ProtocolData.java |  130 -
 .../org/jgroups/conf/ProtocolParameter.java     |   64 -
 .../jgroups/conf/ProtocolStackConfigurator.java |   18 -
 .../org/jgroups/conf/XmlConfigurator.java       |  463 --
 .../gemstone/org/jgroups/conf/XmlValidator.java |  146 -
 .../com/gemstone/org/jgroups/conf/package.html  |    5 -
 .../gemstone/org/jgroups/debug/Debugger.java    |  133 -
 .../org/jgroups/debug/JChannelTestHook.java     |   30 -
 .../gemstone/org/jgroups/debug/Profiler.java    |  160 -
 .../org/jgroups/debug/ProtocolSpecificView.java |   24 -
 .../org/jgroups/debug/ProtocolTester.java       |  142 -
 .../org/jgroups/debug/ProtocolView.java         |   90 -
 .../gemstone/org/jgroups/debug/QUEUEView.java   |   28 -
 .../gemstone/org/jgroups/debug/Simulator.java   |  249 -
 .../com/gemstone/org/jgroups/debug/package.html |    5 -
 .../com/gemstone/org/jgroups/gemstonizing.txt   |   28 -
 .../org/jgroups/oswego/concurrent/Barrier.java  |   65 -
 .../oswego/concurrent/BoundedBuffer.java        |  190 -
 .../oswego/concurrent/BoundedChannel.java       |   37 -
 .../oswego/concurrent/BoundedLinkedQueue.java   |  384 --
 .../oswego/concurrent/BoundedPriorityQueue.java |  123 -
 .../concurrent/BrokenBarrierException.java      |   48 -
 .../org/jgroups/oswego/concurrent/Callable.java |   39 -
 .../org/jgroups/oswego/concurrent/Channel.java  |  309 --
 .../jgroups/oswego/concurrent/ClockDaemon.java  |  403 --
 .../org/jgroups/oswego/concurrent/CondVar.java  |  277 --
 .../jgroups/oswego/concurrent/CountDown.java    |  126 -
 .../oswego/concurrent/CyclicBarrier.java        |  299 --
 .../concurrent/DefaultChannelCapacity.java      |   58 -
 .../oswego/concurrent/DirectExecutor.java       |   36 -
 .../org/jgroups/oswego/concurrent/Executor.java |   70 -
 .../oswego/concurrent/FIFOReadWriteLock.java    |  198 -
 .../oswego/concurrent/FIFOSemaphore.java        |   84 -
 .../org/jgroups/oswego/concurrent/FJTask.java   |  535 ---
 .../jgroups/oswego/concurrent/FJTaskRunner.java |  979 ----
 .../oswego/concurrent/FJTaskRunnerGroup.java    |  625 ---
 .../jgroups/oswego/concurrent/FutureResult.java |  209 -
 .../org/jgroups/oswego/concurrent/Heap.java     |  151 -
 .../org/jgroups/oswego/concurrent/Latch.java    |  103 -
 .../jgroups/oswego/concurrent/LayeredSync.java  |   96 -
 .../jgroups/oswego/concurrent/LinkedNode.java   |   29 -
 .../jgroups/oswego/concurrent/LinkedQueue.java  |  192 -
 .../oswego/concurrent/LockedExecutor.java       |   62 -
 .../org/jgroups/oswego/concurrent/Mutex.java    |  173 -
 .../org/jgroups/oswego/concurrent/NullSync.java |   51 -
 .../oswego/concurrent/PooledExecutor.java       |  924 ----
 .../oswego/concurrent/PrioritySemaphore.java    |   96 -
 .../concurrent/PropertyChangeMulticaster.java   |  466 --
 .../org/jgroups/oswego/concurrent/Puttable.java |   68 -
 .../oswego/concurrent/QueuedExecutor.java       |  220 -
 .../oswego/concurrent/QueuedSemaphore.java      |  181 -
 .../oswego/concurrent/ReadWriteLock.java        |   86 -
 .../ReaderPreferenceReadWriteLock.java          |   35 -
 .../oswego/concurrent/ReentrantLock.java        |  151 -
 .../ReentrantWriterPreferenceReadWriteLock.java |  169 -
 .../jgroups/oswego/concurrent/Rendezvous.java   |  422 --
 .../jgroups/oswego/concurrent/Semaphore.java    |  193 -
 .../concurrent/SemaphoreControlledChannel.java  |  164 -
 .../org/jgroups/oswego/concurrent/Slot.java     |   88 -
 .../org/jgroups/oswego/concurrent/Sync.java     |  344 --
 .../oswego/concurrent/SyncCollection.java       |  514 --
 .../org/jgroups/oswego/concurrent/SyncList.java |  327 --
 .../org/jgroups/oswego/concurrent/SyncMap.java  |  314 --
 .../org/jgroups/oswego/concurrent/SyncSet.java  |   82 -
 .../oswego/concurrent/SyncSortedMap.java        |  129 -
 .../oswego/concurrent/SyncSortedSet.java        |  129 -
 .../oswego/concurrent/SynchronizedBoolean.java  |  182 -
 .../oswego/concurrent/SynchronizedByte.java     |  253 -
 .../oswego/concurrent/SynchronizedChar.java     |  176 -
 .../oswego/concurrent/SynchronizedDouble.java   |  181 -
 .../oswego/concurrent/SynchronizedFloat.java    |  181 -
 .../oswego/concurrent/SynchronizedInt.java      |  250 -
 .../oswego/concurrent/SynchronizedLong.java     |  252 -
 .../oswego/concurrent/SynchronizedRef.java      |  107 -
 .../oswego/concurrent/SynchronizedShort.java    |  254 -
 .../oswego/concurrent/SynchronizedVariable.java |  209 -
 .../oswego/concurrent/SynchronousChannel.java   |  379 --
 .../org/jgroups/oswego/concurrent/Takable.java  |   67 -
 .../oswego/concurrent/ThreadFactory.java        |   35 -
 .../oswego/concurrent/ThreadFactoryUser.java    |   62 -
 .../oswego/concurrent/ThreadedExecutor.java     |   40 -
 .../oswego/concurrent/TimedCallable.java        |   68 -
 .../oswego/concurrent/TimeoutException.java     |   53 -
 .../jgroups/oswego/concurrent/TimeoutSync.java  |   75 -
 .../concurrent/VetoableChangeMulticaster.java   |  577 ---
 .../oswego/concurrent/WaitFreeQueue.java        |  208 -
 .../oswego/concurrent/WaitableBoolean.java      |  141 -
 .../jgroups/oswego/concurrent/WaitableByte.java |  238 -
 .../jgroups/oswego/concurrent/WaitableChar.java |  170 -
 .../oswego/concurrent/WaitableDouble.java       |  173 -
 .../oswego/concurrent/WaitableFloat.java        |  173 -
 .../jgroups/oswego/concurrent/WaitableInt.java  |  239 -
 .../jgroups/oswego/concurrent/WaitableLong.java |  239 -
 .../jgroups/oswego/concurrent/WaitableRef.java  |  112 -
 .../oswego/concurrent/WaitableShort.java        |  238 -
 .../concurrent/WaiterPreferenceSemaphore.java   |  155 -
 .../WriterPreferenceReadWriteLock.java          |  337 --
 .../org/jgroups/oswego/concurrent/package.html  |  998 ----
 .../java/com/gemstone/org/jgroups/overview.html |   15 -
 .../java/com/gemstone/org/jgroups/package.html  |    5 -
 .../persistence/CannotConnectException.java     |   55 -
 .../CannotCreateSchemaException.java            |   45 -
 .../persistence/CannotPersistException.java     |   44 -
 .../persistence/CannotRemoveException.java      |   45 -
 .../persistence/CannotRetrieveException.java    |   44 -
 .../persistence/DBPersistenceManager.java       |  877 ----
 .../persistence/FilePersistenceManager.java     |  173 -
 .../jgroups/persistence/PersistenceFactory.java |  207 -
 .../jgroups/persistence/PersistenceManager.java |   69 -
 .../org/jgroups/persistence/package.html        |    5 -
 .../com/gemstone/org/jgroups/primarychanges.txt |   80 -
 .../gemstone/org/jgroups/protocols/AUTH.java    |  454 --
 .../org/jgroups/protocols/AUTOCONF.java         |  249 -
 .../org/jgroups/protocols/AuthHeader.java       |  108 -
 .../gemstone/org/jgroups/protocols/CAUSAL.java  |  296 --
 .../org/jgroups/protocols/COMPRESS.java         |  188 -
 .../org/jgroups/protocols/DEADLOCK.java         |  250 -
 .../gemstone/org/jgroups/protocols/DELAY.java   |  116 -
 .../com/gemstone/org/jgroups/protocols/DESIGN   |  283 --
 .../gemstone/org/jgroups/protocols/DISCARD.java |  150 -
 .../gemstone/org/jgroups/protocols/DUMMY.java   |   85 -
 .../org/jgroups/protocols/DUMMY_TP.java         |   84 -
 .../gemstone/org/jgroups/protocols/Digest.java  |   38 -
 .../org/jgroups/protocols/Discovery.java        |  484 --
 .../gemstone/org/jgroups/protocols/ENCRYPT.java | 1390 ------
 .../org/jgroups/protocols/ENCRYPT1_4.java       |  566 ---
 .../gemstone/org/jgroups/protocols/EXAMPLE.java |  104 -
 .../com/gemstone/org/jgroups/protocols/FC.java  | 1025 ----
 .../com/gemstone/org/jgroups/protocols/FD.java  | 1100 -----
 .../gemstone/org/jgroups/protocols/FD_PID.java  |  640 ---
 .../gemstone/org/jgroups/protocols/FD_PROB.java |  628 ---
 .../org/jgroups/protocols/FD_SIMPLE.java        |  357 --
 .../gemstone/org/jgroups/protocols/FD_SOCK.java | 2654 ----------
 .../org/jgroups/protocols/FD_SOCK.java.new      | 1153 -----
 .../org/jgroups/protocols/FLOWCONTROL.java      |   89 -
 .../org/jgroups/protocols/FLOW_CONTROL.java     |  317 --
 .../gemstone/org/jgroups/protocols/FLUSH.java   |  466 --
 .../gemstone/org/jgroups/protocols/FRAG.java    |  572 ---
 .../gemstone/org/jgroups/protocols/FRAG2.java   |  773 ---
 .../gemstone/org/jgroups/protocols/FRAG3.java   |   48 -
 .../org/jgroups/protocols/FlushRsp.java         |   31 -
 .../org/jgroups/protocols/FragHeader.java       |   80 -
 .../gemstone/org/jgroups/protocols/GMS.java.rmi |  219 -
 .../org/jgroups/protocols/GemFireTimeSync.java  |  720 ---
 .../gemstone/org/jgroups/protocols/HDRS.java    |   53 -
 .../gemstone/org/jgroups/protocols/HTOTAL.java  |  207 -
 .../org/jgroups/protocols/LOOPBACK.java         |  115 -
 .../gemstone/org/jgroups/protocols/LOSS.java    |  118 -
 .../gemstone/org/jgroups/protocols/MERGE.java   |  376 --
 .../gemstone/org/jgroups/protocols/MERGE2.java  |  362 --
 .../gemstone/org/jgroups/protocols/MERGE3.java  |  312 --
 .../org/jgroups/protocols/MERGEFAST.java        |  118 -
 .../protocols/MessageProtocolEXAMPLE.java       |   64 -
 .../protocols/NAKACK.java.MessageProtocol       |  422 --
 .../org/jgroups/protocols/NAKACK.java.separate  |  484 --
 .../org/jgroups/protocols/NakAckHeader.java     |  113 -
 .../org/jgroups/protocols/PARTITIONER.java      |  185 -
 .../gemstone/org/jgroups/protocols/PERF.java    |  284 --
 .../gemstone/org/jgroups/protocols/PERF_TP.java |  172 -
 .../org/jgroups/protocols/PIGGYBACK.java        |  271 --
 .../gemstone/org/jgroups/protocols/PING.java    |  297 --
 .../org/jgroups/protocols/PRINTMETHODS.java     |   64 -
 .../org/jgroups/protocols/PRINTOBJS.java        |  120 -
 .../org/jgroups/protocols/PerfHeader.java       |  451 --
 .../org/jgroups/protocols/PingHeader.java       |   79 -
 .../gemstone/org/jgroups/protocols/PingRsp.java |  107 -
 .../org/jgroups/protocols/PingSender.java       |  109 -
 .../org/jgroups/protocols/PingWaiter.java       |  301 --
 .../gemstone/org/jgroups/protocols/QUEUE.java   |  184 -
 .../jgroups/protocols/RpcProtocolEXAMPLE.java   |   64 -
 .../gemstone/org/jgroups/protocols/SHUFFLE.java |  146 -
 .../gemstone/org/jgroups/protocols/SIZE.java    |  186 -
 .../gemstone/org/jgroups/protocols/SMACK.java   |  392 --
 .../org/jgroups/protocols/STATE_TRANSFER.java   |  448 --
 .../gemstone/org/jgroups/protocols/STATS.java   |  211 -
 .../com/gemstone/org/jgroups/protocols/TCP.java |  308 --
 .../org/jgroups/protocols/TCPGOSSIP.java        |  429 --
 .../gemstone/org/jgroups/protocols/TCPPING.java |  144 -
 .../gemstone/org/jgroups/protocols/TCP_NIO.java |  118 -
 .../gemstone/org/jgroups/protocols/TOTAL.java   | 1055 ----
 .../com/gemstone/org/jgroups/protocols/TP.java  | 2012 --------
 .../gemstone/org/jgroups/protocols/TP.java.mt   | 1522 ------
 .../gemstone/org/jgroups/protocols/TRACE.java   |   47 -
 .../gemstone/org/jgroups/protocols/TUNNEL.java  |  459 --
 .../org/jgroups/protocols/TcpHeader.java        |   55 -
 .../org/jgroups/protocols/TpHeader.java         |   64 -
 .../protocols/TransportedVectorTime.java        |  185 -
 .../org/jgroups/protocols/TunnelHeader.java     |   47 -
 .../com/gemstone/org/jgroups/protocols/UDP.java | 1462 ------
 .../gemstone/org/jgroups/protocols/UDP.java.mt  | 1005 ----
 .../jgroups/protocols/UDP.java.packethandler    |  592 ---
 .../gemstone/org/jgroups/protocols/UDP_NIO.java | 1567 ------
 .../gemstone/org/jgroups/protocols/UNICAST.java |  977 ----
 .../org/jgroups/protocols/UdpHeader.java        |   62 -
 .../org/jgroups/protocols/VERIFY_SUSPECT.java   |  470 --
 .../org/jgroups/protocols/VIEW_ENFORCER.java    |   81 -
 .../org/jgroups/protocols/VIEW_SYNC.java        |  499 --
 .../org/jgroups/protocols/VectorTime.java       |  270 --
 .../gemstone/org/jgroups/protocols/WANPING.java |  106 -
 .../gemstone/org/jgroups/protocols/WANPIPE.java |  441 --
 .../org/jgroups/protocols/WanPipeAddress.java   |  140 -
 .../gemstone/org/jgroups/protocols/dump2.log    |    0
 .../jgroups/protocols/obsolete/ENCRYPT.java.txt |  408 --
 .../org/jgroups/protocols/obsolete/FC.java.txt  |  643 ---
 .../jgroups/protocols/obsolete/FD_RAND.java.txt |  287 --
 .../jgroups/protocols/obsolete/FD_SHUN.java.txt |  323 --
 .../org/jgroups/protocols/obsolete/TCP.java.txt |  493 --
 .../org/jgroups/protocols/obsolete/UDP.java.txt | 1921 --------
 .../jgroups/protocols/obsolete/UNIFORM.java.txt |  349 --
 .../gemstone/org/jgroups/protocols/package.html |    6 -
 .../jgroups/protocols/pbcast/ClientGmsImpl.java |  907 ----
 .../jgroups/protocols/pbcast/CoordGmsImpl.java  | 1103 -----
 .../org/jgroups/protocols/pbcast/DESIGN         |  478 --
 .../org/jgroups/protocols/pbcast/Digest.java    |  534 ---
 .../jgroups/protocols/pbcast/Digest.java.old    |  558 ---
 .../org/jgroups/protocols/pbcast/FD.java        |  273 --
 .../org/jgroups/protocols/pbcast/GMS.java       | 2732 -----------
 .../org/jgroups/protocols/pbcast/GmsImpl.java   |  111 -
 .../org/jgroups/protocols/pbcast/Gossip.java    |  134 -
 .../org/jgroups/protocols/pbcast/JoinRsp.java   |  126 -
 .../org/jgroups/protocols/pbcast/MergeData.java |  118 -
 .../org/jgroups/protocols/pbcast/NAKACK.java    | 1631 -------
 .../jgroups/protocols/pbcast/NakAckHeader.java  |  148 -
 .../org/jgroups/protocols/pbcast/PBCAST.java    | 1043 ----
 .../protocols/pbcast/ParticipantGmsImpl.java    |  371 --
 .../jgroups/protocols/pbcast/PbcastHeader.java  |  110 -
 .../org/jgroups/protocols/pbcast/README         |  140 -
 .../org/jgroups/protocols/pbcast/STABLE.java    |  907 ----
 .../jgroups/protocols/pbcast/STABLE.java.latest |  897 ----
 .../jgroups/protocols/pbcast/STABLE.java.new    |  890 ----
 .../jgroups/protocols/pbcast/STABLE.java.old    |  855 ----
 .../protocols/pbcast/STATE_TRANSFER.java        |  461 --
 .../org/jgroups/protocols/pbcast/package.html   |    5 -
 .../org/jgroups/protocols/ring/RingNode.java    |   26 -
 .../protocols/ring/RingNodeFlowControl.java     |  135 -
 .../org/jgroups/protocols/ring/RingToken.java   |  245 -
 .../org/jgroups/protocols/ring/TcpRingNode.java |  205 -
 .../protocols/ring/TokenLostException.java      |   63 -
 .../org/jgroups/protocols/ring/package.html     |    5 -
 .../org/jgroups/spi/GFBasicAdapter.java         |  112 -
 .../gemstone/org/jgroups/spi/GFPeerAdapter.java |  185 -
 .../jgroups/stack/AckMcastReceiverWindow.java   |  169 -
 .../org/jgroups/stack/AckMcastSenderWindow.java |  601 ---
 .../org/jgroups/stack/AckReceiverWindow.java    |  184 -
 .../org/jgroups/stack/AckSenderWindow.java      |  354 --
 .../org/jgroups/stack/BoundedLinkedHashMap.java |   91 -
 .../org/jgroups/stack/Configurator.java         |  764 ---
 .../org/jgroups/stack/GFBasicAdapterImpl.java   |  596 ---
 .../org/jgroups/stack/GFPeerAdapterImpl.java    |  338 --
 .../org/jgroups/stack/GossipClient.java         |  817 ----
 .../gemstone/org/jgroups/stack/GossipData.java  |  232 -
 .../org/jgroups/stack/GossipServer.java         |  633 ---
 .../gemstone/org/jgroups/stack/Interval.java    |   40 -
 .../gemstone/org/jgroups/stack/IpAddress.java   |  780 ---
 .../org/jgroups/stack/LogicalAddress.java       |  370 --
 .../org/jgroups/stack/MessageProtocol.java      |  243 -
 .../org/jgroups/stack/NakReceiverWindow.java    |  914 ----
 .../gemstone/org/jgroups/stack/Protocol.java    |  837 ----
 .../org/jgroups/stack/ProtocolObserver.java     |   81 -
 .../org/jgroups/stack/ProtocolStack.java        |  506 --
 .../org/jgroups/stack/Retransmitter.java        |  480 --
 .../com/gemstone/org/jgroups/stack/Router.java  |  577 ---
 .../gemstone/org/jgroups/stack/RouterStub.java  |  419 --
 .../gemstone/org/jgroups/stack/RpcProtocol.java |  166 -
 .../org/jgroups/stack/SockCreatorImpl.java      |   59 -
 .../org/jgroups/stack/StateTransferInfo.java    |   64 -
 .../com/gemstone/org/jgroups/stack/package.html |    5 -
 .../gemstone/org/jgroups/util/AckCollector.java |  149 -
 .../gemstone/org/jgroups/util/BoundedList.java  |   53 -
 .../com/gemstone/org/jgroups/util/Buffer.java   |   64 -
 .../com/gemstone/org/jgroups/util/Command.java  |   16 -
 .../com/gemstone/org/jgroups/util/CondVar.java  |  139 -
 .../org/jgroups/util/ConnectionWatcher.java     |   41 -
 .../jgroups/util/ContextObjectInputStream.java  |   91 -
 .../util/ExposedBufferedInputStream.java        |   61 -
 .../util/ExposedBufferedOutputStream.java       |   44 -
 .../util/ExposedByteArrayInputStream.java       |   58 -
 .../util/ExposedByteArrayOutputStream.java      |   31 -
 .../jgroups/util/ExposedDataOutputStream.java   |   31 -
 .../org/jgroups/util/ExternalStrings.java       |  832 ----
 .../gemstone/org/jgroups/util/GFLogWriter.java  |   73 -
 .../org/jgroups/util/GFStringIdImpl.java        |   84 -
 .../org/jgroups/util/GemFireTracer.java         |  473 --
 .../org/jgroups/util/GetNetworkInterfaces.java  |   34 -
 .../org/jgroups/util/LinkedListQueue.java       |  422 --
 .../com/gemstone/org/jgroups/util/List.java     |  462 --
 .../jgroups/util/MagicObjectInputStream.java    |   55 -
 .../jgroups/util/MagicObjectOutputStream.java   |   60 -
 .../gemstone/org/jgroups/util/Marshaller.java   |  152 -
 .../org/jgroups/util/NullReadWriteLock.java     |   25 -
 .../com/gemstone/org/jgroups/util/NullSync.java |   26 -
 .../gemstone/org/jgroups/util/PrintXMLTree.java |  168 -
 .../com/gemstone/org/jgroups/util/Promise.java  |  162 -
 .../com/gemstone/org/jgroups/util/Proxy.java    |  870 ----
 .../com/gemstone/org/jgroups/util/Queue.java    |  653 ---
 .../org/jgroups/util/Queue.java.concurrent      |  113 -
 .../com/gemstone/org/jgroups/util/Queue2.java   |  715 ---
 .../org/jgroups/util/QueueClosedException.java  |   29 -
 .../com/gemstone/org/jgroups/util/Range.java    |   58 -
 .../org/jgroups/util/ReentrantLatch.java        |   65 -
 .../org/jgroups/util/ReusableThread.java        |  295 --
 .../java/com/gemstone/org/jgroups/util/Rsp.java |   82 -
 .../com/gemstone/org/jgroups/util/RspList.java  |  193 -
 .../gemstone/org/jgroups/util/Scheduler.java    |  270 --
 .../org/jgroups/util/SchedulerListener.java     |   29 -
 .../gemstone/org/jgroups/util/SockCreator.java  |   40 -
 .../com/gemstone/org/jgroups/util/Stack.java    |  108 -
 .../gemstone/org/jgroups/util/Streamable.java   |   26 -
 .../org/jgroups/util/StreamableFixedID.java     |   35 -
 .../com/gemstone/org/jgroups/util/StringId.java |   58 -
 .../gemstone/org/jgroups/util/ThreadPool.java   |  105 -
 .../org/jgroups/util/TimeScheduler.java         |  720 ---
 .../gemstone/org/jgroups/util/TimedWriter.java  |  295 --
 .../com/gemstone/org/jgroups/util/Util.java     | 1869 --------
 .../org/jgroups/util/VersionedStreamable.java   |   34 -
 .../com/gemstone/org/jgroups/util/package.html  |    5 -
 .../java/com/gemstone/org/jgroups/util/todo.txt |   80 -
 .../gemstone/org/jgroups/conf/jg-magic-map.dtd  |   55 -
 .../gemstone/org/jgroups/conf/jg-magic-map.xml  |  269 --
 .../com/gemstone/org/jgroups/log4j2-default.xml |   21 -
 .../org/jgroups/stack/jboss-service.xml         |  146 -
 .../gemstone/org/jgroups/JChannelJUnitTest.java |  287 --
 settings.gradle                                 |    1 -
 732 files changed, 23803 insertions(+), 141457 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/d63113c6/build.gradle
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/d63113c6/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelGatewaySenderQueue.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/d63113c6/gemfire-core/src/test/java/com/gemstone/gemfire/cache/management/MemoryThresholdsOffHeapDUnitTest.java
----------------------------------------------------------------------
diff --cc gemfire-core/src/test/java/com/gemstone/gemfire/cache/management/MemoryThresholdsOffHeapDUnitTest.java
index 5399d28,fcaf99d..0552641
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/management/MemoryThresholdsOffHeapDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/management/MemoryThresholdsOffHeapDUnitTest.java
@@@ -407,7 -404,7 +404,7 @@@ public class MemoryThresholdsOffHeapDUn
    }
    
    public void testGettersAndSetters() {
-     getSystem(getServerProperties(0));
 -    getSystem(getServerProperties());
++    getSystem(getOffHeapProperties());
      ResourceManager rm = getCache().getResourceManager();
      assertEquals(0.0f, rm.getCriticalOffHeapPercentage());
      assertEquals(0.0f, rm.getEvictionOffHeapPercentage());
@@@ -773,7 -768,7 +768,7 @@@
          regionName, true/*createPR*/, false/*notifyBySubscription*/, redundancy);
      accessor.invoke(new SerializableCallable() {
        public Object call() throws Exception {
-         getSystem(getServerProperties(mcastPort));
 -        getSystem(getServerProperties());
++        getSystem(getOffHeapProperties());
          getCache();
          AttributesFactory factory = new AttributesFactory();        
          PartitionAttributesFactory paf = new PartitionAttributesFactory();
@@@ -1116,7 -1110,7 +1110,7 @@@
      @Override
      public void run2() throws CacheException {
        // Assert some level of connectivity
-       getSystem(getServerProperties(mcastPort));      
 -      getSystem(getServerProperties());      
++      getSystem(getOffHeapProperties());      
        InternalResourceManager irm = (InternalResourceManager)getCache().getResourceManager();
        irm.setCriticalOffHeapPercentage(90f);
        AttributesFactory<Integer, String> af = new AttributesFactory<Integer, String>();
@@@ -1614,7 -1606,7 +1606,7 @@@
  
      server.invoke(new SerializableCallable() {
        public Object call() throws Exception {
-         getSystem(getServerProperties(mcastPort));
 -        getSystem(getServerProperties());
++        getSystem(getOffHeapProperties());
          GemFireCacheImpl cache = (GemFireCacheImpl)getCache();
  
          InternalResourceManager irm = cache.getResourceManager();
@@@ -1819,8 -1811,9 +1811,9 @@@
      });
    }
    
 -  private Properties getServerProperties() {
 +  private Properties getOffHeapProperties() {
      Properties p = new Properties();
+     p.setProperty(DistributionConfig.LOCATORS_NAME, "localhost["+getDUnitLocatorPort()+"]");
      p.setProperty(DistributionConfig.OFF_HEAP_MEMORY_SIZE_NAME, "1m");
      return p;
    }



[46/50] [abbrv] incubator-geode git commit: another attempt to fix this test's configuration

Posted by ma...@apache.org.
another attempt to fix this test's configuration

For some reason one of the build machines is causing a problem with this
test.  It should be using the same ip address for both bind-address and
locator-name but something is messing with it.  I've changed it to use
host addresses instead.  The test passes on the build machine with or
without this change when run as a single test.


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

Branch: refs/heads/feature/GEODE-53
Commit: ac0b68ecd3a85a4b8c1bf70e8e9d242429a7ea67
Parents: c9d8778
Author: Bruce Schuchardt <bs...@pivotal.io>
Authored: Fri Nov 20 14:50:38 2015 -0800
Committer: Bruce Schuchardt <bs...@pivotal.io>
Committed: Fri Nov 20 14:51:32 2015 -0800

----------------------------------------------------------------------
 .../membership/gms/locator/GMSLocatorRecoveryJUnitTest.java      | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ac0b68ec/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/locator/GMSLocatorRecoveryJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/locator/GMSLocatorRecoveryJUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/locator/GMSLocatorRecoveryJUnitTest.java
index 8484f7c..49e1c48 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/locator/GMSLocatorRecoveryJUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/locator/GMSLocatorRecoveryJUnitTest.java
@@ -136,8 +136,8 @@ public class GMSLocatorRecoveryJUnitTest {
       nonDefault.put(DistributionConfig.MCAST_PORT_NAME, "0");
       nonDefault.put(DistributionConfig.LOG_FILE_NAME, "");
       nonDefault.put(DistributionConfig.LOG_LEVEL_NAME, "fine");
-      nonDefault.put(DistributionConfig.LOCATORS_NAME, localHost.getHostName()+'['+port+']');
-      nonDefault.put(DistributionConfig.BIND_ADDRESS_NAME, localHost.getHostName());
+      nonDefault.put(DistributionConfig.LOCATORS_NAME, localHost.getHostAddress()+'['+port+']');
+      nonDefault.put(DistributionConfig.BIND_ADDRESS_NAME, localHost.getHostAddress());
       DistributionConfigImpl config = new DistributionConfigImpl(nonDefault);
       RemoteTransportConfig transport = new RemoteTransportConfig(config,
           DistributionManager.NORMAL_DM_TYPE);