incubator-geode git commit: GEODE-2043: change makeTombstone to handle exception

2016-10-27 Thread dschneider
Repository: incubator-geode
Updated Branches:
  refs/heads/feature/GEODE-2043 [created] f2dd46182


GEODE-2043: change makeTombstone to handle exception

Now if makeTombstone has an exception but had already changed
the region entry value to a TOMBSTONE, it will now change
the value to REMOVE_PHASE2 instead of leaving it as a TOMBSTONE.


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

Branch: refs/heads/feature/GEODE-2043
Commit: f2dd46182a88e58438b9914d8b27c3638d5e2f1c
Parents: 3ff33be
Author: Darrel Schneider 
Authored: Thu Oct 27 16:05:08 2016 -0700
Committer: Darrel Schneider 
Committed: Thu Oct 27 16:05:08 2016 -0700

--
 .../internal/cache/AbstractRegionEntry.java |  15 ++-
 .../internal/cache/AbstractRegionEntryTest.java | 112 +++
 2 files changed, 125 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f2dd4618/geode-core/src/main/java/org/apache/geode/internal/cache/AbstractRegionEntry.java
--
diff --git 
a/geode-core/src/main/java/org/apache/geode/internal/cache/AbstractRegionEntry.java
 
b/geode-core/src/main/java/org/apache/geode/internal/cache/AbstractRegionEntry.java
index 4e1f0aa..2138af9 100644
--- 
a/geode-core/src/main/java/org/apache/geode/internal/cache/AbstractRegionEntry.java
+++ 
b/geode-core/src/main/java/org/apache/geode/internal/cache/AbstractRegionEntry.java
@@ -209,7 +209,7 @@ public abstract class AbstractRegionEntry implements 
RegionEntry, HashEntryhttp://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f2dd4618/geode-core/src/test/java/org/apache/geode/internal/cache/AbstractRegionEntryTest.java
--
diff --git 
a/geode-core/src/test/java/org/apache/geode/internal/cache/AbstractRegionEntryTest.java
 
b/geode-core/src/test/java/org/apache/geode/internal/cache/AbstractRegionEntryTest.java
new file mode 100644
index 000..36e3e30
--- /dev/null
+++ 
b/geode-core/src/test/java/org/apache/geode/internal/cache/AbstractRegionEntryTest.java
@@ -0,0 +1,112 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.geode.internal.cache;
+
+import static org.junit.Assert.*;
+import static org.mockito.Mockito.*;
+
+import org.assertj.core.api.Assertions;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import org.apache.geode.internal.cache.versions.RegionVersionVector;
+import org.apache.geode.internal.cache.versions.VersionTag;
+import org.apache.geode.internal.offheap.annotations.Unretained;
+import 
org.apache.geode.internal.util.concurrent.CustomEntryConcurrentHashMap.HashEntry;
+import org.apache.geode.test.junit.categories.UnitTest;
+
+@Category(UnitTest.class)
+public class AbstractRegionEntryTest {
+  
+  @Test
+  public void 
whenMakeTombstoneHasSetValueThatThrowsExceptionDoesNotChangeValueToTombstone() 
throws RegionClearedException {
+LocalRegion lr = mock(LocalRegion.class);
+RegionVersionVector rvv = mock(RegionVersionVector.class);
+when(lr.getVersionVector()).thenReturn(rvv);
+VersionTag vt = mock(VersionTag.class);
+Object value = "value";
+AbstractRegionEntry re = new TestableRegionEntry(lr, value);
+assertEquals(value, re.getValueField());
+Assertions.assertThatThrownBy(() -> re.makeTombstone(lr, vt))
+.isInstanceOf(RuntimeException.class)
+.hasMessage("throw exception on setValue(TOMBSTONE)");
+assertEquals(Token.REMOVED_PHASE2, re.getValueField());
+  }
+
+  
+  public static class TestableRegionEntry extends AbstractRegionEntry {
+
+private Object value;
+
+protected TestableRegionEntry(RegionEntryContext context, Object value) {
+  super(context, value);
+}
+
+@Override

incubator-geode git commit: GEODE-2012: always write stat types to archive

2016-10-27 Thread klund
Repository: incubator-geode
Updated Branches:
  refs/heads/develop e9b509580 -> 3ff33be20


GEODE-2012: always write stat types to archive

* write additional tests for stat archive rolling
* expose bug GEODE-2012 in StatTypesAreRolledOverRegressionTest
* fix failure in StatTypesAreRolledOverRegressionTest


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

Branch: refs/heads/develop
Commit: 3ff33be200484ff4c8614a0d97e3612e1ca85ac4
Parents: e9b5095
Author: Kirk Lund 
Authored: Wed Oct 26 14:07:44 2016 -0700
Committer: Kirk Lund 
Committed: Thu Oct 27 12:34:43 2016 -0700

--
 .../org/apache/geode/internal/NanoTimer.java|   6 +-
 .../geode/internal/i18n/LocalizedStrings.java   |   2 +-
 .../internal/statistics/HostStatSampler.java|  31 ++-
 .../internal/statistics/SampleCollector.java|  10 +-
 .../internal/statistics/SimpleStatSampler.java  |   7 +-
 .../concurrent/StoppableCountDownLatch.java |   8 +-
 .../DiskSpaceLimitIntegrationTest.java  | 139 
 .../FileSizeLimitIntegrationTest.java   | 128 
 .../StatTypesAreRolledOverRegressionTest.java   | 209 +++
 9 files changed, 524 insertions(+), 16 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3ff33be2/geode-core/src/main/java/org/apache/geode/internal/NanoTimer.java
--
diff --git a/geode-core/src/main/java/org/apache/geode/internal/NanoTimer.java 
b/geode-core/src/main/java/org/apache/geode/internal/NanoTimer.java
index 12e91f8..247f9a9 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/NanoTimer.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/NanoTimer.java
@@ -38,7 +38,7 @@ package org.apache.geode.internal;
  * 
  * 
  */
-public final class NanoTimer {
+public class NanoTimer {
 
   public static final long NANOS_PER_MILLISECOND = 100;
 
@@ -73,7 +73,7 @@ public final class NanoTimer {
   /**
* For unit testing
*/
-  NanoTimer(TimeService ts) {
+  protected NanoTimer(TimeService ts) {
 this.timeService = ts;
 this.lastResetTime = ts.getTime();
 this.constructionTime = this.lastResetTime;
@@ -164,7 +164,7 @@ public final class NanoTimer {
   /**
* Allows unit tests to insert a deterministic clock for testing.
*/
-  interface TimeService {
+  public interface TimeService {
 /**
  * Returns the current time.
  */

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3ff33be2/geode-core/src/main/java/org/apache/geode/internal/i18n/LocalizedStrings.java
--
diff --git 
a/geode-core/src/main/java/org/apache/geode/internal/i18n/LocalizedStrings.java 
b/geode-core/src/main/java/org/apache/geode/internal/i18n/LocalizedStrings.java
index 210539b..7638cb3 100755
--- 
a/geode-core/src/main/java/org/apache/geode/internal/i18n/LocalizedStrings.java
+++ 
b/geode-core/src/main/java/org/apache/geode/internal/i18n/LocalizedStrings.java
@@ -1265,7 +1265,7 @@ public class LocalizedStrings {
   "Could not free space in {0} directory.  The space used is {1} which 
exceeds the configured limit of {2}.");
 
   public static final StringId ManagerLogWriter_DELETED_INACTIVE__0___1_ =
-  new StringId(1797, "Deleted inactive  {0}  \"{1}\".");
+  new StringId(1797, "Deleted inactive {0} \"{1}\".");
   public static final StringId ManagerLogWriter_SWITCHING_TO_LOG__0 =
   new StringId(1798, "Switching to log {0}");
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3ff33be2/geode-core/src/main/java/org/apache/geode/internal/statistics/HostStatSampler.java
--
diff --git 
a/geode-core/src/main/java/org/apache/geode/internal/statistics/HostStatSampler.java
 
b/geode-core/src/main/java/org/apache/geode/internal/statistics/HostStatSampler.java
index 6d7b967..494362c 100644
--- 
a/geode-core/src/main/java/org/apache/geode/internal/statistics/HostStatSampler.java
+++ 
b/geode-core/src/main/java/org/apache/geode/internal/statistics/HostStatSampler.java
@@ -89,12 +89,20 @@ public abstract class HostStatSampler
 
   private final CallbackSampler callbackSampler;
 
+  private final NanoTimer timer;
+
   protected HostStatSampler(CancelCriterion stopper, StatSamplerStats 
samplerStats) {
+this(stopper, samplerStats, new NanoTimer());
+  }
+
+  protected HostStatSampler(CancelCriterion stopper, StatSamplerStats 
samplerStats,
+  NanoTimer timer) {
 this.stopper = 

incubator-geode git commit: GEODE-2017: Fixed formatting

2016-10-27 Thread boglesby
Repository: incubator-geode
Updated Branches:
  refs/heads/develop 7b11d0843 -> e9b509580


GEODE-2017: Fixed formatting


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

Branch: refs/heads/develop
Commit: e9b509580de948145e145b8f54d50aeaa7d0867f
Parents: 7b11d08
Author: Barry Oglesby 
Authored: Thu Oct 27 11:13:27 2016 -0700
Committer: Barry Oglesby 
Committed: Thu Oct 27 11:14:17 2016 -0700

--
 .../parallel/ParallelQueueRemovalMessage.java   |  6 +-
 .../internal/cache/BucketRegionQueueHelper.java | 31 
 .../ParallelQueueRemovalMessageJUnitTest.java   | 77 
 3 files changed, 67 insertions(+), 47 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/e9b50958/geode-core/src/main/java/org/apache/geode/internal/cache/wan/parallel/ParallelQueueRemovalMessage.java
--
diff --git 
a/geode-core/src/main/java/org/apache/geode/internal/cache/wan/parallel/ParallelQueueRemovalMessage.java
 
b/geode-core/src/main/java/org/apache/geode/internal/cache/wan/parallel/ParallelQueueRemovalMessage.java
index bad3d3c..921af9c 100644
--- 
a/geode-core/src/main/java/org/apache/geode/internal/cache/wan/parallel/ParallelQueueRemovalMessage.java
+++ 
b/geode-core/src/main/java/org/apache/geode/internal/cache/wan/parallel/ParallelQueueRemovalMessage.java
@@ -137,11 +137,13 @@ public class ParallelQueueRemovalMessage extends 
PooledDistributionMessage {
   isDestroyed = true;
 }
 
-// Even if BucketRegionQueue does not have the key, it 
could be in the tempQueue
+// Even if BucketRegionQueue does not have the key, it 
could be in the
+// tempQueue
 // remove it from there..defect #49196
 destroyFromTempQueue(brq.getPartitionedRegion(), 
(Integer) bId, key);
 
-// Finally, add the key to the failed batch removal 
keys so that it is definitely removed from the bucket region queue
+// Finally, add the key to the failed batch removal 
keys so that it is
+// definitely removed from the bucket region queue
 brq.addToFailedBatchRemovalMessageKeys(key);
   } finally {
 brq.getInitializationLock().readLock().unlock();

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/e9b50958/geode-core/src/test/java/org/apache/geode/internal/cache/BucketRegionQueueHelper.java
--
diff --git 
a/geode-core/src/test/java/org/apache/geode/internal/cache/BucketRegionQueueHelper.java
 
b/geode-core/src/test/java/org/apache/geode/internal/cache/BucketRegionQueueHelper.java
index 68b29c2..64a49c6 100644
--- 
a/geode-core/src/test/java/org/apache/geode/internal/cache/BucketRegionQueueHelper.java
+++ 
b/geode-core/src/test/java/org/apache/geode/internal/cache/BucketRegionQueueHelper.java
@@ -1,18 +1,16 @@
 /*
- * 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
+ * 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
+ * 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.
+ * 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, 

[23/50] [abbrv] incubator-geode git commit: GEODE-288: move admin packages to internal

2016-10-27 Thread klund
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/20a32286/geode-core/src/main/java/org/apache/geode/internal/admin/api/jmx/impl/AdminDistributedSystemJmxImpl.java
--
diff --git 
a/geode-core/src/main/java/org/apache/geode/internal/admin/api/jmx/impl/AdminDistributedSystemJmxImpl.java
 
b/geode-core/src/main/java/org/apache/geode/internal/admin/api/jmx/impl/AdminDistributedSystemJmxImpl.java
new file mode 100755
index 000..7998091
--- /dev/null
+++ 
b/geode-core/src/main/java/org/apache/geode/internal/admin/api/jmx/impl/AdminDistributedSystemJmxImpl.java
@@ -0,0 +1,2289 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more 
contributor license
+ * agreements. See the NOTICE file distributed with this work for additional 
information regarding
+ * copyright ownership. The ASF licenses this file to You under the Apache 
License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the 
License. You may obtain a
+ * copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software 
distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 
KIND, either express
+ * or implied. See the License for the specific language governing permissions 
and limitations under
+ * the License.
+ */
+package org.apache.geode.internal.admin.api.jmx.impl;
+
+import org.apache.geode.DataSerializer;
+import org.apache.geode.SystemFailure;
+import org.apache.geode.internal.admin.api.AdminException;
+import org.apache.geode.internal.admin.api.CacheServer;
+import org.apache.geode.internal.admin.api.CacheServerConfig;
+import org.apache.geode.internal.admin.api.CacheVm;
+import org.apache.geode.internal.admin.api.CacheVmConfig;
+import org.apache.geode.internal.admin.api.DistributedSystemConfig;
+import org.apache.geode.internal.admin.api.DistributionLocator;
+import org.apache.geode.internal.admin.api.DistributionLocatorConfig;
+import org.apache.geode.internal.admin.api.GemFireHealth;
+import org.apache.geode.internal.admin.api.SystemMember;
+import org.apache.geode.internal.admin.api.SystemMemberCacheEvent;
+import org.apache.geode.internal.admin.api.SystemMemberCacheListener;
+import org.apache.geode.internal.admin.api.SystemMemberRegionEvent;
+import org.apache.geode.internal.admin.api.SystemMemberType;
+import org.apache.geode.internal.admin.api.impl.AdminDistributedSystemImpl;
+import org.apache.geode.internal.admin.api.impl.CacheServerConfigImpl;
+import org.apache.geode.internal.admin.api.impl.DistributionLocatorImpl;
+import org.apache.geode.cache.persistence.PersistentID;
+import org.apache.geode.distributed.DistributedMember;
+import org.apache.geode.distributed.internal.DistributionConfig;
+import org.apache.geode.distributed.internal.InternalDistributedSystem;
+import 
org.apache.geode.distributed.internal.membership.InternalDistributedMember;
+import org.apache.geode.internal.Assert;
+import org.apache.geode.internal.admin.Alert;
+import org.apache.geode.internal.admin.*;
+import org.apache.geode.internal.admin.remote.UpdateAlertDefinitionMessage;
+import org.apache.geode.internal.i18n.LocalizedStrings;
+import org.apache.geode.internal.logging.InternalLogWriter;
+import org.apache.geode.internal.logging.LogService;
+import org.apache.geode.internal.logging.log4j.LocalizedMessage;
+import org.apache.logging.log4j.Logger;
+
+import javax.management.*;
+import javax.management.modelmbean.ModelMBean;
+import javax.management.openmbean.*;
+import java.io.*;
+import java.net.InetAddress;
+import java.net.UnknownHostException;
+import java.util.*;
+import java.util.concurrent.atomic.AtomicInteger;
+
+/**
+ * Provides MBean support for managing a GemFire distributed system.
+ * 
+ * TODO: refactor to implement DistributedSystem and delegate to instance of 
DistributedSystemImpl.
+ * Wrap all delegate calls w/ e.printStackTrace() since the HttpAdaptor 
devours them (what to do w/
+ * template methods then?)
+ *
+ * @since GemFire 3.5
+ */
+public class AdminDistributedSystemJmxImpl extends AdminDistributedSystemImpl
+implements ManagedResource, DistributedSystemConfig, StatAlertsAggregator {
+
+  private static final Logger logger = LogService.getLogger();
+
+  private Properties mailProps;
+
+  // The file name where the StatAlertDefinitions would be serialized
+  private String statAlertDefnSerFile = System.getProperty("user.dir");
+
+  /**
+   * Simple counter incrementing on each notification. This this currently 
resets at every restart
+   * of Agent
+   */
+  private final AtomicInteger notificationSequenceNumber = new AtomicInteger();
+
+  /**
+   * Variable to indicate if there are no Rmi clients connected.
+   */
+  private volatile boolean isRmiClientCountZero;
+
+  /**
+   * Variable to indicate if Statistics Alert definitions could be 

[32/50] [abbrv] incubator-geode git commit: GEODE-288: move admin packages to internal

2016-10-27 Thread klund
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/20a32286/geode-core/src/main/java/org/apache/geode/internal/admin/api/AlertLevel.java
--
diff --git 
a/geode-core/src/main/java/org/apache/geode/internal/admin/api/AlertLevel.java 
b/geode-core/src/main/java/org/apache/geode/internal/admin/api/AlertLevel.java
new file mode 100755
index 000..1bcc0e6
--- /dev/null
+++ 
b/geode-core/src/main/java/org/apache/geode/internal/admin/api/AlertLevel.java
@@ -0,0 +1,168 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more 
contributor license
+ * agreements. See the NOTICE file distributed with this work for additional 
information regarding
+ * copyright ownership. The ASF licenses this file to You under the Apache 
License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the 
License. You may obtain a
+ * copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software 
distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 
KIND, either express
+ * or implied. See the License for the specific language governing permissions 
and limitations under
+ * the License.
+ */
+package org.apache.geode.internal.admin.api;
+
+import org.apache.geode.internal.admin.Alert;
+import org.apache.geode.internal.i18n.LocalizedStrings;
+
+/**
+ * Type-safe enumeration for {@link org.apache.geode.internal.admin.api.Alert 
Alert} level.
+ *
+ * @since GemFire 3.5
+ * @deprecated as of 7.0 use the management
+ * package instead
+ */
+public class AlertLevel implements java.io.Serializable {
+  private static final long serialVersionUID = -4752438966587392126L;
+
+  public static final AlertLevel WARNING = new AlertLevel(Alert.WARNING, 
"WARNING");
+  public static final AlertLevel ERROR = new AlertLevel(Alert.ERROR, "ERROR");
+  public static final AlertLevel SEVERE = new AlertLevel(Alert.SEVERE, 
"SEVERE");
+
+  public static final AlertLevel OFF = new AlertLevel(Alert.OFF, "OFF");
+
+  /** The severity level of this AlertLevel. Greater is more severe. */
+  private final transient int severity;
+
+  /** The name of this AlertLevel. */
+  private final transient String name;
+
+  // The 4 declarations below are necessary for serialization
+  /** int used as ordinal to represent this AlertLevel */
+  public final int ordinal = nextOrdinal++;
+
+  private static int nextOrdinal = 0;
+
+  private static final AlertLevel[] VALUES = {WARNING, ERROR, SEVERE, OFF};
+
+  private Object readResolve() throws java.io.ObjectStreamException {
+return VALUES[ordinal]; // Canonicalize
+  }
+
+  /** Creates a new instance of AlertLevel. */
+  private AlertLevel(int severity, String name) {
+this.severity = severity;
+this.name = name;
+  }
+
+  /** Return the AlertLevel represented by specified ordinal */
+  public static AlertLevel fromOrdinal(int ordinal) {
+return VALUES[ordinal];
+  }
+
+  /**
+   * Returns the AlertLevel for the given severity
+   *
+   * @throws IllegalArgumentException If there is no alert level with the given
+   * severity
+   */
+  public static AlertLevel forSeverity(int severity) {
+switch (severity) {
+  case Alert.WARNING:
+return AlertLevel.WARNING;
+  case Alert.ERROR:
+return AlertLevel.ERROR;
+  case Alert.SEVERE:
+return AlertLevel.SEVERE;
+  case Alert.OFF:
+return AlertLevel.OFF;
+  default:
+throw new 
IllegalArgumentException(LocalizedStrings.AlertLevel_UNKNOWN_ALERT_SEVERITY_0
+.toLocalizedString(Integer.valueOf(severity)));
+}
+  }
+
+  /**
+   * Returns the AlertLevel with the given name
+   *
+   * @throws IllegalArgumentException If there is no alert level named 
name
+   */
+  public static AlertLevel forName(String name) {
+for (int i = 0; i < VALUES.length; i++) {
+  AlertLevel level = VALUES[i];
+  if (level.getName().equalsIgnoreCase(name)) {
+return level;
+  }
+}
+
+throw new IllegalArgumentException(
+
LocalizedStrings.AlertLevel_THERE_IS_NO_ALERT_LEVEL_0.toLocalizedString(name));
+  }
+
+  public int getSeverity() {
+return this.severity;
+  }
+
+  public String getName() {
+return this.name;
+  }
+
+  public static AlertLevel[] values() {
+return VALUES;
+  }
+
+  /**
+   * Returns a string representation for this alert level.
+   *
+   * @return the name of this alert level
+   */
+  @Override
+  public String toString() {
+return this.name /* + "=" + this.severity */;
+  }
+
+  /**
+   * Indicates whether some other object is "equal to" this one.
+   *
+   * @param other the reference object with which to compare.
+   * @return true if this object is the same as the obj argument; false 
otherwise.
+   */
+  @Override
+  public boolean equals(Object 

[30/50] [abbrv] incubator-geode git commit: GEODE-288: move admin packages to internal

2016-10-27 Thread klund
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/20a32286/geode-core/src/main/java/org/apache/geode/internal/admin/api/SystemMemberCacheServer.java
--
diff --git 
a/geode-core/src/main/java/org/apache/geode/internal/admin/api/SystemMemberCacheServer.java
 
b/geode-core/src/main/java/org/apache/geode/internal/admin/api/SystemMemberCacheServer.java
new file mode 100755
index 000..ba31538
--- /dev/null
+++ 
b/geode-core/src/main/java/org/apache/geode/internal/admin/api/SystemMemberCacheServer.java
@@ -0,0 +1,308 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more 
contributor license
+ * agreements. See the NOTICE file distributed with this work for additional 
information regarding
+ * copyright ownership. The ASF licenses this file to You under the Apache 
License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the 
License. You may obtain a
+ * copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software 
distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 
KIND, either express
+ * or implied. See the License for the specific language governing permissions 
and limitations under
+ * the License.
+ */
+package org.apache.geode.internal.admin.api;
+
+import org.apache.geode.cache.server.ServerLoadProbe;
+
+/**
+ * Administrative interface that represents a {@link 
org.apache.geode.cache.server.CacheServer
+ * CacheServer} that serves the contents of a system member's cache to clients.
+ *
+ * @see SystemMemberCache#addCacheServer
+ *
+ * @since GemFire 5.7
+ * @deprecated as of 7.0 use the management
+ * package instead
+ */
+public interface SystemMemberCacheServer {
+
+  /**
+   * Returns the port on which this cache server listens for clients to 
connect.
+   */
+  public int getPort();
+
+  /**
+   * Sets the port on which this cache server listens for clients to connect.
+   *
+   * @throws AdminException If this cache server is running
+   */
+  public void setPort(int port) throws AdminException;
+
+  /**
+   * Starts this cache server. Once the server is running, its configuration 
cannot be changed.
+   *
+   * @throws AdminException If an error occurs while starting the cache server
+   */
+  public void start() throws AdminException;
+
+  /**
+   * Returns whether or not this cache server is running
+   */
+  public boolean isRunning();
+
+  /**
+   * Stops this cache server. Note that the CacheServer can be 
reconfigured and
+   * restarted if desired.
+   */
+  public void stop() throws AdminException;
+
+  /**
+   * Updates the information about this cache server.
+   */
+  public void refresh();
+
+  /**
+   * Returns a string representing the ip address or host name that this 
server will listen on.
+   * 
+   * @return the ip address or host name that this server is to listen on
+   * @since GemFire 5.7
+   */
+  public String getBindAddress();
+
+  /**
+   * Sets the ip address or host name that this server is to listen on for 
client connections.
+   * 
+   * Setting a specific bind address will cause the cache server to always use 
this address and
+   * ignore any address specified by "server-bind-address" or "bind-address" 
in the
+   * gemfire.properties file (see
+   * {@link org.apache.geode.distributed.DistributedSystem} for a description 
of these properties).
+   * 
+   * A null value will be treated the same as the default "".
+   * 
+   * The default value does not override the gemfire.properties. If you wish 
to override the
+   * properties and want to have your server bind to all local addresses then 
use this string
+   * "0.0.0.0".
+   * 
+   * @param address the ip address or host name that this server is to listen 
on
+   * @throws AdminException if this cache server is running
+   * @since GemFire 5.7
+   */
+  public void setBindAddress(String address) throws AdminException;
+
+  /**
+   * Returns a string representing the ip address or host name that server 
locators will tell
+   * clients that this server is listening on.
+   * 
+   * @return the ip address or host name to give to clients so they can 
connect to this server
+   * @since GemFire 5.7
+   */
+  public String getHostnameForClients();
+
+  /**
+   * Sets the ip address or host name that this server is to listen on for 
client connections.
+   * 
+   * Setting a specific hostname-for-clients will cause server locators to use 
this value when
+   * telling clients how to connect to this server.
+   * 
+   * The default value causes the bind-address to be given to clients
+   * 
+   * A null value will be treated the same as the default "".
+   * 
+   * @param name the ip address or host name that will be given to clients so 
they can connect to
+   *this server
+   * @throws AdminException if this 

[01/50] [abbrv] incubator-geode git commit: Merge branch 'release/1.0.0-incubating' into develop [Forced Update!]

2016-10-27 Thread klund
Repository: incubator-geode
Updated Branches:
  refs/heads/feature/GEODE-288 a672c7d3e -> 20a32286b (forced update)


Merge branch 'release/1.0.0-incubating' 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/ddc32682
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/ddc32682
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/ddc32682

Branch: refs/heads/feature/GEODE-288
Commit: ddc326821c74c170a8fe03642d7114a0e51311d9
Parents: cd06c8c 280a407
Author: Swapnil Bawaskar 
Authored: Tue Oct 25 11:14:01 2016 -0700
Committer: Swapnil Bawaskar 
Committed: Tue Oct 25 11:14:01 2016 -0700

--
 KEYS | 171 ++
 1 file changed, 171 insertions(+)
--




[19/50] [abbrv] incubator-geode git commit: GEODE-288: move admin packages to internal

2016-10-27 Thread klund
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/20a32286/geode-core/src/main/java/org/apache/geode/internal/admin/api/jmx/impl/GemFireHealthConfigJmxImpl.java
--
diff --git 
a/geode-core/src/main/java/org/apache/geode/internal/admin/api/jmx/impl/GemFireHealthConfigJmxImpl.java
 
b/geode-core/src/main/java/org/apache/geode/internal/admin/api/jmx/impl/GemFireHealthConfigJmxImpl.java
new file mode 100644
index 000..23e9038
--- /dev/null
+++ 
b/geode-core/src/main/java/org/apache/geode/internal/admin/api/jmx/impl/GemFireHealthConfigJmxImpl.java
@@ -0,0 +1,211 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more 
contributor license
+ * agreements. See the NOTICE file distributed with this work for additional 
information regarding
+ * copyright ownership. The ASF licenses this file to You under the Apache 
License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the 
License. You may obtain a
+ * copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software 
distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 
KIND, either express
+ * or implied. See the License for the specific language governing permissions 
and limitations under
+ * the License.
+ */
+package org.apache.geode.internal.admin.api.jmx.impl;
+
+import javax.management.ObjectName;
+import javax.management.modelmbean.ModelMBean;
+
+import org.apache.geode.internal.admin.api.AdminException;
+import org.apache.geode.internal.admin.api.GemFireHealth;
+import org.apache.geode.internal.admin.api.GemFireHealthConfig;
+import org.apache.geode.internal.admin.api.impl.GemFireHealthConfigImpl;
+
+/**
+ * The JMX "managed resource" that represents the configuration for the health 
of GemFire.
+ * Basically, it provides the behavior of 
GemFireHealthConfigImpl, but does some JMX
+ * stuff like registering beans with the agent.
+ *
+ * 
+ *
+ * Unlike other ManagedResources this class cannot simply subclass
+ * GemFireHealthImpl because it instances are serialized and sent 
to other VMs. This is
+ * problematic because the other VMs most likely do not have JMX classes like
+ * ModelMBean on their classpaths. So, instead we delegate all of 
the
+ * GemFireHealthConfig behavior to another object which IS 
serialized.
+ *
+ * @see GemFireHealthJmxImpl#createDistributedSystemHealthConfig
+ *
+ *
+ * @since GemFire 3.5
+ */
+@edu.umd.cs.findbugs.annotations.SuppressWarnings(
+justification = "This class is deprecated. Also, any further changes so 
close to the release is inadvisable.")
+public class GemFireHealthConfigJmxImpl
+implements GemFireHealthConfig, ManagedResource, java.io.Serializable {
+
+  private static final long serialVersionUID = 1482719647163239953L;
+
+  /** The GemFireHealth that we help configure */
+  private GemFireHealth health;
+
+  /** The name of the MBean that will manage this resource */
+  private String mbeanName;
+
+  /** The ModelMBean that is configured to manage this resource */
+  private ModelMBean modelMBean;
+
+  /** The delegate that contains the real config state */
+  private GemFireHealthConfig delegate;
+
+  /** The object name of this managed resource */
+  private ObjectName objectName;
+
+  /// Constructors ///
+
+  /**
+   * Creates a new GemFireHealthConfigJmxImpl that configures the 
health monitoring of
+   * components running on the given host.
+   */
+  GemFireHealthConfigJmxImpl(GemFireHealthJmxImpl health, String hostName) 
throws AdminException {
+
+this.delegate = new GemFireHealthConfigImpl(hostName);
+this.health = health;
+this.mbeanName = new 
StringBuffer().append(MBEAN_NAME_PREFIX).append("GemFireHealthConfig,id=")
+
.append(MBeanUtil.makeCompliantMBeanNameProperty(health.getDistributedSystem().getId()))
+.append(",host=")
+.append((hostName == null ? "default" : 
MBeanUtil.makeCompliantMBeanNameProperty(hostName)))
+.toString();
+this.objectName = MBeanUtil.createMBean(this);
+  }
+
+  // Instance Methods //
+
+  /**
+   * Applies the changes made to this config back to the health monitor.
+   *
+   * @see GemFireHealth#setDistributedSystemHealthConfig
+   */
+  public void applyChanges() {
+String hostName = this.getHostName();
+if (hostName == null) {
+  this.health.setDefaultGemFireHealthConfig(this);
+
+} else {
+  this.health.setGemFireHealthConfig(hostName, this);
+}
+  }
+
+  public String getMBeanName() {
+return this.mbeanName;
+  }
+
+  public ModelMBean getModelMBean() {
+return this.modelMBean;
+  }
+
+  public ObjectName getObjectName() {
+return this.objectName;
+  }
+
+  public void setModelMBean(ModelMBean modelMBean) {
+

[18/50] [abbrv] incubator-geode git commit: GEODE-288: move admin packages to internal

2016-10-27 Thread klund
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/20a32286/geode-core/src/main/java/org/apache/geode/internal/admin/api/jmx/impl/MX4JModelMBean.java
--
diff --git 
a/geode-core/src/main/java/org/apache/geode/internal/admin/api/jmx/impl/MX4JModelMBean.java
 
b/geode-core/src/main/java/org/apache/geode/internal/admin/api/jmx/impl/MX4JModelMBean.java
new file mode 100755
index 000..2facc17
--- /dev/null
+++ 
b/geode-core/src/main/java/org/apache/geode/internal/admin/api/jmx/impl/MX4JModelMBean.java
@@ -0,0 +1,1232 @@
+/*
+ * Copyright (C) MX4J. All rights reserved.
+ *
+ * This software is distributed under the terms of the MX4J License version 
1.0. See the terms of
+ * the MX4J License in the documentation provided with this software.
+ */
+
+package org.apache.geode.internal.admin.api.jmx.impl;
+
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.util.Date;
+import java.util.Iterator;
+
+import javax.management.Attribute;
+import javax.management.AttributeChangeNotification;
+import javax.management.AttributeChangeNotificationFilter;
+import javax.management.AttributeList;
+import javax.management.AttributeNotFoundException;
+import javax.management.Descriptor;
+import javax.management.InstanceNotFoundException;
+import javax.management.InvalidAttributeValueException;
+import javax.management.ListenerNotFoundException;
+import javax.management.MBeanAttributeInfo;
+import javax.management.MBeanException;
+import javax.management.MBeanInfo;
+import javax.management.MBeanNotificationInfo;
+import javax.management.MBeanOperationInfo;
+import javax.management.MBeanRegistration;
+import javax.management.MBeanRegistrationException;
+import javax.management.MBeanServer;
+import javax.management.MalformedObjectNameException;
+import javax.management.Notification;
+import javax.management.NotificationBroadcasterSupport;
+import javax.management.NotificationEmitter;
+import javax.management.NotificationFilter;
+import javax.management.NotificationListener;
+import javax.management.ObjectName;
+import javax.management.ReflectionException;
+import javax.management.RuntimeErrorException;
+import javax.management.RuntimeOperationsException;
+import javax.management.ServiceNotFoundException;
+import javax.management.loading.ClassLoaderRepository;
+import javax.management.modelmbean.InvalidTargetObjectTypeException;
+import javax.management.modelmbean.ModelMBean;
+import javax.management.modelmbean.ModelMBeanAttributeInfo;
+import javax.management.modelmbean.ModelMBeanInfo;
+import javax.management.modelmbean.ModelMBeanOperationInfo;
+
+import mx4j.ImplementationException;
+import mx4j.log.FileLogger;
+import mx4j.log.Log;
+import mx4j.log.Logger;
+import mx4j.log.MBeanLogger;
+import mx4j.persist.FilePersister;
+import mx4j.persist.MBeanPersister;
+import mx4j.persist.PersisterMBean;
+import mx4j.util.Utils;
+
+import org.apache.geode.internal.i18n.LocalizedStrings;
+
+/**
+ * @author mailto:biorn_stee...@users.sourceforge.net;>Simone 
Bordet
+ * @version $Revision: 1.14 $
+ */
+public class MX4JModelMBean implements ModelMBean, MBeanRegistration, 
NotificationEmitter {
+  private static final String OBJECT_RESOURCE_TYPE = "ObjectReference";
+
+  private static final int ALWAYS_STALE = 1;
+  private static final int NEVER_STALE = 2;
+  private static final int STALE = 3;
+  private static final int NOT_STALE = 4;
+
+  private static final int PERSIST_NEVER = -1;
+  private static final int PERSIST_ON_TIMER = -2;
+  private static final int PERSIST_ON_UPDATE = -3;
+  private static final int PERSIST_NO_MORE_OFTEN_THAN = -4;
+
+  private MBeanServer m_mbeanServer;
+  private Object m_managedResource;
+  private boolean m_canBeRegistered;
+  private ModelMBeanInfo m_modelMBeanInfo;
+  private NotificationBroadcasterSupport m_attributeChangeBroadcaster =
+  new NotificationBroadcasterSupport();
+  private NotificationBroadcasterSupport m_generalBroadcaster =
+  new NotificationBroadcasterSupport();
+
+  public MX4JModelMBean() throws MBeanException, RuntimeOperationsException {
+try {
+  load();
+} catch (Exception x) {
+  Logger logger = getLogger();
+  
logger.warn(LocalizedStrings.MX4JModelMBean_CANNOT_RESTORE_PREVIOUSLY_SAVED_STATUS
+  .toLocalizedString(), x);
+}
+  }
+
+  public MX4JModelMBean(ModelMBeanInfo info) throws MBeanException, 
RuntimeOperationsException {
+if (info == null)
+  throw new RuntimeOperationsException(new IllegalArgumentException(
+  LocalizedStrings.MX4JModelMBean_MODELMBEANINFO_PARAMETER_CANT_BE_NULL
+  .toLocalizedString()));
+else
+  setModelMBeanInfo(info);
+  }
+
+  private Logger getLogger() {
+return Log.getLogger(getClass().getName());
+  }
+
+  public ObjectName preRegister(MBeanServer server, ObjectName name) throws 
Exception {
+if (m_canBeRegistered) {
+  m_mbeanServer 

[38/50] [abbrv] incubator-geode git commit: GEODE-288: move admin packages to internal

2016-10-27 Thread klund
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/20a32286/geode-core/src/main/java/org/apache/geode/admin/jmx/internal/AgentLauncher.java
--
diff --git 
a/geode-core/src/main/java/org/apache/geode/admin/jmx/internal/AgentLauncher.java
 
b/geode-core/src/main/java/org/apache/geode/admin/jmx/internal/AgentLauncher.java
deleted file mode 100644
index 6a1bd63..000
--- 
a/geode-core/src/main/java/org/apache/geode/admin/jmx/internal/AgentLauncher.java
+++ /dev/null
@@ -1,918 +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 org.apache.geode.admin.jmx.internal;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
-import java.io.PrintStream;
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.Properties;
-import java.util.SortedMap;
-import java.util.StringTokenizer;
-import java.util.TreeMap;
-
-import org.apache.logging.log4j.Logger;
-
-import org.apache.geode.GemFireException;
-import org.apache.geode.SystemFailure;
-import org.apache.geode.admin.AdminException;
-import org.apache.geode.admin.jmx.Agent;
-import org.apache.geode.admin.jmx.AgentConfig;
-import org.apache.geode.admin.jmx.AgentFactory;
-import org.apache.geode.distributed.internal.DistributionManager;
-import org.apache.geode.internal.OSProcess;
-import org.apache.geode.internal.PureJavaMode;
-import org.apache.geode.internal.net.SocketCreator;
-import org.apache.geode.internal.i18n.LocalizedStrings;
-import org.apache.geode.internal.logging.LogService;
-import org.apache.geode.internal.util.IOUtils;
-import org.apache.geode.internal.util.JavaCommandBuilder;
-
-/**
- * A command line utility inspired by the CacheServerLauncher 
that is responsible for
- * administering a stand-along GemFire JMX {@link Agent}.
- * 
- * 
- * @since GemFire 3.5
- */
-public class AgentLauncher {
-
-  private static final Logger logger = LogService.getLogger();
-
-  /** Should the launch command be printed? */
-  public static final boolean PRINT_LAUNCH_COMMAND =
-  Boolean.getBoolean(AgentLauncher.class.getSimpleName() + 
".PRINT_LAUNCH_COMMAND");
-
-  /* constants used to define state */
-  static final int SHUTDOWN = 0;
-  static final int STARTING = 1;
-  static final int RUNNING = 2;
-  static final int SHUTDOWN_PENDING = 3;
-  static final int SHUTDOWN_PENDING_AFTER_FAILED_STARTUP = 4;
-  static final int UNKNOWN = 6;
-
-  /** Agent configuration options */
-  static final String AGENT_PROPS = "agent-props";
-
-  /**
-   * A flag to indicate if the current log file should be kept. Used only when 
'start' is used to
-   * fork off the 'server'
-   */
-  static final String APPENDTO_LOG_FILE = "appendto-log-file";
-
-  /** optional and additional classpath entries */
-  static final String CLASSPATH = "classpath";
-
-  /** The directory argument */
-  static final String DIR = "dir";
-
-  /** Extra VM arguments */
-  static final String VMARGS = "vmargs";
-
-  /** The directory in which the agent's output resides */
-  private File workingDirectory = null;
-
-  /** The Status object for the agent */
-  private Status status = null;
-
-  /** base name for the agent to be launched */
-  private final String basename;
-
-  /** The name for the start up log file */
-  private final String startLogFileName;
-
-  /** The name of the status file */
-  private final String statusFileName;
-
-  /**
-   * Instantiates an AgentLauncher for execution and control of the GemFire 
JMX Agent process. This
-   * constructor is package private to prevent direct instantiation or 
subclassing by classes
-   * outside this package, but does allow the class to be tested as needed.
-   * 
-   * 
-   * @param basename base name for the application to be launched
-   */
-  AgentLauncher(final String basename) {
-assert basename != null : "The base name used by the AgentLauncher to 

[48/50] [abbrv] incubator-geode git commit: GEODE-288: move admin packages to internal

2016-10-27 Thread klund
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/20a32286/geode-core/src/main/java/org/apache/geode/admin/RegionSubRegionSnapshot.java
--
diff --git 
a/geode-core/src/main/java/org/apache/geode/admin/RegionSubRegionSnapshot.java 
b/geode-core/src/main/java/org/apache/geode/admin/RegionSubRegionSnapshot.java
deleted file mode 100644
index 19f89b2..000
--- 
a/geode-core/src/main/java/org/apache/geode/admin/RegionSubRegionSnapshot.java
+++ /dev/null
@@ -1,183 +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 org.apache.geode.admin;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Set;
-
-import org.apache.geode.DataSerializable;
-import org.apache.geode.DataSerializer;
-import org.apache.geode.cache.Region;
-import org.apache.geode.i18n.LogWriterI18n;
-import org.apache.geode.internal.cache.PartitionedRegion;
-
-/**
- * Class RegionSubRegionSnapshot provides information about 
Regions. This
- * also provides the information about sub regions This class is used by the 
monitoring tool.
- * 
- * 
- * @since GemFire 5.7
- * @deprecated as of 7.0 use the management
- * package instead
- */
-public class RegionSubRegionSnapshot implements DataSerializable {
-  private static final long serialVersionUID = -8052137675270041871L;
-
-  public RegionSubRegionSnapshot() {
-this.parent = null;
-this.subRegionSnapshots = new HashSet();
-  }
-
-  public RegionSubRegionSnapshot(Region reg) {
-this();
-this.name = reg.getName();
-if (reg instanceof PartitionedRegion) {
-  PartitionedRegion p_reg = (PartitionedRegion) reg;
-  this.entryCount = p_reg.entryCount(true);
-} else {
-  this.entryCount = reg.entrySet().size();
-}
-final LogWriterI18n logger = reg.getCache().getLoggerI18n();
-if ((logger != null) && logger.fineEnabled()) {
-  logger.fine("RegionSubRegionSnapshot Region entry count =" + 
this.entryCount + " for region ="
-  + this.name);
-}
-  }
-
-  /**
-   * add the snapshot of sub region
-   * 
-   * @param snap snapshot of sub region
-   * @return true if operation is successful
-   */
-  public boolean addSubRegion(RegionSubRegionSnapshot snap) {
-if (subRegionSnapshots.contains(snap)) {
-  return true;
-}
-
-if (subRegionSnapshots.add(snap)) {
-  snap.setParent(this);
-  return true;
-}
-
-return false;
-  }
-
-  /**
-   * @return get entry count of region
-   */
-  public final int getEntryCount() {
-return entryCount;
-  }
-
-  /**
-   * @param entryCount entry count of region
-   */
-  public final void setEntryCount(int entryCount) {
-this.entryCount = entryCount;
-  }
-
-  /**
-   * @return name of region
-   */
-  public final String getName() {
-return name;
-  }
-
-  /**
-   * @param name name of region
-   */
-  public final void setName(String name) {
-this.name = name;
-  }
-
-  /**
-   * @return subRegionSnapshots of all the sub regions
-   */
-  public final Set getSubRegionSnapshots() {
-return subRegionSnapshots;
-  }
-
-  /**
-   * @param subRegionSnapshots subRegionSnapshots of all the sub regions
-   */
-  public final void setSubRegionSnapshots(Set subRegionSnapshots) {
-this.subRegionSnapshots = subRegionSnapshots;
-  }
-
-  /**
-   * @return snapshot of parent region
-   */
-  public final RegionSubRegionSnapshot getParent() {
-return parent;
-  }
-
-  /**
-   * @param parent snapshot of parent region
-   */
-  public final void setParent(RegionSubRegionSnapshot parent) {
-this.parent = parent;
-  }
-
-  /**
-   * 
-   * @return full path of region
-   */
-  public String getFullPath() {
-return (getParent() == null ? "/" : getParent().getFullPath()) + getName() 
+ "/";
-  }
-
-  public void toData(DataOutput out) throws IOException {
-DataSerializer.writeString(this.name, out);
-out.writeInt(this.entryCount);
-DataSerializer.writeHashSet((HashSet) this.subRegionSnapshots, out);
-  }
-
-  public void fromData(DataInput in) throws IOException, 
ClassNotFoundException {
-this.name = 

[28/50] [abbrv] incubator-geode git commit: GEODE-288: move admin packages to internal

2016-10-27 Thread klund
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/20a32286/geode-core/src/main/java/org/apache/geode/internal/admin/api/impl/BackupDataStoreHelper.java
--
diff --git 
a/geode-core/src/main/java/org/apache/geode/internal/admin/api/impl/BackupDataStoreHelper.java
 
b/geode-core/src/main/java/org/apache/geode/internal/admin/api/impl/BackupDataStoreHelper.java
new file mode 100644
index 000..bf2d484
--- /dev/null
+++ 
b/geode-core/src/main/java/org/apache/geode/internal/admin/api/impl/BackupDataStoreHelper.java
@@ -0,0 +1,74 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more 
contributor license
+ * agreements. See the NOTICE file distributed with this work for additional 
information regarding
+ * copyright ownership. The ASF licenses this file to You under the Apache 
License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the 
License. You may obtain a
+ * copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software 
distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 
KIND, either express
+ * or implied. See the License for the specific language governing permissions 
and limitations under
+ * the License.
+ */
+package org.apache.geode.internal.admin.api.impl;
+
+import java.io.File;
+import java.util.Map;
+import java.util.Set;
+
+import org.apache.geode.cache.persistence.PersistentID;
+import org.apache.geode.distributed.DistributedLockService;
+import org.apache.geode.distributed.DistributedMember;
+import org.apache.geode.distributed.internal.DM;
+import org.apache.geode.internal.Assert;
+
+public class BackupDataStoreHelper {
+
+  public static String LOCK_SERVICE_NAME = 
BackupDataStoreHelper.class.getSimpleName();
+
+  private static String LOCK_NAME = LOCK_SERVICE_NAME + "_token";
+
+  private static Object LOCK_SYNC = new Object();
+
+  @SuppressWarnings("rawtypes")
+  public static BackupDataStoreResult backupAllMembers(DM dm, Set recipients, 
File targetDir,
+  File baselineDir) {
+FlushToDiskRequest.send(dm, recipients);
+
+boolean abort = true;
+Map successfulMembers;
+Map existingDataStores;
+try {
+  existingDataStores = PrepareBackupRequest.send(dm, recipients);
+  abort = false;
+} finally {
+  successfulMembers = FinishBackupRequest.send(dm, recipients, targetDir, 
baselineDir, abort);
+}
+return new BackupDataStoreResult(existingDataStores, successfulMembers);
+  }
+
+  private static DistributedLockService getLockService(DM dm) {
+DistributedLockService dls = 
DistributedLockService.getServiceNamed(LOCK_SERVICE_NAME);
+if (dls == null) {
+  synchronized (LOCK_SYNC) {
+dls = DistributedLockService.getServiceNamed(LOCK_SERVICE_NAME);
+if (dls == null) {
+  // Create the DistributedLockService
+  dls = DistributedLockService.create(LOCK_SERVICE_NAME, 
dm.getSystem());
+}
+  }
+}
+Assert.assertTrue(dls != null);
+return dls;
+  }
+
+  public static boolean obtainLock(DM dm) {
+return getLockService(dm).lock(LOCK_NAME, 0, -1);
+  }
+
+  public static void releaseLock(DM dm) {
+getLockService(dm).unlock(LOCK_NAME);
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/20a32286/geode-core/src/main/java/org/apache/geode/internal/admin/api/impl/BackupDataStoreResult.java
--
diff --git 
a/geode-core/src/main/java/org/apache/geode/internal/admin/api/impl/BackupDataStoreResult.java
 
b/geode-core/src/main/java/org/apache/geode/internal/admin/api/impl/BackupDataStoreResult.java
new file mode 100644
index 000..b61e5c8
--- /dev/null
+++ 
b/geode-core/src/main/java/org/apache/geode/internal/admin/api/impl/BackupDataStoreResult.java
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more 
contributor license
+ * agreements. See the NOTICE file distributed with this work for additional 
information regarding
+ * copyright ownership. The ASF licenses this file to You under the Apache 
License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the 
License. You may obtain a
+ * copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software 
distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 
KIND, either express
+ * or implied. See the License for the specific language governing permissions 
and limitations under
+ * the License.
+ */
+package org.apache.geode.internal.admin.api.impl;
+
+import java.util.Map;
+import java.util.Set;
+
+import 

[05/50] [abbrv] incubator-geode git commit: Revert "GEODE-2000 Now ClientMembershipListener returns host on which"

2016-10-27 Thread klund
Revert "GEODE-2000 Now ClientMembershipListener returns host on which"

This reverts commit 8a080323070dbbc1d7037612d0d8e1188dcf1507.

This change caused some CI failures that folks suppressed.  The fix needs
to be revisited.


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

Branch: refs/heads/feature/GEODE-288
Commit: be2a40488b44ebeccdac0d8b6c8a3810df00f9da
Parents: 60f8a80
Author: Bruce Schuchardt 
Authored: Tue Oct 25 14:08:10 2016 -0700
Committer: Bruce Schuchardt 
Committed: Tue Oct 25 14:51:58 2016 -0700

--
 .../membership/InternalDistributedMember.java   |  6 +
 .../internal/cache/tier/sockets/HandShake.java  |  9 +++
 .../AutoConnectionSourceImplJUnitTest.java  | 27 
 3 files changed, 4 insertions(+), 38 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/be2a4048/geode-core/src/main/java/org/apache/geode/distributed/internal/membership/InternalDistributedMember.java
--
diff --git 
a/geode-core/src/main/java/org/apache/geode/distributed/internal/membership/InternalDistributedMember.java
 
b/geode-core/src/main/java/org/apache/geode/distributed/internal/membership/InternalDistributedMember.java
index ac8379b..82dd055 100755
--- 
a/geode-core/src/main/java/org/apache/geode/distributed/internal/membership/InternalDistributedMember.java
+++ 
b/geode-core/src/main/java/org/apache/geode/distributed/internal/membership/InternalDistributedMember.java
@@ -1171,11 +1171,7 @@ public class InternalDistributedMember implements 
DistributedMember, Externaliza
   }
 
   public String getHost() {
-return this.hostName;
-  }
-
-  public void setHost(String h) {
-this.hostName = h;
+return this.netMbr.getInetAddress().getCanonicalHostName();
   }
 
   public int getProcessId() {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/be2a4048/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/HandShake.java
--
diff --git 
a/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/HandShake.java
 
b/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/HandShake.java
index 5e13be0..95e531d 100644
--- 
a/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/HandShake.java
+++ 
b/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/HandShake.java
@@ -1253,7 +1253,7 @@ public class HandShake implements ClientHandShake {
   int qSize = dis.readInt();
 
   // Read the server member
-  member = readServerMember(dis, location);
+  member = readServerMember(dis);
   serverQStatus = new ServerQueueStatus(epType, qSize, member);
 
   // Read the message (if any)
@@ -1368,8 +1368,7 @@ public class HandShake implements ClientHandShake {
 return sqs;
   }
 
-  public static DistributedMember readServerMember(DataInputStream p_dis,
-  ServerLocation serverLocation) throws IOException {
+  protected DistributedMember readServerMember(DataInputStream p_dis) throws 
IOException {
 
 byte[] memberBytes = DataSerializer.readByteArray(p_dis);
 ByteArrayInputStream bais = new ByteArrayInputStream(memberBytes);
@@ -1379,9 +1378,7 @@ public class HandShake implements ClientHandShake {
   dis = new VersionedDataInputStream(dis, v);
 }
 try {
-  InternalDistributedMember ids = (InternalDistributedMember) 
DataSerializer.readObject(dis);
-  ids.setHost(serverLocation.getHostName());
-  return ids;
+  return (DistributedMember) DataSerializer.readObject(dis);
 } catch (EOFException e) {
   throw e;
 } catch (Exception e) {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/be2a4048/geode-core/src/test/java/org/apache/geode/cache/client/internal/AutoConnectionSourceImplJUnitTest.java
--
diff --git 
a/geode-core/src/test/java/org/apache/geode/cache/client/internal/AutoConnectionSourceImplJUnitTest.java
 
b/geode-core/src/test/java/org/apache/geode/cache/client/internal/AutoConnectionSourceImplJUnitTest.java
index 63fc8d5..913edf2 100644
--- 
a/geode-core/src/test/java/org/apache/geode/cache/client/internal/AutoConnectionSourceImplJUnitTest.java
+++ 
b/geode-core/src/test/java/org/apache/geode/cache/client/internal/AutoConnectionSourceImplJUnitTest.java
@@ -15,7 +15,6 @@
 package org.apache.geode.cache.client.internal;
 
 import org.apache.geode.CancelCriterion;
-import 

[41/50] [abbrv] incubator-geode git commit: GEODE-288: move admin packages to internal

2016-10-27 Thread klund
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/20a32286/geode-core/src/main/java/org/apache/geode/admin/jmx/internal/AdminDistributedSystemJmxImpl.java
--
diff --git 
a/geode-core/src/main/java/org/apache/geode/admin/jmx/internal/AdminDistributedSystemJmxImpl.java
 
b/geode-core/src/main/java/org/apache/geode/admin/jmx/internal/AdminDistributedSystemJmxImpl.java
deleted file mode 100755
index 1bfddf2..000
--- 
a/geode-core/src/main/java/org/apache/geode/admin/jmx/internal/AdminDistributedSystemJmxImpl.java
+++ /dev/null
@@ -1,2279 +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 org.apache.geode.admin.jmx.internal;
-
-import org.apache.geode.DataSerializer;
-import org.apache.geode.SystemFailure;
-import org.apache.geode.admin.*;
-import org.apache.geode.admin.internal.AdminDistributedSystemImpl;
-import org.apache.geode.admin.internal.CacheServerConfigImpl;
-import org.apache.geode.admin.internal.DistributionLocatorImpl;
-import org.apache.geode.cache.persistence.PersistentID;
-import org.apache.geode.distributed.DistributedMember;
-import org.apache.geode.distributed.internal.DistributionConfig;
-import org.apache.geode.distributed.internal.InternalDistributedSystem;
-import 
org.apache.geode.distributed.internal.membership.InternalDistributedMember;
-import org.apache.geode.internal.Assert;
-import org.apache.geode.internal.admin.Alert;
-import org.apache.geode.internal.admin.*;
-import org.apache.geode.internal.admin.remote.UpdateAlertDefinitionMessage;
-import org.apache.geode.internal.i18n.LocalizedStrings;
-import org.apache.geode.internal.logging.InternalLogWriter;
-import org.apache.geode.internal.logging.LogService;
-import org.apache.geode.internal.logging.log4j.LocalizedMessage;
-import org.apache.logging.log4j.Logger;
-
-import javax.management.*;
-import javax.management.modelmbean.ModelMBean;
-import javax.management.openmbean.*;
-import java.io.*;
-import java.net.InetAddress;
-import java.net.UnknownHostException;
-import java.util.*;
-import java.util.concurrent.atomic.AtomicInteger;
-
-/**
- * Provides MBean support for managing a GemFire distributed system.
- * 
- * TODO: refactor to implement DistributedSystem and delegate to instance of 
DistributedSystemImpl.
- * Wrap all delegate calls w/ e.printStackTrace() since the HttpAdaptor 
devours them (what to do w/
- * template methods then?)
- *
- * @since GemFire 3.5
- */
-public class AdminDistributedSystemJmxImpl extends AdminDistributedSystemImpl
-implements ManagedResource, DistributedSystemConfig, StatAlertsAggregator {
-
-  private static final Logger logger = LogService.getLogger();
-
-  private Properties mailProps;
-
-  // The file name where the StatAlertDefinitions would be serialized
-  private String statAlertDefnSerFile = System.getProperty("user.dir");
-
-  /**
-   * Simple counter incrementing on each notification. This this currently 
resets at every restart
-   * of Agent
-   */
-  private final AtomicInteger notificationSequenceNumber = new AtomicInteger();
-
-  /**
-   * Variable to indicate if there are no Rmi clients connected.
-   */
-  private volatile boolean isRmiClientCountZero;
-
-  /**
-   * Variable to indicate if Statistics Alert definitions could be persisted 
across runs/sessions.
-   */
-  private volatile boolean canPersistStatAlertDefs = true;
-
-  /** Cache Listener to listen to Cache & Region create/destroy events */
-  private CacheAndRegionListenerImpl cacheRegionListener;
-
-  // -
-  // Constructor(s)
-  // -
-
-  /**
-   * Constructs new DistributedSystemJmxImpl and registers an MBean to 
represent it.
-   * 
-   * @param config configuration defining the JMX agent.
-   */
-  public AdminDistributedSystemJmxImpl(AgentConfigImpl config)
-  throws org.apache.geode.admin.AdminException {
-super(config);
-this.mbeanName = "GemFire:type=AdminDistributedSystem,id="
-+ MBeanUtil.makeCompliantMBeanNameProperty(getId());
-this.objectName = MBeanUtil.createMBean(this);
-

[17/50] [abbrv] incubator-geode git commit: GEODE-288: move admin packages to internal

2016-10-27 Thread klund
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/20a32286/geode-core/src/main/java/org/apache/geode/internal/admin/api/jmx/impl/MemberInfoWithStatsMBean.java
--
diff --git 
a/geode-core/src/main/java/org/apache/geode/internal/admin/api/jmx/impl/MemberInfoWithStatsMBean.java
 
b/geode-core/src/main/java/org/apache/geode/internal/admin/api/jmx/impl/MemberInfoWithStatsMBean.java
new file mode 100644
index 000..95fd01c
--- /dev/null
+++ 
b/geode-core/src/main/java/org/apache/geode/internal/admin/api/jmx/impl/MemberInfoWithStatsMBean.java
@@ -0,0 +1,1355 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more 
contributor license
+ * agreements. See the NOTICE file distributed with this work for additional 
information regarding
+ * copyright ownership. The ASF licenses this file to You under the Apache 
License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the 
License. You may obtain a
+ * copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software 
distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 
KIND, either express
+ * or implied. See the License for the specific language governing permissions 
and limitations under
+ * the License.
+ */
+package org.apache.geode.internal.admin.api.jmx.impl;
+
+import static org.apache.geode.distributed.ConfigurationProperties.*;
+
+import org.apache.geode.internal.admin.api.AdminDistributedSystem;
+import org.apache.geode.internal.admin.api.AdminException;
+import org.apache.geode.internal.admin.api.CacheVm;
+import org.apache.geode.internal.admin.api.ConfigurationParameter;
+import org.apache.geode.internal.admin.api.GemFireMemberStatus;
+import org.apache.geode.internal.admin.api.RegionSubRegionSnapshot;
+import org.apache.geode.internal.admin.api.StatisticResource;
+import org.apache.geode.internal.admin.api.SystemMember;
+import org.apache.geode.internal.admin.api.SystemMemberCacheServer;
+import org.apache.geode.internal.admin.api.jmx.Agent;
+import org.apache.geode.cache.InterestPolicy;
+import org.apache.geode.cache.SubscriptionAttributes;
+import org.apache.geode.distributed.internal.DistributionConfig;
+import org.apache.geode.internal.GemFireVersion;
+import org.apache.geode.internal.admin.remote.ClientHealthStats;
+import org.apache.geode.internal.i18n.LocalizedStrings;
+import org.apache.geode.internal.logging.LogService;
+import org.apache.geode.internal.logging.log4j.LocalizedMessage;
+import mx4j.AbstractDynamicMBean;
+import org.apache.logging.log4j.Logger;
+
+import javax.management.*;
+import java.net.InetAddress;
+import java.text.MessageFormat;
+import java.util.*;
+import java.util.concurrent.atomic.AtomicLong;
+
+/**
+ * This class uses the JMX Attributes/Operations that use (return/throw) 
GemFire types. This is the
+ * single MBean accessible with ObjectName string {@link 
MemberInfoWithStatsMBean#MBEAN_NAME}}. This
+ * MBean can be used to retrieve the all member details as plain java types.
+ * 
+ * This MBean also acts as a Notification Hub for all the Notifications that 
are defined for Admin
+ * Distributed System.
+ * 
+ * 
+ * @since GemFire 6.5
+ */
+public class MemberInfoWithStatsMBean extends AbstractDynamicMBean implements 
NotificationEmitter {
+  private static final Logger logger = LogService.getLogger();
+
+  /* constants defining max no of attributes/operations/notifications */
+  private static final int MAX_ATTRIBUTES_COUNT = 3;
+  private static final int MAX_OPERATIONS_COUNT = 3;
+  private static final int MAX_NOTIFICATIONS_COUNT = 9;
+
+  private static final String NOT_AVAILABLE_STR = "N/A";
+  private static final String NOT_AVAILABLE = null;
+  private static final Number NOT_AVAILABLE_NUMBER = null;
+
+  /*
+   * String constant used for a region that is used on admin side just as a 
root for rootRegions
+   * defined on the member
+   */
+  private static final String PLACE_HOLDER_ROOT_REGION = "/Root/";
+
+  /* String that are used to form QueryExp/ObjectName for querying MBeanServer 
*/
+  private static final String REGION_QUERY_EXPRESSION = 
"*GemFire.Cache*:*,owner={0},type=Region";
+  private static final String STATS_QUERY_EXPRESSION = 
"*GemFire.Statistic*:*,source={0},name={1}";
+
+  /** mbean name string for this MBean */
+  /* default */static final String MBEAN_NAME = 
"GemFire:type=MemberInfoWithStatsMBean";
+
+  /** ObjectName handle for this MBean */
+  private ObjectName objectName;
+
+  /** version of the GemFire Enterprise system that is running */
+  private String version;
+  private int refreshInterval;
+  private String id;
+
+  private Agent agent;
+  private AdminDistributedSystemJmxImpl adminDSJmx;
+
+  private NotificationForwarder forwarder;
+  private boolean isInitialized;// needs synchronization?
+

[46/50] [abbrv] incubator-geode git commit: GEODE-288: move admin packages to internal

2016-10-27 Thread klund
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/20a32286/geode-core/src/main/java/org/apache/geode/admin/internal/BackupDataStoreResult.java
--
diff --git 
a/geode-core/src/main/java/org/apache/geode/admin/internal/BackupDataStoreResult.java
 
b/geode-core/src/main/java/org/apache/geode/admin/internal/BackupDataStoreResult.java
deleted file mode 100644
index eae674b..000
--- 
a/geode-core/src/main/java/org/apache/geode/admin/internal/BackupDataStoreResult.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 org.apache.geode.admin.internal;
-
-import java.util.Map;
-import java.util.Set;
-
-import org.apache.geode.cache.persistence.PersistentID;
-import org.apache.geode.distributed.DistributedMember;
-
-public class BackupDataStoreResult {
-
-  private Map existingDataStores;
-
-  private Map successfulMembers;
-
-  public BackupDataStoreResult(Map 
existingDataStores,
-  Map successfulMembers) {
-this.existingDataStores = existingDataStores;
-this.successfulMembers = successfulMembers;
-  }
-
-  public Map getExistingDataStores() {
-return this.existingDataStores;
-  }
-
-  public Map getSuccessfulMembers() {
-return this.successfulMembers;
-  }
-
-  public String toString() {
-return new StringBuilder().append(getClass().getSimpleName()).append("[")
-.append("existingDataStores=").append(this.existingDataStores)
-.append("; 
successfulMembers=").append(this.successfulMembers).append("]").toString();
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/20a32286/geode-core/src/main/java/org/apache/geode/admin/internal/BackupStatusImpl.java
--
diff --git 
a/geode-core/src/main/java/org/apache/geode/admin/internal/BackupStatusImpl.java
 
b/geode-core/src/main/java/org/apache/geode/admin/internal/BackupStatusImpl.java
deleted file mode 100644
index 4256c3c..000
--- 
a/geode-core/src/main/java/org/apache/geode/admin/internal/BackupStatusImpl.java
+++ /dev/null
@@ -1,59 +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 org.apache.geode.admin.internal;
-
-import java.io.Serializable;
-import java.util.Map;
-import java.util.Set;
-
-import org.apache.geode.admin.BackupStatus;
-import org.apache.geode.cache.persistence.PersistentID;
-import org.apache.geode.distributed.DistributedMember;
-
-/**
- * Holds the result of a backup operation.
- * 
- *
- */
-public class BackupStatusImpl implements BackupStatus, Serializable {
-  private static final long serialVersionUID = 3704162840296921840L;
-
-  private Map backedUpDiskStores;
-  private Set offlineDiskStores;
-
-  public BackupStatusImpl(Map 
backedUpDiskStores,
-  Set offlineDiskStores) {
-super();
-this.backedUpDiskStores = backedUpDiskStores;
-this.offlineDiskStores = offlineDiskStores;
-  }
-
-  public Map getBackedUpDiskStores() {
-return backedUpDiskStores;
-  }
-
-  public Set getOfflineDiskStores() {
-return offlineDiskStores;
-  }
-
-  @Override
-  public String toString() {
-return "BackupStatus[backedUpDiskStores=" + backedUpDiskStores + ", 

[07/50] [abbrv] incubator-geode git commit: GEODE-2014: Upgrade Swagger libraries

2016-10-27 Thread klund
GEODE-2014: Upgrade Swagger libraries

* Updated gradle exclusions to remove items no longer used.
* Updated distribution LICENSE file
* Corrected LICENSE file as jquery-ui is still used in pulse, updated version
* Updated rat configuration.
* This closes #271

(cherry picked from commit a6018ab)


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

Branch: refs/heads/feature/GEODE-288
Commit: ee0666a3ca5a8807648eb44f0c844c8aefde01fe
Parents: 1d9a4ed
Author: Kevin Duling 
Authored: Tue Oct 25 15:52:56 2016 -0700
Committer: Jinmei Liao 
Committed: Wed Oct 26 09:30:04 2016 -0700

--
 LICENSE   |  5 +--
 geode-assembly/src/main/dist/LICENSE  | 40 ++
 geode-web-api/src/main/webapp/docs/index.html | 13 +++
 gradle/rat.gradle | 19 --
 4 files changed, 16 insertions(+), 61 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ee0666a3/LICENSE
--
diff --git a/LICENSE b/LICENSE
index 3f777c7..231239b 100644
--- a/LICENSE
+++ b/LICENSE
@@ -346,11 +346,8 @@ Apache Geode bundles the following files under the MIT 
license:
   - jQuery UI MultiSelect Widget v1.14pre
 (http://www.erichynds.com/jquery/jquery-ui-multiselect-widget/),
 Copyright (c) 2011 Eric Hynds
-  - jQuery UI v1.8.18 (http://jqueryui.com/about), Copyright (c) jQuery
+  - jQuery UI v1.10.2 (http://jqueryui.com/about), Copyright (c) jQuery
 Foundation and other contributors, http://jquery.org
-  - jQuery Wiggle (https://github.com/wilhelm-murdoch/jQuery-Wiggle),
-Copyright (c) 2011 Wilhelm Murdoch ,
- TheDrunkenEpic 
   - jScrollPane (http://jscrollpane.kelvinluck.com/), Copyright (c) 2010
 Kelvin Luck
   - matchMedia() polyfill (https://github.com/paulirish/matchMedia.js),

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ee0666a3/geode-assembly/src/main/dist/LICENSE
--
diff --git a/geode-assembly/src/main/dist/LICENSE 
b/geode-assembly/src/main/dist/LICENSE
index 04ce74c..92e95b3 100644
--- a/geode-assembly/src/main/dist/LICENSE
+++ b/geode-assembly/src/main/dist/LICENSE
@@ -221,8 +221,6 @@ Apache Geode bundles the following files under the BSD 
3-Clause License:
 Copyright (c) 2002-2007 Marc Prud'hommeaux.
   - Antlr v2.7.7 (http://www.antlr.org), Copyright (c) 2012 Terrence Parr
 and Sam Harwell
-  - highlight.js v7.3 (https://highlightjs.org), Copyright (c) 2006, Ivan
-Sagalaev
   - JLine v2.12 (http://jline.sourceforge.net), Copyright (c) 2002-2006,
 Marc Prud'hommeaux 
   - jQuery Sparklines v2.0 (http://omnipotent.net/jquery.sparkline/),
@@ -597,26 +595,6 @@ Federal Courts of the Northern District of California and 
the state courts
 of the State of California, with venue lying in Santa Clara County,
 California.
 

-The ISC License (http://opensource.org/licenses/ISC)

-
-Apache Geode bundles the following file under the ISC license:
-
-  - Shred (https://github.com/pandastrike/shred), Copyright (c) 2012-2015
-Panda Strike, LLC and Dan Yoder 
-
-Permission to use, copy, modify, and/or distribute this software for any
-purpose with or without fee is hereby granted, provided that the above
-copyright notice and this permission notice appear in all copies.
-
-THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
-SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
-IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 
 ---
 The JSON License (http://www.json.org/license.html)
@@ -653,16 +631,12 @@ The MIT License 
(http://opensource.org/licenses/mit-license.html)
 
 Apache Geode bundles the following files under the MIT license:
 
-  - Backbone.js v0.9.2 (http://backbonejs.org), Copyright (c) 2010-2012
-Jeremy Ashkenas, DocumentCloud Inc.
   - Bootflat v1.0.1 

[26/50] [abbrv] incubator-geode git commit: GEODE-288: move admin packages to internal

2016-10-27 Thread klund
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/20a32286/geode-core/src/main/java/org/apache/geode/internal/admin/api/impl/GemFireHealthImpl.java
--
diff --git 
a/geode-core/src/main/java/org/apache/geode/internal/admin/api/impl/GemFireHealthImpl.java
 
b/geode-core/src/main/java/org/apache/geode/internal/admin/api/impl/GemFireHealthImpl.java
new file mode 100644
index 000..fc40261
--- /dev/null
+++ 
b/geode-core/src/main/java/org/apache/geode/internal/admin/api/impl/GemFireHealthImpl.java
@@ -0,0 +1,514 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more 
contributor license
+ * agreements. See the NOTICE file distributed with this work for additional 
information regarding
+ * copyright ownership. The ASF licenses this file to You under the Apache 
License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the 
License. You may obtain a
+ * copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software 
distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 
KIND, either express
+ * or implied. See the License for the specific language governing permissions 
and limitations under
+ * the License.
+ */
+package org.apache.geode.internal.admin.api.impl;
+
+import org.apache.geode.CancelException;
+import org.apache.geode.internal.Assert;
+import org.apache.geode.internal.admin.*;
+import org.apache.geode.internal.admin.api.AdminDistributedSystem;
+import org.apache.geode.internal.admin.api.DistributedSystemHealthConfig;
+import org.apache.geode.internal.admin.api.GemFireHealth;
+import org.apache.geode.internal.admin.api.GemFireHealthConfig;
+import org.apache.geode.internal.i18n.LocalizedStrings;
+
+import java.net.InetAddress;
+import java.net.UnknownHostException;
+import java.util.*;
+
+/**
+ * Provides the implementation of the GemFireHealth 
administration API. This class is
+ * responsible for {@linkplain GemFireVM#addHealthListener sending} the {@link 
GemFireHealthConfig}s
+ * to the remote member VM in which the health is calcualted.
+ *
+ *
+ * @since GemFire 3.5
+ */
+public class GemFireHealthImpl implements GemFireHealth, JoinLeaveListener, 
HealthListener {
+
+  /** The distributed system whose health is being monitored */
+  private final GfManagerAgent agent;
+
+  /** The default configuration for checking GemFire health */
+  protected GemFireHealthConfig defaultConfig;
+
+  /**
+   * Maps the name of a host to its GemFireHealthConfig. Note 
that the mappings are
+   * created lazily.
+   */
+  private final Map hostConfigs;
+
+  /**
+   * Maps the name of a host to all of the members (GemFireVMs) 
that run on that host.
+   */
+  private final Map hostMembers;
+
+  /** The members that are known to be in {@link #OKAY_HEALTH}. */
+  private Collection okayHealth;
+
+  /** The members that are known to be in {@link #POOR_HEALTH}. */
+  private Collection poorHealth;
+
+  /** The overall health of GemFire */
+  private GemFireHealth.Health overallHealth;
+
+  /** Is this GemFireHealthImpl closed? */
+  private boolean isClosed;
+
+  /**
+   * The configuration specifying how the health of the distributed system 
should be computed.
+   */
+  protected volatile DistributedSystemHealthConfig dsHealthConfig;
+
+  /** Monitors the health of the entire distributed system */
+  private DistributedSystemHealthMonitor dsHealthMonitor = null;
+
+  /**
+   * The distributed system whose health is monitored by this 
GemFireHealth.
+   */
+  private final AdminDistributedSystem system;
+
+
+  /// Constructors ///
+
+  /**
+   * Creates a new GemFireHealthImpl that monitors the health of 
member of the given
+   * distributed system.
+   */
+  protected GemFireHealthImpl(GfManagerAgent agent, AdminDistributedSystem 
system) {
+// agent.getDM().getLogger().info("Creating GemFireHealthImpl",
+// new Exception("Stack trace"));
+
+this.agent = agent;
+this.system = system;
+
+this.hostConfigs = new HashMap();
+this.hostMembers = new HashMap();
+this.okayHealth = new HashSet();
+this.poorHealth = new HashSet();
+this.overallHealth = GOOD_HEALTH;
+this.isClosed = false;
+
+GemFireVM[] apps = this.agent.listApplications();
+for (int i = 0; i < apps.length; i++) {
+  GemFireVM member = apps[i];
+  this.noteNewMember(member);
+}
+
+agent.addJoinLeaveListener(this);
+setDefaultGemFireHealthConfig(createGemFireHealthConfig(null));
+setDistributedSystemHealthConfig(createDistributedSystemHealthConfig());
+  }
+
+  @Override
+  public String toString() {
+StringBuffer sb = new StringBuffer();
+sb.append("closed=" + isClosed);
+sb.append("; hostMembers=" + hostMembers);
+sb.append("; okayHealth=" + 

[42/50] [abbrv] incubator-geode git commit: GEODE-288: move admin packages to internal

2016-10-27 Thread klund
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/20a32286/geode-core/src/main/java/org/apache/geode/admin/internal/SystemMemberRegionImpl.java
--
diff --git 
a/geode-core/src/main/java/org/apache/geode/admin/internal/SystemMemberRegionImpl.java
 
b/geode-core/src/main/java/org/apache/geode/admin/internal/SystemMemberRegionImpl.java
deleted file mode 100644
index fbf0839..000
--- 
a/geode-core/src/main/java/org/apache/geode/admin/internal/SystemMemberRegionImpl.java
+++ /dev/null
@@ -1,371 +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 org.apache.geode.admin.internal;
-
-import org.apache.geode.admin.*;
-import org.apache.geode.cache.*;
-// import org.apache.geode.internal.Assert;
-// import org.apache.geode.internal.admin.*;
-import org.apache.geode.internal.admin.remote.*;
-
-import java.io.File;
-import java.util.*;
-
-/**
- * View of a region in a GemFire system member's cache.
- *
- * @since GemFire 3.5
- */
-public class SystemMemberRegionImpl implements SystemMemberRegion {
-
-  private AdminRegion r;
-  private RegionAttributes ra;
-  private CacheStatistics rs;
-  private Set subregionNames;
-  private Set subregionFullPaths;
-  private int entryCount;
-  private int subregionCount;
-
-  /** The cache to which this region belongs */
-  private final SystemMemberCacheImpl cache;
-
-  // constructors
-  public SystemMemberRegionImpl(SystemMemberCacheImpl cache, Region r) {
-this.cache = cache;
-this.r = (AdminRegion) r;
-  }
-
-  private void refreshFields() {
-this.ra = this.r.getAttributes();
-if (getStatisticsEnabled() && !this.ra.getDataPolicy().withPartitioning()) 
{
-  this.rs = this.r.getStatistics();
-} else {
-  this.rs = null;
-}
-{ // set subregionNames
-  Set s = this.r.subregions(false);
-  Set names = new TreeSet();
-  Set paths = new TreeSet();
-  Iterator it = s.iterator();
-  while (it.hasNext()) {
-Region r = (Region) it.next();
-String name = r.getName();
-names.add(name);
-paths.add(this.getFullPath() + Region.SEPARATOR_CHAR + name);
-  }
-  this.subregionNames = names;
-  this.subregionFullPaths = paths;
-}
-try {
-  int[] sizes = this.r.sizes();
-  this.entryCount = sizes[0];
-  this.subregionCount = sizes[1];
-} catch (CacheException ignore) {
-  this.entryCount = 0;
-  this.subregionCount = 0;
-}
-  }
-
-  // attributes
-  public String getName() {
-return this.r.getName();
-  }
-
-  public String getFullPath() {
-return this.r.getFullPath();
-  }
-
-  public java.util.Set getSubregionNames() {
-return this.subregionNames;
-  }
-
-  public java.util.Set getSubregionFullPaths() {
-return this.subregionFullPaths;
-  }
-
-  public String getUserAttribute() {
-return (String) r.getUserAttribute();
-  }
-
-  public String getCacheLoader() {
-Object o = this.ra.getCacheLoader();
-if (o == null) {
-  return "";
-} else {
-  return o.toString();
-}
-  }
-
-  public String getCacheWriter() {
-Object o = this.ra.getCacheWriter();
-if (o == null) {
-  return "";
-} else {
-  return o.toString();
-}
-  }
-
-  public String getKeyConstraint() {
-Class constraint = this.ra.getKeyConstraint();
-if (constraint == null) {
-  return "";
-} else {
-  return constraint.getName();
-}
-  }
-
-  public String getValueConstraint() {
-Class constraint = this.ra.getValueConstraint();
-if (constraint == null) {
-  return "";
-} else {
-  return constraint.getName();
-}
-  }
-
-  public boolean getEarlyAck() {
-return this.ra.getEarlyAck();
-  }
-
-  public int getRegionTimeToLiveTimeLimit() {
-return this.ra.getRegionTimeToLive().getTimeout();
-  }
-
-  public ExpirationAction getRegionTimeToLiveAction() {
-return this.ra.getRegionTimeToLive().getAction();
-  }
-
-  public int getEntryTimeToLiveTimeLimit() {
-return this.ra.getEntryTimeToLive().getTimeout();
-  }
-
-  public ExpirationAction getEntryTimeToLiveAction() {
-return this.ra.getEntryTimeToLive().getAction();
-  }
-
-  public 

[06/50] [abbrv] incubator-geode git commit: Removing old text about 1.0 GA release

2016-10-27 Thread klund
Removing old text about 1.0 GA release


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

Branch: refs/heads/feature/GEODE-288
Commit: 1d9a4ed62faa6c7e8ca23491b1a8a20c701e508c
Parents: be2a404
Author: Swapnil Bawaskar 
Authored: Tue Oct 25 15:17:25 2016 -0700
Committer: Swapnil Bawaskar 
Committed: Tue Oct 25 15:18:00 2016 -0700

--
 geode-site/website/content/releases/index.html | 6 --
 1 file changed, 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1d9a4ed6/geode-site/website/content/releases/index.html
--
diff --git a/geode-site/website/content/releases/index.html 
b/geode-site/website/content/releases/index.html
index 51e3096..63f685e 100644
--- a/geode-site/website/content/releases/index.html
+++ b/geode-site/website/content/releases/index.html
@@ -238,12 +238,6 @@ under the License. -->
   
   
   
-  
- General Availability (GA) 
Releases - Geode 1.0.0
-Coming soon.
-
-  
-  
 
Project releases are approved by vote 
of the Apache Geode Podling Project Management Committee (PPMC) and Apache 
Incubator (PMC). Support for a release is provided by project volunteers on the 
project http://geode.incubator.apache.org/community/#mailing-lists;>mailing 
lists. Bugs found in a release may be discussed on the list and reported 
through the https://issues.apache.org/jira/browse/GEODE;>issue 
tracker. The user mailing list and issue tracker are the only support 
options hosted by the Apache Geode project.




[47/50] [abbrv] incubator-geode git commit: GEODE-288: move admin packages to internal

2016-10-27 Thread klund
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/20a32286/geode-core/src/main/java/org/apache/geode/admin/internal/AdminDistributedSystemImpl.java
--
diff --git 
a/geode-core/src/main/java/org/apache/geode/admin/internal/AdminDistributedSystemImpl.java
 
b/geode-core/src/main/java/org/apache/geode/admin/internal/AdminDistributedSystemImpl.java
deleted file mode 100755
index 59fce55..000
--- 
a/geode-core/src/main/java/org/apache/geode/admin/internal/AdminDistributedSystemImpl.java
+++ /dev/null
@@ -1,2400 +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 org.apache.geode.admin.internal;
-
-import org.apache.geode.CancelException;
-import org.apache.geode.SystemFailure;
-import org.apache.geode.admin.*;
-import org.apache.geode.admin.Alert;
-import org.apache.geode.admin.AlertListener;
-import org.apache.geode.cache.persistence.PersistentID;
-import org.apache.geode.distributed.DistributedMember;
-import org.apache.geode.distributed.FutureCancelledException;
-import org.apache.geode.distributed.internal.*;
-import 
org.apache.geode.distributed.internal.membership.InternalDistributedMember;
-import org.apache.geode.internal.Assert;
-import org.apache.geode.internal.Banner;
-import org.apache.geode.internal.admin.*;
-import org.apache.geode.internal.admin.remote.*;
-import org.apache.geode.internal.cache.persistence.PersistentMemberPattern;
-import org.apache.geode.internal.i18n.LocalizedStrings;
-import org.apache.geode.internal.logging.InternalLogWriter;
-import org.apache.geode.internal.logging.LogService;
-import org.apache.geode.internal.logging.LogWriterFactory;
-import org.apache.geode.internal.logging.log4j.LocalizedMessage;
-import org.apache.geode.internal.logging.log4j.LogMarker;
-import org.apache.geode.internal.logging.log4j.LogWriterAppender;
-import org.apache.geode.internal.logging.log4j.LogWriterAppenders;
-import org.apache.geode.internal.util.concurrent.FutureResult;
-import org.apache.logging.log4j.Logger;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.InetAddress;
-import java.text.SimpleDateFormat;
-import java.util.*;
-import java.util.concurrent.*;
-
-import static org.apache.geode.distributed.ConfigurationProperties.*;
-
-/**
- * Represents a GemFire distributed system for remote 
administration/management.
- *
- * @since GemFire 3.5
- */
-public class AdminDistributedSystemImpl implements 
org.apache.geode.admin.AdminDistributedSystem,
-org.apache.geode.internal.admin.JoinLeaveListener,
-org.apache.geode.internal.admin.AlertListener,
-
org.apache.geode.distributed.internal.InternalDistributedSystem.DisconnectListener
 {
-
-  private static final Logger logger = LogService.getLogger();
-
-  /** String identity of this distributed system */
-  private String id;
-
-  /** Latest alert broadcast by any system members */
-  private Alert latestAlert;
-
-  // -
-
-  /** Internal admin agent to delegate low-level work to */
-  private volatile GfManagerAgent gfManagerAgent;
-
-  /** Monitors the health of this distributed system */
-  private GemFireHealth health;
-
-  /** Set of non-Manager members in this system */
-  private final Set applicationSet = new HashSet();
-
-  /** Set of DistributionLocators for this system */
-  private final Set locatorSet = new HashSet();
-
-  /** Set of dedicated CacheServer members in this system */
-  private final Set cacheServerSet = new HashSet();
-
-  /** Configuration defining this distributed system */
-  private final DistributedSystemConfigImpl config;
-
-  /** Controller for starting and stopping managed entities */
-  private ManagedEntityController controller;
-
-  /** Log file collator for gathering and merging system member logs */
-  private LogCollator logCollator = new LogCollator();
-
-  /**
-   * The level above which alerts will be delivered to the alert listeners
-   */
-  private AlertLevel alertLevel = AlertLevel.WARNING;
-
-  /** The alert listeners registered on this distributed system. */
-  private volatile Set alertListeners = Collections.emptySet();
-  private final Object 

[12/50] [abbrv] incubator-geode git commit: GEODE-288: move admin packages to internal

2016-10-27 Thread klund
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/20a32286/geode-core/src/test/java/org/apache/geode/admin/internal/HealthEvaluatorTestCase.java
--
diff --git 
a/geode-core/src/test/java/org/apache/geode/admin/internal/HealthEvaluatorTestCase.java
 
b/geode-core/src/test/java/org/apache/geode/admin/internal/HealthEvaluatorTestCase.java
deleted file mode 100644
index c61cbd0..000
--- 
a/geode-core/src/test/java/org/apache/geode/admin/internal/HealthEvaluatorTestCase.java
+++ /dev/null
@@ -1,71 +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 org.apache.geode.admin.internal;
-
-import org.apache.geode.distributed.DistributedSystem;
-import org.apache.geode.distributed.internal.InternalDistributedSystem;
-import org.junit.After;
-import org.junit.Before;
-
-import java.util.Properties;
-
-import static org.apache.geode.distributed.ConfigurationProperties.*;
-
-/**
- * Superclass of tests for the {@linkplain 
org.apache.geode.admin.internal.AbstractHealthEvaluator
- * health evaluator} classes.
- *
- *
- * @since GemFire 3.5
- */
-public abstract class HealthEvaluatorTestCase {
-
-  /** The DistributedSystem used for this test */
-  protected InternalDistributedSystem system;
-
-  /**
-   * Creates a "loner" DistributedSystem for this test.
-   */
-  @Before
-  public void setUp() {
-Properties props = getProperties();
-system = (InternalDistributedSystem) DistributedSystem.connect(props);
-  }
-
-  /**
-   * Closes the "loner" DistributedSystem
-   */
-  @After
-  public void tearDown() {
-if (this.system != null) {
-  this.system.disconnect();
-}
-
-this.system = null;
-  }
-
-  /**
-   * Creates the Properties objects used to connect to the 
distributed system.
-   */
-  protected Properties getProperties() {
-Properties props = new Properties();
-props.setProperty(MCAST_PORT, "0");
-props.setProperty(LOCATORS, "");
-props.setProperty(STATISTIC_SAMPLING_ENABLED, "true");
-
-return props;
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/20a32286/geode-core/src/test/java/org/apache/geode/admin/internal/MemberHealthEvaluatorJUnitTest.java
--
diff --git 
a/geode-core/src/test/java/org/apache/geode/admin/internal/MemberHealthEvaluatorJUnitTest.java
 
b/geode-core/src/test/java/org/apache/geode/admin/internal/MemberHealthEvaluatorJUnitTest.java
deleted file mode 100644
index d20ce36..000
--- 
a/geode-core/src/test/java/org/apache/geode/admin/internal/MemberHealthEvaluatorJUnitTest.java
+++ /dev/null
@@ -1,96 +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 org.apache.geode.admin.internal;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
-import org.apache.geode.admin.GemFireHealth;
-import org.apache.geode.admin.GemFireHealthConfig;
-import org.apache.geode.internal.statistics.GemFireStatSampler;
-import org.apache.geode.internal.statistics.platform.ProcessStats;
-import org.apache.geode.internal.PureJavaMode;
-import org.apache.geode.test.junit.categories.IntegrationTest;
-
-/**
- * Contains simple tests for the {@link MemberHealthEvaluator}.
- *

[04/50] [abbrv] incubator-geode git commit: Adding 1.0.0-incubating to the releases page

2016-10-27 Thread klund
Adding 1.0.0-incubating to the releases page


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

Branch: refs/heads/feature/GEODE-288
Commit: 60f8a808096d7d8c7ca74ad6545d63f88a42e888
Parents: 06de527
Author: Swapnil Bawaskar 
Authored: Tue Oct 25 14:38:50 2016 -0700
Committer: Swapnil Bawaskar 
Committed: Tue Oct 25 14:38:50 2016 -0700

--
 geode-site/website/content/releases/index.html | 51 +
 1 file changed, 51 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/60f8a808/geode-site/website/content/releases/index.html
--
diff --git a/geode-site/website/content/releases/index.html 
b/geode-site/website/content/releases/index.html
index c5d4971..51e3096 100644
--- a/geode-site/website/content/releases/index.html
+++ b/geode-site/website/content/releases/index.html
@@ -34,6 +34,57 @@ under the License. -->
  
   
   
+
+ 1.0.0-incubating
+
+
+ Binaries 
+  [ http://apache.org/dyn/closer.cgi/incubator/geode/1.0.0-incubating/apache-geode-1.0.0-incubating.zip;>ZIP,
 https://dist.apache.org/repos/dist/release/incubator/geode/1.0.0-incubating/apache-geode-1.0.0-incubating.zip.sha256;>SHA-256,
+  https://dist.apache.org/repos/dist/release/incubator/geode/1.0.0-incubating/apache-geode-1.0.0-incubating.zip.asc;>PGP
 ] -
+  [http://apache.org/dyn/closer.cgi/incubator/geode/1.0.0-incubating/apache-geode-1.0.0-incubating.tar.gz;>TAR.GZ,
 https://dist.apache.org/repos/dist/release/incubator/geode/1.0.0-incubating/apache-geode-1.0.0-incubating.tar.gz.sha256;>SHA-256,
+  https://dist.apache.org/repos/dist/release/incubator/geode/1.0.0-incubating/apache-geode-1.0.0-incubating.tar.gz.asc;>PGP
 ]
+  
+
+  Binary downloads are provided for the convenience of 
our users and are not official Apache Geode releases. 
+
+
+
+
+ Source
+   [ http://apache.org/dyn/closer.cgi/incubator/geode/1.0.0-incubating/apache-geode-src-1.0.0-incubating.zip;>ZIP,
 https://dist.apache.org/repos/dist/release/incubator/geode/1.0.0-incubating/apache-geode-src-1.0.0-incubating.zip.sha256;>SHA-256,
+   https://dist.apache.org/repos/dist/release/incubator/geode/1.0.0-incubating/apache-geode-src-1.0.0-incubating.zip.asc;>PGP
+] -
+   [http://apache.org/dyn/closer.cgi/incubator/geode/1.0.0-incubating/apache-geode-src-1.0.0-incubating.tar.gz;>TAR.GZ,
 https://dist.apache.org/repos/dist/release/incubator/geode/1.0.0-incubating/apache-geode-src-1.0.0-incubating.tar.gz.sha256;>SHA-256,
+   https://dist.apache.org/repos/dist/release/incubator/geode/1.0.0-incubating/apache-geode-src-1.0.0-incubating.tar.gz.asc;>PGP
+   ]
+ 
+
+
+
+
+   Dependency Managers
+  
+   Gradle
+
+  dependencies {
+  compile 'org.apache.geode:geode-core:1.0.0-incubating'
+  }
+
+  
+   Maven
+
+  dependencies
+ dependency
+groupIdorg.apache.geode/groupId
+artifactIdgeode-core/artifactId
+version1.0.0-incubating/version
+ /dependency
+  /dependencies
+  
+  
+
+
+
 
  1.0.0-incubating.M3
 



[39/50] [abbrv] incubator-geode git commit: GEODE-288: move admin packages to internal

2016-10-27 Thread klund
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/20a32286/geode-core/src/main/java/org/apache/geode/admin/jmx/internal/AgentImpl.java
--
diff --git 
a/geode-core/src/main/java/org/apache/geode/admin/jmx/internal/AgentImpl.java 
b/geode-core/src/main/java/org/apache/geode/admin/jmx/internal/AgentImpl.java
deleted file mode 100644
index e55c3f1..000
--- 
a/geode-core/src/main/java/org/apache/geode/admin/jmx/internal/AgentImpl.java
+++ /dev/null
@@ -1,1624 +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 org.apache.geode.admin.jmx.internal;
-
-import java.io.File;
-import java.io.IOException;
-import java.rmi.server.RMIClientSocketFactory;
-import java.rmi.server.RMIServerSocketFactory;
-import java.text.MessageFormat;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Properties;
-
-import javax.management.InstanceNotFoundException;
-import javax.management.MBeanException;
-import javax.management.MBeanRegistrationException;
-import javax.management.MBeanServer;
-import javax.management.MalformedObjectNameException;
-import javax.management.Notification;
-import javax.management.NotificationFilter;
-import javax.management.NotificationListener;
-import javax.management.ObjectName;
-import javax.management.OperationsException;
-import javax.management.ReflectionException;
-import javax.management.modelmbean.ModelMBean;
-import javax.management.remote.JMXConnectionNotification;
-import javax.management.remote.JMXConnectorServer;
-import javax.management.remote.JMXConnectorServerFactory;
-import javax.management.remote.JMXServiceURL;
-import javax.management.remote.rmi.RMIConnectorServer;
-import javax.rmi.ssl.SslRMIClientSocketFactory;
-
-import mx4j.tools.adaptor.http.HttpAdaptor;
-
-import org.apache.logging.log4j.Logger;
-
-import org.apache.geode.GemFireException;
-import org.apache.geode.GemFireIOException;
-import org.apache.geode.LogWriter;
-import org.apache.geode.SystemFailure;
-import org.apache.geode.admin.AdminDistributedSystem;
-import org.apache.geode.admin.AdminException;
-import org.apache.geode.admin.jmx.Agent;
-import org.apache.geode.admin.jmx.AgentConfig;
-import org.apache.geode.admin.jmx.AgentFactory;
-import org.apache.geode.distributed.internal.DistributionManager;
-import org.apache.geode.i18n.StringId;
-import org.apache.geode.internal.Banner;
-import org.apache.geode.internal.GemFireVersion;
-import org.apache.geode.internal.admin.remote.TailLogResponse;
-import org.apache.geode.internal.i18n.LocalizedStrings;
-import org.apache.geode.internal.logging.InternalLogWriter;
-import org.apache.geode.internal.logging.LogConfig;
-import org.apache.geode.internal.logging.LogService;
-import org.apache.geode.internal.logging.LogWriterFactory;
-import org.apache.geode.internal.logging.LoggingThreadGroup;
-import org.apache.geode.internal.logging.log4j.AlertAppender;
-import org.apache.geode.internal.logging.log4j.LocalizedMessage;
-import org.apache.geode.internal.logging.log4j.LogMarker;
-import org.apache.geode.internal.logging.log4j.LogWriterAppender;
-import org.apache.geode.internal.logging.log4j.LogWriterAppenders;
-
-/**
- * The GemFire JMX Agent provides the ability to administrate one GemFire 
distributed system via
- * JMX.
- *
- * @since GemFire 3.5
- */
-public class AgentImpl implements org.apache.geode.admin.jmx.Agent,
-org.apache.geode.admin.jmx.internal.ManagedResource {
-
-  private static final Logger logger = LogService.getLogger();
-
-  /**
-   * MX4J HttpAdaptor only supports "basic" as an authentication method. 
Enabling HttpAdaptor
-   * authentication ({@link AgentConfig#HTTP_AUTHENTICATION_ENABLED_NAME}) 
causes the browser to
-   * require a login with username ({@link 
AgentConfig#HTTP_AUTHENTICATION_USER_NAME}) and password
-   * ({@link AgentConfig#HTTP_AUTHENTICATION_PASSWORD_NAME}).
-   */
-  private static final String MX4J_HTTPADAPTOR_BASIC_AUTHENTICATION = "basic";
-
-  /** JMX Service URL template for JMX/RMI Connector Server */
-  private static final String JMX_SERVICE_URL = 
"service:jmx:rmi://{0}:{1}/jndi/rmi://{2}:{3}{4}";
-
-  /**
-   * Set third-party logging configration: MX4J, 

[36/50] [abbrv] incubator-geode git commit: GEODE-288: move admin packages to internal

2016-10-27 Thread klund
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/20a32286/geode-core/src/main/java/org/apache/geode/admin/jmx/internal/MX4JModelMBean.java
--
diff --git 
a/geode-core/src/main/java/org/apache/geode/admin/jmx/internal/MX4JModelMBean.java
 
b/geode-core/src/main/java/org/apache/geode/admin/jmx/internal/MX4JModelMBean.java
deleted file mode 100755
index d3f4ab2..000
--- 
a/geode-core/src/main/java/org/apache/geode/admin/jmx/internal/MX4JModelMBean.java
+++ /dev/null
@@ -1,1232 +0,0 @@
-/*
- * Copyright (C) MX4J. All rights reserved.
- *
- * This software is distributed under the terms of the MX4J License version 
1.0. See the terms of
- * the MX4J License in the documentation provided with this software.
- */
-
-package org.apache.geode.admin.jmx.internal;
-
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.util.Date;
-import java.util.Iterator;
-
-import javax.management.Attribute;
-import javax.management.AttributeChangeNotification;
-import javax.management.AttributeChangeNotificationFilter;
-import javax.management.AttributeList;
-import javax.management.AttributeNotFoundException;
-import javax.management.Descriptor;
-import javax.management.InstanceNotFoundException;
-import javax.management.InvalidAttributeValueException;
-import javax.management.ListenerNotFoundException;
-import javax.management.MBeanAttributeInfo;
-import javax.management.MBeanException;
-import javax.management.MBeanInfo;
-import javax.management.MBeanNotificationInfo;
-import javax.management.MBeanOperationInfo;
-import javax.management.MBeanRegistration;
-import javax.management.MBeanRegistrationException;
-import javax.management.MBeanServer;
-import javax.management.MalformedObjectNameException;
-import javax.management.Notification;
-import javax.management.NotificationBroadcasterSupport;
-import javax.management.NotificationEmitter;
-import javax.management.NotificationFilter;
-import javax.management.NotificationListener;
-import javax.management.ObjectName;
-import javax.management.ReflectionException;
-import javax.management.RuntimeErrorException;
-import javax.management.RuntimeOperationsException;
-import javax.management.ServiceNotFoundException;
-import javax.management.loading.ClassLoaderRepository;
-import javax.management.modelmbean.InvalidTargetObjectTypeException;
-import javax.management.modelmbean.ModelMBean;
-import javax.management.modelmbean.ModelMBeanAttributeInfo;
-import javax.management.modelmbean.ModelMBeanInfo;
-import javax.management.modelmbean.ModelMBeanOperationInfo;
-
-import mx4j.ImplementationException;
-import mx4j.log.FileLogger;
-import mx4j.log.Log;
-import mx4j.log.Logger;
-import mx4j.log.MBeanLogger;
-import mx4j.persist.FilePersister;
-import mx4j.persist.MBeanPersister;
-import mx4j.persist.PersisterMBean;
-import mx4j.util.Utils;
-
-import org.apache.geode.internal.i18n.LocalizedStrings;
-
-/**
- * @author mailto:biorn_stee...@users.sourceforge.net;>Simone 
Bordet
- * @version $Revision: 1.14 $
- */
-public class MX4JModelMBean implements ModelMBean, MBeanRegistration, 
NotificationEmitter {
-  private static final String OBJECT_RESOURCE_TYPE = "ObjectReference";
-
-  private static final int ALWAYS_STALE = 1;
-  private static final int NEVER_STALE = 2;
-  private static final int STALE = 3;
-  private static final int NOT_STALE = 4;
-
-  private static final int PERSIST_NEVER = -1;
-  private static final int PERSIST_ON_TIMER = -2;
-  private static final int PERSIST_ON_UPDATE = -3;
-  private static final int PERSIST_NO_MORE_OFTEN_THAN = -4;
-
-  private MBeanServer m_mbeanServer;
-  private Object m_managedResource;
-  private boolean m_canBeRegistered;
-  private ModelMBeanInfo m_modelMBeanInfo;
-  private NotificationBroadcasterSupport m_attributeChangeBroadcaster =
-  new NotificationBroadcasterSupport();
-  private NotificationBroadcasterSupport m_generalBroadcaster =
-  new NotificationBroadcasterSupport();
-
-  public MX4JModelMBean() throws MBeanException, RuntimeOperationsException {
-try {
-  load();
-} catch (Exception x) {
-  Logger logger = getLogger();
-  
logger.warn(LocalizedStrings.MX4JModelMBean_CANNOT_RESTORE_PREVIOUSLY_SAVED_STATUS
-  .toLocalizedString(), x);
-}
-  }
-
-  public MX4JModelMBean(ModelMBeanInfo info) throws MBeanException, 
RuntimeOperationsException {
-if (info == null)
-  throw new RuntimeOperationsException(new IllegalArgumentException(
-  LocalizedStrings.MX4JModelMBean_MODELMBEANINFO_PARAMETER_CANT_BE_NULL
-  .toLocalizedString()));
-else
-  setModelMBeanInfo(info);
-  }
-
-  private Logger getLogger() {
-return Log.getLogger(getClass().getName());
-  }
-
-  public ObjectName preRegister(MBeanServer server, ObjectName name) throws 
Exception {
-if (m_canBeRegistered) {
-  m_mbeanServer = server;
-  return name;
-} 

[45/50] [abbrv] incubator-geode git commit: GEODE-288: move admin packages to internal

2016-10-27 Thread klund
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/20a32286/geode-core/src/main/java/org/apache/geode/admin/internal/DistributedSystemHealthEvaluator.java
--
diff --git 
a/geode-core/src/main/java/org/apache/geode/admin/internal/DistributedSystemHealthEvaluator.java
 
b/geode-core/src/main/java/org/apache/geode/admin/internal/DistributedSystemHealthEvaluator.java
deleted file mode 100644
index a352616..000
--- 
a/geode-core/src/main/java/org/apache/geode/admin/internal/DistributedSystemHealthEvaluator.java
+++ /dev/null
@@ -1,167 +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 org.apache.geode.admin.internal;
-
-import org.apache.geode.admin.DistributedSystemHealthConfig;
-import org.apache.geode.distributed.internal.DM;
-import org.apache.geode.distributed.internal.DistributionConfig;
-import org.apache.geode.distributed.internal.DistributionManager;
-import org.apache.geode.distributed.internal.MembershipListener;
-import 
org.apache.geode.distributed.internal.membership.InternalDistributedMember;
-import org.apache.geode.internal.i18n.LocalizedStrings;
-
-import java.util.List;
-import java.util.Set;
-
-/**
- * Contains the logic for evaluating the health of an entire GemFire 
distributed system according to
- * the thresholds provided in a {@link DistributedSystemHealthConfig}.
- *
- * 
- *
- * Note that unlike other evaluators, the 
DistributedSystemHealthEvaluator resides in
- * the "administrator" VM and not in the member VMs. This is because there 
only needs to be one
- * DistributedSystemHealthEvaluator per distributed system.
- *
- *
- * @since GemFire 3.5
- */
-class DistributedSystemHealthEvaluator extends AbstractHealthEvaluator
-implements MembershipListener {
-
-  /** The config from which we get the evaluation criteria */
-  private DistributedSystemHealthConfig config;
-
-  /**
-   * The distribution manager with which this MembershipListener is registered
-   */
-  private DM dm;
-
-  /** The description of the distributed system being evaluated */
-  private String description;
-
-  /**
-   * The number of application members that have unexpectedly left since the 
previous evaluation
-   */
-  private int crashedApplications;
-
-  /// Constructors ///
-
-  /**
-   * Creates a new DistributedSystemHealthEvaluator
-   */
-  DistributedSystemHealthEvaluator(DistributedSystemHealthConfig config, DM 
dm) {
-super(null, dm);
-
-this.config = config;
-this.dm = dm;
-this.dm.addMembershipListener(this);
-
-StringBuffer sb = new StringBuffer();
-sb.append("Distributed System ");
-
-String desc = null;
-if (dm instanceof DistributionManager) {
-  desc = ((DistributionManager) dm).getDistributionConfigDescription();
-}
-
-if (desc != null) {
-  sb.append(desc);
-
-} else {
-  DistributionConfig dsc = dm.getSystem().getConfig();
-  String locators = dsc.getLocators();
-  if (locators == null || locators.equals("")) {
-sb.append("using multicast ");
-sb.append(dsc.getMcastAddress());
-sb.append(":");
-sb.append(dsc.getMcastPort());
-
-  } else {
-sb.append("using locators ");
-sb.append(locators);
-  }
-}
-
-this.description = sb.toString();
-  }
-
-   Instance Methods 
-
-  @Override
-  protected String getDescription() {
-return this.description;
-  }
-
-  /**
-   * Checks to make sure that the number of application members of the 
distributed system that have
-   * left unexpected since the last evaluation is less than the
-   * {@linkplain DistributedSystemHealthConfig#getMaxDepartedApplications 
threshold}. If not, the
-   * status is "poor" health.
-   */
-  void checkDepartedApplications(List status) {
-synchronized (this) {
-  long threshold = this.config.getMaxDepartedApplications();
-  if (this.crashedApplications > threshold) {
-String s =
-
LocalizedStrings.DistributedSystemHealth_THE_NUMBER_OF_APPLICATIONS_THAT_HAVE_LEFT_THE_DISTRIBUTED_SYSTEM_0_EXCEEDS_THE_THRESHOLD_1
-

[25/50] [abbrv] incubator-geode git commit: GEODE-288: move admin packages to internal

2016-10-27 Thread klund
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/20a32286/geode-core/src/main/java/org/apache/geode/internal/admin/api/impl/ManagedSystemMemberImpl.java
--
diff --git 
a/geode-core/src/main/java/org/apache/geode/internal/admin/api/impl/ManagedSystemMemberImpl.java
 
b/geode-core/src/main/java/org/apache/geode/internal/admin/api/impl/ManagedSystemMemberImpl.java
new file mode 100644
index 000..abc6d01
--- /dev/null
+++ 
b/geode-core/src/main/java/org/apache/geode/internal/admin/api/impl/ManagedSystemMemberImpl.java
@@ -0,0 +1,258 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more 
contributor license
+ * agreements. See the NOTICE file distributed with this work for additional 
information regarding
+ * copyright ownership. The ASF licenses this file to You under the Apache 
License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the 
License. You may obtain a
+ * copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software 
distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 
KIND, either express
+ * or implied. See the License for the specific language governing permissions 
and limitations under
+ * the License.
+ */
+package org.apache.geode.internal.admin.api.impl;
+
+import org.apache.geode.internal.admin.api.AdminException;
+import org.apache.geode.internal.admin.api.ConfigurationParameter;
+import org.apache.geode.internal.admin.api.ManagedEntityConfig;
+import org.apache.geode.internal.admin.GemFireVM;
+
+import static org.apache.geode.distributed.ConfigurationProperties.LOCATORS;
+
+/**
+ * A SystemMember that is also managed (or manageable) by the 
admin API.
+ *
+ * This class must be public so that its methods can be invoked reflectively 
(for MBean operations)
+ * on instances of its subclasses.
+ *
+ * @since GemFire 4.0
+ */
+public abstract class ManagedSystemMemberImpl extends SystemMemberImpl
+implements InternalManagedEntity {
+
+  /** Controller for starting and stopping local or remote managers */
+  protected ManagedEntityController controller;
+
+  /** The state of this managed entity (see bug 32455) */
+  private int state = UNKNOWN;
+
+  /** A lock that is obtained while this entity's state changes */
+  private final Object stateChange = new Object();
+
+  // Constructors //
+
+  /**
+   * Creates a new ManagedSystemMemberImpl that represents an 
existing member of an
+   * AdminDistributedSystem.
+   */
+  protected ManagedSystemMemberImpl(AdminDistributedSystemImpl system, 
GemFireVM vm)
+  throws AdminException {
+
+super(system, vm);
+this.controller = system.getEntityController();
+  }
+
+  /**
+   * Creates a new ManagedSystemMemberImpl that represents a 
non-existing member with
+   * the given ManagedEntityConfig that has not yet been started.
+   */
+  protected ManagedSystemMemberImpl(AdminDistributedSystemImpl system, 
ManagedEntityConfig config)
+  throws AdminException {
+
+super(system);
+this.internalId = null;
+this.id = getNewId();
+this.host = config.getHost();
+this.name = this.id;
+this.controller = system.getEntityController();
+  }
+
+  // Instance Methods //
+
+  public String getWorkingDirectory() {
+return this.getEntityConfig().getWorkingDirectory();
+  }
+
+  public void setWorkingDirectory(String workingDirectory) {
+this.getEntityConfig().setWorkingDirectory(workingDirectory);
+  }
+
+  public String getProductDirectory() {
+return this.getEntityConfig().getProductDirectory();
+  }
+
+  public void setProductDirectory(String productDirectory) {
+this.getEntityConfig().setProductDirectory(productDirectory);
+  }
+
+  @Override
+  public String getHost() {
+return this.getEntityConfig().getHost();
+  }
+
+  public int setState(int state) {
+if (this.stateChange == null) {
+  // The initial state is set in the constructor before
+  // stateChange is initialized.
+  int oldState = this.state;
+  this.state = state;
+  return oldState;
+
+} else {
+  synchronized (this.stateChange) {
+int oldState = this.state;
+this.state = state;
+
+this.stateChange.notifyAll();
+
+return oldState;
+  }
+}
+  }
+
+  /**
+   * Returns whether or not this managed system member needs to be stopped. If 
this member is
+   * stopped or is stopping, then it does not need to be stopped. Otherwise, 
it will atomically
+   * place this member in the {@link #STOPPING} state. See bug 32455.
+   */
+  protected boolean needToStop() {
+synchronized (this.stateChange) {
+  if (this.state == STOPPED || this.state == STOPPING) {
+return false;
+
+  } else {
+

[13/50] [abbrv] incubator-geode git commit: GEODE-288: move admin packages to internal

2016-10-27 Thread klund
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/20a32286/geode-core/src/main/resources/org/apache/geode/admin/jmx/mbeans-descriptors.xml
--
diff --git 
a/geode-core/src/main/resources/org/apache/geode/admin/jmx/mbeans-descriptors.xml
 
b/geode-core/src/main/resources/org/apache/geode/admin/jmx/mbeans-descriptors.xml
deleted file mode 100755
index b54716f..000
--- 
a/geode-core/src/main/resources/org/apache/geode/admin/jmx/mbeans-descriptors.xml
+++ /dev/null
@@ -1,1452 +0,0 @@
-
-http://jakarta.apache.org/commons/dtds/mbeans-descriptors.dtd;>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-  
-  
-  
-  
- 
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 
-
-
-
-
-
-
-
-  
-  
-
-
-  
-
-
-
-
-
-
-
-
-  
-
-  
-  
-  
-  
-  
-
-
-
-
-
-
-
-
-
-
-
-
-
- 
-
-
-
-
-
-
-
-
-
-
-
-  
-
-
-
-  
-  
gemfire.distributedsystem.member.joined
-
-
-
-  
-
-
-
-  
-  
gemfire.distributedsystem.member.left
-
-
-
-  
-
-
-
-  
-  
gemfire.distributedsystem.member.crashed
-
-
-
-  
-
-
-
-  
-  gemfire.distributedsystem.alert
-
-
-
-  
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-   
-
-  
-  
-  
-  
-
-
-
-  
-
-
-
-
-
-
-  
-
-
-
-  
-
-
-
-  
-
-
-  
-  
-
-
-
-
-   
-
-  
-
-  
-  
-  
-  
-
-
-
-
-
-
-
-
-
-
- 
-
-
-
-
-
-  
-
-
-
-  
-  
gemfire.distributedsystem.cache.created
-
-
-
-  
-
-
-
-  
-  
gemfire.distributedsystem.cache.closed
-
-
-
-  
-
-
-
-  
-  
gemfire.distributedsystem.cache.region.created
-
-
-
-  
-
-
-
-  
-  
gemfire.distributedsystem.cache.region.lost
-
-
-
-  
-
-
-
-  
-  
gemfire.distributedsystem.cache.client.joined
-
-
-
-  
-
-
-
-  
-  
gemfire.distributedsystem.cache.client.left
-
-
-
-  
-
-
-
-  
-  
gemfire.distributedsystem.cache.client.crashed
-
- 
-
-
- 
-
-
-
-
-
-
-
-
-
-
-
-
-
- 
-
-
-
-
-
-
-
-  
-
-  
-  
-  
-  
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-  
-
-  
-  
-  
-  
-
-
-
-
-
-
-
-
-
-
-
-
- 
-
-
-
-
-
-  
-
-
-
-  
-
-
-
-
-
-
-
-   
-  
-
-  
-  
-  
-  
- 
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-  
-
-
-
-
-
-
-
-
-
-
-
-
-
-  
-
-  
-  
-  
-  
- 
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-  
-
-  
-  
-  
-  
- 
-
-
-
-
-
-
-
-
-
-
-
-   
-   
- 
-
-
-
-
-
-
-
-
-
-  
-
-  
-  
-  
-  
- 
-
-
-
-
-
-
-
-
-
- 
-
- 
- 
-
-
-
-
-
-
-
-
-
-
-
-
-  
-
-
-
-  
-  
gemfire.distributedsystem.cache.created
-
-
-
-  
-
-
-
-  
-  
gemfire.distributedsystem.cache.closed
-
-
-
-  
-
-
-
-  
-  
gemfire.distributedsystem.cache.region.created
-
-
-
-  
-
-
-
-  
-  
gemfire.distributedsystem.cache.region.lost
-
-
-
-  
-
-
-
-  
-  
gemfire.distributedsystem.cache.client.joined
-
-
-
-  
-
-
-
-  
-  
gemfire.distributedsystem.cache.client.left
-
-
-
-  
-
-
-
-  
-  
gemfire.distributedsystem.cache.client.crashed
-
- 
- 

[29/50] [abbrv] incubator-geode git commit: GEODE-288: move admin packages to internal

2016-10-27 Thread klund
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/20a32286/geode-core/src/main/java/org/apache/geode/internal/admin/api/impl/AdminDistributedSystemImpl.java
--
diff --git 
a/geode-core/src/main/java/org/apache/geode/internal/admin/api/impl/AdminDistributedSystemImpl.java
 
b/geode-core/src/main/java/org/apache/geode/internal/admin/api/impl/AdminDistributedSystemImpl.java
new file mode 100755
index 000..ef0012f
--- /dev/null
+++ 
b/geode-core/src/main/java/org/apache/geode/internal/admin/api/impl/AdminDistributedSystemImpl.java
@@ -0,0 +1,2418 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more 
contributor license
+ * agreements. See the NOTICE file distributed with this work for additional 
information regarding
+ * copyright ownership. The ASF licenses this file to You under the Apache 
License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the 
License. You may obtain a
+ * copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software 
distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 
KIND, either express
+ * or implied. See the License for the specific language governing permissions 
and limitations under
+ * the License.
+ */
+package org.apache.geode.internal.admin.api.impl;
+
+import org.apache.geode.CancelException;
+import org.apache.geode.SystemFailure;
+import org.apache.geode.internal.admin.api.AdminException;
+import org.apache.geode.internal.admin.api.Alert;
+import org.apache.geode.internal.admin.api.AlertLevel;
+import org.apache.geode.internal.admin.api.AlertListener;
+import org.apache.geode.cache.persistence.PersistentID;
+import org.apache.geode.distributed.DistributedMember;
+import org.apache.geode.distributed.FutureCancelledException;
+import org.apache.geode.distributed.internal.*;
+import 
org.apache.geode.distributed.internal.membership.InternalDistributedMember;
+import org.apache.geode.internal.Assert;
+import org.apache.geode.internal.Banner;
+import org.apache.geode.internal.admin.*;
+import org.apache.geode.internal.admin.api.AdminDistributedSystem;
+import org.apache.geode.internal.admin.api.BackupStatus;
+import org.apache.geode.internal.admin.api.CacheServer;
+import org.apache.geode.internal.admin.api.CacheServerConfig;
+import org.apache.geode.internal.admin.api.CacheVm;
+import org.apache.geode.internal.admin.api.ConfigurationParameter;
+import org.apache.geode.internal.admin.api.DistributedSystemConfig;
+import org.apache.geode.internal.admin.api.DistributionLocator;
+import org.apache.geode.internal.admin.api.DistributionLocatorConfig;
+import org.apache.geode.internal.admin.api.GemFireHealth;
+import org.apache.geode.internal.admin.api.ManagedEntity;
+import org.apache.geode.internal.admin.api.ManagedEntityConfig;
+import org.apache.geode.internal.admin.api.OperationCancelledException;
+import org.apache.geode.internal.admin.api.RuntimeAdminException;
+import org.apache.geode.internal.admin.api.SystemMember;
+import org.apache.geode.internal.admin.api.SystemMemberCacheListener;
+import org.apache.geode.internal.admin.api.SystemMembershipEvent;
+import org.apache.geode.internal.admin.api.SystemMembershipListener;
+import org.apache.geode.internal.admin.remote.*;
+import org.apache.geode.internal.cache.persistence.PersistentMemberPattern;
+import org.apache.geode.internal.i18n.LocalizedStrings;
+import org.apache.geode.internal.logging.InternalLogWriter;
+import org.apache.geode.internal.logging.LogService;
+import org.apache.geode.internal.logging.LogWriterFactory;
+import org.apache.geode.internal.logging.log4j.LocalizedMessage;
+import org.apache.geode.internal.logging.log4j.LogMarker;
+import org.apache.geode.internal.logging.log4j.LogWriterAppender;
+import org.apache.geode.internal.logging.log4j.LogWriterAppenders;
+import org.apache.geode.internal.util.concurrent.FutureResult;
+import org.apache.logging.log4j.Logger;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.InetAddress;
+import java.text.SimpleDateFormat;
+import java.util.*;
+import java.util.concurrent.*;
+
+import static org.apache.geode.distributed.ConfigurationProperties.*;
+
+/**
+ * Represents a GemFire distributed system for remote 
administration/management.
+ *
+ * @since GemFire 3.5
+ */
+public class AdminDistributedSystemImpl
+implements AdminDistributedSystem, 
org.apache.geode.internal.admin.JoinLeaveListener,
+org.apache.geode.internal.admin.AlertListener,
+
org.apache.geode.distributed.internal.InternalDistributedSystem.DisconnectListener
 {
+
+  private static final Logger logger = LogService.getLogger();
+
+  /** String identity of this distributed system */
+  private String id;
+
+  /** Latest alert broadcast by any system members */
+  private Alert 

[44/50] [abbrv] incubator-geode git commit: GEODE-288: move admin packages to internal

2016-10-27 Thread klund
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/20a32286/geode-core/src/main/java/org/apache/geode/admin/internal/GemFireHealthImpl.java
--
diff --git 
a/geode-core/src/main/java/org/apache/geode/admin/internal/GemFireHealthImpl.java
 
b/geode-core/src/main/java/org/apache/geode/admin/internal/GemFireHealthImpl.java
deleted file mode 100644
index efeee66..000
--- 
a/geode-core/src/main/java/org/apache/geode/admin/internal/GemFireHealthImpl.java
+++ /dev/null
@@ -1,511 +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 org.apache.geode.admin.internal;
-
-import org.apache.geode.CancelException;
-import org.apache.geode.admin.*;
-import org.apache.geode.internal.Assert;
-import org.apache.geode.internal.admin.*;
-import org.apache.geode.internal.i18n.LocalizedStrings;
-
-import java.net.InetAddress;
-import java.net.UnknownHostException;
-import java.util.*;
-
-/**
- * Provides the implementation of the GemFireHealth 
administration API. This class is
- * responsible for {@linkplain GemFireVM#addHealthListener sending} the {@link 
GemFireHealthConfig}s
- * to the remote member VM in which the health is calcualted.
- *
- *
- * @since GemFire 3.5
- */
-public class GemFireHealthImpl implements GemFireHealth, JoinLeaveListener, 
HealthListener {
-
-  /** The distributed system whose health is being monitored */
-  private final GfManagerAgent agent;
-
-  /** The default configuration for checking GemFire health */
-  protected GemFireHealthConfig defaultConfig;
-
-  /**
-   * Maps the name of a host to its GemFireHealthConfig. Note 
that the mappings are
-   * created lazily.
-   */
-  private final Map hostConfigs;
-
-  /**
-   * Maps the name of a host to all of the members (GemFireVMs) 
that run on that host.
-   */
-  private final Map hostMembers;
-
-  /** The members that are known to be in {@link #OKAY_HEALTH}. */
-  private Collection okayHealth;
-
-  /** The members that are known to be in {@link #POOR_HEALTH}. */
-  private Collection poorHealth;
-
-  /** The overall health of GemFire */
-  private GemFireHealth.Health overallHealth;
-
-  /** Is this GemFireHealthImpl closed? */
-  private boolean isClosed;
-
-  /**
-   * The configuration specifying how the health of the distributed system 
should be computed.
-   */
-  protected volatile DistributedSystemHealthConfig dsHealthConfig;
-
-  /** Monitors the health of the entire distributed system */
-  private DistributedSystemHealthMonitor dsHealthMonitor = null;
-
-  /**
-   * The distributed system whose health is monitored by this 
GemFireHealth.
-   */
-  private final AdminDistributedSystem system;
-
-
-  /// Constructors ///
-
-  /**
-   * Creates a new GemFireHealthImpl that monitors the health of 
member of the given
-   * distributed system.
-   */
-  protected GemFireHealthImpl(GfManagerAgent agent, AdminDistributedSystem 
system) {
-// agent.getDM().getLogger().info("Creating GemFireHealthImpl",
-// new Exception("Stack trace"));
-
-this.agent = agent;
-this.system = system;
-
-this.hostConfigs = new HashMap();
-this.hostMembers = new HashMap();
-this.okayHealth = new HashSet();
-this.poorHealth = new HashSet();
-this.overallHealth = GOOD_HEALTH;
-this.isClosed = false;
-
-GemFireVM[] apps = this.agent.listApplications();
-for (int i = 0; i < apps.length; i++) {
-  GemFireVM member = apps[i];
-  this.noteNewMember(member);
-}
-
-agent.addJoinLeaveListener(this);
-setDefaultGemFireHealthConfig(createGemFireHealthConfig(null));
-setDistributedSystemHealthConfig(createDistributedSystemHealthConfig());
-  }
-
-  @Override
-  public String toString() {
-StringBuffer sb = new StringBuffer();
-sb.append("closed=" + isClosed);
-sb.append("; hostMembers=" + hostMembers);
-sb.append("; okayHealth=" + okayHealth);
-sb.append("; poorHealth=" + poorHealth);
-sb.append("; overallHealth=" + overallHealth);
-sb.append("; diagnosis=" + getDiagnosis());
-return sb.toString();
-  }
-  // Instance Methods //
-
-  /**
-   * Returns the 

[50/50] [abbrv] incubator-geode git commit: GEODE-288: move admin packages to internal

2016-10-27 Thread klund
GEODE-288: move admin packages to internal

* org.apache.geode.admin (old Admin API) moves to
org.apache.geode.internal.admin.api

* org.apache.geode.admin.internal (old Amin API implementation)
moves to org.apache.geode.internal.admin.api.impl

* org.apache.geode.admin.jmx (old JMX API) moves to
org.apache.geode.internal.admin.api.jmx

* org.apache.geode.admin.jmx.internal (old JMX API implementation)
moves to org.apache.geode.internal.admin.api.jmx.impl


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

Branch: refs/heads/feature/GEODE-288
Commit: 20a32286bbfa79d91f0ab18a885b06667547849b
Parents: f02ea36
Author: Kirk Lund 
Authored: Wed Oct 26 15:10:49 2016 -0700
Committer: Kirk Lund 
Committed: Wed Oct 26 16:52:33 2016 -0700

--
 geode-core/build.gradle |1 -
 .../java/org/apache/geode/DataSerializer.java   |2 +-
 .../org/apache/geode/admin/AdminConfig.java |  148 --
 .../geode/admin/AdminDistributedSystem.java |  434 
 .../admin/AdminDistributedSystemFactory.java|  148 --
 .../org/apache/geode/admin/AdminException.java  |   81 -
 .../apache/geode/admin/AdminXmlException.java   |   44 -
 .../main/java/org/apache/geode/admin/Alert.java |   53 -
 .../java/org/apache/geode/admin/AlertLevel.java |  168 --
 .../org/apache/geode/admin/AlertListener.java   |   30 -
 .../org/apache/geode/admin/BackupStatus.java|   46 -
 .../geode/admin/CacheDoesNotExistException.java |   80 -
 .../apache/geode/admin/CacheHealthConfig.java   |  151 --
 .../org/apache/geode/admin/CacheServer.java |   43 -
 .../apache/geode/admin/CacheServerConfig.java   |   50 -
 .../java/org/apache/geode/admin/CacheVm.java|   35 -
 .../org/apache/geode/admin/CacheVmConfig.java   |   51 -
 .../geode/admin/ConfigurationParameter.java |   72 -
 .../geode/admin/DistributedSystemConfig.java|  626 -
 .../admin/DistributedSystemHealthConfig.java|   74 -
 .../apache/geode/admin/DistributionLocator.java |   45 -
 .../geode/admin/DistributionLocatorConfig.java  |   81 -
 .../org/apache/geode/admin/GemFireHealth.java   |  209 --
 .../apache/geode/admin/GemFireHealthConfig.java |   54 -
 .../apache/geode/admin/GemFireMemberStatus.java |  670 -
 .../org/apache/geode/admin/ManagedEntity.java   |  100 -
 .../apache/geode/admin/ManagedEntityConfig.java |   88 -
 .../apache/geode/admin/MemberHealthConfig.java  |  142 -
 .../admin/OperationCancelledException.java  |   47 -
 .../geode/admin/RegionNotFoundException.java|   39 -
 .../geode/admin/RegionSubRegionSnapshot.java|  183 --
 .../geode/admin/RuntimeAdminException.java  |   48 -
 .../java/org/apache/geode/admin/Statistic.java  |   64 -
 .../apache/geode/admin/StatisticResource.java   |   82 -
 .../org/apache/geode/admin/SystemMember.java|  145 --
 .../geode/admin/SystemMemberBridgeServer.java   |  307 ---
 .../apache/geode/admin/SystemMemberCache.java   |  183 --
 .../geode/admin/SystemMemberCacheEvent.java |   33 -
 .../geode/admin/SystemMemberCacheListener.java  |   76 -
 .../geode/admin/SystemMemberCacheServer.java|  308 ---
 .../apache/geode/admin/SystemMemberRegion.java  |  314 ---
 .../geode/admin/SystemMemberRegionEvent.java|   31 -
 .../apache/geode/admin/SystemMemberType.java|  150 --
 .../geode/admin/SystemMembershipEvent.java  |   42 -
 .../geode/admin/SystemMembershipListener.java   |   59 -
 .../UnmodifiableConfigurationException.java |   81 -
 .../admin/internal/AbstractHealthEvaluator.java |  170 --
 .../internal/AdminDistributedSystemImpl.java| 2400 -
 .../admin/internal/BackupDataStoreHelper.java   |   74 -
 .../admin/internal/BackupDataStoreResult.java   |   48 -
 .../geode/admin/internal/BackupStatusImpl.java  |   59 -
 .../admin/internal/CacheHealthConfigImpl.java   |   91 -
 .../admin/internal/CacheHealthEvaluator.java|  306 ---
 .../admin/internal/CacheServerConfigImpl.java   |  133 -
 .../geode/admin/internal/CacheServerImpl.java   |  190 --
 .../internal/ConfigurationParameterImpl.java|  282 --
 .../ConfigurationParameterListener.java |   30 -
 .../DisabledManagedEntityController.java|   94 -
 .../internal/DistributedSystemConfigImpl.java   | 1109 
 .../DistributedSystemHealthConfigImpl.java  |   53 -
 .../DistributedSystemHealthEvaluator.java   |  167 --
 .../DistributedSystemHealthMonitor.java |  461 
 .../internal/DistributionLocatorConfigImpl.java |  187 --
 .../admin/internal/DistributionLocatorImpl.java |  329 ---
 .../EnabledManagedEntityController.java |  385 ---
 .../admin/internal/FinishBackupRequest.java |  173 --
 

[43/50] [abbrv] incubator-geode git commit: GEODE-288: move admin packages to internal

2016-10-27 Thread klund
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/20a32286/geode-core/src/main/java/org/apache/geode/admin/internal/ManagedSystemMemberImpl.java
--
diff --git 
a/geode-core/src/main/java/org/apache/geode/admin/internal/ManagedSystemMemberImpl.java
 
b/geode-core/src/main/java/org/apache/geode/admin/internal/ManagedSystemMemberImpl.java
deleted file mode 100644
index 02e7ae4..000
--- 
a/geode-core/src/main/java/org/apache/geode/admin/internal/ManagedSystemMemberImpl.java
+++ /dev/null
@@ -1,258 +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 org.apache.geode.admin.internal;
-
-import org.apache.geode.admin.AdminException;
-import org.apache.geode.admin.ConfigurationParameter;
-import org.apache.geode.admin.ManagedEntityConfig;
-import org.apache.geode.internal.admin.GemFireVM;
-
-import static org.apache.geode.distributed.ConfigurationProperties.LOCATORS;
-
-/**
- * A SystemMember that is also managed (or manageable) by the 
admin API.
- *
- * This class must be public so that its methods can be invoked reflectively 
(for MBean operations)
- * on instances of its subclasses.
- *
- * @since GemFire 4.0
- */
-public abstract class ManagedSystemMemberImpl extends SystemMemberImpl
-implements InternalManagedEntity {
-
-  /** Controller for starting and stopping local or remote managers */
-  protected ManagedEntityController controller;
-
-  /** The state of this managed entity (see bug 32455) */
-  private int state = UNKNOWN;
-
-  /** A lock that is obtained while this entity's state changes */
-  private final Object stateChange = new Object();
-
-  // Constructors //
-
-  /**
-   * Creates a new ManagedSystemMemberImpl that represents an 
existing member of an
-   * AdminDistributedSystem.
-   */
-  protected ManagedSystemMemberImpl(AdminDistributedSystemImpl system, 
GemFireVM vm)
-  throws AdminException {
-
-super(system, vm);
-this.controller = system.getEntityController();
-  }
-
-  /**
-   * Creates a new ManagedSystemMemberImpl that represents a 
non-existing member with
-   * the given ManagedEntityConfig that has not yet been started.
-   */
-  protected ManagedSystemMemberImpl(AdminDistributedSystemImpl system, 
ManagedEntityConfig config)
-  throws AdminException {
-
-super(system);
-this.internalId = null;
-this.id = getNewId();
-this.host = config.getHost();
-this.name = this.id;
-this.controller = system.getEntityController();
-  }
-
-  // Instance Methods //
-
-  public String getWorkingDirectory() {
-return this.getEntityConfig().getWorkingDirectory();
-  }
-
-  public void setWorkingDirectory(String workingDirectory) {
-this.getEntityConfig().setWorkingDirectory(workingDirectory);
-  }
-
-  public String getProductDirectory() {
-return this.getEntityConfig().getProductDirectory();
-  }
-
-  public void setProductDirectory(String productDirectory) {
-this.getEntityConfig().setProductDirectory(productDirectory);
-  }
-
-  @Override
-  public String getHost() {
-return this.getEntityConfig().getHost();
-  }
-
-  public int setState(int state) {
-if (this.stateChange == null) {
-  // The initial state is set in the constructor before
-  // stateChange is initialized.
-  int oldState = this.state;
-  this.state = state;
-  return oldState;
-
-} else {
-  synchronized (this.stateChange) {
-int oldState = this.state;
-this.state = state;
-
-this.stateChange.notifyAll();
-
-return oldState;
-  }
-}
-  }
-
-  /**
-   * Returns whether or not this managed system member needs to be stopped. If 
this member is
-   * stopped or is stopping, then it does not need to be stopped. Otherwise, 
it will atomically
-   * place this member in the {@link #STOPPING} state. See bug 32455.
-   */
-  protected boolean needToStop() {
-synchronized (this.stateChange) {
-  if (this.state == STOPPED || this.state == STOPPING) {
-return false;
-
-  } else {
-setState(STOPPING);
-return true;
-  }
-}
-  }
-
-  /**
-   * 

[49/50] [abbrv] incubator-geode git commit: GEODE-288: move admin packages to internal

2016-10-27 Thread klund
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/20a32286/geode-core/src/main/java/org/apache/geode/admin/CacheVmConfig.java
--
diff --git a/geode-core/src/main/java/org/apache/geode/admin/CacheVmConfig.java 
b/geode-core/src/main/java/org/apache/geode/admin/CacheVmConfig.java
deleted file mode 100755
index 81f4a38..000
--- a/geode-core/src/main/java/org/apache/geode/admin/CacheVmConfig.java
+++ /dev/null
@@ -1,51 +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 org.apache.geode.admin;
-
-/**
- * Configuration for a GemFire cache server VM that is managed by the 
administration API. The VM may
- * or may not be running.
- *
- * @see AdminDistributedSystem#addCacheVm()
- *
- * @since GemFire 5.7
- * @deprecated as of 7.0 use the management
- * package instead
- */
-public interface CacheVmConfig extends ManagedEntityConfig {
-  /**
-   * Returns the cache.xml declarative caching initialization 
file used to configure
-   * this cache server VM. By default, a cache server VM is started without an 
XML file.
-   */
-  public String getCacheXMLFile();
-
-  /**
-   * Sets the cache.xml declarative caching initialization file 
used to configure this
-   * cache server VM.
-   */
-  public void setCacheXMLFile(String cacheXml);
-
-  /**
-   * Returns the location(s) of user classes (such as cache loaders) required 
by the cache server
-   * VM.
-   */
-  public String getClassPath();
-
-  /**
-   * Sets the location(s) of user classes (such as cache loaders) required by 
the cache server VM.
-   */
-  public void setClassPath(String classpath);
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/20a32286/geode-core/src/main/java/org/apache/geode/admin/ConfigurationParameter.java
--
diff --git 
a/geode-core/src/main/java/org/apache/geode/admin/ConfigurationParameter.java 
b/geode-core/src/main/java/org/apache/geode/admin/ConfigurationParameter.java
deleted file mode 100755
index 74e1510..000
--- 
a/geode-core/src/main/java/org/apache/geode/admin/ConfigurationParameter.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 org.apache.geode.admin;
-
-/**
- * A single configuration parameter of a {@link SystemMember}.
- *
- * @since GemFire 3.5
- *
- * @deprecated as of 7.0 use the management
- * package instead
- */
-public interface ConfigurationParameter {
-
-  /** Gets the identifying name of this configuration parameter. */
-  public String getName();
-
-  /** Gets the full description of this configuration parameter */
-  public String getDescription();
-
-  /** Gets the current value */
-  public Object getValue();
-
-  /** Gets the current value as a string */
-  public String getValueAsString();
-
-  /** Gets the class type of the value */
-  public Class getValueType();
-
-  /** True if this is modifiable; false if read-only */
-  public boolean isModifiable();
-
-  /** Returns true if this config parameter uses a string array for value. */
-  public boolean isArray();
-
-  /** Returns true if this config parameter represents an InetAddress value. */
-  public boolean isInetAddress();
-
-  /** Returns true if this config parameter represents a File value. */
-  public boolean isFile();
-
-  /** Returns true if this config parameter represents an octal value. */
-  

[15/50] [abbrv] incubator-geode git commit: GEODE-288: move admin packages to internal

2016-10-27 Thread klund
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/20a32286/geode-core/src/main/java/org/apache/geode/internal/admin/api/jmx/impl/package.html
--
diff --git 
a/geode-core/src/main/java/org/apache/geode/internal/admin/api/jmx/impl/package.html
 
b/geode-core/src/main/java/org/apache/geode/internal/admin/api/jmx/impl/package.html
new file mode 100755
index 000..ab335d1
--- /dev/null
+++ 
b/geode-core/src/main/java/org/apache/geode/internal/admin/api/jmx/impl/package.html
@@ -0,0 +1,166 @@
+
+
+
+
+Contains the implementation of the external JMX APIs from
+org.apache.geode.internal.admin.api.jmx.
+
+JMX Support in GemFire
+
+Our goal was to provide JMX administrative support in GemFire.  The design was 
influenced by these important factors:
+
+
+1) Requirement to not impact performance of the product
+2) Desire to introduce JMX without altering the existing product or the 
management console
+3) Similar functionality already existed in the console and the 
internal.admin pkg which the console uses
+4) Requirement to also introduce a simple and usable Admin API which or 
may not be related to JMX
+
+
+From a functional stand point, the JMX support was supposed to provide most of 
the same administrative and operational monitoring that the console already 
provides.  In some cases we limited the functionality due to security concerns 
and in others because it was hard to express the features as JMX beans.  The 
JMX Agent also provides some functionality (such as Health monitoring) that is 
not currently in the console.
+
+The Agent communicates with the distributed system using the same distribution 
manager {@link org.apache.geode.distributed.internal.DistributionManager} as 
the console uses and thus has the same requirements that determine what 
distributed system it can manage.  Although the Console currently supports 
managing multiple distributed systems, we decided that a given Agent should 
only be able to manage a single system.  We have not tested the use of more 
than one Agent for the same system, however nothing currently prohibits this.
+
+We decided to develop a simple public Admin API which in essence wraps the 
internal.admin API that the Console currently uses extensively.  The Admin API 
also contains implementations of new functionality not in internal.admin.  Our 
JMX support is an extension to this Admin API.  In an overly simplified view, 
the GemFire JMX MBeans are ModelMBeans that manage instances of the Admin API 
objects housed in the Agent's MBeanServer.
+
+The selected architecture consists of a Daemon Agent, which exists in a 
separate VM that GemFire does not depend on.  This Agent hosts an MBeanServer, 
instances of any and all MBeans registered for managing a GemFire distributed 
system, and server connectors/adaptors that various types of clients can 
connect to.
+
+The two server connectors we selected are the HttpAdaptor and the RMI 
Connector.  The HttpAdaptor provides an HTML user interface of all MBeans in 
the MBeanServer.  Although this generic UI is not as rich as an RMI client (or 
the GemFire Console) could be, it provides a functional and easy to use UI with 
no development required.  The JMX Remote specification details the standard 
connectors.  Although the HttpAdaptor is not required by this Sun spec. it is 
included in some form with all JMX implementations that I investigated.  It 
should be noted that our JMX Agent currently starts up the HttpAdaptor, but not 
the RMI Connector.  The latter is deferred as later work since some form of 
client must be developed for testing.  Further research may also uncover a 
generic, configurable open-source RMI client for JMX.  The GemFire Console 
could in theory be reworked as an RMI Connector client, but this is not 
currently planned.
+
+Two open-source JMX implementations made it to our final review for 
consideration: http://www.xmojo.org;>XMOJO and http://www.mx4j.org;>MX4J.  The decision to go with MX4J was based 
mainly on our perceptions of MX4J being more active and widespread in use.  
Additionally, XMOJO is associated with http://www.adventnet.com/;>AdventNet which produces commercial 
products.  This made MX4J seem more true to open-source and safer from 
corporate tampering.
+
+ModelMBeans are very dynamic and capable of managing aggregate resources.  Use 
of a ModelMBean entails specifying meta-data to an instance of 
javax.management.modelmbean.RequiredModelMBean.  This meta-data identifies the 
manageble resource(s) which can consist of a single object, or many objects, 
including those in one VM or in any number of distributed VMs.  We decided to 
subclass classes in the Admin API in order to massage them a little and make 
them easier to use as a managed resource by the ModelMBean.  For example, 
org.apache.geode.internal.admin.api.GemFireManager represents a type of member 
in a GemFire system which manages shared memory. 

[35/50] [abbrv] incubator-geode git commit: GEODE-288: move admin packages to internal

2016-10-27 Thread klund
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/20a32286/geode-core/src/main/java/org/apache/geode/admin/jmx/internal/MemberInfoWithStatsMBean.java
--
diff --git 
a/geode-core/src/main/java/org/apache/geode/admin/jmx/internal/MemberInfoWithStatsMBean.java
 
b/geode-core/src/main/java/org/apache/geode/admin/jmx/internal/MemberInfoWithStatsMBean.java
deleted file mode 100644
index 40a514a..000
--- 
a/geode-core/src/main/java/org/apache/geode/admin/jmx/internal/MemberInfoWithStatsMBean.java
+++ /dev/null
@@ -1,1347 +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 org.apache.geode.admin.jmx.internal;
-
-import static org.apache.geode.distributed.ConfigurationProperties.*;
-
-import org.apache.geode.admin.*;
-import org.apache.geode.admin.jmx.Agent;
-import org.apache.geode.cache.InterestPolicy;
-import org.apache.geode.cache.SubscriptionAttributes;
-import org.apache.geode.distributed.internal.DistributionConfig;
-import org.apache.geode.internal.GemFireVersion;
-import org.apache.geode.internal.admin.remote.ClientHealthStats;
-import org.apache.geode.internal.i18n.LocalizedStrings;
-import org.apache.geode.internal.logging.LogService;
-import org.apache.geode.internal.logging.log4j.LocalizedMessage;
-import mx4j.AbstractDynamicMBean;
-import org.apache.logging.log4j.Logger;
-
-import javax.management.*;
-import java.net.InetAddress;
-import java.text.MessageFormat;
-import java.util.*;
-import java.util.concurrent.atomic.AtomicLong;
-
-/**
- * This class uses the JMX Attributes/Operations that use (return/throw) 
GemFire types. This is the
- * single MBean accessible with ObjectName string {@link 
MemberInfoWithStatsMBean#MBEAN_NAME}}. This
- * MBean can be used to retrieve the all member details as plain java types.
- * 
- * This MBean also acts as a Notification Hub for all the Notifications that 
are defined for Admin
- * Distributed System.
- * 
- * 
- * @since GemFire 6.5
- */
-public class MemberInfoWithStatsMBean extends AbstractDynamicMBean implements 
NotificationEmitter {
-  private static final Logger logger = LogService.getLogger();
-
-  /* constants defining max no of attributes/operations/notifications */
-  private static final int MAX_ATTRIBUTES_COUNT = 3;
-  private static final int MAX_OPERATIONS_COUNT = 3;
-  private static final int MAX_NOTIFICATIONS_COUNT = 9;
-
-  private static final String NOT_AVAILABLE_STR = "N/A";
-  private static final String NOT_AVAILABLE = null;
-  private static final Number NOT_AVAILABLE_NUMBER = null;
-
-  /*
-   * String constant used for a region that is used on admin side just as a 
root for rootRegions
-   * defined on the member
-   */
-  private static final String PLACE_HOLDER_ROOT_REGION = "/Root/";
-
-  /* String that are used to form QueryExp/ObjectName for querying MBeanServer 
*/
-  private static final String REGION_QUERY_EXPRESSION = 
"*GemFire.Cache*:*,owner={0},type=Region";
-  private static final String STATS_QUERY_EXPRESSION = 
"*GemFire.Statistic*:*,source={0},name={1}";
-
-  /** mbean name string for this MBean */
-  /* default */static final String MBEAN_NAME = 
"GemFire:type=MemberInfoWithStatsMBean";
-
-  /** ObjectName handle for this MBean */
-  private ObjectName objectName;
-
-  /** version of the GemFire Enterprise system that is running */
-  private String version;
-  private int refreshInterval;
-  private String id;
-
-  private Agent agent;
-  private AdminDistributedSystemJmxImpl adminDSJmx;
-
-  private NotificationForwarder forwarder;
-  private boolean isInitialized;// needs synchronization?
-
-  /**
-   * Default Constructor
-   * 
-   * @param agent Admin Agent instance
-   * @throws OperationsException if ObjectName can't be formed for this MBean
-   * @throws MBeanRegistrationException
-   * @throws AdminException
-   */
-  MemberInfoWithStatsMBean(Agent agent)
-  throws OperationsException, MBeanRegistrationException, AdminException {
-this.agent = agent;
-this.objectName = ObjectName.getInstance(MBEAN_NAME);
-this.version = GemFireVersion.getGemFireVersion();
-this.refreshInterval = -1;
-this.id = NOT_AVAILABLE_STR;
-this.forwarder = new 

[27/50] [abbrv] incubator-geode git commit: GEODE-288: move admin packages to internal

2016-10-27 Thread klund
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/20a32286/geode-core/src/main/java/org/apache/geode/internal/admin/api/impl/DistributedSystemHealthConfigImpl.java
--
diff --git 
a/geode-core/src/main/java/org/apache/geode/internal/admin/api/impl/DistributedSystemHealthConfigImpl.java
 
b/geode-core/src/main/java/org/apache/geode/internal/admin/api/impl/DistributedSystemHealthConfigImpl.java
new file mode 100644
index 000..d38d5cb
--- /dev/null
+++ 
b/geode-core/src/main/java/org/apache/geode/internal/admin/api/impl/DistributedSystemHealthConfigImpl.java
@@ -0,0 +1,53 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more 
contributor license
+ * agreements. See the NOTICE file distributed with this work for additional 
information regarding
+ * copyright ownership. The ASF licenses this file to You under the Apache 
License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the 
License. You may obtain a
+ * copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software 
distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 
KIND, either express
+ * or implied. See the License for the specific language governing permissions 
and limitations under
+ * the License.
+ */
+package org.apache.geode.internal.admin.api.impl;
+
+import org.apache.geode.internal.admin.api.DistributedSystemHealthConfig;
+
+/**
+ * The implementation of DistributedSystemHealthConfig. Note that 
because it never
+ * leaves the management VM, it is not Serializable and is not 
part of the
+ * {@link GemFireHealthConfigImpl} class hierarchy.
+ *
+ *
+ * @since GemFire 3.5
+ */
+public class DistributedSystemHealthConfigImpl implements 
DistributedSystemHealthConfig {
+
+  /**
+   * The maximum number of application members that can unexceptedly leave a 
healthy the distributed
+   * system.
+   */
+  private long maxDepartedApplications = DEFAULT_MAX_DEPARTED_APPLICATIONS;
+
+  // Constructors //
+
+  /**
+   * Creates a new DistributedSystemHealthConfigImpl with the 
default configuration.
+   */
+  protected DistributedSystemHealthConfigImpl() {
+
+  }
+
+  / Instance Methods /
+
+  public long getMaxDepartedApplications() {
+return this.maxDepartedApplications;
+  }
+
+  public void setMaxDepartedApplications(long maxDepartedApplications) {
+this.maxDepartedApplications = maxDepartedApplications;
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/20a32286/geode-core/src/main/java/org/apache/geode/internal/admin/api/impl/DistributedSystemHealthEvaluator.java
--
diff --git 
a/geode-core/src/main/java/org/apache/geode/internal/admin/api/impl/DistributedSystemHealthEvaluator.java
 
b/geode-core/src/main/java/org/apache/geode/internal/admin/api/impl/DistributedSystemHealthEvaluator.java
new file mode 100644
index 000..5087933
--- /dev/null
+++ 
b/geode-core/src/main/java/org/apache/geode/internal/admin/api/impl/DistributedSystemHealthEvaluator.java
@@ -0,0 +1,167 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more 
contributor license
+ * agreements. See the NOTICE file distributed with this work for additional 
information regarding
+ * copyright ownership. The ASF licenses this file to You under the Apache 
License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the 
License. You may obtain a
+ * copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software 
distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 
KIND, either express
+ * or implied. See the License for the specific language governing permissions 
and limitations under
+ * the License.
+ */
+package org.apache.geode.internal.admin.api.impl;
+
+import org.apache.geode.internal.admin.api.DistributedSystemHealthConfig;
+import org.apache.geode.distributed.internal.DM;
+import org.apache.geode.distributed.internal.DistributionConfig;
+import org.apache.geode.distributed.internal.DistributionManager;
+import org.apache.geode.distributed.internal.MembershipListener;
+import 
org.apache.geode.distributed.internal.membership.InternalDistributedMember;
+import org.apache.geode.internal.i18n.LocalizedStrings;
+
+import java.util.List;
+import java.util.Set;
+
+/**
+ * Contains the logic for evaluating the health of an entire GemFire 
distributed system according to
+ * the thresholds provided in a {@link DistributedSystemHealthConfig}.
+ *
+ * 
+ *
+ * Note that unlike other evaluators, the 
DistributedSystemHealthEvaluator 

[40/50] [abbrv] incubator-geode git commit: GEODE-288: move admin packages to internal

2016-10-27 Thread klund
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/20a32286/geode-core/src/main/java/org/apache/geode/admin/jmx/internal/AgentConfigImpl.java
--
diff --git 
a/geode-core/src/main/java/org/apache/geode/admin/jmx/internal/AgentConfigImpl.java
 
b/geode-core/src/main/java/org/apache/geode/admin/jmx/internal/AgentConfigImpl.java
deleted file mode 100644
index 4e53b07..000
--- 
a/geode-core/src/main/java/org/apache/geode/admin/jmx/internal/AgentConfigImpl.java
+++ /dev/null
@@ -1,1915 +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 org.apache.geode.admin.jmx.internal;
-
-import static org.apache.geode.distributed.ConfigurationProperties.*;
-import static org.apache.geode.distributed.internal.DistributionConfig.*;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.PrintWriter;
-import java.io.StringWriter;
-import java.net.InetAddress;
-import java.net.URL;
-import java.util.Enumeration;
-import java.util.Iterator;
-import java.util.Properties;
-import java.util.StringTokenizer;
-
-import org.apache.geode.GemFireIOException;
-import org.apache.geode.admin.DistributedSystemConfig;
-import org.apache.geode.admin.DistributionLocatorConfig;
-import org.apache.geode.admin.internal.DistributedSystemConfigImpl;
-import org.apache.geode.admin.internal.InetAddressUtil;
-import org.apache.geode.admin.jmx.Agent;
-import org.apache.geode.admin.jmx.AgentConfig;
-import org.apache.geode.internal.ClassPathLoader;
-import org.apache.geode.internal.i18n.LocalizedStrings;
-import org.apache.geode.internal.util.IOUtils;
-
-/**
- * Provides the JMX Agent configuration properties.
- * 
- * Supports importing of persisted properties from an external configuration 
file.
- * 
- * Select values can also be overridden with command line arguments. See 
remarks on individual
- * properties for further information.
- * 
- * Extends and implements DistributedSystemConfig.
- * 
- * @since GemFire 3.5 (in which it was named AgentConfig)
- */
-public class AgentConfigImpl extends DistributedSystemConfigImpl implements 
AgentConfig {
-
-  // -
-  // Static class variable(s)
-  // -
-
-  /**
-   * Command-line arg to enable agent debugging
-   */
-  public static final String AGENT_DEBUG = "agent-debug";
-
-  /**
-   * The name of the "propertyFile" property. May specify as cmd-line arg
-   */
-  public static final String PROPERTY_FILE_NAME = "property-file";
-
-  /**
-   * The name of the "gfAgentPropertyFile" property, can be specified as 
System Property
-   */
-  public static final String AGENT_PROPSFILE_PROPERTY_NAME = 
"gfAgentPropertyFile";
-
-  // -
-  // DistributionLocator properties...
-  // -
-
-  /**
-   * The name of the "locator.host-" property
-   */
-  public static final String LOCATOR_HOST_NAME = "locator.host-";
-  /**
-   * The name of the "locator.port-" property
-   */
-  public static final String LOCATOR_PORT_NAME = "locator.port-";
-  /**
-   * The name of the "locator.product-directory-" property
-   */
-  public static final String LOCATOR_PRODUCT_DIRECTORY_NAME = 
"locator.product-directory-";
-  /**
-   * The name of the "locator.working-directory-" property
-   */
-  public static final String LOCATOR_WORKING_DIRECTORY_NAME = 
"locator.working-directory-";
-  /**
-   * The name of the "locator.remote-command-" property
-   */
-  public static final String LOCATOR_REMOTE_COMMAND = 
"locator.remote-command-";
-  /**
-   * The name of the "locator.bind-address-" property
-   */
-  public static final String LOCATOR_BIND_ADDRESS = "locator.bind-address-";
-  /**
-   * the properties used in configuring a locator's distributed system
-   */
-  public static final String LOCATOR_DS_PROPERTIES = "locator.ds-properties";
-
-  /**
-   * The default log file for stand-alone JMX agents
-   */
-  /* package scope */
-  

[31/50] [abbrv] incubator-geode git commit: GEODE-288: move admin packages to internal

2016-10-27 Thread klund
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/20a32286/geode-core/src/main/java/org/apache/geode/internal/admin/api/GemFireMemberStatus.java
--
diff --git 
a/geode-core/src/main/java/org/apache/geode/internal/admin/api/GemFireMemberStatus.java
 
b/geode-core/src/main/java/org/apache/geode/internal/admin/api/GemFireMemberStatus.java
new file mode 100755
index 000..6bac386
--- /dev/null
+++ 
b/geode-core/src/main/java/org/apache/geode/internal/admin/api/GemFireMemberStatus.java
@@ -0,0 +1,670 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more 
contributor license
+ * agreements. See the NOTICE file distributed with this work for additional 
information regarding
+ * copyright ownership. The ASF licenses this file to You under the Apache 
License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the 
License. You may obtain a
+ * copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software 
distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 
KIND, either express
+ * or implied. See the License for the specific language governing permissions 
and limitations under
+ * the License.
+ */
+package org.apache.geode.internal.admin.api;
+
+import org.apache.geode.cache.Cache;
+import org.apache.geode.cache.Region;
+import org.apache.geode.cache.client.PoolManager;
+import org.apache.geode.cache.server.CacheServer;
+import org.apache.geode.distributed.DistributedSystem;
+import org.apache.geode.distributed.Locator;
+import org.apache.geode.distributed.internal.DM;
+import org.apache.geode.distributed.internal.DistributionConfig;
+import org.apache.geode.distributed.internal.InternalDistributedSystem;
+import 
org.apache.geode.distributed.internal.membership.InternalDistributedMember;
+import org.apache.geode.internal.net.SocketCreator;
+import org.apache.geode.internal.admin.ClientHealthMonitoringRegion;
+import org.apache.geode.internal.admin.remote.ClientHealthStats;
+import org.apache.geode.internal.cache.*;
+import org.apache.geode.internal.cache.tier.InternalClientMembership;
+import org.apache.geode.internal.cache.tier.sockets.ClientProxyMembershipID;
+
+import java.io.IOException;
+import java.io.Serializable;
+import java.net.InetAddress;
+import java.util.*;
+
+/**
+ * Class GemFireMemberStatus provides the status of a specific 
GemFire member VM. This
+ * VM can be a peer, a client, a server and/or a gateway.
+ * 
+ * @deprecated as of 7.0 use the management
+ * package instead
+ */
+public class GemFireMemberStatus implements Serializable {
+  private static final long serialVersionUID = 3389997790525991310L;
+
+  /**
+   * Notifies whether this member is a client to a cache server.
+   */
+  protected boolean _isClient;
+
+  /**
+   * Notifies whether this member is a cache server.
+   */
+  protected boolean _isServer;
+
+  /**
+   * Notifies whether this member is a hub for WAN gateways.
+   */
+  protected boolean _isGatewayHub;
+
+  /**
+   * Notifies whether this member is a locator.
+   */
+  protected boolean _isLocator;
+
+  protected boolean _isPrimaryGatewayHub;
+
+  protected Object/* GatewayHubStatus */ _gatewayHubStatus;
+
+  protected boolean _isConnected;
+  protected Serializable _memberId;
+  protected Set _connectedPeers;
+  protected Set _connectedServers;
+  protected Set _unconnectedServers;
+  protected Set _connectedClients;
+  protected Map _connectedIncomingGateways;
+  protected Map _outgoingGateways;
+
+  protected Map _clientHostNames;
+  protected Map _clientQueueSizes;
+  protected Map _gatewayQueueSizes;
+  protected Map _regionStatuses;
+  protected Map _clientHealthStats;
+
+  protected String _memberName;
+  protected int _mcastPort;
+  protected int _serverPort;
+  protected InetAddress _mcastAddress;
+  protected String _bindAddress;
+  protected String _locators;
+  protected InetAddress _hostAddress;
+
+  protected long _maximumHeapSize;
+  protected long _freeHeapSize;
+
+  protected long upTime = -1;
+
+  protected transient final Cache cache;
+
+  public GemFireMemberStatus() {
+this(null);
+  }
+
+  public GemFireMemberStatus(Cache cache) {
+this.cache = cache;
+DistributedSystem ds = null;
+if (cache != null) {
+  ds = cache.getDistributedSystem();
+}
+initialize(ds);
+  }
+
+  public boolean getIsConnected() {
+return this._isConnected;
+  }
+
+  protected void setIsConnected(boolean isConnected) {
+this._isConnected = isConnected;
+  }
+
+  /**
+   * Returns whether this member is a client to a cache server
+   * 
+   * @return whether this member is a client to a cache server
+   */
+  public boolean getIsClient() {
+return this._isClient;
+  }
+
+  /**
+   * Sets whether this member is a client to a cache server
+   

[33/50] [abbrv] incubator-geode git commit: GEODE-288: move admin packages to internal

2016-10-27 Thread klund
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/20a32286/geode-core/src/main/java/org/apache/geode/admin/jmx/internal/package.html
--
diff --git 
a/geode-core/src/main/java/org/apache/geode/admin/jmx/internal/package.html 
b/geode-core/src/main/java/org/apache/geode/admin/jmx/internal/package.html
deleted file mode 100755
index bc2b2f2..000
--- a/geode-core/src/main/java/org/apache/geode/admin/jmx/internal/package.html
+++ /dev/null
@@ -1,166 +0,0 @@
-
-
-
-
-Contains the implementation of the external JMX APIs from
-org.apache.geode.admin.jmx.
-
-JMX Support in GemFire
-
-Our goal was to provide JMX administrative support in GemFire.  The design was 
influenced by these important factors:
-
-
-1) Requirement to not impact performance of the product
-2) Desire to introduce JMX without altering the existing product or the 
management console
-3) Similar functionality already existed in the console and the 
internal.admin pkg which the console uses
-4) Requirement to also introduce a simple and usable Admin API which or 
may not be related to JMX
-
-
-From a functional stand point, the JMX support was supposed to provide most of 
the same administrative and operational monitoring that the console already 
provides.  In some cases we limited the functionality due to security concerns 
and in others because it was hard to express the features as JMX beans.  The 
JMX Agent also provides some functionality (such as Health monitoring) that is 
not currently in the console.
-
-The Agent communicates with the distributed system using the same distribution 
manager {@link org.apache.geode.distributed.internal.DistributionManager} as 
the console uses and thus has the same requirements that determine what 
distributed system it can manage.  Although the Console currently supports 
managing multiple distributed systems, we decided that a given Agent should 
only be able to manage a single system.  We have not tested the use of more 
than one Agent for the same system, however nothing currently prohibits this.
-
-We decided to develop a simple public Admin API which in essence wraps the 
internal.admin API that the Console currently uses extensively.  The Admin API 
also contains implementations of new functionality not in internal.admin.  Our 
JMX support is an extension to this Admin API.  In an overly simplified view, 
the GemFire JMX MBeans are ModelMBeans that manage instances of the Admin API 
objects housed in the Agent's MBeanServer.
-
-The selected architecture consists of a Daemon Agent, which exists in a 
separate VM that GemFire does not depend on.  This Agent hosts an MBeanServer, 
instances of any and all MBeans registered for managing a GemFire distributed 
system, and server connectors/adaptors that various types of clients can 
connect to.
-
-The two server connectors we selected are the HttpAdaptor and the RMI 
Connector.  The HttpAdaptor provides an HTML user interface of all MBeans in 
the MBeanServer.  Although this generic UI is not as rich as an RMI client (or 
the GemFire Console) could be, it provides a functional and easy to use UI with 
no development required.  The JMX Remote specification details the standard 
connectors.  Although the HttpAdaptor is not required by this Sun spec. it is 
included in some form with all JMX implementations that I investigated.  It 
should be noted that our JMX Agent currently starts up the HttpAdaptor, but not 
the RMI Connector.  The latter is deferred as later work since some form of 
client must be developed for testing.  Further research may also uncover a 
generic, configurable open-source RMI client for JMX.  The GemFire Console 
could in theory be reworked as an RMI Connector client, but this is not 
currently planned.
-
-Two open-source JMX implementations made it to our final review for 
consideration: http://www.xmojo.org;>XMOJO and http://www.mx4j.org;>MX4J.  The decision to go with MX4J was based 
mainly on our perceptions of MX4J being more active and widespread in use.  
Additionally, XMOJO is associated with http://www.adventnet.com/;>AdventNet which produces commercial 
products.  This made MX4J seem more true to open-source and safer from 
corporate tampering.
-
-ModelMBeans are very dynamic and capable of managing aggregate resources.  Use 
of a ModelMBean entails specifying meta-data to an instance of 
javax.management.modelmbean.RequiredModelMBean.  This meta-data identifies the 
manageble resource(s) which can consist of a single object, or many objects, 
including those in one VM or in any number of distributed VMs.  We decided to 
subclass classes in the Admin API in order to massage them a little and make 
them easier to use as a managed resource by the ModelMBean.  For example, 
org.apache.geode.admin.GemFireManager represents a type of member in a GemFire 
system which manages shared memory.  When an MBean is registered for managing 
the 

[37/50] [abbrv] incubator-geode git commit: GEODE-288: move admin packages to internal

2016-10-27 Thread klund
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/20a32286/geode-core/src/main/java/org/apache/geode/admin/jmx/internal/GemFireHealthConfigJmxImpl.java
--
diff --git 
a/geode-core/src/main/java/org/apache/geode/admin/jmx/internal/GemFireHealthConfigJmxImpl.java
 
b/geode-core/src/main/java/org/apache/geode/admin/jmx/internal/GemFireHealthConfigJmxImpl.java
deleted file mode 100644
index 6c44811..000
--- 
a/geode-core/src/main/java/org/apache/geode/admin/jmx/internal/GemFireHealthConfigJmxImpl.java
+++ /dev/null
@@ -1,211 +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 org.apache.geode.admin.jmx.internal;
-
-import javax.management.ObjectName;
-import javax.management.modelmbean.ModelMBean;
-
-import org.apache.geode.admin.AdminException;
-import org.apache.geode.admin.GemFireHealth;
-import org.apache.geode.admin.GemFireHealthConfig;
-import org.apache.geode.admin.internal.GemFireHealthConfigImpl;
-
-/**
- * The JMX "managed resource" that represents the configuration for the health 
of GemFire.
- * Basically, it provides the behavior of 
GemFireHealthConfigImpl, but does some JMX
- * stuff like registering beans with the agent.
- *
- * 
- *
- * Unlike other ManagedResources this class cannot simply subclass
- * GemFireHealthImpl because it instances are serialized and sent 
to other VMs. This is
- * problematic because the other VMs most likely do not have JMX classes like
- * ModelMBean on their classpaths. So, instead we delegate all of 
the
- * GemFireHealthConfig behavior to another object which IS 
serialized.
- *
- * @see GemFireHealthJmxImpl#createDistributedSystemHealthConfig
- *
- *
- * @since GemFire 3.5
- */
-@edu.umd.cs.findbugs.annotations.SuppressWarnings(
-justification = "This class is deprecated. Also, any further changes so 
close to the release is inadvisable.")
-public class GemFireHealthConfigJmxImpl
-implements GemFireHealthConfig, ManagedResource, java.io.Serializable {
-
-  private static final long serialVersionUID = 1482719647163239953L;
-
-  /** The GemFireHealth that we help configure */
-  private GemFireHealth health;
-
-  /** The name of the MBean that will manage this resource */
-  private String mbeanName;
-
-  /** The ModelMBean that is configured to manage this resource */
-  private ModelMBean modelMBean;
-
-  /** The delegate that contains the real config state */
-  private GemFireHealthConfig delegate;
-
-  /** The object name of this managed resource */
-  private ObjectName objectName;
-
-  /// Constructors ///
-
-  /**
-   * Creates a new GemFireHealthConfigJmxImpl that configures the 
health monitoring of
-   * components running on the given host.
-   */
-  GemFireHealthConfigJmxImpl(GemFireHealthJmxImpl health, String hostName) 
throws AdminException {
-
-this.delegate = new GemFireHealthConfigImpl(hostName);
-this.health = health;
-this.mbeanName = new 
StringBuffer().append(MBEAN_NAME_PREFIX).append("GemFireHealthConfig,id=")
-
.append(MBeanUtil.makeCompliantMBeanNameProperty(health.getDistributedSystem().getId()))
-.append(",host=")
-.append((hostName == null ? "default" : 
MBeanUtil.makeCompliantMBeanNameProperty(hostName)))
-.toString();
-this.objectName = MBeanUtil.createMBean(this);
-  }
-
-  // Instance Methods //
-
-  /**
-   * Applies the changes made to this config back to the health monitor.
-   *
-   * @see GemFireHealth#setDistributedSystemHealthConfig
-   */
-  public void applyChanges() {
-String hostName = this.getHostName();
-if (hostName == null) {
-  this.health.setDefaultGemFireHealthConfig(this);
-
-} else {
-  this.health.setGemFireHealthConfig(hostName, this);
-}
-  }
-
-  public String getMBeanName() {
-return this.mbeanName;
-  }
-
-  public ModelMBean getModelMBean() {
-return this.modelMBean;
-  }
-
-  public ObjectName getObjectName() {
-return this.objectName;
-  }
-
-  public void setModelMBean(ModelMBean modelMBean) {
-this.modelMBean = modelMBean;
-  }
-
-  public ManagedResourceType getManagedResourceType() 

[11/50] [abbrv] incubator-geode git commit: GEODE-2024 Deadlock creating a new lock service Grantor

2016-10-27 Thread klund
GEODE-2024 Deadlock creating a new lock service Grantor

This change-set causes the code in TXLockServiceImpl.release() to
perform periodic checks to see if grantor recovery is being performed.
If so it skips releaseTryLocks, which requires a recovered grantor to
function.  This is in line with the previous attempts to fix this
problem.  The recovery message that is trying to obtain the recovery
write-lock now sets the "recovering" state in TXLockServiceImpl prior
to attempting to get the lock so that it is set when
TXLockServiceImpl.release() checks its state.


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

Branch: refs/heads/feature/GEODE-288
Commit: f02ea36f2e3a440e8aa39815539f3aa2855ce124
Parents: 69a0877
Author: Bruce Schuchardt 
Authored: Wed Oct 26 13:51:20 2016 -0700
Committer: Bruce Schuchardt 
Committed: Wed Oct 26 13:53:00 2016 -0700

--
 .../locks/DLockRecoverGrantorProcessor.java |  16 +-
 .../internal/locks/DLockService.java| 108 ++
 .../internal/cache/locks/TXLockServiceImpl.java |  35 ++--
 .../locks/TXRecoverGrantorMessageProcessor.java |   8 +-
 .../cache/locks/TXLockServiceDUnitTest.java | 210 ++-
 5 files changed, 272 insertions(+), 105 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f02ea36f/geode-core/src/main/java/org/apache/geode/distributed/internal/locks/DLockRecoverGrantorProcessor.java
--
diff --git 
a/geode-core/src/main/java/org/apache/geode/distributed/internal/locks/DLockRecoverGrantorProcessor.java
 
b/geode-core/src/main/java/org/apache/geode/distributed/internal/locks/DLockRecoverGrantorProcessor.java
index 37fbfbe..2a48308 100755
--- 
a/geode-core/src/main/java/org/apache/geode/distributed/internal/locks/DLockRecoverGrantorProcessor.java
+++ 
b/geode-core/src/main/java/org/apache/geode/distributed/internal/locks/DLockRecoverGrantorProcessor.java
@@ -91,7 +91,7 @@ public class DLockRecoverGrantorProcessor extends 
ReplyProcessor21 {
 // process msg and reply from this VM...
 if (msg.getSender() == null)
   msg.setSender(dm.getId());
-msg.processMessage(dm);
+msg.scheduleMessage(dm);
 
 // keep waiting even if interrupted
 try {
@@ -239,6 +239,20 @@ public class DLockRecoverGrantorProcessor extends 
ReplyProcessor21 {
   processMessage(dm);
 }
 
+/**
+ * For unit testing we need to push the message through scheduleAction so 
that message observers
+ * are invoked
+ * 
+ * @param dm the distribution manager
+ */
+protected void scheduleMessage(DM dm) {
+  if (dm instanceof DistributionManager) {
+super.scheduleAction((DistributionManager) dm);
+  } else {
+processMessage(dm);
+  }
+}
+
 protected void processMessage(DM dm) {
   MessageProcessor processor = nullServiceProcessor;
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f02ea36f/geode-core/src/main/java/org/apache/geode/distributed/internal/locks/DLockService.java
--
diff --git 
a/geode-core/src/main/java/org/apache/geode/distributed/internal/locks/DLockService.java
 
b/geode-core/src/main/java/org/apache/geode/distributed/internal/locks/DLockService.java
index a859299..ca012d3 100644
--- 
a/geode-core/src/main/java/org/apache/geode/distributed/internal/locks/DLockService.java
+++ 
b/geode-core/src/main/java/org/apache/geode/distributed/internal/locks/DLockService.java
@@ -15,8 +15,18 @@
 
 package org.apache.geode.distributed.internal.locks;
 
-import org.apache.geode.*;
-import org.apache.geode.distributed.*;
+import org.apache.geode.CancelCriterion;
+import org.apache.geode.CancelException;
+import org.apache.geode.InternalGemFireError;
+import org.apache.geode.InternalGemFireException;
+import org.apache.geode.StatisticsFactory;
+import org.apache.geode.SystemFailure;
+import org.apache.geode.distributed.DistributedLockService;
+import org.apache.geode.distributed.DistributedSystem;
+import org.apache.geode.distributed.DistributedSystemDisconnectedException;
+import org.apache.geode.distributed.LeaseExpiredException;
+import org.apache.geode.distributed.LockNotHeldException;
+import org.apache.geode.distributed.LockServiceDestroyedException;
 import org.apache.geode.distributed.internal.DM;
 import org.apache.geode.distributed.internal.DistributionConfig;
 import org.apache.geode.distributed.internal.InternalDistributedSystem;
@@ -39,8 +49,18 @@ import 

[14/50] [abbrv] incubator-geode git commit: GEODE-288: move admin packages to internal

2016-10-27 Thread klund
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/20a32286/geode-core/src/main/resources/org/apache/geode/admin/api/jmx/mbeans-descriptors.xml
--
diff --git 
a/geode-core/src/main/resources/org/apache/geode/admin/api/jmx/mbeans-descriptors.xml
 
b/geode-core/src/main/resources/org/apache/geode/admin/api/jmx/mbeans-descriptors.xml
new file mode 100755
index 000..1735f5f
--- /dev/null
+++ 
b/geode-core/src/main/resources/org/apache/geode/admin/api/jmx/mbeans-descriptors.xml
@@ -0,0 +1,1452 @@
+
+http://jakarta.apache.org/commons/dtds/mbeans-descriptors.dtd;>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+  
+  
+  
+  
+ 
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 
+
+
+
+
+
+
+
+  
+  
+
+
+  
+
+
+
+
+
+
+
+
+  
+
+  
+  
+  
+  
+  
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 
+
+
+
+
+
+
+
+
+
+
+
+  
+
+
+
+  
+  
gemfire.distributedsystem.member.joined
+
+
+
+  
+
+
+
+  
+  
gemfire.distributedsystem.member.left
+
+
+
+  
+
+
+
+  
+  
gemfire.distributedsystem.member.crashed
+
+
+
+  
+
+
+
+  
+  gemfire.distributedsystem.alert
+
+
+
+  
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+   
+
+  
+  
+  
+  
+
+
+
+  
+
+
+
+
+
+
+  
+
+
+
+  
+
+
+
+  
+
+
+  
+  
+
+
+
+
+   
+
+  
+
+  
+  
+  
+  
+
+
+
+
+
+
+
+
+
+
+ 
+
+
+
+
+
+  
+
+
+
+  
+  
gemfire.distributedsystem.cache.created
+
+
+
+  
+
+
+
+  
+  
gemfire.distributedsystem.cache.closed
+
+
+
+  
+
+
+
+  
+  
gemfire.distributedsystem.cache.region.created
+
+
+
+  
+
+
+
+  
+  
gemfire.distributedsystem.cache.region.lost
+
+
+
+  
+
+
+
+  
+  
gemfire.distributedsystem.cache.client.joined
+
+
+
+  
+
+
+
+  
+  
gemfire.distributedsystem.cache.client.left
+
+
+
+  
+
+
+
+  
+  
gemfire.distributedsystem.cache.client.crashed
+
+ 
+
+
+ 
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 
+
+
+
+
+
+
+
+  
+
+  
+  
+  
+  
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+  
+
+  
+  
+  
+  
+
+
+
+
+
+
+
+
+
+
+
+
+ 
+
+
+
+
+
+  
+
+
+
+  
+
+
+
+
+
+
+
+   
+  
+
+  
+  
+  
+  
+ 
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+  
+
+
+
+
+
+
+
+
+
+
+
+
+
+  
+
+  
+  
+  
+  
+ 
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+  
+
+  
+  
+  
+  
+ 
+
+
+
+
+
+
+
+
+
+
+
+   
+   
+ 
+
+
+
+
+
+
+
+
+
+  
+
+  
+  
+  
+  
+ 
+
+
+
+
+
+
+
+
+
+ 
+
+ 
+ 
+
+
+
+
+
+
+
+
+
+
+
+
+  
+
+
+
+  
+  
gemfire.distributedsystem.cache.created
+
+
+
+  
+
+
+
+  
+  
gemfire.distributedsystem.cache.closed
+
+
+
+  
+
+
+
+  
+  
gemfire.distributedsystem.cache.region.created
+
+
+
+  
+
+
+
+  
+  
gemfire.distributedsystem.cache.region.lost
+
+
+
+  
+
+
+
+  
+  
gemfire.distributedsystem.cache.client.joined
+
+
+
+  
+
+
+
+  
+  
gemfire.distributedsystem.cache.client.left
+
+
+
+  
+
+
+
+  
+  

[10/50] [abbrv] incubator-geode git commit: [GEODE-2037] Update pulse documentation links

2016-10-27 Thread klund
[GEODE-2037] Update pulse documentation links


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

Branch: refs/heads/feature/GEODE-288
Commit: 69a0877abf1c789d58913cfb152f85ac5ba9d965
Parents: f73a4e3
Author: Anthony Baker 
Authored: Wed Oct 26 07:59:42 2016 -0700
Committer: Anthony Baker 
Committed: Wed Oct 26 10:14:11 2016 -0700

--
 geode-pulse/src/main/webapp/DataBrowser.html | 2 +-
 geode-pulse/src/main/webapp/MemberDetails.html   | 2 +-
 geode-pulse/src/main/webapp/QueryStatistics.html | 2 +-
 geode-pulse/src/main/webapp/clusterDetail.html   | 2 +-
 geode-pulse/src/main/webapp/properties/gemfire.properties| 2 +-
 geode-pulse/src/main/webapp/properties/gemfire_en.properties | 2 +-
 geode-pulse/src/main/webapp/regionDetail.html| 2 +-
 7 files changed, 7 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/69a0877a/geode-pulse/src/main/webapp/DataBrowser.html
--
diff --git a/geode-pulse/src/main/webapp/DataBrowser.html 
b/geode-pulse/src/main/webapp/DataBrowser.html
index 165fa6f..1695a83 100644
--- a/geode-pulse/src/main/webapp/DataBrowser.html
+++ b/geode-pulse/src/main/webapp/DataBrowser.html
@@ -137,7 +137,7 @@



- http://geode.docs.pivotal.io/docs/tools_modules/pulse/chapter_overview.html;
 class="left headerTopLinks">Help
+ http://geode.apache.org/docs/guide/tools_modules/pulse/chapter_overview.html;
 class="left headerTopLinks">Help
  
  Welcome
  

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/69a0877a/geode-pulse/src/main/webapp/MemberDetails.html
--
diff --git a/geode-pulse/src/main/webapp/MemberDetails.html 
b/geode-pulse/src/main/webapp/MemberDetails.html
index b416926..1ce2a4c 100644
--- a/geode-pulse/src/main/webapp/MemberDetails.html
+++ b/geode-pulse/src/main/webapp/MemberDetails.html
@@ -128,7 +128,7 @@
   
   
   
-  http://geode.docs.pivotal.io/docs/tools_modules/pulse/chapter_overview.html;
 class="left headerTopLinks" class="left headerTopLinks">Help
+  http://geode.apache.org/docs/guide/tools_modules/pulse/chapter_overview.html;
 class="left headerTopLinks" class="left headerTopLinks">Help
   
   Welcome
   

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/69a0877a/geode-pulse/src/main/webapp/QueryStatistics.html
--
diff --git a/geode-pulse/src/main/webapp/QueryStatistics.html 
b/geode-pulse/src/main/webapp/QueryStatistics.html
index 07f61c6..21ece3f 100644
--- a/geode-pulse/src/main/webapp/QueryStatistics.html
+++ b/geode-pulse/src/main/webapp/QueryStatistics.html
@@ -150,7 +150,7 @@


http://geode.docs.pivotal.io/docs/tools_modules/pulse/chapter_overview.html;
+   
href="http://geode.apache.org/docs/guide/tools_modules/pulse/chapter_overview.html;
class="left 
headerTopLinks">Help



http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/69a0877a/geode-pulse/src/main/webapp/clusterDetail.html
--
diff --git a/geode-pulse/src/main/webapp/clusterDetail.html 
b/geode-pulse/src/main/webapp/clusterDetail.html
index 211e366..0b1f562 100644
--- a/geode-pulse/src/main/webapp/clusterDetail.html
+++ b/geode-pulse/src/main/webapp/clusterDetail.html
@@ -118,7 +118,7 @@
 
   
   
-  http://geode.docs.pivotal.io/docs/tools_modules/pulse/chapter_overview.html;
 class="left headerTopLinks" class="left headerTopLinks">Help
+  http://geode.apache.org/docs/guide/tools_modules/pulse/chapter_overview.html;
 class="left headerTopLinks" class="left headerTopLinks">Help
   
   Welcome
   

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/69a0877a/geode-pulse/src/main/webapp/properties/gemfire.properties
--
diff --git a/geode-pulse/src/main/webapp/properties/gemfire.properties 
b/geode-pulse/src/main/webapp/properties/gemfire.properties
index 

[21/50] [abbrv] incubator-geode git commit: GEODE-288: move admin packages to internal

2016-10-27 Thread klund
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/20a32286/geode-core/src/main/java/org/apache/geode/internal/admin/api/jmx/impl/AgentImpl.java
--
diff --git 
a/geode-core/src/main/java/org/apache/geode/internal/admin/api/jmx/impl/AgentImpl.java
 
b/geode-core/src/main/java/org/apache/geode/internal/admin/api/jmx/impl/AgentImpl.java
new file mode 100644
index 000..6dbf134
--- /dev/null
+++ 
b/geode-core/src/main/java/org/apache/geode/internal/admin/api/jmx/impl/AgentImpl.java
@@ -0,0 +1,1624 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more 
contributor license
+ * agreements. See the NOTICE file distributed with this work for additional 
information regarding
+ * copyright ownership. The ASF licenses this file to You under the Apache 
License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the 
License. You may obtain a
+ * copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software 
distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 
KIND, either express
+ * or implied. See the License for the specific language governing permissions 
and limitations under
+ * the License.
+ */
+package org.apache.geode.internal.admin.api.jmx.impl;
+
+import java.io.File;
+import java.io.IOException;
+import java.rmi.server.RMIClientSocketFactory;
+import java.rmi.server.RMIServerSocketFactory;
+import java.text.MessageFormat;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Properties;
+
+import javax.management.InstanceNotFoundException;
+import javax.management.MBeanException;
+import javax.management.MBeanRegistrationException;
+import javax.management.MBeanServer;
+import javax.management.MalformedObjectNameException;
+import javax.management.Notification;
+import javax.management.NotificationFilter;
+import javax.management.NotificationListener;
+import javax.management.ObjectName;
+import javax.management.OperationsException;
+import javax.management.ReflectionException;
+import javax.management.modelmbean.ModelMBean;
+import javax.management.remote.JMXConnectionNotification;
+import javax.management.remote.JMXConnectorServer;
+import javax.management.remote.JMXConnectorServerFactory;
+import javax.management.remote.JMXServiceURL;
+import javax.management.remote.rmi.RMIConnectorServer;
+import javax.rmi.ssl.SslRMIClientSocketFactory;
+
+import mx4j.tools.adaptor.http.HttpAdaptor;
+
+import org.apache.logging.log4j.Logger;
+
+import org.apache.geode.GemFireException;
+import org.apache.geode.GemFireIOException;
+import org.apache.geode.LogWriter;
+import org.apache.geode.SystemFailure;
+import org.apache.geode.internal.admin.api.AdminDistributedSystem;
+import org.apache.geode.internal.admin.api.AdminException;
+import org.apache.geode.internal.admin.api.DistributedSystemConfig;
+import org.apache.geode.internal.admin.api.jmx.Agent;
+import org.apache.geode.internal.admin.api.jmx.AgentConfig;
+import org.apache.geode.internal.admin.api.jmx.AgentFactory;
+import org.apache.geode.distributed.internal.DistributionManager;
+import org.apache.geode.i18n.StringId;
+import org.apache.geode.internal.Banner;
+import org.apache.geode.internal.GemFireVersion;
+import org.apache.geode.internal.admin.remote.TailLogResponse;
+import org.apache.geode.internal.i18n.LocalizedStrings;
+import org.apache.geode.internal.logging.InternalLogWriter;
+import org.apache.geode.internal.logging.LogConfig;
+import org.apache.geode.internal.logging.LogService;
+import org.apache.geode.internal.logging.LogWriterFactory;
+import org.apache.geode.internal.logging.LoggingThreadGroup;
+import org.apache.geode.internal.logging.log4j.AlertAppender;
+import org.apache.geode.internal.logging.log4j.LocalizedMessage;
+import org.apache.geode.internal.logging.log4j.LogMarker;
+import org.apache.geode.internal.logging.log4j.LogWriterAppender;
+import org.apache.geode.internal.logging.log4j.LogWriterAppenders;
+
+/**
+ * The GemFire JMX Agent provides the ability to administrate one GemFire 
distributed system via
+ * JMX.
+ *
+ * @since GemFire 3.5
+ */
+public class AgentImpl implements Agent, ManagedResource {
+
+  private static final Logger logger = LogService.getLogger();
+
+  /**
+   * MX4J HttpAdaptor only supports "basic" as an authentication method. 
Enabling HttpAdaptor
+   * authentication ({@link AgentConfig#HTTP_AUTHENTICATION_ENABLED_NAME}) 
causes the browser to
+   * require a login with username ({@link 
AgentConfig#HTTP_AUTHENTICATION_USER_NAME}) and password
+   * ({@link AgentConfig#HTTP_AUTHENTICATION_PASSWORD_NAME}).
+   */
+  private static final String MX4J_HTTPADAPTOR_BASIC_AUTHENTICATION = "basic";
+
+  /** JMX Service URL template for JMX/RMI Connector Server */
+  private static final String JMX_SERVICE_URL = 

[24/50] [abbrv] incubator-geode git commit: GEODE-288: move admin packages to internal

2016-10-27 Thread klund
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/20a32286/geode-core/src/main/java/org/apache/geode/internal/admin/api/impl/SystemMemberRegionImpl.java
--
diff --git 
a/geode-core/src/main/java/org/apache/geode/internal/admin/api/impl/SystemMemberRegionImpl.java
 
b/geode-core/src/main/java/org/apache/geode/internal/admin/api/impl/SystemMemberRegionImpl.java
new file mode 100644
index 000..87a06b8
--- /dev/null
+++ 
b/geode-core/src/main/java/org/apache/geode/internal/admin/api/impl/SystemMemberRegionImpl.java
@@ -0,0 +1,372 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more 
contributor license
+ * agreements. See the NOTICE file distributed with this work for additional 
information regarding
+ * copyright ownership. The ASF licenses this file to You under the Apache 
License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the 
License. You may obtain a
+ * copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software 
distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 
KIND, either express
+ * or implied. See the License for the specific language governing permissions 
and limitations under
+ * the License.
+ */
+package org.apache.geode.internal.admin.api.impl;
+
+import org.apache.geode.cache.*;
+// import org.apache.geode.internal.Assert;
+// import org.apache.geode.internal.admin.*;
+import org.apache.geode.internal.admin.api.AdminException;
+import org.apache.geode.internal.admin.api.SystemMemberRegion;
+import org.apache.geode.internal.admin.remote.*;
+
+import java.io.File;
+import java.util.*;
+
+/**
+ * View of a region in a GemFire system member's cache.
+ *
+ * @since GemFire 3.5
+ */
+public class SystemMemberRegionImpl implements SystemMemberRegion {
+
+  private AdminRegion r;
+  private RegionAttributes ra;
+  private CacheStatistics rs;
+  private Set subregionNames;
+  private Set subregionFullPaths;
+  private int entryCount;
+  private int subregionCount;
+
+  /** The cache to which this region belongs */
+  private final SystemMemberCacheImpl cache;
+
+  // constructors
+  public SystemMemberRegionImpl(SystemMemberCacheImpl cache, Region r) {
+this.cache = cache;
+this.r = (AdminRegion) r;
+  }
+
+  private void refreshFields() {
+this.ra = this.r.getAttributes();
+if (getStatisticsEnabled() && !this.ra.getDataPolicy().withPartitioning()) 
{
+  this.rs = this.r.getStatistics();
+} else {
+  this.rs = null;
+}
+{ // set subregionNames
+  Set s = this.r.subregions(false);
+  Set names = new TreeSet();
+  Set paths = new TreeSet();
+  Iterator it = s.iterator();
+  while (it.hasNext()) {
+Region r = (Region) it.next();
+String name = r.getName();
+names.add(name);
+paths.add(this.getFullPath() + Region.SEPARATOR_CHAR + name);
+  }
+  this.subregionNames = names;
+  this.subregionFullPaths = paths;
+}
+try {
+  int[] sizes = this.r.sizes();
+  this.entryCount = sizes[0];
+  this.subregionCount = sizes[1];
+} catch (CacheException ignore) {
+  this.entryCount = 0;
+  this.subregionCount = 0;
+}
+  }
+
+  // attributes
+  public String getName() {
+return this.r.getName();
+  }
+
+  public String getFullPath() {
+return this.r.getFullPath();
+  }
+
+  public java.util.Set getSubregionNames() {
+return this.subregionNames;
+  }
+
+  public java.util.Set getSubregionFullPaths() {
+return this.subregionFullPaths;
+  }
+
+  public String getUserAttribute() {
+return (String) r.getUserAttribute();
+  }
+
+  public String getCacheLoader() {
+Object o = this.ra.getCacheLoader();
+if (o == null) {
+  return "";
+} else {
+  return o.toString();
+}
+  }
+
+  public String getCacheWriter() {
+Object o = this.ra.getCacheWriter();
+if (o == null) {
+  return "";
+} else {
+  return o.toString();
+}
+  }
+
+  public String getKeyConstraint() {
+Class constraint = this.ra.getKeyConstraint();
+if (constraint == null) {
+  return "";
+} else {
+  return constraint.getName();
+}
+  }
+
+  public String getValueConstraint() {
+Class constraint = this.ra.getValueConstraint();
+if (constraint == null) {
+  return "";
+} else {
+  return constraint.getName();
+}
+  }
+
+  public boolean getEarlyAck() {
+return this.ra.getEarlyAck();
+  }
+
+  public int getRegionTimeToLiveTimeLimit() {
+return this.ra.getRegionTimeToLive().getTimeout();
+  }
+
+  public ExpirationAction getRegionTimeToLiveAction() {
+return this.ra.getRegionTimeToLive().getAction();
+  }
+
+  public int getEntryTimeToLiveTimeLimit() {
+return this.ra.getEntryTimeToLive().getTimeout();
+  }

[22/50] [abbrv] incubator-geode git commit: GEODE-288: move admin packages to internal

2016-10-27 Thread klund
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/20a32286/geode-core/src/main/java/org/apache/geode/internal/admin/api/jmx/impl/AgentConfigImpl.java
--
diff --git 
a/geode-core/src/main/java/org/apache/geode/internal/admin/api/jmx/impl/AgentConfigImpl.java
 
b/geode-core/src/main/java/org/apache/geode/internal/admin/api/jmx/impl/AgentConfigImpl.java
new file mode 100644
index 000..5652b1a
--- /dev/null
+++ 
b/geode-core/src/main/java/org/apache/geode/internal/admin/api/jmx/impl/AgentConfigImpl.java
@@ -0,0 +1,1911 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more 
contributor license
+ * agreements. See the NOTICE file distributed with this work for additional 
information regarding
+ * copyright ownership. The ASF licenses this file to You under the Apache 
License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the 
License. You may obtain a
+ * copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software 
distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 
KIND, either express
+ * or implied. See the License for the specific language governing permissions 
and limitations under
+ * the License.
+ */
+package org.apache.geode.internal.admin.api.jmx.impl;
+
+import static org.apache.geode.distributed.ConfigurationProperties.*;
+import static org.apache.geode.distributed.internal.DistributionConfig.*;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.net.InetAddress;
+import java.net.URL;
+import java.util.Enumeration;
+import java.util.Iterator;
+import java.util.Properties;
+import java.util.StringTokenizer;
+
+import org.apache.geode.GemFireIOException;
+import org.apache.geode.internal.admin.api.DistributedSystemConfig;
+import org.apache.geode.internal.admin.api.DistributionLocatorConfig;
+import org.apache.geode.internal.admin.api.impl.DistributedSystemConfigImpl;
+import org.apache.geode.internal.admin.api.impl.InetAddressUtil;
+import org.apache.geode.internal.admin.api.jmx.Agent;
+import org.apache.geode.internal.admin.api.jmx.AgentConfig;
+import org.apache.geode.internal.ClassPathLoader;
+import org.apache.geode.internal.i18n.LocalizedStrings;
+import org.apache.geode.internal.util.IOUtils;
+
+/**
+ * Provides the JMX Agent configuration properties.
+ * 
+ * Supports importing of persisted properties from an external configuration 
file.
+ * 
+ * Select values can also be overridden with command line arguments. See 
remarks on individual
+ * properties for further information.
+ * 
+ * Extends and implements DistributedSystemConfig.
+ * 
+ * @since GemFire 3.5 (in which it was named AgentConfig)
+ */
+public class AgentConfigImpl extends DistributedSystemConfigImpl implements 
AgentConfig {
+
+  // -
+  // Static class variable(s)
+  // -
+
+  /**
+   * Command-line arg to enable agent debugging
+   */
+  public static final String AGENT_DEBUG = "agent-debug";
+
+  /**
+   * The name of the "propertyFile" property. May specify as cmd-line arg
+   */
+  public static final String PROPERTY_FILE_NAME = "property-file";
+
+  /**
+   * The name of the "gfAgentPropertyFile" property, can be specified as 
System Property
+   */
+  public static final String AGENT_PROPSFILE_PROPERTY_NAME = 
"gfAgentPropertyFile";
+
+  // -
+  // DistributionLocator properties...
+  // -
+
+  /**
+   * The name of the "locator.host-" property
+   */
+  public static final String LOCATOR_HOST_NAME = "locator.host-";
+  /**
+   * The name of the "locator.port-" property
+   */
+  public static final String LOCATOR_PORT_NAME = "locator.port-";
+  /**
+   * The name of the "locator.product-directory-" property
+   */
+  public static final String LOCATOR_PRODUCT_DIRECTORY_NAME = 
"locator.product-directory-";
+  /**
+   * The name of the "locator.working-directory-" property
+   */
+  public static final String LOCATOR_WORKING_DIRECTORY_NAME = 
"locator.working-directory-";
+  /**
+   * The name of the "locator.remote-command-" property
+   */
+  public static final String LOCATOR_REMOTE_COMMAND = 
"locator.remote-command-";
+  /**
+   * The name of the "locator.bind-address-" property
+   */
+  public static final String LOCATOR_BIND_ADDRESS = "locator.bind-address-";
+  /**
+   * the properties used in configuring a locator's distributed system
+   */
+  public static final String LOCATOR_DS_PROPERTIES = 

[03/50] [abbrv] incubator-geode git commit: Adding my PGP key to KEYS

2016-10-27 Thread klund
Adding my PGP key to KEYS


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

Branch: refs/heads/feature/GEODE-288
Commit: 06de52736845a434ab0325766fab44506a81df2a
Parents: a847c55
Author: zhouxh 
Authored: Tue Oct 25 14:17:26 2016 -0700
Committer: zhouxh 
Committed: Tue Oct 25 14:17:26 2016 -0700

--
 KEYS | 128 ++
 1 file changed, 128 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/06de5273/KEYS
--
diff --git a/KEYS b/KEYS
index cbc5354..183abc1 100644
--- a/KEYS
+++ b/KEYS
@@ -897,3 +897,131 @@ 
CmrjtFbx4w8QQYkUwvYYtdVWD2JvNnp/eX89ROcaS+TCbLukaC3OphBXvWI3k1BK
 Vb32t+OopTVcELjTjAMBsixx+IaBClvjPXBTuaSXA4S+
 =SSEN
 -END PGP PUBLIC KEY BLOCK-
+-BEGIN PGP PUBLIC KEY BLOCK-
+Version: GnuPG v2
+
+mQENBFcGu5QBCACdmRgd8tfI7RVBdySyL/z41j+yJXdAak2BPXyVvlKP0FMvb0qB
+U6l8vk89HB+jpr5HtUFn+/rj4HuN8IK2blyn8NkSFCWdxirOZWWhMXyNFZQNJ7O7
++DdR8/ko/5I8RsLQ3cHLrF4e4c3NtAhv1IndFisd+mnalcnhLMIQU3899YC+VK4N
+KkSs9N1WDBtTd/kdr6sRUvkHf5hlICaXxmYwDknJ/jdLOI7bZN90fTWH0dWQNf2p
+6qEJlG/TrcW8IFVVk/eS9lk2eMVpYe8ObOfoF5lxfBqElTuuFOVQ+ermUzrQ+C7j
+HUYRKGsxs13cJXnaq3m2GCFbCuMzsU0aqg99ABEBAAG0J1hpYW9qaWFuIFpob3Ug
+PHpob3UueGlhb2ppYW5AZ21haWwuY29tPokBOQQTAQgAIwUCVwa7lAIbAwcLCQgH
+AwIBBhUIAgkKCwQWAgMBAh4BAheAAAoJEHbgUH6u2u49LkEH/3hL5UqceDnOV+2s
+Fx2kiT7L5dYQWHETls8ZFkrpokCHhPt7A/MxYPP06Ohe7q1g8FJhKeQbzXD6FSdq
+ewn2t9DwZN/pIIdPR/6OTgwgwhqeQvdLQIAZBbC3qjIRe0KxJFtxgcBVMXN8aWfa
+iUF/6ir+6bjx6/mtziTI3A/qdO/D8C3TwU2SpqpqLh1N/cTcgU6ZtIk/ZiaL4Eh4
+qIO205p1fvFX6gytrBkX9aBVSMtJFkOCBX/VqkGsrGcDtQYEwNEbI5rVFiYmA5of
+j8VxrSpXXK8eirXcHEzEbW969Wu29GzdhYIipVjVwDwmA+M6Wf6093jI+Y5IrgAf
+jgxhYn6JARwEEAEIAAYFAlcGyHkACgkQ8EzEmalmEzoZCwf/cl37XcJuH29yTzLr
+ApFMNxOEUb9p5wMKMSyEM7NzIMJc9luP2Di1nCZ/Hgp9+cjVFSwQ5eR8s4+y6d3b
+0Fva7QdMit1GLN+F/vV8ln8fql7SYbjhI/Z4yskMl4nvL8DBlPKGHTv5ruXQAmJi
+y50iCoa9wSXeU8ZT5N7g+BsbryRvfdKjYLfSdMUa4YlR/pRVTitivpwcyA4mN0AQ
+27Tb/ygurqHAVNlmgJjX0fowwOUEr1aqgasTRv5meet//utQsiRlIKGF43IMLai0
+dhk+r/EtXIsHaQXmGGpcFhFf0FN18x52A3LXsZTeSELxCXY8YdzhmtJmyRt7H+pe
+vgEPY4kCHAQQAQoABgUCVwa+JAAKCRBETB0goWiNl3uzD/4+8vs9zX89F8o4HMyF
+DpxzgH3etpjM8CScHcNdbVnrcO3OCgGg1nO8HMwRZS6PjIS0FVfl9csNMOZw8/SJ
+FdVz8u2GycyueiRu4SZHA0smu7lZlLNeB1AOqYFmreXbAHLd8LnCxlW4qA5RPtw/
+x0nWVSNJ5zUvJjBXurcDPS/FpcdaTRoK2jkWePddF/c4SBkgc1VARHWhqIuwvohZ
+ifCEeeU11l0Vl4HZCj0hgUUt9gXAcjk4YhCsSba/Cz3ERuxlhRgluvhBYlp+DzHq
+0benTCOSVUywTLUjajxdeV1l0jgH1Ps9Rvq8KYBPyP8PcdONLDIa9VcrhZNHabHN
+SUZRz3hAp/xsDY9oihUCHn1zfGklZRidAorR5FS0UZzFy8PoV6+Mrz2inf1xZapK
+a4bA3A0fYm1z3pXxA7ty6XCtwaQ7Gavs3toAXZWdiTtvqdObjb+3Zmhh1o63BA9t
+wIMi5dGy9/xvlQT7Ah6vWtJwGD45t9MwbRnDdivk0/3EJlZWwVzlHoPfjzUFKo+J
+zpU4cWRljJQPps5EAPFPl/OWx0nHbvrpbBQzc6f+ZbB+LszEetap+xq9yVJbGlXU
+cLr5OSAe0IWwOca5CGXCiO2Rr33jnCjLwshNTsPi4Iqtj+1ZVE75eDDbLXvQL+DF
+YIhA56DNZ8svFfBs34gtrW60fYkCIgQQAQoADAUCVwa/ugWDB4YfgAAKCRAmj1Aw
+i2z43fBJD/4i1ac8VxqMuSiEovEb/b+BbW2hipE6BofLdHIG3pixyo4mWR+EWlCB
+BDP8Vm/TZrnBS4b22K3xui4wR7ReTS5qqifv2LHxUdWMYZIbCGp4M1QbTmtGPvWG
+F6p/cw0lMltX2zTxRf1H/T71xvy8n4s07BZ7i0dgySYyZHDptXkPyZJGHeE1RbFW
+mwvvW3n8q40wETQXXTajIiUJEsDVbqTPTL5dlHrCbIdUXzxB+vkcg8e6sqZAqKJz
+YIaeL7VjbF9vzvcc6nLMa4qrlaBVOFfVrCgA8BL03UOIJ6sTmrXF7p4/qyxc8BIR
+kTQSXBU6t+D9NTXIGZ1VtOxuIIbE5TzzVGGHni/+D3aHhZjI/WHpXjvWgFfd6xY4
+6mVhO2H1pqgnnTqp+P4HCjKmoifUXVdqZnM0KAT2+RmIQ4FTXTZ/anxIIgETXXtF
+UiR9n+lc/P5D25UEj+gL07L+2smb0UYQmPAvCs0gGgyfR+iovOFX4CO9c/UPwnKf
+lPlW1u0nIEBIK6Z0kgsHCEh9H5NE1IV5YUY/2lq8ymAatCIf0+vaeI1b44j15aqd
+f1n/Ddp9eH8WOsicO9E5FJqBaOIGeRcGxkpFeix0HiMq0q5rwoC6M1agSxNdZVWy
+FkQx8r0kIMa28KDvMLFEhiLsc7sEZYHvcy0N5gYtXsu29hqva1XA0IkCIgQQAQoA
+DAUCVwbAUgWDB4YfgAAKCRDg7ynLSKVPhAyAD/9eBoOoc6a9tl7zIzBBlKjHMvFh
+Uv2zDJQpT6bd7HdzNnB9Ja2k72xeOzxdLH+2PU5IO0nrasJQMmvxSYQ4nPg1jWOQ
+hE8TQ061Y2Fbv8Z0eb5HJKcvI74xcseoML4wg15V69XV9768eeQD53jGpLoarbd8
+sNMOn8je6Gp1lGJ2MSxFOiPI2VWCTzc4BHMVv7t8VvQDOgOgEYw5ZhW1U+4spSWi
+45mS4y8V0zaA8x4pULkP1en+x3F8zavKWwJqCAl6zmd5gYtAvfEroXSLE7r/lRwd
+8gHJD/lhUmFLok31c61+a2yz8bDdD26noDorO7O66sYSJowflHsDz5jB9j1/iL3Z
+eHoM0ANLZ8TNHnR/buyiKoUG+BuQCCKBQH00ifqqP7UabLea/Ajbf9hxHGxfjOiA
+EA2Ij7pbYYR39FBdww3QmJxU9MyFL89h8egW5XE7Q73MdCd8WiqrLj4/NYI1Gvht
++5QKR0sY0jtJpX9+YW+8XBb2HwfwIZvmP/H6nyaXPq2uLCMNMMl+HNs4dpM5+1Gz
+dqHoyCpNoY39G3KdxWFe+Cwmf0Jt5JZab4DkRjYSRRkQ3R/lIdDnqPRaa0YConVh
+puywIKjS/yJWC6Sg9m6Wh1uf0IM94d45OGuFV/wDnky6kqnTOOwB5XIjaZvNflIU
+W1zh5l9Eb9fS9g55bokCIgQTAQgADAUCVwa+9AWDB4YfgAAKCRBWSn1JwdVHAe16
+D/9uy0+VEir3BtVuTw/S24cr1aUmaztOzi2unJN04Chd0XWmb5X5a/qaie1Kn7on
+YiyUERdKt6ScOuUEyszsMFukqOqB1HOuJbWzgu33KHNZYnrYEiIPXGxA4vHcYn0m

[09/50] [abbrv] incubator-geode git commit: [GEODE-2037] Update documentation links

2016-10-27 Thread klund
[GEODE-2037] Update documentation links

Fix README.md, geode-examples/README.md, and the website releases
page to point to documentation hosted on the geode website


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

Branch: refs/heads/feature/GEODE-288
Commit: f73a4e3fd941715de6547c66875bebbf2db29d6e
Parents: f6b534d
Author: Anthony Baker 
Authored: Wed Oct 26 07:40:29 2016 -0700
Committer: Anthony Baker 
Committed: Wed Oct 26 10:14:11 2016 -0700

--
 README.md  | 4 ++--
 geode-examples/README.md   | 4 ++--
 geode-site/website/content/releases/index.html | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f73a4e3f/README.md
--
diff --git a/README.md b/README.md
index eee17fc..4ca2416 100644
--- a/README.md
+++ b/README.md
@@ -94,7 +94,7 @@ Apache Geode applications can be written in these client 
technologies:
 
 * Java using the Geode client API or embedded using the Geode peer API
 * [Spring Data GemFire](http://projects.spring.io/spring-data-gemfire/) or 
[Spring 
Cache](http://docs.spring.io/spring/docs/current/spring-framework-reference/html/cache.html)
-* [Python](https://github.com/gemfire/py-gemfire-rest)
-* [REST](http://geode.docs.pivotal.io/docs/rest_apps/book_intro.html)
+* [REST](http://geode.apache.org/docs/guide/rest_apps/chapter_overview.html)
 * 
[memcached](https://cwiki.apache.org/confluence/display/GEODE/Moving+from+memcached+to+gemcached)
+* [Python](https://github.com/gemfire/py-gemfire-rest)
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f73a4e3f/geode-examples/README.md
--
diff --git a/geode-examples/README.md b/geode-examples/README.md
index 1d4eafb..83fd93d 100644
--- a/geode-examples/README.md
+++ b/geode-examples/README.md
@@ -16,9 +16,9 @@ All examples:
 
 ### Installation and a Tutorial for Beginners
 
-*  [How to 
Install](http://geode.docs.pivotal.io/docs/getting_started/installation/install_standalone.html)
+*  [How to 
Install](http://geode.apache.org/docs/guide/getting_started/installation/install_standalone.html)
 *  Set a `GEODE_HOME` environment variable to point to the root directory of 
the installation; this directory contains `bin/`. For those that have built 
from source, it will be the `geode-assembly/build/install/apache-geode` 
directory.
-*  If desired run the tutorial: [Apache Geode in 15 minutes or 
Less](http://geode.docs.pivotal.io/docs/getting_started/15_minute_quickstart_gfsh.html)
+*  If desired run the tutorial: [Apache Geode in 15 minutes or 
Less](http://geode.apache.org/docs/guide/getting_started/15_minute_quickstart_gfsh.html)
 
 ### Basics
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f73a4e3f/geode-site/website/content/releases/index.html
--
diff --git a/geode-site/website/content/releases/index.html 
b/geode-site/website/content/releases/index.html
index 63f685e..7056640 100644
--- a/geode-site/website/content/releases/index.html
+++ b/geode-site/website/content/releases/index.html
@@ -268,7 +268,7 @@ under the License. -->

Alternatively, you can verify the MD5 
signature on the files. A Unix program called md5 or md5sum is included in many 
Unix distributions. It is also available as part of http://www.gnu.org/software/textutils/textutils.html;>GNU Textutils. 
Windows users can get binary md5 programs from http://www.fourmilab.ch/md5/;>here, http://www.pc-tools.net/win32/md5sums/;>here, or http://www.slavasoft.com/fsum/;>here.

-   If you want to build directly from 
source, instructions are within the User Documentation in the http://geode.docs.pivotal.io/docs/getting_started/installation/install_standalone.html;>How
 to Install subsection.
+   If you want to build directly from 
source, instructions are within the User Documentation in the http://geode.apache.org/docs/guide/getting_started/installation/install_standalone.html;>How
 to Install subsection.






[16/50] [abbrv] incubator-geode git commit: GEODE-288: move admin packages to internal

2016-10-27 Thread klund
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/20a32286/geode-core/src/main/java/org/apache/geode/internal/admin/api/jmx/impl/StatisticAttributeInfo.java
--
diff --git 
a/geode-core/src/main/java/org/apache/geode/internal/admin/api/jmx/impl/StatisticAttributeInfo.java
 
b/geode-core/src/main/java/org/apache/geode/internal/admin/api/jmx/impl/StatisticAttributeInfo.java
new file mode 100755
index 000..ec675f1
--- /dev/null
+++ 
b/geode-core/src/main/java/org/apache/geode/internal/admin/api/jmx/impl/StatisticAttributeInfo.java
@@ -0,0 +1,71 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more 
contributor license
+ * agreements. See the NOTICE file distributed with this work for additional 
information regarding
+ * copyright ownership. The ASF licenses this file to You under the Apache 
License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the 
License. You may obtain a
+ * copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software 
distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 
KIND, either express
+ * or implied. See the License for the specific language governing permissions 
and limitations under
+ * the License.
+ */
+package org.apache.geode.internal.admin.api.jmx.impl;
+
+import org.apache.geode.internal.admin.api.Statistic;
+import org.apache.geode.internal.Assert;
+
+import javax.management.Descriptor;
+import javax.management.modelmbean.DescriptorSupport;
+import javax.management.modelmbean.ModelMBeanAttributeInfo;
+
+/**
+ * Subclass of AttributeInfo with {@link Statistic} added for use as the
+ * {@link javax.management.modelmbean.ModelMBeanAttributeInfo} descriptor's 
targetObject
+ * value.
+ *
+ * @since GemFire 3.5
+ *
+ */
+class StatisticAttributeInfo extends org.apache.commons.modeler.AttributeInfo {
+  private static final long serialVersionUID = 28022387514935560L;
+
+  private Statistic stat;
+
+  public StatisticAttributeInfo() {
+super();
+  }
+
+  public Statistic getStat() {
+return this.stat;
+  }
+
+  public void setStat(Statistic stat) {
+// System.out.println(">> stat = " + stat);
+Assert.assertTrue(stat != null, "Attempting to set stat to null");
+this.stat = stat;
+  }
+
+  @Override
+  public ModelMBeanAttributeInfo createAttributeInfo() {
+Descriptor desc = new DescriptorSupport(new String[] {"name=" + 
this.displayName,
+"descriptorType=attribute", "currencyTimeLimit=-1", // always stale
+"displayName=" + this.displayName, "getMethod=getValue"});
+
+Assert.assertTrue(this.stat != null, "Stat target object is null!");
+desc.setField("targetObject", this.stat);
+
+ModelMBeanAttributeInfo info = new 
ModelMBeanAttributeInfo(this.displayName, // name
+this.type, // type
+this.description, // description
+this.readable, // isReadable
+this.writeable, // isWritable
+this.is, // isIs
+desc);
+
+return info;
+  }
+}
+

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/20a32286/geode-core/src/main/java/org/apache/geode/internal/admin/api/jmx/impl/StatisticResourceJmxImpl.java
--
diff --git 
a/geode-core/src/main/java/org/apache/geode/internal/admin/api/jmx/impl/StatisticResourceJmxImpl.java
 
b/geode-core/src/main/java/org/apache/geode/internal/admin/api/jmx/impl/StatisticResourceJmxImpl.java
new file mode 100755
index 000..f7b776b
--- /dev/null
+++ 
b/geode-core/src/main/java/org/apache/geode/internal/admin/api/jmx/impl/StatisticResourceJmxImpl.java
@@ -0,0 +1,342 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more 
contributor license
+ * agreements. See the NOTICE file distributed with this work for additional 
information regarding
+ * copyright ownership. The ASF licenses this file to You under the Apache 
License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the 
License. You may obtain a
+ * copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software 
distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 
KIND, either express
+ * or implied. See the License for the specific language governing permissions 
and limitations under
+ * the License.
+ */
+package org.apache.geode.internal.admin.api.jmx.impl;
+
+import javax.management.Notification;
+import javax.management.ObjectName;
+import javax.management.modelmbean.ModelMBean;
+import javax.naming.OperationNotSupportedException;
+
+import org.apache.commons.modeler.ManagedBean;
+import org.apache.logging.log4j.Logger;
+
+import 

[20/50] [abbrv] incubator-geode git commit: GEODE-288: move admin packages to internal

2016-10-27 Thread klund
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/20a32286/geode-core/src/main/java/org/apache/geode/internal/admin/api/jmx/impl/AgentLauncher.java
--
diff --git 
a/geode-core/src/main/java/org/apache/geode/internal/admin/api/jmx/impl/AgentLauncher.java
 
b/geode-core/src/main/java/org/apache/geode/internal/admin/api/jmx/impl/AgentLauncher.java
new file mode 100644
index 000..932fe21
--- /dev/null
+++ 
b/geode-core/src/main/java/org/apache/geode/internal/admin/api/jmx/impl/AgentLauncher.java
@@ -0,0 +1,918 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more 
contributor license
+ * agreements. See the NOTICE file distributed with this work for additional 
information regarding
+ * copyright ownership. The ASF licenses this file to You under the Apache 
License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the 
License. You may obtain a
+ * copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software 
distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 
KIND, either express
+ * or implied. See the License for the specific language governing permissions 
and limitations under
+ * the License.
+ */
+package org.apache.geode.internal.admin.api.jmx.impl;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+import java.io.PrintStream;
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Properties;
+import java.util.SortedMap;
+import java.util.StringTokenizer;
+import java.util.TreeMap;
+
+import org.apache.logging.log4j.Logger;
+
+import org.apache.geode.GemFireException;
+import org.apache.geode.SystemFailure;
+import org.apache.geode.internal.admin.api.AdminException;
+import org.apache.geode.internal.admin.api.jmx.Agent;
+import org.apache.geode.internal.admin.api.jmx.AgentConfig;
+import org.apache.geode.internal.admin.api.jmx.AgentFactory;
+import org.apache.geode.distributed.internal.DistributionManager;
+import org.apache.geode.internal.OSProcess;
+import org.apache.geode.internal.PureJavaMode;
+import org.apache.geode.internal.net.SocketCreator;
+import org.apache.geode.internal.i18n.LocalizedStrings;
+import org.apache.geode.internal.logging.LogService;
+import org.apache.geode.internal.util.IOUtils;
+import org.apache.geode.internal.util.JavaCommandBuilder;
+
+/**
+ * A command line utility inspired by the CacheServerLauncher 
that is responsible for
+ * administering a stand-along GemFire JMX {@link Agent}.
+ * 
+ * 
+ * @since GemFire 3.5
+ */
+public class AgentLauncher {
+
+  private static final Logger logger = LogService.getLogger();
+
+  /** Should the launch command be printed? */
+  public static final boolean PRINT_LAUNCH_COMMAND =
+  Boolean.getBoolean(AgentLauncher.class.getSimpleName() + 
".PRINT_LAUNCH_COMMAND");
+
+  /* constants used to define state */
+  static final int SHUTDOWN = 0;
+  static final int STARTING = 1;
+  static final int RUNNING = 2;
+  static final int SHUTDOWN_PENDING = 3;
+  static final int SHUTDOWN_PENDING_AFTER_FAILED_STARTUP = 4;
+  static final int UNKNOWN = 6;
+
+  /** Agent configuration options */
+  static final String AGENT_PROPS = "agent-props";
+
+  /**
+   * A flag to indicate if the current log file should be kept. Used only when 
'start' is used to
+   * fork off the 'server'
+   */
+  static final String APPENDTO_LOG_FILE = "appendto-log-file";
+
+  /** optional and additional classpath entries */
+  static final String CLASSPATH = "classpath";
+
+  /** The directory argument */
+  static final String DIR = "dir";
+
+  /** Extra VM arguments */
+  static final String VMARGS = "vmargs";
+
+  /** The directory in which the agent's output resides */
+  private File workingDirectory = null;
+
+  /** The Status object for the agent */
+  private Status status = null;
+
+  /** base name for the agent to be launched */
+  private final String basename;
+
+  /** The name for the start up log file */
+  private final String startLogFileName;
+
+  /** The name of the status file */
+  private final String statusFileName;
+
+  /**
+   * Instantiates an AgentLauncher for execution and control of the GemFire 
JMX Agent process. This
+   * constructor is package private to prevent direct instantiation or 
subclassing by classes
+   * outside this package, but does allow the class to be tested as needed.
+   * 
+   * 
+   * @param basename base name for the application to be launched
+   */
+  AgentLauncher(final 

[08/50] [abbrv] incubator-geode git commit: GEODE-2036 Fix documentation typo

2016-10-27 Thread klund
GEODE-2036 Fix documentation typo

Removed an old documentation reference to GemFire.


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

Branch: refs/heads/feature/GEODE-288
Commit: f6b534d024fa692eb6b68d215db9d7d33af86ac3
Parents: ee0666a
Author: Karen Miller 
Authored: Wed Oct 26 09:36:58 2016 -0700
Committer: Karen Miller 
Committed: Wed Oct 26 09:43:54 2016 -0700

--
 geode-docs/getting_started/querying_quick_reference.html.md.erb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f6b534d0/geode-docs/getting_started/querying_quick_reference.html.md.erb
--
diff --git a/geode-docs/getting_started/querying_quick_reference.html.md.erb 
b/geode-docs/getting_started/querying_quick_reference.html.md.erb
index 7c684d9..5a117d2 100644
--- a/geode-docs/getting_started/querying_quick_reference.html.md.erb
+++ b/geode-docs/getting_started/querying_quick_reference.html.md.erb
@@ -583,7 +583,7 @@ QueryService qs = cache.getQueryService();
  qs.createKeyIndex("myKeyIndex", "id", "exampleRegion");
 ```
 
-For more information on using this API, see the [GemFire 
JavaDocs](/releases/latest/javadoc/index.html).
+For more information on using this API, see the 
[JavaDocs](/releases/latest/javadoc/index.html).
 
 **Sample XML**
 



[02/50] [abbrv] incubator-geode git commit: GEODE-17: mark deprecated security configurations

2016-10-27 Thread klund
GEODE-17: mark deprecated security configurations


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

Branch: refs/heads/feature/GEODE-288
Commit: a847c550bfe3b3387f3c023ce56eee63d353c062
Parents: ddc3268
Author: Jinmei Liao 
Authored: Tue Oct 25 10:00:50 2016 -0700
Committer: Jinmei Liao 
Committed: Tue Oct 25 13:58:54 2016 -0700

--
 .../apache/geode/distributed/ConfigurationProperties.java | 10 ++
 1 file changed, 10 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/a847c550/geode-core/src/main/java/org/apache/geode/distributed/ConfigurationProperties.java
--
diff --git 
a/geode-core/src/main/java/org/apache/geode/distributed/ConfigurationProperties.java
 
b/geode-core/src/main/java/org/apache/geode/distributed/ConfigurationProperties.java
index 38bec6f..c58a398 100644
--- 
a/geode-core/src/main/java/org/apache/geode/distributed/ConfigurationProperties.java
+++ 
b/geode-core/src/main/java/org/apache/geode/distributed/ConfigurationProperties.java
@@ -1439,10 +1439,14 @@ public interface ConfigurationProperties {
   String SECURITY_PREFIX = "security-";
   /**
* The static String definition of the "security-client-accessor" 
property
+   *
+   * @deprecated since Geode 1.0, use security-manager
*/
   String SECURITY_CLIENT_ACCESSOR = SECURITY_PREFIX + "client-accessor";
   /**
* The static String definition of the "security-client-accessor-pp" 
property
+   *
+   * @deprecated since Geode 1.0, use security-post-processor
*/
   String SECURITY_CLIENT_ACCESSOR_PP = SECURITY_PREFIX + "client-accessor-pp";
   /**
@@ -1474,6 +1478,8 @@ public interface ConfigurationProperties {
 
   /**
* The static String definition of the 
"security-client-authenticator" property
+   *
+   * @deprecated since Geode 1.0, use security-manager
*/
   String SECURITY_CLIENT_AUTHENTICATOR = SECURITY_PREFIX + 
"client-authenticator";
   /**
@@ -1497,10 +1503,14 @@ public interface ConfigurationProperties {
   String SECURITY_LOG_LEVEL = SECURITY_PREFIX + "log-level";
   /**
* The static String definition of the "security-peer-auth-init" 
property
+   *
+   * @deprecated since Geode 1.0. use security-username and security-password
*/
   String SECURITY_PEER_AUTH_INIT = SECURITY_PREFIX + "peer-auth-init";
   /**
* The static String definition of the "security-peer-authenticator" 
property
+   *
+   * @deprecated since Geode 1.0, use security-manager
*/
   String SECURITY_PEER_AUTHENTICATOR = SECURITY_PREFIX + "peer-authenticator";
   /**



incubator-geode git commit: fixing dumpStack/dumpAllStacks methods

2016-10-27 Thread bschuchardt
Repository: incubator-geode
Updated Branches:
  refs/heads/develop b10a171e1 -> 7b11d0843


fixing dumpStack/dumpAllStacks methods

These were trying to invoke methods using DistributedTestCase that have
been moved to ThreadUtils.


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

Branch: refs/heads/develop
Commit: 7b11d0843ed87054183b572299fcb010a3f7084a
Parents: b10a171
Author: Bruce Schuchardt 
Authored: Thu Oct 27 10:15:34 2016 -0700
Committer: Bruce Schuchardt 
Committed: Thu Oct 27 10:16:40 2016 -0700

--
 .../src/test/java/org/apache/geode/test/dunit/ThreadUtils.java   | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7b11d084/geode-core/src/test/java/org/apache/geode/test/dunit/ThreadUtils.java
--
diff --git 
a/geode-core/src/test/java/org/apache/geode/test/dunit/ThreadUtils.java 
b/geode-core/src/test/java/org/apache/geode/test/dunit/ThreadUtils.java
index 3122925..ac90cbc 100755
--- a/geode-core/src/test/java/org/apache/geode/test/dunit/ThreadUtils.java
+++ b/geode-core/src/test/java/org/apache/geode/test/dunit/ThreadUtils.java
@@ -77,7 +77,7 @@ public class ThreadUtils {
*/
   public static void dumpStack(final Host host) {
 for (int v = 0; v < host.getVMCount(); v++) {
-  
host.getVM(v).invoke(org.apache.geode.test.dunit.DistributedTestCase.class, 
"dumpStack");
+  host.getVM(v).invoke(org.apache.geode.test.dunit.ThreadUtils.class, 
"dumpStack");
 }
   }
 
@@ -87,7 +87,7 @@ public class ThreadUtils {
* @since GemFire 5.0
*/
   public static void dumpStack(final VM vm) {
-vm.invoke(org.apache.geode.test.dunit.DistributedTestCase.class, 
"dumpStack");
+vm.invoke(org.apache.geode.test.dunit.ThreadUtils.class, "dumpStack");
   }
 
   public static void dumpStackTrace(final Thread thread, final 
StackTraceElement[] stackTrace) {



incubator-geode git commit: GEODE-2027: ParallelQueueRemovalMessage processing removes events from the region and temp queue

2016-10-27 Thread boglesby
Repository: incubator-geode
Updated Branches:
  refs/heads/develop 87f2fb5f3 -> b10a171e1


GEODE-2027: ParallelQueueRemovalMessage processing removes events from the 
region and temp queue


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

Branch: refs/heads/develop
Commit: b10a171e11990a566ed42560a903668908131390
Parents: 87f2fb5
Author: Barry Oglesby 
Authored: Fri Oct 21 12:40:41 2016 -0700
Committer: Barry Oglesby 
Committed: Thu Oct 27 09:17:35 2016 -0700

--
 .../cache/wan/AbstractGatewaySender.java|   2 +-
 .../parallel/ParallelQueueRemovalMessage.java   |  22 +-
 .../internal/cache/BucketRegionQueueHelper.java |  58 +
 .../ParallelQueueRemovalMessageJUnitTest.java   | 256 +++
 .../java/org/apache/geode/test/fake/Fakes.java  |   5 +-
 5 files changed, 326 insertions(+), 17 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/b10a171e/geode-core/src/main/java/org/apache/geode/internal/cache/wan/AbstractGatewaySender.java
--
diff --git 
a/geode-core/src/main/java/org/apache/geode/internal/cache/wan/AbstractGatewaySender.java
 
b/geode-core/src/main/java/org/apache/geode/internal/cache/wan/AbstractGatewaySender.java
index 33119bc..e1c9010 100644
--- 
a/geode-core/src/main/java/org/apache/geode/internal/cache/wan/AbstractGatewaySender.java
+++ 
b/geode-core/src/main/java/org/apache/geode/internal/cache/wan/AbstractGatewaySender.java
@@ -684,7 +684,7 @@ public abstract class AbstractGatewaySender implements 
GatewaySender, Distributi
 return null;
   }
 
-  final public Set getQueues() {
+  public Set getQueues() {
 if (this.eventProcessor != null) {
   if (!(this.eventProcessor instanceof 
ConcurrentSerialGatewaySenderEventProcessor)) {
 Set queues = new HashSet();

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/b10a171e/geode-core/src/main/java/org/apache/geode/internal/cache/wan/parallel/ParallelQueueRemovalMessage.java
--
diff --git 
a/geode-core/src/main/java/org/apache/geode/internal/cache/wan/parallel/ParallelQueueRemovalMessage.java
 
b/geode-core/src/main/java/org/apache/geode/internal/cache/wan/parallel/ParallelQueueRemovalMessage.java
index a363b5d..bad3d3c 100644
--- 
a/geode-core/src/main/java/org/apache/geode/internal/cache/wan/parallel/ParallelQueueRemovalMessage.java
+++ 
b/geode-core/src/main/java/org/apache/geode/internal/cache/wan/parallel/ParallelQueueRemovalMessage.java
@@ -135,22 +135,14 @@ public class ParallelQueueRemovalMessage extends 
PooledDistributionMessage {
   afterAckForSecondary_EventInBucket(abstractSender, 
brq, key);
   destroyKeyFromBucketQueue(brq, key, region);
   isDestroyed = true;
-} else {
-  // if BucketRegionQueue does not have the key, it
-  // should be in tempQueue
-  // remove it from there..defect #49196
-  isDestroyed =
-  destroyFromTempQueue(brq.getPartitionedRegion(), 
(Integer) bId, key);
-}
-if (!isDestroyed) {
-  // event is neither destroyed from BucketRegionQueue 
nor from tempQueue
-  brq.addToFailedBatchRemovalMessageKeys(key);
-  if (isDebugEnabled) {
-logger.debug(
-"Event is neither destroyed from 
BucketRegionQueue not from tempQueue. Added to failedBatchRemovalMessageKeys: 
{}",
-key);
-  }
 }
+
+// Even if BucketRegionQueue does not have the key, it 
could be in the tempQueue
+// remove it from there..defect #49196
+destroyFromTempQueue(brq.getPartitionedRegion(), 
(Integer) bId, key);
+
+// Finally, add the key to the failed batch removal 
keys so that it is definitely removed from the bucket region queue
+brq.addToFailedBatchRemovalMessageKeys(key);
   } finally {
 brq.getInitializationLock().readLock().unlock();
   }


incubator-geode git commit: GEODE-2000 client should see server-bind-address in event memberId

2016-10-27 Thread bschuchardt
Repository: incubator-geode
Updated Branches:
  refs/heads/develop a564a692a -> 87f2fb5f3


GEODE-2000 client should see server-bind-address in event memberId

The previous fix for this caused confusion as it changed the server
memberId that is used in other places and should remain unchanged.
This change set alters just the listener-invocation code in the client
cache so that client events are based on the ServerLocation information
returned by the Locator or added to the connection pool by applications.

Udo worked with me on this and we found the listener invocation code to
be somewhat convoluted, mixing server-side notification about clients
with client-side notification about servers in the same code.  This
lead to a bit of refactoring in InternalClientMembership to separate the two.

A number of changes had to be made in test code.  Some tests were
requiring that client-side listeners see the server's exact member
ID which is no longer true since the ID being fabricated out of a
ServerLocation doesn't have as much detail as the true member ID and
so is not equal() to it.  Some other test code was creating
ServerLocation objects with non-existent host names.  This is
no longer allowed so we changed these tests to use a numeric IP 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/87f2fb5f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/87f2fb5f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/87f2fb5f

Branch: refs/heads/develop
Commit: 87f2fb5f32f71b0fda74fa61c1237b41f4c7ef11
Parents: a564a69
Author: Bruce Schuchardt 
Authored: Thu Oct 27 09:00:50 2016 -0700
Committer: Bruce Schuchardt 
Committed: Thu Oct 27 09:03:51 2016 -0700

--
 .../internal/DistributionLocatorConfigImpl.java |  23 +-
 .../client/internal/EndpointManagerImpl.java|   6 +-
 .../membership/InternalDistributedMember.java   |  29 ++-
 .../cache/tier/InternalClientMembership.java| 139 ++-
 .../cache/tier/sockets/CacheClientUpdater.java  |   2 +-
 .../internal/cache/tier/sockets/HandShake.java  |   4 +-
 .../cache/tier/sockets/ServerConnection.java|   6 +-
 .../AutoConnectionSourceImplJUnitTest.java  |  55 +
 .../pooling/ConnectionManagerJUnitTest.java |   7 +-
 .../PartitionRegionHelperDUnitTest.java |   6 -
 .../cache30/ClientMembershipDUnitTest.java  |  77 +++---
 .../internal/DistributionManagerDUnitTest.java  |   2 -
 ...onedRegionQueryEvaluatorIntegrationTest.java |  25 +-
 ...ersalMembershipListenerAdapterDUnitTest.java | 238 +--
 .../java/org/apache/geode/test/fake/Fakes.java  |   6 +-
 15 files changed, 334 insertions(+), 291 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/87f2fb5f/geode-core/src/main/java/org/apache/geode/admin/internal/DistributionLocatorConfigImpl.java
--
diff --git 
a/geode-core/src/main/java/org/apache/geode/admin/internal/DistributionLocatorConfigImpl.java
 
b/geode-core/src/main/java/org/apache/geode/admin/internal/DistributionLocatorConfigImpl.java
index c3cab6f..851693a 100644
--- 
a/geode-core/src/main/java/org/apache/geode/admin/internal/DistributionLocatorConfigImpl.java
+++ 
b/geode-core/src/main/java/org/apache/geode/admin/internal/DistributionLocatorConfigImpl.java
@@ -14,6 +14,7 @@
  */
 package org.apache.geode.admin.internal;
 
+import org.apache.geode.GemFireConfigException;
 import org.apache.geode.admin.DistributionLocator;
 import org.apache.geode.admin.DistributionLocatorConfig;
 import org.apache.geode.distributed.internal.tcpserver.*;
@@ -66,14 +67,20 @@ public class DistributionLocatorConfigImpl extends 
ManagedEntityConfigImpl
*/
   static DistributionLocatorConfig createConfigFor(String host, int port, 
InetAddress bindAddress) {
 TcpClient client = new TcpClient();
-String[] info = null;
-if (bindAddress != null) {
-  info = client.getInfo(bindAddress, port);
-} else {
-  info = client.getInfo(InetAddressUtil.toInetAddress(host), port);
-}
-if (info == null) {
-  return null;
+String[] info = new String[] {"unknown", "unknown"};
+
+try {
+  client = new TcpClient();
+  if (bindAddress != null) {
+info = client.getInfo(bindAddress, port);
+  } else {
+info = client.getInfo(InetAddressUtil.toInetAddress(host), port);
+  }
+  if (info == null) {
+return null;
+  }
+} catch (GemFireConfigException e) {
+  // communications are not initialized at this point
 }
 
 DistributionLocatorConfigImpl config = new DistributionLocatorConfigImpl();


incubator-geode git commit: GEODE-2040 Add to docs Tomcat 8.0 and 8.5 for HTTP Session Mgmt module

2016-10-27 Thread kmiller
Repository: incubator-geode
Updated Branches:
  refs/heads/develop 477806af4 -> a564a692a


GEODE-2040 Add to docs Tomcat 8.0 and 8.5 for HTTP
Session Mgmt module


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

Branch: refs/heads/develop
Commit: a564a692afeecb56fc33008ba51fa8832395ad2e
Parents: 477806a
Author: Karen Miller 
Authored: Wed Oct 26 16:31:09 2016 -0700
Committer: Karen Miller 
Committed: Wed Oct 26 16:31:09 2016 -0700

--
 .../http_session_mgmt/quick_start.html.md.erb  |  4 ++--
 .../tomcat_setting_up_the_module.html.md.erb   | 17 +++--
 2 files changed, 17 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/a564a692/geode-docs/tools_modules/http_session_mgmt/quick_start.html.md.erb
--
diff --git a/geode-docs/tools_modules/http_session_mgmt/quick_start.html.md.erb 
b/geode-docs/tools_modules/http_session_mgmt/quick_start.html.md.erb
index d065e32..434a13c 100644
--- a/geode-docs/tools_modules/http_session_mgmt/quick_start.html.md.erb
+++ b/geode-docs/tools_modules/http_session_mgmt/quick_start.html.md.erb
@@ -30,7 +30,7 @@ In this section you download, install, and set up the HTTP 
Session Management mo
 | tc Server| 2.9 (Deprecated)| 
[https://my.vmware.com/web/vmware/info/slug/application_platform/vmware_vfabric_tc_server/2_9](https://my.vmware.com/web/vmware/info/slug/application_platform/vmware_vfabric_tc_server/2_9)
 |
 | tc Server| 3.0 and 3.1 | 
[https://network.pivotal.io/products/pivotal-tcserver](https://network.pivotal.io/products/pivotal-tcserver)
 |
 | Tomcat   | 7.0 | 
[http://tomcat.apache.org/download-70.cgi](http://tomcat.apache.org/download-70.cgi)

 |
-| Tomcat   | 8.0 | 
[http://tomcat.apache.org/download-80.cgi](http://tomcat.apache.org/download-80.cgi)

 |
+| Tomcat   | 8.0, 8.5| 
[http://tomcat.apache.org/download-80.cgi](http://tomcat.apache.org/download-80.cgi)

 |
 | WebLogic | 11g (10.3.x)| 
[http://www.oracle.com/technetwork/middleware/weblogic/overview/index.html](http://www.oracle.com/technetwork/middleware/weblogic/overview/index.html)
   |
 | WebSphere| 7, 8| 
[http://www.ibm.com/developerworks/downloads/ws/was/](http://www.ibm.com/developerworks/downloads/ws/was/)
   |
 | JBoss| 5, 6, 7 | 
[http://www.jboss.org/jbossas/downloads/](http://www.jboss.org/jbossas/downloads/)

   |
@@ -43,7 +43,7 @@ In this section you download, install, and set up the HTTP 
Session Management mo
 
|--|-|--|--|
 | tc Server| 2.9 (Deprecated)| HTTP 
Session Management Module for Pivotal tc Server | `/templates` |
 | tc Server| 3.0 and 3.1 | HTTP 
Session Management Module for Pivotal tc Server | `/templates` |
-| Tomcat   | 7.0 and 8.0 | HTTP 
Session Management Module for Tomcat| `$CATALINA_HOME`  
   |
+| Tomcat   | 7.0, 8.0 and 8.5| HTTP 
Session Management Module for Tomcat| `$CATALINA_HOME`  
   |
 | WebLogic | 11g (10.3.x)| HTTP 
Session Management Module for AppServers| *any directory*   
   |
 | WebSphere| 7, 8