geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dschnei...@apache.org
Subject [36/51] [partial] incubator-geode git commit: GEODE-12: Imported pulse from geode-1.0.0-SNAPSHOT-2.src.tar
Date Mon, 06 Jul 2015 21:46:24 GMT
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c4f7ff44/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/ClusterMembersRGraphService.java
----------------------------------------------------------------------
diff --git a/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/ClusterMembersRGraphService.java b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/ClusterMembersRGraphService.java
new file mode 100644
index 0000000..2e3ed9b
--- /dev/null
+++ b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/ClusterMembersRGraphService.java
@@ -0,0 +1,362 @@
+/*
+ * =========================================================================
+ *  Copyright (c) 2012-2014 Pivotal Software, Inc. All Rights Reserved.
+ *  This product is protected by U.S. and international copyright
+ *  and intellectual property laws. Pivotal products are covered by
+ *  more patents listed at http://www.pivotal.io/patents.
+ * ========================================================================
+ */
+
+package com.vmware.gemfire.tools.pulse.internal.service;
+
+import java.text.DecimalFormat;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.springframework.context.annotation.Scope;
+import org.springframework.stereotype.Component;
+import org.springframework.stereotype.Service;
+
+import com.vmware.gemfire.tools.pulse.internal.data.Cluster;
+import com.vmware.gemfire.tools.pulse.internal.data.PulseConstants;
+import com.vmware.gemfire.tools.pulse.internal.data.Repository;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONArray;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONException;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONObject;
+
+/**
+ * Class ClusterMembersRGraphService
+ * 
+ * This class contains implementations of getting List of Cluster members and
+ * their details
+ * 
+ * @author Anchal G
+ * @since version 7.5
+ */
+@Component
+@Service("ClusterMembersRGraph")
+// @Service("ClusterMembers")
+@Scope("singleton")
+public class ClusterMembersRGraphService implements PulseService {
+
+  // String constants used for forming a json response
+  private final String CLUSTER = "clustor";
+  private final String MEMBER_COUNT = "memberCount";
+  private final String ID = "id";
+  private final String NAME = "name";
+  private final String DATA = "data";
+  private final String MEMORY_USAGE = "memoryUsage";
+  private final String CPU_USAGE = "cpuUsage";
+  private final String REGIONS = "regions";
+  private final String HOST = "host";
+  private final String PORT = "port";
+  private final String CLIENTS = "clients";
+  private final String GC_PAUSES = "gcPauses";
+  private final String GATEWAY_SENDER = "gatewaySender";
+  private final String GATEWAY_RECEIVER = "gatewayReceiver";
+  private final String LOAD_AVG = "loadAvg";
+  private final String SOCKETS = "sockets";
+  private final String THREADS = "threads";
+  private final String NUM_THREADS = "numThreads";
+
+  private final String MEMBER_NODE_TYPE_NORMAL = "Normal";
+  private final String MEMBER_NODE_TYPE_WARNING = "Warning";
+  private final String MEMBER_NODE_TYPE_ERROR = "Error";
+  private final String MEMBER_NODE_TYPE_SEVERE = "Severe";
+  private final String CHILDREN = "children";
+
+  // traversing the alert array list and members which have severe, error or
+  // warnings
+  // alerts saving them in three different arraylists
+  private List<String> severeAlertList;
+  private List<String> errorAlertsList;
+  private List<String> warningAlertsList;
+
+  public JSONObject execute(final HttpServletRequest request) throws Exception {
+
+    // Reference to repository
+    Repository repository = Repository.get();
+
+    // get cluster object
+    Cluster cluster = repository.getCluster();
+
+    // json object to be sent as response
+    JSONObject responseJSON = new JSONObject();
+
+    try {
+      // clucter's Members
+      responseJSON.put(
+          this.CLUSTER,
+          getPhysicalServerJson(cluster, repository.getJmxHost(),
+              repository.getJmxPort()));
+      responseJSON.put(this.MEMBER_COUNT, cluster.getMemberCount());
+      // Send json response
+      return responseJSON;
+    } catch (JSONException e) {
+      throw new Exception(e);
+    }
+  }
+
+  /**
+   * function used for getting all members details in format of JSON Object
+   * array defined under a cluster. This function create json based on the
+   * relation of physical host and members related to it.
+   * 
+   * @param cluster
+   * @param host
+   * @param port
+   * @return Array list of JSON objects for required fields of members in
+   *         cluster
+   */
+  private JSONObject getPhysicalServerJson(Cluster cluster, String host,
+      String port) throws JSONException {
+    Map<String, List<Cluster.Member>> physicalToMember = cluster
+        .getPhysicalToMember();
+
+    JSONObject clusterTopologyJSON = new JSONObject();
+
+    clusterTopologyJSON.put(this.ID, cluster.getClusterId());
+    clusterTopologyJSON.put(this.NAME, cluster.getClusterId());
+    JSONObject data1 = new JSONObject();
+    clusterTopologyJSON.put(this.DATA, data1);
+    JSONArray childHostArray = new JSONArray();
+    DecimalFormat df2 = new DecimalFormat(PulseConstants.DECIMAL_FORMAT_PATTERN);
+
+    updateAlertLists(cluster);
+
+    for (Map.Entry<String, List<Cluster.Member>> physicalToMem : physicalToMember
+        .entrySet()) {
+      String hostName = physicalToMem.getKey();
+      Float hostCpuUsage = 0.0F;
+      Long hostMemoryUsage = (long) 0;
+      Double hostLoadAvg = 0.0;
+      int hostNumThreads = 0;
+      Long hostSockets = (long) 0;
+      boolean hostSevere = false;
+      boolean hostError = false;
+      boolean hostWarning = false;
+      String hostStatus;
+      JSONObject childHostObject = new JSONObject();
+      childHostObject.put(this.ID, hostName);
+      childHostObject.put(this.NAME, hostName);
+
+      JSONArray membersArray = new JSONArray();
+
+      List<Cluster.Member> memberList = physicalToMem.getValue();
+      for (Cluster.Member member : memberList) {
+        JSONObject memberJSONObj = new JSONObject();
+
+        memberJSONObj.put(this.ID, member.getId());
+        memberJSONObj.put(this.NAME, member.getName());
+
+        JSONObject memberData = new JSONObject();
+
+        memberData.put("gemfireVersion", member.getGemfireVersion());
+
+        Long currentHeap = member.getCurrentHeapSize();
+        Long usedHeapSize = cluster.getUsedHeapSize();
+
+        if (usedHeapSize > 0) {
+          float heapUsage = (currentHeap.floatValue() / usedHeapSize
+              .floatValue()) * 100;
+
+          memberData.put(this.MEMORY_USAGE,
+              Double.valueOf(df2.format(heapUsage)));
+        } else
+          memberData.put(this.MEMORY_USAGE, 0);
+
+        Float currentCPUUsage = member.getCpuUsage();
+
+        memberData.put(this.CPU_USAGE,
+            Float.valueOf(df2.format(currentCPUUsage)));
+        memberData.put(this.REGIONS, member.getMemberRegions().size());
+        memberData.put(this.HOST, member.getHost());
+        if ((member.getMemberPort() == null)
+            || (member.getMemberPort().equals("")))
+          memberData.put(this.PORT, "-");
+        else
+          memberData.put(this.PORT, member.getMemberPort());
+        memberData.put(this.CLIENTS, member.getMemberClientsHMap().size());
+        memberData.put(this.GC_PAUSES, member.getGarbageCollectionCount());
+        memberData.put(this.NUM_THREADS, member.getNumThreads());
+
+        // Host CPU Usage is aggregate of all members cpu usage
+        // hostCpuUsage = hostCpuUsage + currentCPUUsage;
+        hostCpuUsage = member.getHostCpuUsage();
+        hostMemoryUsage = hostMemoryUsage + member.getCurrentHeapSize();
+        hostLoadAvg = member.getLoadAverage();
+        hostNumThreads = member.getNumThreads();
+        hostSockets = member.getTotalFileDescriptorOpen();
+
+        // defining the status of Member Icons for R Graph based on the alerts
+        // created for that member
+        String memberNodeType = "";
+        // for severe alert
+        if (severeAlertList.contains(member.getName())) {
+          memberNodeType = getMemberNodeType(member,
+              this.MEMBER_NODE_TYPE_SEVERE);
+          if (!hostSevere) {
+            hostSevere = true;
+          }
+        }
+        // for error alerts
+        else if (errorAlertsList.contains(member.getName())) {
+          memberNodeType = getMemberNodeType(member,
+              this.MEMBER_NODE_TYPE_ERROR);
+          if (!hostError) {
+            hostError = true;
+          }
+        }
+        // for warning alerts
+        else if (warningAlertsList.contains(member.getName())) {
+          memberNodeType = getMemberNodeType(member,
+              this.MEMBER_NODE_TYPE_WARNING);
+          if (!hostWarning)
+            hostWarning = true;
+        } else {
+          memberNodeType = getMemberNodeType(member,
+              this.MEMBER_NODE_TYPE_NORMAL);
+        }
+
+        memberData.put("nodeType", memberNodeType);
+        memberData.put("$type", memberNodeType);
+        memberData.put(this.GATEWAY_SENDER, member.getGatewaySenderList()
+            .size());
+        if (member.getGatewayReceiver() != null) {
+          memberData.put(this.GATEWAY_RECEIVER, "1");
+        } else {
+          memberData.put(this.GATEWAY_RECEIVER, "0");
+        }
+        memberJSONObj.put(this.DATA, memberData);
+        memberJSONObj.put(this.CHILDREN, new JSONArray());
+        membersArray.put(memberJSONObj);
+      }
+      JSONObject data = new JSONObject();
+
+      data.put(this.LOAD_AVG, hostLoadAvg);
+      data.put(this.SOCKETS, hostSockets);
+      data.put(this.THREADS, hostNumThreads);
+      data.put(this.CPU_USAGE, Double.valueOf(df2.format(hostCpuUsage)));
+      data.put(this.MEMORY_USAGE, hostMemoryUsage);
+
+      String hostNodeType;
+      // setting physical host status
+      if (hostSevere) {
+        hostStatus = this.MEMBER_NODE_TYPE_SEVERE;
+        hostNodeType = "hostSevereNode";
+      } else if (hostError) {
+        hostStatus = this.MEMBER_NODE_TYPE_ERROR;
+        hostNodeType = "hostErrorNode";
+      } else if (hostWarning) {
+        hostStatus = this.MEMBER_NODE_TYPE_WARNING;
+        hostNodeType = "hostWarningNode";
+      } else {
+        hostStatus = this.MEMBER_NODE_TYPE_NORMAL;
+        hostNodeType = "hostNormalNode";
+      }
+      data.put("hostStatus", hostStatus);
+      data.put("$type", hostNodeType);
+
+      childHostObject.put(this.DATA, data);
+
+      childHostObject.put(this.CHILDREN, membersArray);
+      childHostArray.put(childHostObject);
+    }
+    clusterTopologyJSON.put(this.CHILDREN, childHostArray);
+
+    return clusterTopologyJSON;
+  }
+
+  /**
+   * used for getting member node type based on member's current state
+   * 
+   * @param member
+   *          Member
+   * @param memberState
+   *          i.e Severe, Error, Warning or Normal
+   * @return
+   */
+  private String getMemberNodeType(Cluster.Member member, String memberState) {
+    String memberNodeType = "";
+
+    if ((member.isLocator()) && (member.isServer()) && (member.isManager())) {
+      memberNodeType = "memberLocatorManagerServer" + memberState + "Node";
+    } else if ((member.isLocator()) && (member.isServer())
+        && !(member.isManager())) {
+      memberNodeType = "memberLocatorServer" + memberState + "Node";
+    } else if ((member.isLocator()) && !(member.isServer())
+        && (member.isManager())) {
+      memberNodeType = "memberLocatorManager" + memberState + "Node";
+    } else if ((member.isLocator()) && !(member.isServer())
+        && !(member.isManager())) {
+      memberNodeType = "memberLocator" + memberState + "Node";
+    } else if (!(member.isLocator()) && (member.isServer())
+        && (member.isManager())) {
+      memberNodeType = "memberManagerServer" + memberState + "Node";
+    } else if (!(member.isLocator()) && (member.isServer())
+        && !(member.isManager())) {
+      memberNodeType = "memberServer" + memberState + "Node";
+    } else if (!(member.isLocator()) && !(member.isServer())
+        && (member.isManager())) {
+      memberNodeType = "memberManager" + memberState + "Node";
+    } else if (!(member.isLocator()) && !(member.isServer())
+        && !(member.isManager())) {
+      memberNodeType = "member" + memberState + "Node";
+    }
+    return memberNodeType;
+  }
+
+  /**
+   * function used for getting list of all the alerts and save the member names
+   * in respective error, warning and severe alert lists
+   * 
+   * @param cluster
+   */
+  private void updateAlertLists(Cluster cluster) {
+
+    severeAlertList = new ArrayList<String>();
+    errorAlertsList = new ArrayList<String>();
+    warningAlertsList = new ArrayList<String>();
+
+    Cluster.Alert[] alertsList = cluster.getAlertsList();
+
+    for (Cluster.Alert alert : alertsList) {
+      // if alert is severe
+      if (alert.getSeverity() == Cluster.Alert.SEVERE) {
+        if (errorAlertsList.contains(alert.getMemberName())) {
+          errorAlertsList.remove(alert.getMemberName());
+        } else if (warningAlertsList.contains(alert.getMemberName())) {
+          warningAlertsList.remove(alert.getMemberName());
+        }
+        if (!severeAlertList.contains(alert.getMemberName())) {
+          severeAlertList.add(alert.getMemberName());
+        }
+      }
+      // if alert is error
+      else if (alert.getSeverity() == Cluster.Alert.ERROR) {
+        if (!severeAlertList.contains(alert.getMemberName())) {
+          if (warningAlertsList.contains(alert.getMemberName())) {
+            warningAlertsList.remove(alert.getMemberName());
+          }
+          if (!errorAlertsList.contains(alert.getMemberName())) {
+            errorAlertsList.add(alert.getMemberName());
+          }
+        }
+      }
+      // if alert is warning
+      else if (alert.getSeverity() == Cluster.Alert.WARNING) {
+        if (!severeAlertList.contains(alert.getMemberName())) {
+          if (!errorAlertsList.contains(alert.getMemberName())) {
+            if (!warningAlertsList.contains(alert.getMemberName())) {
+              warningAlertsList.add(alert.getMemberName());
+            }
+          }
+        }
+      }
+    }
+
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c4f7ff44/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/ClusterMemoryUsageService.java
----------------------------------------------------------------------
diff --git a/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/ClusterMemoryUsageService.java b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/ClusterMemoryUsageService.java
new file mode 100644
index 0000000..f5480fa
--- /dev/null
+++ b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/ClusterMemoryUsageService.java
@@ -0,0 +1,60 @@
+/*
+ * =========================================================================
+ *  Copyright (c) 2012-2014 Pivotal Software, Inc. All Rights Reserved.
+ *  This product is protected by U.S. and international copyright
+ *  and intellectual property laws. Pivotal products are covered by
+ *  more patents listed at http://www.pivotal.io/patents.
+ * ========================================================================
+ */
+
+package com.vmware.gemfire.tools.pulse.internal.service;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.springframework.context.annotation.Scope;
+import org.springframework.stereotype.Component;
+import org.springframework.stereotype.Service;
+
+import com.vmware.gemfire.tools.pulse.internal.data.Cluster;
+import com.vmware.gemfire.tools.pulse.internal.data.Repository;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONArray;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONException;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONObject;
+
+/**
+ * Class ClusterMemoryUsageService
+ * 
+ * This class contains implementations of getting Cluster's overall current
+ * memory usage details and its trend over the time.
+ * 
+ * @author Anchal G
+ * @since version 7.5
+ */
+
+@Component
+@Service("ClusterMemoryUsage")
+@Scope("singleton")
+public class ClusterMemoryUsageService implements PulseService {
+
+  public JSONObject execute(final HttpServletRequest request) throws Exception {
+
+    // get cluster object
+    Cluster cluster = Repository.get().getCluster();
+
+    // json object to be sent as response
+    JSONObject responseJSON = new JSONObject();
+    // clucter's Memory Usage trend added to json response object
+
+    try {
+      responseJSON.put("currentMemoryUsage", cluster.getUsedHeapSize());
+      responseJSON.put(
+          "memoryUsageTrend",
+          new JSONArray(cluster
+              .getStatisticTrend(Cluster.CLUSTER_STAT_MEMORY_USAGE)));
+      // Send json response
+      return responseJSON;
+    } catch (JSONException e) {
+      throw new Exception(e);
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c4f7ff44/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/ClusterRegionService.java
----------------------------------------------------------------------
diff --git a/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/ClusterRegionService.java b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/ClusterRegionService.java
new file mode 100644
index 0000000..4b0d0e9
--- /dev/null
+++ b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/ClusterRegionService.java
@@ -0,0 +1,231 @@
+/*
+ * =========================================================================
+ *  Copyright (c) 2012-2014 Pivotal Software, Inc. All Rights Reserved.
+ *  This product is protected by U.S. and international copyright
+ *  and intellectual property laws. Pivotal products are covered by
+ *  more patents listed at http://www.pivotal.io/patents.
+ * ========================================================================
+ */
+
+package com.vmware.gemfire.tools.pulse.internal.service;
+
+import java.text.DecimalFormat;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.List;
+import java.util.Map;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.springframework.context.annotation.Scope;
+import org.springframework.stereotype.Component;
+import org.springframework.stereotype.Service;
+
+import com.vmware.gemfire.tools.pulse.internal.controllers.PulseController;
+import com.vmware.gemfire.tools.pulse.internal.data.Cluster;
+import com.vmware.gemfire.tools.pulse.internal.data.PulseConstants;
+import com.vmware.gemfire.tools.pulse.internal.data.Repository;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONArray;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONException;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONObject;
+import com.vmware.gemfire.tools.pulse.internal.util.StringUtils;
+
+/**
+ * Class ClusterRegionService
+ *
+ * This class contains implementations of getting Cluster's regions details
+ *
+ * @author Anchal G
+ * @since version 7.5
+ */
+
+@Component
+@Service("ClusterRegion")
+@Scope("singleton")
+public class ClusterRegionService implements PulseService {
+
+  // String constants used for forming a json response
+  private final String ENTRY_SIZE = "entrySize";
+
+  // Comparator based upon regions entry count
+  private static Comparator<Cluster.Region> regionEntryCountComparator = new Comparator<Cluster.Region>() {
+    @Override
+    public int compare(Cluster.Region r1, Cluster.Region r2) {
+      long r1Cnt = r1.getSystemRegionEntryCount();
+      long r2Cnt = r2.getSystemRegionEntryCount();
+      if (r1Cnt < r2Cnt) {
+        return -1;
+      } else if (r1Cnt > r2Cnt) {
+        return 1;
+      } else {
+        return 0;
+      }
+    }
+  };
+
+  @Override
+  public JSONObject execute(final HttpServletRequest request) throws Exception {
+
+    String userName = request.getUserPrincipal().getName();
+
+    // get cluster object
+    Cluster cluster = Repository.get().getCluster();
+
+    // json object to be sent as response
+    JSONObject responseJSON = new JSONObject();
+
+    try {
+      // getting cluster's Regions
+      responseJSON.put("clusterName", cluster.getServerName());
+      responseJSON.put("userName", userName);
+      responseJSON.put("region", getRegionJson(cluster));
+      // Send json response
+      return responseJSON;
+    } catch (JSONException e) {
+      throw new Exception(e);
+    }
+  }
+
+  /**
+   * This method is used to get various regions associated with the given
+   * cluster and create json for each region fields and returns Array List for
+   * all the regions associated with given cluster
+   *
+   * @param cluster
+   * @return JSONObject Array List
+   */
+  private List<JSONObject> getRegionJson(Cluster cluster) throws JSONException {
+
+    Long totalHeapSize = cluster.getTotalHeapSize();
+    Long totalDiskUsage = cluster.getTotalBytesOnDisk();
+
+    Map<String, Cluster.Region> clusterRegions = cluster.getClusterRegions();
+
+    List<Cluster.Region> clusterRegionsList = new ArrayList<Cluster.Region>();
+    clusterRegionsList.addAll(clusterRegions.values());
+
+    Collections.sort(clusterRegionsList, regionEntryCountComparator);
+
+    List<JSONObject> regionListJson = new ArrayList<JSONObject>();
+    for (int count = 0; count < clusterRegionsList.size(); count++) {
+      Cluster.Region reg = clusterRegionsList.get(count);
+      JSONObject regionJSON = new JSONObject();
+
+      regionJSON.put("name", reg.getName());
+      regionJSON.put("totalMemory", totalHeapSize);
+      regionJSON.put("systemRegionEntryCount", reg.getSystemRegionEntryCount());
+      regionJSON.put("memberCount", reg.getMemberCount());
+
+      final String regionType = reg.getRegionType();
+      regionJSON.put("type", regionType);
+      regionJSON.put("getsRate", reg.getGetsRate());
+      regionJSON.put("putsRate", reg.getPutsRate());
+
+      Cluster.Member[] clusterMembersList = cluster.getMembers();
+
+      JSONArray memberNameArray = new JSONArray();
+      for (String memberName : reg.getMemberName()) {
+        for (Cluster.Member member : clusterMembersList) {
+          String name = member.getName();
+          name = name.replace(":", "-");
+          String id = member.getId();
+          id = id.replace(":", "-");
+
+          if ((memberName.equals(id)) || (memberName.equals(name))) {
+            JSONObject regionMember = new JSONObject();
+            regionMember.put("id", member.getId());
+            regionMember.put("name", member.getName());
+            memberNameArray.put(regionMember);
+            break;
+          }
+        }
+      }
+
+      regionJSON.put("memberNames", memberNameArray);
+      regionJSON.put("entryCount", reg.getSystemRegionEntryCount());
+
+      Boolean persistent = reg.getPersistentEnabled();
+      if (persistent) {
+        regionJSON.put("persistence", VALUE_ON);
+      } else {
+        regionJSON.put("persistence", VALUE_OFF);
+      }
+
+      Boolean isEnableOffHeapMemory = reg.isEnableOffHeapMemory();
+      if (isEnableOffHeapMemory) {
+        regionJSON.put("isEnableOffHeapMemory", VALUE_ON);
+      } else {
+        regionJSON.put("isEnableOffHeapMemory", VALUE_OFF);
+      }
+
+      Boolean isHDFSWriteOnly = reg.isHdfsWriteOnly();
+      if (regionType.startsWith("HDFS")) {
+        if (isHDFSWriteOnly) {
+          regionJSON.put("isHDFSWriteOnly", VALUE_ON);
+        } else {
+          regionJSON.put("isHDFSWriteOnly", VALUE_OFF);
+        }
+      } else {
+        regionJSON.put("isHDFSWriteOnly", VALUE_NA);
+      }
+
+      String regCompCodec = reg.getCompressionCodec();
+      if (StringUtils.isNotNullNotEmptyNotWhiteSpace(regCompCodec)) {
+        regionJSON.put("compressionCodec", reg.getCompressionCodec());
+      } else {
+        regionJSON.put("compressionCodec", VALUE_NA);
+      }
+
+      if (PulseConstants.PRODUCT_NAME_SQLFIRE.equalsIgnoreCase(PulseController
+          .getPulseProductSupport())) {
+        // Convert region path to dot separated region path
+        regionJSON.put("regionPath",
+            StringUtils.getTableNameFromRegionName(reg.getFullPath()));
+      } else {
+        regionJSON.put("regionPath", reg.getFullPath());
+      }
+
+      regionJSON
+          .put(
+              "memoryReadsTrend",
+              new JSONArray(
+                  reg.getRegionStatisticTrend(Cluster.Region.REGION_STAT_GETS_PER_SEC_TREND)));
+      regionJSON
+          .put(
+              "memoryWritesTrend",
+              new JSONArray(
+                  reg.getRegionStatisticTrend(Cluster.Region.REGION_STAT_PUTS_PER_SEC_TREND)));
+      regionJSON
+          .put(
+              "diskReadsTrend",
+              new JSONArray(
+                  reg.getRegionStatisticTrend(Cluster.Region.REGION_STAT_DISK_READS_PER_SEC_TREND)));
+      regionJSON
+          .put(
+              "diskWritesTrend",
+              new JSONArray(
+                  reg.getRegionStatisticTrend(Cluster.Region.REGION_STAT_DISK_WRITES_PER_SEC_TREND)));
+      regionJSON.put("emptyNodes", reg.getEmptyNode());
+      Long entrySize = reg.getEntrySize();
+      DecimalFormat form = new DecimalFormat(
+          PulseConstants.DECIMAL_FORMAT_PATTERN_2);
+      String entrySizeInMB = form.format(entrySize / (1024f * 1024f));
+
+      if (entrySize < 0) {
+        regionJSON.put(this.ENTRY_SIZE, VALUE_NA);
+      } else {
+        regionJSON.put(this.ENTRY_SIZE, entrySizeInMB);
+      }
+      regionJSON.put("dataUsage", reg.getDiskUsage());
+      regionJSON.put("wanEnabled", reg.getWanEnabled());
+      regionJSON.put("totalDataUsage", totalDiskUsage);
+
+      regionJSON.put("memoryUsage", entrySizeInMB);
+
+      regionListJson.add(regionJSON);
+    }
+
+    return regionListJson;
+  }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c4f7ff44/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/ClusterRegionsService.java
----------------------------------------------------------------------
diff --git a/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/ClusterRegionsService.java b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/ClusterRegionsService.java
new file mode 100644
index 0000000..ab862c9
--- /dev/null
+++ b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/ClusterRegionsService.java
@@ -0,0 +1,233 @@
+/*
+ * =========================================================================
+ *  Copyright (c) 2012-2014 Pivotal Software, Inc. All Rights Reserved.
+ *  This product is protected by U.S. and international copyright
+ *  and intellectual property laws. Pivotal products are covered by
+ *  more patents listed at http://www.pivotal.io/patents.
+ * ========================================================================
+ */
+
+package com.vmware.gemfire.tools.pulse.internal.service;
+
+import java.text.DecimalFormat;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.List;
+import java.util.Map;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.springframework.context.annotation.Scope;
+import org.springframework.stereotype.Component;
+import org.springframework.stereotype.Service;
+
+import com.vmware.gemfire.tools.pulse.internal.controllers.PulseController;
+import com.vmware.gemfire.tools.pulse.internal.data.Cluster;
+import com.vmware.gemfire.tools.pulse.internal.data.PulseConstants;
+import com.vmware.gemfire.tools.pulse.internal.data.Repository;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONArray;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONException;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONObject;
+import com.vmware.gemfire.tools.pulse.internal.util.StringUtils;
+
+/**
+ * Class ClusterRegionsService
+ * 
+ * This class contains implementations of getting Cluster's regions details
+ * 
+ * @author Sachin K
+ * @since version 7.5
+ */
+
+@Component
+@Service("ClusterRegions")
+@Scope("singleton")
+public class ClusterRegionsService implements PulseService {
+
+  // String constants used for forming a json response
+  private final String ENTRY_SIZE = "entrySize";
+
+  // Comparator based upon regions entry count
+  private static Comparator<Cluster.Region> regionEntryCountComparator = new Comparator<Cluster.Region>() {
+    @Override
+    public int compare(Cluster.Region r1, Cluster.Region r2) {
+      long r1Cnt = r1.getSystemRegionEntryCount();
+      long r2Cnt = r2.getSystemRegionEntryCount();
+      if (r1Cnt < r2Cnt) {
+        return -1;
+      } else if (r1Cnt > r2Cnt) {
+        return 1;
+      } else {
+        return 0;
+      }
+    }
+  };
+
+  public JSONObject execute(final HttpServletRequest request) throws Exception {
+
+    String userName = request.getUserPrincipal().getName();
+
+    // get cluster object
+    Cluster cluster = Repository.get().getCluster();
+
+    // json object to be sent as response
+    JSONObject responseJSON = new JSONObject();
+
+    try {
+      // getting cluster's Regions
+      responseJSON.put("regions", getRegionJson(cluster));
+      // Send json response
+      return responseJSON;
+    } catch (JSONException e) {
+      throw new Exception(e);
+    }
+  }
+
+  /**
+   * This method is used to get various regions associated with the given
+   * cluster and create json for each region fields and returns Array List for
+   * all the regions associated with given cluster
+   * 
+   * @param cluster
+   * @return JSONObject Array List
+   */
+  private List<JSONObject> getRegionJson(Cluster cluster) throws JSONException {
+
+    Long totalHeapSize = cluster.getTotalHeapSize();
+    Long totalDiskUsage = cluster.getTotalBytesOnDisk();
+
+    Map<String, Cluster.Region> clusterRegions = cluster.getClusterRegions();
+
+    List<Cluster.Region> clusterRegionsList = new ArrayList<Cluster.Region>();
+    clusterRegionsList.addAll(clusterRegions.values());
+
+    Collections.sort(clusterRegionsList, regionEntryCountComparator);
+
+    List<JSONObject> regionListJson = new ArrayList<JSONObject>();
+    for (int count = 0; count < clusterRegionsList.size(); count++) {
+      Cluster.Region reg = clusterRegionsList.get(count);
+      JSONObject regionJSON = new JSONObject();
+
+      regionJSON.put("name", reg.getName());
+      regionJSON.put("totalMemory", totalHeapSize);
+      regionJSON.put("systemRegionEntryCount", reg.getSystemRegionEntryCount());
+      regionJSON.put("memberCount", reg.getMemberCount());
+
+      final String regionType = reg.getRegionType();
+      regionJSON.put("type", regionType);
+      regionJSON.put("getsRate", reg.getGetsRate());
+      regionJSON.put("putsRate", reg.getPutsRate());
+
+      Cluster.Member[] clusterMembersList = cluster.getMembers();
+
+      JSONArray memberNameArray = new JSONArray();
+      for (String memberName : reg.getMemberName()) {
+        for (Cluster.Member member : clusterMembersList) {
+          String name = member.getName();
+          name = name.replace(":", "-");
+          String id = member.getId();
+          id = id.replace(":", "-");
+
+          if ((memberName.equals(id)) || (memberName.equals(name))) {
+            JSONObject regionMember = new JSONObject();
+            regionMember.put("id", member.getId());
+            regionMember.put("name", member.getName());
+            memberNameArray.put(regionMember);
+            break;
+          }
+        }
+      }
+
+      regionJSON.put("memberNames", memberNameArray);
+      regionJSON.put("entryCount", reg.getSystemRegionEntryCount());
+
+      Boolean persistent = reg.getPersistentEnabled();
+      if (persistent) {
+        regionJSON.put("persistence", this.VALUE_ON);
+      } else {
+        regionJSON.put("persistence", this.VALUE_OFF);
+      }
+
+      Boolean isEnableOffHeapMemory = reg.isEnableOffHeapMemory();
+      if (isEnableOffHeapMemory) {
+        regionJSON.put("isEnableOffHeapMemory", this.VALUE_ON);
+      } else {
+        regionJSON.put("isEnableOffHeapMemory", this.VALUE_OFF);
+      }
+
+      Boolean isHDFSWriteOnly = reg.isHdfsWriteOnly();
+      if (regionType.startsWith("HDFS")) {
+        if (isHDFSWriteOnly) {
+          regionJSON.put("isHDFSWriteOnly", this.VALUE_ON);
+        } else {
+          regionJSON.put("isHDFSWriteOnly", this.VALUE_OFF);
+        }
+      } else {
+        regionJSON.put("isHDFSWriteOnly", this.VALUE_NA);
+      }
+
+      String regCompCodec = reg.getCompressionCodec();
+      if (StringUtils.isNotNullNotEmptyNotWhiteSpace(regCompCodec)) {
+        regionJSON.put("compressionCodec", reg.getCompressionCodec());
+      } else {
+        regionJSON.put("compressionCodec", this.VALUE_NA);
+      }
+
+      if (PulseConstants.PRODUCT_NAME_SQLFIRE.equalsIgnoreCase(PulseController
+          .getPulseProductSupport())) {
+        // Convert region path to dot separated region path
+        regionJSON.put("regionPath",
+            StringUtils.getTableNameFromRegionName(reg.getFullPath()));
+        regionJSON.put("id",
+            StringUtils.getTableNameFromRegionName(reg.getFullPath()));
+      } else {
+        regionJSON.put("regionPath", reg.getFullPath());
+        regionJSON.put("id", reg.getFullPath());
+      }
+
+      regionJSON
+          .put(
+              "memoryReadsTrend",
+              new JSONArray(
+                  reg.getRegionStatisticTrend(Cluster.Region.REGION_STAT_GETS_PER_SEC_TREND)));
+      regionJSON
+          .put(
+              "memoryWritesTrend",
+              new JSONArray(
+                  reg.getRegionStatisticTrend(Cluster.Region.REGION_STAT_PUTS_PER_SEC_TREND)));
+      regionJSON
+          .put(
+              "diskReadsTrend",
+              new JSONArray(
+                  reg.getRegionStatisticTrend(Cluster.Region.REGION_STAT_DISK_READS_PER_SEC_TREND)));
+      regionJSON
+          .put(
+              "diskWritesTrend",
+              new JSONArray(
+                  reg.getRegionStatisticTrend(Cluster.Region.REGION_STAT_DISK_WRITES_PER_SEC_TREND)));
+      regionJSON.put("emptyNodes", reg.getEmptyNode());
+      Long entrySize = reg.getEntrySize();
+      DecimalFormat form = new DecimalFormat(
+          PulseConstants.DECIMAL_FORMAT_PATTERN_2);
+      String entrySizeInMB = form.format(entrySize / (1024f * 1024f));
+
+      if (entrySize < 0) {
+        regionJSON.put(this.ENTRY_SIZE, this.VALUE_NA);
+      } else {
+        regionJSON.put(this.ENTRY_SIZE, entrySizeInMB);
+      }
+      regionJSON.put("dataUsage", reg.getDiskUsage());
+      regionJSON.put("wanEnabled", reg.getWanEnabled());
+      regionJSON.put("totalDataUsage", totalDiskUsage);
+
+      regionJSON.put("memoryUsage", entrySizeInMB);
+
+      regionListJson.add(regionJSON);
+    }
+
+    return regionListJson;
+  }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c4f7ff44/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/ClusterSelectedRegionService.java
----------------------------------------------------------------------
diff --git a/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/ClusterSelectedRegionService.java b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/ClusterSelectedRegionService.java
new file mode 100644
index 0000000..3bf79ff
--- /dev/null
+++ b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/ClusterSelectedRegionService.java
@@ -0,0 +1,268 @@
+/*
+ * =========================================================================
+ *  Copyright (c) 2012-2014 Pivotal Software, Inc. All Rights Reserved.
+ *  This product is protected by U.S. and international copyright
+ *  and intellectual property laws. Pivotal products are covered by
+ *  more patents listed at http://www.pivotal.io/patents.
+ * ========================================================================
+ */
+
+package com.vmware.gemfire.tools.pulse.internal.service;
+
+import java.text.DecimalFormat;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.List;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.springframework.context.annotation.Scope;
+import org.springframework.stereotype.Component;
+import org.springframework.stereotype.Service;
+
+import com.vmware.gemfire.tools.pulse.internal.controllers.PulseController;
+import com.vmware.gemfire.tools.pulse.internal.data.Cluster;
+import com.vmware.gemfire.tools.pulse.internal.data.PulseConstants;
+import com.vmware.gemfire.tools.pulse.internal.data.Repository;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONArray;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONException;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONObject;
+import com.vmware.gemfire.tools.pulse.internal.log.PulseLogWriter;
+import com.vmware.gemfire.tools.pulse.internal.util.StringUtils;
+import com.vmware.gemfire.tools.pulse.internal.util.TimeUtils;
+
+/**
+ * Class ClusterSelectedRegionService
+ *
+ * This class contains implementations of getting Cluster's selected region details
+ *
+ * @author Riya Bhandekar
+ * @since version 7.5 cedar  2014-03-01
+ */
+
+@Component
+@Service("ClusterSelectedRegion")
+@Scope("singleton")
+public class ClusterSelectedRegionService implements PulseService {
+
+  // String constants used for forming a json response
+  private final String ENTRY_SIZE = "entrySize";
+
+  // Comparator based upon regions entry count
+  private static Comparator<Cluster.Member> memberCurrentHeapUsageComparator = new Comparator<Cluster.Member>() {
+    @Override
+    public int compare(Cluster.Member m1, Cluster.Member m2) {
+      long m1HeapUsage = m1.getCurrentHeapSize();
+      long m2HeapUsage = m2.getCurrentHeapSize();
+      if (m1HeapUsage < m2HeapUsage) {
+        return -1;
+      } else if (m1HeapUsage > m2HeapUsage) {
+        return 1;
+      } else {
+        return 0;
+      }
+    }
+  };
+
+  @Override
+  public JSONObject execute(final HttpServletRequest request) throws Exception {
+
+    String userName = request.getUserPrincipal().getName();
+    String pulseData = request.getParameter("pulseData");
+    JSONObject parameterMap = new JSONObject(pulseData);
+    String selectedRegionFullPath = parameterMap.getJSONObject("ClusterSelectedRegion").getString("regionFullPath");
+
+    // get cluster object
+    Cluster cluster = Repository.get().getCluster();
+
+    // json object to be sent as response
+    JSONObject responseJSON = new JSONObject();
+
+    try {
+      // getting cluster's Regions
+      responseJSON.put("clusterName", cluster.getServerName());
+      responseJSON.put("userName", userName);
+      responseJSON.put("selectedRegion", getSelectedRegionJson(cluster, selectedRegionFullPath));
+      // Send json response
+      return responseJSON;
+    } catch (JSONException e) {
+      throw new Exception(e);
+    }
+  }
+
+  /**
+   * Create JSON for selected cluster region
+   *
+   * @param cluster
+   * @return JSONObject Array List
+   */
+  private JSONObject getSelectedRegionJson(Cluster cluster, String selectedRegionFullPath) throws JSONException {
+    PulseLogWriter LOGGER = PulseLogWriter.getLogger();
+    Long totalHeapSize = cluster.getTotalHeapSize();
+    Long totalDiskUsage = cluster.getTotalBytesOnDisk();
+
+    Cluster.Region reg = cluster.getClusterRegion(selectedRegionFullPath);
+    if(reg != null){
+      JSONObject regionJSON = new JSONObject();
+
+      regionJSON.put("name", reg.getName());
+      regionJSON.put("path", reg.getFullPath());
+      regionJSON.put("totalMemory", totalHeapSize);
+      regionJSON.put("systemRegionEntryCount", reg.getSystemRegionEntryCount());
+      regionJSON.put("memberCount", reg.getMemberCount());
+
+      final String regionType = reg.getRegionType();
+      regionJSON.put("type", regionType);
+      regionJSON.put("getsRate", reg.getGetsRate());
+      regionJSON.put("putsRate", reg.getPutsRate());
+      regionJSON.put("lruEvictionRate", reg.getLruEvictionRate());
+
+      DecimalFormat df2 = new DecimalFormat(
+          PulseConstants.DECIMAL_FORMAT_PATTERN);
+      Cluster.Member[] clusterMembersList = cluster.getMembers();
+
+      // collect members of this region
+      List<Cluster.Member> clusterMembersL = new ArrayList<Cluster.Member>();
+      for (String memberName : reg.getMemberName()) {
+       for (Cluster.Member member : clusterMembersList) {
+          String name = member.getName();
+          name = name.replace(":", "-");
+          String id = member.getId();
+          id = id.replace(":", "-");
+
+          if ((memberName.equals(id)) || (memberName.equals(name))) {
+             clusterMembersL.add(member);
+          }
+        }
+      }
+
+      // sort members of this region
+      Collections.sort(clusterMembersL, memberCurrentHeapUsageComparator);
+      // return sorted member list by heap usage
+      JSONArray memberArray = new JSONArray();
+      for (Cluster.Member member : clusterMembersL) {
+
+          JSONObject regionMember = new JSONObject();
+          regionMember.put("memberId", member.getId());
+          regionMember.put("name", member.getName());
+          regionMember.put("host", member.getHost());
+
+          long usedHeapSize = cluster.getUsedHeapSize();
+          long currentHeap = member.getCurrentHeapSize();
+          if (usedHeapSize > 0) {
+            float heapUsage = ((float) currentHeap / (float) usedHeapSize) * 100;
+            regionMember.put("heapUsage", Double.valueOf(df2.format(heapUsage)));
+          } else {
+            regionMember.put("heapUsage", 0);
+          }
+          Float currentCPUUsage = member.getCpuUsage();
+
+          regionMember.put("cpuUsage", Float.valueOf(df2.format(currentCPUUsage)));
+          regionMember.put("currentHeapUsage", member.getCurrentHeapSize());
+          regionMember.put("isManager", member.isManager());
+          regionMember.put("uptime", TimeUtils.convertTimeSecondsToHMS(member.getUptime()));
+
+          regionMember.put("loadAvg", member.getLoadAverage());
+          regionMember.put("sockets", member.getTotalFileDescriptorOpen());
+          regionMember.put("threads", member.getNumThreads());
+
+          if (PulseController.getPulseProductSupport().equalsIgnoreCase(
+              PulseConstants.PRODUCT_NAME_SQLFIRE)){
+            regionMember.put("clients", member.getNumSqlfireClients());
+          }else{
+            regionMember.put("clients", member.getMemberClientsHMap().size());
+          }
+          regionMember.put("queues", member.getQueueBacklog());
+          memberArray.put(regionMember);
+      }
+
+      regionJSON.put("members", memberArray);
+      regionJSON.put("entryCount", reg.getSystemRegionEntryCount());
+
+      Boolean persistent = reg.getPersistentEnabled();
+      if (persistent) {
+        regionJSON.put("persistence", PulseService.VALUE_ON);
+      } else {
+        regionJSON.put("persistence", PulseService.VALUE_OFF);
+      }
+
+      Boolean isEnableOffHeapMemory = reg.isEnableOffHeapMemory();
+      if (isEnableOffHeapMemory) {
+        regionJSON.put("isEnableOffHeapMemory", PulseService.VALUE_ON);
+      } else {
+        regionJSON.put("isEnableOffHeapMemory", PulseService.VALUE_OFF);
+      }
+
+      Boolean isHDFSWriteOnly = reg.isHdfsWriteOnly();
+      if (regionType.startsWith("HDFS")) {
+        if (isHDFSWriteOnly) {
+          regionJSON.put("isHDFSWriteOnly", PulseService.VALUE_ON);
+        } else {
+          regionJSON.put("isHDFSWriteOnly", PulseService.VALUE_OFF);
+        }
+      } else {
+        regionJSON.put("isHDFSWriteOnly", PulseService.VALUE_NA);
+      }
+
+      String regCompCodec = reg.getCompressionCodec();
+      if (StringUtils.isNotNullNotEmptyNotWhiteSpace(regCompCodec)) {
+        regionJSON.put("compressionCodec", reg.getCompressionCodec());
+      } else {
+        regionJSON.put("compressionCodec", PulseService.VALUE_NA);
+      }
+
+      if (PulseConstants.PRODUCT_NAME_SQLFIRE.equalsIgnoreCase(PulseController
+          .getPulseProductSupport())) {
+        // Convert region path to dot separated region path
+        regionJSON.put("regionPath",
+            StringUtils.getTableNameFromRegionName(reg.getFullPath()));
+      } else {
+        regionJSON.put("regionPath", reg.getFullPath());
+      }
+
+      regionJSON
+          .put(
+              "memoryReadsTrend",
+              new JSONArray(
+                  reg.getRegionStatisticTrend(Cluster.Region.REGION_STAT_GETS_PER_SEC_TREND)));
+      regionJSON
+          .put(
+              "memoryWritesTrend",
+              new JSONArray(
+                  reg.getRegionStatisticTrend(Cluster.Region.REGION_STAT_PUTS_PER_SEC_TREND)));
+      regionJSON
+          .put(
+              "diskReadsTrend",
+              new JSONArray(
+                  reg.getRegionStatisticTrend(Cluster.Region.REGION_STAT_DISK_READS_PER_SEC_TREND)));
+      regionJSON
+          .put(
+              "diskWritesTrend",
+              new JSONArray(
+                  reg.getRegionStatisticTrend(Cluster.Region.REGION_STAT_DISK_WRITES_PER_SEC_TREND)));
+      regionJSON.put("emptyNodes", reg.getEmptyNode());
+      Long entrySize = reg.getEntrySize();
+      DecimalFormat form = new DecimalFormat(
+          PulseConstants.DECIMAL_FORMAT_PATTERN_2);
+      String entrySizeInMB = form.format(entrySize / (1024f * 1024f));
+      if (entrySize < 0) {
+        regionJSON.put(this.ENTRY_SIZE, PulseService.VALUE_NA);
+      } else {
+        regionJSON.put(this.ENTRY_SIZE, entrySizeInMB);
+      }
+      regionJSON.put("dataUsage", reg.getDiskUsage());
+      regionJSON.put("wanEnabled", reg.getWanEnabled());
+      regionJSON.put("totalDataUsage", totalDiskUsage);
+      regionJSON.put("memoryUsage", entrySizeInMB);
+
+      LOGGER.fine("calling getSelectedRegionJson :: regionJSON = " + regionJSON);
+      return regionJSON;
+    } else {
+      JSONObject responseJSON = new JSONObject();
+      responseJSON.put("errorOnRegion", "Region [" + selectedRegionFullPath
+          + "] is not available");
+      return responseJSON;
+    }
+  }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c4f7ff44/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/ClusterSelectedRegionsMemberService.java
----------------------------------------------------------------------
diff --git a/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/ClusterSelectedRegionsMemberService.java b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/ClusterSelectedRegionsMemberService.java
new file mode 100644
index 0000000..d57c6dd
--- /dev/null
+++ b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/ClusterSelectedRegionsMemberService.java
@@ -0,0 +1,139 @@
+/*
+ * =========================================================================
+ *  Copyright (c) 2012-2014 Pivotal Software, Inc. All Rights Reserved.
+ *  This product is protected by U.S. and international copyright
+ *  and intellectual property laws. Pivotal products are covered by
+ *  more patents listed at http://www.pivotal.io/patents.
+ * ========================================================================
+ */
+
+package com.vmware.gemfire.tools.pulse.internal.service;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.List;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.springframework.context.annotation.Scope;
+import org.springframework.stereotype.Component;
+import org.springframework.stereotype.Service;
+
+import com.vmware.gemfire.tools.pulse.internal.data.Cluster;
+import com.vmware.gemfire.tools.pulse.internal.data.Cluster.RegionOnMember;
+import com.vmware.gemfire.tools.pulse.internal.data.Repository;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONArray;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONException;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONObject;
+import com.vmware.gemfire.tools.pulse.internal.log.PulseLogWriter;
+
+/**
+ * Class ClusterSelectedRegionsMemberService
+ *
+ * This class contains implementations of getting Cluster's selected region's member specific details
+ * for all members in that region
+ *
+ * @author Riya Bhandekar
+ * @since version 7.5 cedar 2014-03-01
+ */
+
+@Component
+@Service("ClusterSelectedRegionsMember")
+@Scope("singleton")
+public class ClusterSelectedRegionsMemberService implements PulseService {
+
+  //Comparator based upon regions entry count
+  private static Comparator<Cluster.RegionOnMember> romEntryCountComparator = new Comparator<Cluster.RegionOnMember>() {
+   @Override
+     public int compare(Cluster.RegionOnMember m1, Cluster.RegionOnMember m2) {
+       long m1EntryCount = m1.getEntryCount();
+       long m2EntryCount = m2.getEntryCount();
+       if (m1EntryCount < m2EntryCount) {
+         return -1;
+       } else if (m1EntryCount > m2EntryCount) {
+         return 1;
+       } else {
+         return 0;
+       }
+     }
+  };
+
+  @Override
+  public JSONObject execute(final HttpServletRequest request) throws Exception {
+    PulseLogWriter LOGGER = PulseLogWriter.getLogger();
+    String userName = request.getUserPrincipal().getName();
+    String pulseData = request.getParameter("pulseData");
+    JSONObject parameterMap = new JSONObject(pulseData);
+    String selectedRegionFullPath = parameterMap.getJSONObject("ClusterSelectedRegionsMember").getString("regionFullPath");
+    LOGGER.finest("ClusterSelectedRegionsMemberService selectedRegionFullPath = " + selectedRegionFullPath);
+
+    // get cluster object
+    Cluster cluster = Repository.get().getCluster();
+
+    // json object to be sent as response
+    JSONObject responseJSON = new JSONObject();
+
+    try {
+      // getting cluster's Regions
+      responseJSON.put("clusterName", cluster.getServerName());
+      responseJSON.put("userName", userName);
+      responseJSON.put("selectedRegionsMembers", getSelectedRegionsMembersJson(cluster, selectedRegionFullPath));
+      // Send json response
+      return responseJSON;
+    } catch (JSONException e) {
+      throw new Exception(e);
+    }
+  }
+
+  /**
+   * Create JSON for selected cluster region's all members
+   *
+   * @param cluster, region path
+   * @return JSONObject Array List
+   */
+  private JSONObject getSelectedRegionsMembersJson(Cluster cluster, String selectedRegionFullPath) throws JSONException {
+    PulseLogWriter LOGGER = PulseLogWriter.getLogger();
+    Cluster.Region reg = cluster.getClusterRegion(selectedRegionFullPath);
+    if(reg != null){
+      JSONObject regionMemberJSON = new JSONObject();
+      RegionOnMember[] regionOnMembers = reg.getRegionOnMembers();
+
+      //sort on entry count
+      List<RegionOnMember> romList = Arrays.asList(regionOnMembers);
+      Collections.sort(romList, romEntryCountComparator);
+
+      for(RegionOnMember rom : romList) {
+
+        JSONObject memberJSON = new JSONObject();
+        memberJSON.put("memberName", rom.getMemberName());
+        memberJSON.put("regionFullPath", rom.getRegionFullPath());
+        memberJSON.put("entryCount", rom.getEntryCount());
+        memberJSON.put("entrySize", rom.getEntrySize());
+        memberJSON.put("accessor", ((rom.getLocalMaxMemory() == 0) ? "True" : "False"));
+        LOGGER.finest("calling getSelectedRegionsMembersJson :: rom.getLocalMaxMemory() = " + rom.getLocalMaxMemory());
+        memberJSON.put(
+            "memoryReadsTrend", new JSONArray(rom.getRegionOnMemberStatisticTrend(RegionOnMember.REGION_ON_MEMBER_STAT_GETS_PER_SEC_TREND)));
+        LOGGER.finest("memoryReadsTrend = " + rom.getRegionOnMemberStatisticTrend(RegionOnMember.REGION_ON_MEMBER_STAT_GETS_PER_SEC_TREND).length);
+        memberJSON.put(
+            "memoryWritesTrend", new JSONArray(rom.getRegionOnMemberStatisticTrend(RegionOnMember.REGION_ON_MEMBER_STAT_PUTS_PER_SEC_TREND)));
+        LOGGER.finest("memoryWritesTrend = " + rom.getRegionOnMemberStatisticTrend(RegionOnMember.REGION_ON_MEMBER_STAT_PUTS_PER_SEC_TREND).length);
+        memberJSON.put(
+            "diskReadsTrend", new JSONArray(rom.getRegionOnMemberStatisticTrend(RegionOnMember.REGION_ON_MEMBER_STAT_DISK_READS_PER_SEC_TREND)));
+        LOGGER.finest("diskReadsTrend = " + rom.getRegionOnMemberStatisticTrend(RegionOnMember.REGION_ON_MEMBER_STAT_DISK_READS_PER_SEC_TREND).length);
+        memberJSON.put(
+            "diskWritesTrend", new JSONArray(rom.getRegionOnMemberStatisticTrend(RegionOnMember.REGION_ON_MEMBER_STAT_DISK_WRITES_PER_SEC_TREND)));
+        LOGGER.finest("diskWritesTrend = " + rom.getRegionOnMemberStatisticTrend(RegionOnMember.REGION_ON_MEMBER_STAT_DISK_WRITES_PER_SEC_TREND).length);
+        regionMemberJSON.put(rom.getMemberName(), memberJSON);
+      }
+
+      LOGGER.fine("calling getSelectedRegionsMembersJson :: regionJSON = " + regionMemberJSON);
+      return regionMemberJSON;
+    } else {
+      JSONObject responseJSON = new JSONObject();
+      responseJSON.put("errorOnRegion", "Region [" + selectedRegionFullPath
+          + "] is not available");
+      return responseJSON;
+    }
+  }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c4f7ff44/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/ClusterWANInfoService.java
----------------------------------------------------------------------
diff --git a/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/ClusterWANInfoService.java b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/ClusterWANInfoService.java
new file mode 100644
index 0000000..7f6be08
--- /dev/null
+++ b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/ClusterWANInfoService.java
@@ -0,0 +1,72 @@
+/*
+ * =========================================================================
+ *  Copyright (c) 2012-2014 Pivotal Software, Inc. All Rights Reserved.
+ *  This product is protected by U.S. and international copyright
+ *  and intellectual property laws. Pivotal products are covered by
+ *  more patents listed at http://www.pivotal.io/patents.
+ * ========================================================================
+ */
+
+package com.vmware.gemfire.tools.pulse.internal.service;
+
+import java.util.Map;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.springframework.context.annotation.Scope;
+import org.springframework.stereotype.Component;
+import org.springframework.stereotype.Service;
+
+import com.vmware.gemfire.tools.pulse.internal.data.Cluster;
+import com.vmware.gemfire.tools.pulse.internal.data.Repository;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONArray;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONException;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONObject;
+
+/**
+ * Class ClusterWANInfoService
+ * 
+ * This class contains implementations of getting Cluster's WAN Informations
+ * (connected clusters)
+ * 
+ * @author Sachin K
+ * @since version 7.5
+ */
+@Component
+@Service("ClusterWANInfo")
+@Scope("singleton")
+public class ClusterWANInfoService implements PulseService {
+
+  public JSONObject execute(final HttpServletRequest request) throws Exception {
+
+    // get cluster object
+    Cluster cluster = Repository.get().getCluster();
+
+    // json object to be sent as response
+    JSONObject responseJSON = new JSONObject();
+
+    // members list
+    // ArrayList<Cluster> connectedClusters = cluster.getConnectedClusterList();
+    JSONArray connectedClusterListJson = new JSONArray();
+
+    try {
+
+      for (Map.Entry<String, Boolean> entry : cluster.getWanInformation()
+          .entrySet()) {
+        JSONObject clusterJSON = new JSONObject();
+        clusterJSON.put("clusterId", entry.getKey());
+        clusterJSON.put("name", entry.getKey());
+        clusterJSON.put("status", entry.getValue());
+
+        connectedClusterListJson.put(clusterJSON);
+      }
+      // Response JSON
+      responseJSON.put("connectedClusters", connectedClusterListJson);
+      // Send json response
+      return responseJSON;
+    } catch (JSONException e) {
+      throw new Exception(e);
+    }
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c4f7ff44/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/MemberAsynchEventQueuesService.java
----------------------------------------------------------------------
diff --git a/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/MemberAsynchEventQueuesService.java b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/MemberAsynchEventQueuesService.java
new file mode 100644
index 0000000..31a5cfb
--- /dev/null
+++ b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/MemberAsynchEventQueuesService.java
@@ -0,0 +1,97 @@
+/*
+ * =========================================================================
+ *  Copyright (c) 2012-2014 Pivotal Software, Inc. All Rights Reserved.
+ *  This product is protected by U.S. and international copyright
+ *  and intellectual property laws. Pivotal products are covered by
+ *  more patents listed at http://www.pivotal.io/patents.
+ * ========================================================================
+ */
+
+package com.vmware.gemfire.tools.pulse.internal.service;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.springframework.context.annotation.Scope;
+import org.springframework.stereotype.Component;
+import org.springframework.stereotype.Service;
+
+import com.vmware.gemfire.tools.pulse.internal.data.Cluster;
+import com.vmware.gemfire.tools.pulse.internal.data.Repository;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONArray;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONException;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONObject;
+import com.vmware.gemfire.tools.pulse.internal.util.StringUtils;
+
+/**
+ * Class MemberAsynchEventQueuesService
+ * 
+ * This class contains implementations of getting Asynchronous Event Queues
+ * details of Cluster Member.
+ * 
+ * @author Sachin K
+ * @since version 7.5
+ */
+@Component
+@Service("MemberAsynchEventQueues")
+@Scope("singleton")
+public class MemberAsynchEventQueuesService implements PulseService {
+
+  public JSONObject execute(final HttpServletRequest request) throws Exception {
+
+    // get cluster object
+    Cluster cluster = Repository.get().getCluster();
+
+    // json object to be sent as response
+    JSONObject responseJSON = new JSONObject();
+
+    try {
+
+      JSONObject requestDataJSON = new JSONObject(
+          request.getParameter("pulseData"));
+      String memberName = requestDataJSON.getJSONObject(
+          "MemberAsynchEventQueues").getString("memberName");
+
+      Cluster.Member clusterMember = cluster.getMember(StringUtils
+          .makeCompliantName(memberName));
+
+      if (clusterMember != null) {
+        // response
+        Cluster.AsyncEventQueue[] asyncEventQueues = clusterMember
+            .getMemberAsyncEventQueueList();
+        JSONArray asyncEventQueueJsonList = new JSONArray();
+
+        if (asyncEventQueues != null && asyncEventQueues.length > 0) {
+
+          responseJSON.put("isAsyncEventQueuesPresent", true);
+
+          for (Cluster.AsyncEventQueue asyncEventQueue : asyncEventQueues) {
+            JSONObject asyncEventQueueJSON = new JSONObject();
+            asyncEventQueueJSON.put("id", asyncEventQueue.getId());
+            asyncEventQueueJSON.put("primary", asyncEventQueue.getPrimary());
+            asyncEventQueueJSON.put("senderType", asyncEventQueue.isParallel());
+            asyncEventQueueJSON
+                .put("batchSize", asyncEventQueue.getBatchSize());
+            asyncEventQueueJSON.put("batchTimeInterval",
+                asyncEventQueue.getBatchTimeInterval());
+            asyncEventQueueJSON.put("batchConflationEnabled",
+                asyncEventQueue.isBatchConflationEnabled());
+            asyncEventQueueJSON.put("asyncEventListener",
+                asyncEventQueue.getAsyncEventListener());
+            asyncEventQueueJSON.put("queueSize",
+                asyncEventQueue.getEventQueueSize());
+
+            asyncEventQueueJsonList.put(asyncEventQueueJSON);
+          }
+          responseJSON.put("asyncEventQueues", asyncEventQueueJsonList);
+        } else {
+          responseJSON.put("isAsyncEventQueuesPresent", false);
+        }
+
+      }
+      // Send json response
+      return responseJSON;
+    } catch (JSONException e) {
+      throw new Exception(e);
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c4f7ff44/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/MemberClientsService.java
----------------------------------------------------------------------
diff --git a/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/MemberClientsService.java b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/MemberClientsService.java
new file mode 100644
index 0000000..3279130
--- /dev/null
+++ b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/MemberClientsService.java
@@ -0,0 +1,113 @@
+/*
+ * =========================================================================
+ *  Copyright (c) 2012-2014 Pivotal Software, Inc. All Rights Reserved.
+ *  This product is protected by U.S. and international copyright
+ *  and intellectual property laws. Pivotal products are covered by
+ *  more patents listed at http://www.pivotal.io/patents.
+ * ========================================================================
+ */
+
+package com.vmware.gemfire.tools.pulse.internal.service;
+
+import java.util.Formatter;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.springframework.context.annotation.Scope;
+import org.springframework.stereotype.Component;
+import org.springframework.stereotype.Service;
+
+import com.vmware.gemfire.tools.pulse.internal.data.Cluster;
+import com.vmware.gemfire.tools.pulse.internal.data.Repository;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONArray;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONException;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONObject;
+import com.vmware.gemfire.tools.pulse.internal.util.StringUtils;
+import com.vmware.gemfire.tools.pulse.internal.util.TimeUtils;
+
+/**
+ * Class MemberClientsService
+ * 
+ * This class contains implementations of getting Memeber's Clients.
+ * 
+ * @author Sachin K
+ * @since version 7.5
+ */
+@Component
+@Service("MemberClients")
+@Scope("singleton")
+public class MemberClientsService implements PulseService {
+
+  // String constants used for forming a json response
+  private final String NAME = "name";
+  private final String HOST = "host";
+
+  public JSONObject execute(final HttpServletRequest request) throws Exception {
+
+    // get cluster object
+    Cluster cluster = Repository.get().getCluster();
+
+    // json object to be sent as response
+    JSONObject responseJSON = new JSONObject();
+
+    try {
+      JSONObject requestDataJSON = new JSONObject(
+          request.getParameter("pulseData"));
+      String memberName = requestDataJSON.getJSONObject("MemberClients")
+          .getString("memberName");
+
+      JSONArray clientListJson = new JSONArray();
+
+      Cluster.Member clusterMember = cluster.getMember(StringUtils
+          .makeCompliantName(memberName));
+      if (clusterMember != null) {
+        responseJSON.put("memberId", clusterMember.getId());
+        responseJSON.put(this.NAME, clusterMember.getName());
+        responseJSON.put(this.HOST, clusterMember.getHost());
+
+        // member's clients
+
+        Cluster.Client[] memberClients = clusterMember.getMemberClients();
+        for (Cluster.Client memberClient : memberClients) {
+          JSONObject regionJSON = new JSONObject();
+          regionJSON.put("clientId", memberClient.getId());
+          regionJSON.put(this.NAME, memberClient.getName());
+          regionJSON.put(this.HOST, memberClient.getHost());
+          regionJSON.put("queueSize", memberClient.getQueueSize());
+          regionJSON.put("clientCQCount", memberClient.getClientCQCount()); 
+          if(memberClient.isConnected()){
+            regionJSON.put("isConnected", "Yes");
+          }else{
+            regionJSON.put("isConnected", "No");
+          }
+          
+          if(memberClient.isSubscriptionEnabled()){ 
+            regionJSON.put("isSubscriptionEnabled", "Yes"); 
+          }else{ 
+            regionJSON.put("isSubscriptionEnabled", "No"); 
+          } 
+
+          regionJSON.put("uptime",
+              TimeUtils.convertTimeSecondsToHMS(memberClient.getUptime()));
+          Formatter fmt = new Formatter();
+          regionJSON.put("cpuUsage",
+              fmt.format("%.4f", memberClient.getCpuUsage()).toString());
+          // regionJSON.put("cpuUsage", memberClient.getCpuUsage());
+          regionJSON.put("threads", memberClient.getThreads());
+          regionJSON.put("gets", memberClient.getGets());
+          regionJSON.put("puts", memberClient.getPuts());
+
+          clientListJson.put(regionJSON);
+          fmt.close();
+
+        }
+        responseJSON.put("memberClients", clientListJson);
+      }
+      // Send json response
+      return responseJSON;
+
+    } catch (JSONException e) {
+      throw new Exception(e);
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c4f7ff44/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/MemberDetailsService.java
----------------------------------------------------------------------
diff --git a/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/MemberDetailsService.java b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/MemberDetailsService.java
new file mode 100644
index 0000000..a4b5c4d
--- /dev/null
+++ b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/MemberDetailsService.java
@@ -0,0 +1,119 @@
+/*
+ * =========================================================================
+ *  Copyright (c) 2012-2014 Pivotal Software, Inc. All Rights Reserved.
+ *  This product is protected by U.S. and international copyright
+ *  and intellectual property laws. Pivotal products are covered by
+ *  more patents listed at http://www.pivotal.io/patents.
+ * ========================================================================
+ */
+
+package com.vmware.gemfire.tools.pulse.internal.service;
+
+import java.text.DecimalFormat;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.springframework.context.annotation.Scope;
+import org.springframework.stereotype.Component;
+import org.springframework.stereotype.Service;
+
+import com.vmware.gemfire.tools.pulse.internal.controllers.PulseController;
+import com.vmware.gemfire.tools.pulse.internal.data.Cluster;
+import com.vmware.gemfire.tools.pulse.internal.data.PulseConstants;
+import com.vmware.gemfire.tools.pulse.internal.data.Repository;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONException;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONObject;
+import com.vmware.gemfire.tools.pulse.internal.util.StringUtils;
+
+/**
+ * Class MemberDetailsService
+ * 
+ * This class contains implementations of getting Memeber's Statistics.
+ * 
+ * @author Sachin K
+ * @since version 7.5
+ */
+@Component
+@Service("MemberDetails")
+@Scope("singleton")
+public class MemberDetailsService implements PulseService {
+
+  public JSONObject execute(final HttpServletRequest request) throws Exception {
+
+    String userName = request.getUserPrincipal().getName();
+
+    // get cluster object
+    Cluster cluster = Repository.get().getCluster();
+
+    // json object to be sent as response
+    JSONObject responseJSON = new JSONObject();
+    try {
+
+      JSONObject requestDataJSON = new JSONObject(
+          request.getParameter("pulseData"));
+      String memberName = requestDataJSON.getJSONObject("MemberDetails")
+          .getString("memberName");
+
+      Cluster.Member clusterMember = cluster.getMember(StringUtils
+          .makeCompliantName(memberName));
+      if (clusterMember != null) {
+        responseJSON.put("memberId", clusterMember.getId());
+        responseJSON.put("name", clusterMember.getName());
+        responseJSON.put("host", clusterMember.getHost());
+        responseJSON.put("clusterId", cluster.getId());
+        responseJSON.put("clusterName", cluster.getServerName());
+        responseJSON.put("userName", userName);
+        responseJSON.put("loadAverage", clusterMember.getLoadAverage());
+        responseJSON.put("sockets", clusterMember.getTotalFileDescriptorOpen());
+        responseJSON.put("threads", clusterMember.getNumThreads());
+        responseJSON.put("offHeapFreeSize", clusterMember.getOffHeapFreeSize());
+        responseJSON.put("offHeapUsedSize", clusterMember.getOffHeapUsedSize());
+        responseJSON.put("regionsCount", clusterMember.getMemberRegionsList().length);
+
+        // Number of member clients
+        if (PulseController.getPulseProductSupport().equalsIgnoreCase(
+            PulseConstants.PRODUCT_NAME_SQLFIRE)){
+          responseJSON.put("numClients", clusterMember.getNumSqlfireClients());
+        }else{
+          responseJSON.put("numClients", clusterMember.getMemberClientsHMap().size());
+        }
+
+        DecimalFormat df2 = new DecimalFormat(
+            PulseConstants.DECIMAL_FORMAT_PATTERN);
+        Long diskUsageVal = clusterMember.getTotalDiskUsage();
+        Double diskUsage = diskUsageVal.doubleValue() / 1024;
+
+        responseJSON.put("diskStorageUsed",
+            Double.valueOf(df2.format(diskUsage)));
+
+        Cluster.Alert[] alertsList = cluster.getAlertsList();
+
+        String status = "Normal";
+
+        for (Cluster.Alert alert : alertsList) {
+          if (clusterMember.getName().equals(alert.getMemberName())) {
+            if (alert.getSeverity() == Cluster.Alert.SEVERE) {
+              status = "Severe";
+              break;
+            } else if (alert.getSeverity() == Cluster.Alert.ERROR) {
+              status = "Error";
+            } else if (alert.getSeverity() == Cluster.Alert.WARNING) {
+              status = "Warning";
+            }
+          }
+        }
+
+        responseJSON.put("status", status);
+
+      } else {
+        responseJSON.put("errorOnMember", "Member [" + memberName
+            + "] is not available");
+      }
+
+      // Send json response
+      return responseJSON;
+    } catch (JSONException e) {
+      throw new Exception(e);
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c4f7ff44/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/MemberDiskThroughputService.java
----------------------------------------------------------------------
diff --git a/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/MemberDiskThroughputService.java b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/MemberDiskThroughputService.java
new file mode 100644
index 0000000..265ff44
--- /dev/null
+++ b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/MemberDiskThroughputService.java
@@ -0,0 +1,83 @@
+/*
+ * =========================================================================
+ *  Copyright (c) 2012 Pivotal Software, Inc. All Rights Reserved.
+ *  This product is protected by U.S. and international copyright
+ *  and intellectual property laws. Pivotal products are covered by
+ *  more patents listed at http://www.pivotal.io/patents.
+ * ========================================================================
+ */
+
+package com.vmware.gemfire.tools.pulse.internal.service;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.springframework.context.annotation.Scope;
+import org.springframework.stereotype.Component;
+import org.springframework.stereotype.Service;
+
+import com.vmware.gemfire.tools.pulse.internal.data.Cluster;
+import com.vmware.gemfire.tools.pulse.internal.data.Repository;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONArray;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONException;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONObject;
+import com.vmware.gemfire.tools.pulse.internal.util.StringUtils;
+
+/**
+ * Class MemberDiskThroughputService
+ * 
+ * This class contains implementations for getting Memeber's current Disk
+ * Throughput trends over the time.
+ * 
+ * @author Sachin K
+ * @since version 7.5
+ */
+@Component
+@Service("MemberDiskThroughput")
+@Scope("singleton")
+public class MemberDiskThroughputService implements PulseService {
+
+  public JSONObject execute(final HttpServletRequest request) throws Exception {
+
+    // get cluster object
+    Cluster cluster = Repository.get().getCluster();
+
+    // json object to be sent as response
+    JSONObject responseJSON = new JSONObject();
+
+    // members list
+    try {
+      JSONObject requestDataJSON = new JSONObject(
+          request.getParameter("pulseData"));
+      String memberName = requestDataJSON.getJSONObject("MemberDiskThroughput")
+          .getString("memberName");
+
+      Cluster.Member clusterMember = cluster.getMember(StringUtils
+          .makeCompliantName(memberName));
+
+      if (clusterMember != null) {
+        // response
+        responseJSON.put("throughputWrites",
+            clusterMember.getThroughputWrites());
+        responseJSON
+            .put(
+                "throughputWritesTrend",
+                new JSONArray(
+                    clusterMember
+                        .getMemberStatisticTrend(Cluster.Member.MEMBER_STAT_THROUGHPUT_WRITES)));
+        responseJSON
+            .put("throughputReads", clusterMember.getThroughputWrites());
+        responseJSON
+            .put(
+                "throughputReadsTrend",
+                new JSONArray(
+                    clusterMember
+                        .getMemberStatisticTrend(Cluster.Member.MEMBER_STAT_THROUGHPUT_READS)));
+      }
+
+      // Send json response
+      return responseJSON;
+    } catch (JSONException e) {
+      throw new Exception(e);
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c4f7ff44/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/MemberGCPausesService.java
----------------------------------------------------------------------
diff --git a/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/MemberGCPausesService.java b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/MemberGCPausesService.java
new file mode 100644
index 0000000..aa778a9
--- /dev/null
+++ b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/MemberGCPausesService.java
@@ -0,0 +1,75 @@
+/*
+ * =========================================================================
+ *  Copyright (c) 2012-2014 Pivotal Software, Inc. All Rights Reserved.
+ *  This product is protected by U.S. and international copyright
+ *  and intellectual property laws. Pivotal products are covered by
+ *  more patents listed at http://www.pivotal.io/patents.
+ * ========================================================================
+ */
+
+package com.vmware.gemfire.tools.pulse.internal.service;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.springframework.context.annotation.Scope;
+import org.springframework.stereotype.Component;
+import org.springframework.stereotype.Service;
+
+import com.vmware.gemfire.tools.pulse.internal.data.Cluster;
+import com.vmware.gemfire.tools.pulse.internal.data.Repository;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONArray;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONException;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONObject;
+import com.vmware.gemfire.tools.pulse.internal.util.StringUtils;
+
+/**
+ * Class MemberGCPausesService
+ * 
+ * This class contains implementations of getting Memeber's GC Pauses (JVM
+ * Pauses) details and its trend over the time.
+ * 
+ * @author Sachin K
+ * @since version 7.5
+ */
+
+@Component
+@Service("MemberGCPauses")
+@Scope("singleton")
+public class MemberGCPausesService implements PulseService {
+
+  public JSONObject execute(final HttpServletRequest request) throws Exception {
+
+    // get cluster object
+    Cluster cluster = Repository.get().getCluster();
+
+    // json object to be sent as response
+    JSONObject responseJSON = new JSONObject();
+
+    // members list
+    try {
+
+      JSONObject requestDataJSON = new JSONObject(
+          request.getParameter("pulseData"));
+      String memberName = requestDataJSON.getJSONObject("MemberGCPauses")
+          .getString("memberName");
+      Cluster.Member clusterMember = cluster.getMember(StringUtils
+          .makeCompliantName(memberName));
+      if (clusterMember != null) {
+        // response
+        responseJSON
+            .put(
+                "gcPausesTrend",
+                new JSONArray(
+                    clusterMember
+                        .getMemberStatisticTrend(Cluster.Member.MEMBER_STAT_GARBAGE_COLLECTION)));
+        responseJSON.put("gcPausesCount",
+            clusterMember.getGarbageCollectionCount());
+      }
+
+      // Send json response
+      return responseJSON;
+    } catch (JSONException e) {
+      throw new Exception(e);
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c4f7ff44/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/MemberGatewayHubService.java
----------------------------------------------------------------------
diff --git a/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/MemberGatewayHubService.java b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/MemberGatewayHubService.java
new file mode 100644
index 0000000..ade9f5a
--- /dev/null
+++ b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/MemberGatewayHubService.java
@@ -0,0 +1,153 @@
+/*
+ * =========================================================================
+ *  Copyright (c) 2012-2014 Pivotal Software, Inc. All Rights Reserved.
+ *  This product is protected by U.S. and international copyright
+ *  and intellectual property laws. Pivotal products are covered by
+ *  more patents listed at http://www.pivotal.io/patents.
+ * ========================================================================
+ */
+
+package com.vmware.gemfire.tools.pulse.internal.service;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.springframework.context.annotation.Scope;
+import org.springframework.stereotype.Component;
+import org.springframework.stereotype.Service;
+
+import com.vmware.gemfire.tools.pulse.internal.data.Cluster;
+import com.vmware.gemfire.tools.pulse.internal.data.Repository;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONArray;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONException;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONObject;
+import com.vmware.gemfire.tools.pulse.internal.util.StringUtils;
+
+/**
+ * Class MemberGatewayHubService
+ * 
+ * This class contains implementations of getting Gateway Receivers and Senders
+ * details of Cluster Member.
+ * 
+ * @author Sachin K
+ * @since version 7.5
+ */
+@Component
+@Service("MemberGatewayHub")
+@Scope("singleton")
+public class MemberGatewayHubService implements PulseService {
+
+  public JSONObject execute(final HttpServletRequest request) throws Exception {
+
+    // get cluster object
+    Cluster cluster = Repository.get().getCluster();
+
+    // json object to be sent as response
+    JSONObject responseJSON = new JSONObject();
+
+    try {
+
+      JSONObject requestDataJSON = new JSONObject(
+          request.getParameter("pulseData"));
+      String memberName = requestDataJSON.getJSONObject("MemberGatewayHub")
+          .getString("memberName");
+
+      Cluster.Member clusterMember = cluster.getMember(StringUtils
+          .makeCompliantName(memberName));
+
+      if (clusterMember != null) {
+        // response
+        // get gateway receiver
+        Cluster.GatewayReceiver gatewayReceiver = clusterMember
+            .getGatewayReceiver();
+
+        Boolean isGateway = false;
+
+        if (gatewayReceiver != null) {
+          responseJSON.put("isGatewayReceiver", true);
+          responseJSON.put("listeningPort", gatewayReceiver.getListeningPort());
+          responseJSON
+              .put("linkTroughput", gatewayReceiver.getLinkThroughput());
+          responseJSON.put("avgBatchLatency",
+              gatewayReceiver.getAvgBatchProcessingTime());
+        } else {
+          responseJSON.put("isGatewayReceiver", false);
+        }
+
+        // get gateway senders
+        Cluster.GatewaySender[] gatewaySenders = clusterMember
+            .getMemberGatewaySenders();
+
+        if (gatewaySenders.length > 0) {
+          isGateway = true;
+        }
+        responseJSON.put("isGatewaySender", isGateway);
+        // Senders
+        JSONArray gatewaySendersJsonList = new JSONArray();
+
+        for (Cluster.GatewaySender gatewaySender : gatewaySenders) {
+          JSONObject gatewaySenderJSON = new JSONObject();
+          gatewaySenderJSON.put("id", gatewaySender.getId());
+          gatewaySenderJSON.put("queueSize", gatewaySender.getQueueSize());
+          gatewaySenderJSON.put("status", gatewaySender.getStatus());
+          gatewaySenderJSON.put("primary", gatewaySender.getPrimary());
+          gatewaySenderJSON.put("senderType", gatewaySender.getSenderType());
+          gatewaySenderJSON.put("batchSize", gatewaySender.getBatchSize());
+          gatewaySenderJSON.put("PersistenceEnabled",
+              gatewaySender.getPersistenceEnabled());
+          gatewaySenderJSON.put("remoteDSId",
+              gatewaySender.getRemoteDSId());
+          gatewaySenderJSON.put("eventsExceedingAlertThreshold",
+              gatewaySender.getEventsExceedingAlertThreshold());
+
+          gatewaySendersJsonList.put(gatewaySenderJSON);
+        }
+        // senders response
+        responseJSON.put("gatewaySenders", gatewaySendersJsonList);
+
+        // async event queues
+        Cluster.AsyncEventQueue[] asyncEventQueues = clusterMember.getMemberAsyncEventQueueList();
+        JSONArray asyncEventQueueJsonList = new JSONArray();
+
+        for (Cluster.AsyncEventQueue asyncEventQueue : asyncEventQueues) {
+          JSONObject asyncEventQueueJSON = new JSONObject();
+          asyncEventQueueJSON.put("id", asyncEventQueue.getId());
+          asyncEventQueueJSON.put("primary", asyncEventQueue.getPrimary());
+          asyncEventQueueJSON.put("senderType", asyncEventQueue.isParallel());
+          asyncEventQueueJSON.put("batchSize", asyncEventQueue.getBatchSize());
+          asyncEventQueueJSON.put("batchTimeInterval", asyncEventQueue.getBatchTimeInterval());
+          asyncEventQueueJSON.put("batchConflationEnabled", asyncEventQueue.isBatchConflationEnabled());
+          asyncEventQueueJSON.put("asyncEventListener", asyncEventQueue.getAsyncEventListener());
+          asyncEventQueueJSON.put("queueSize", asyncEventQueue.getEventQueueSize());
+
+          asyncEventQueueJsonList.put(asyncEventQueueJSON);
+        }
+        responseJSON.put("asyncEventQueues", asyncEventQueueJsonList);
+
+
+        Map<String,Cluster.Region> clusterRegions = cluster.getClusterRegions();
+
+        List<Cluster.Region> clusterRegionsList = new ArrayList<Cluster.Region>();
+        clusterRegionsList.addAll(clusterRegions.values());
+        
+        JSONArray regionsList = new JSONArray();
+
+        for (Cluster.Region region : clusterRegionsList) {
+          if (region.getWanEnabled()) {
+            JSONObject regionJSON = new JSONObject();
+            regionJSON.put("name", region.getName());
+            regionsList.put(regionJSON);
+          }
+        }
+        responseJSON.put("regionsInvolved", regionsList);
+      }
+      // Send json response
+      return responseJSON;
+    } catch (JSONException e) {
+      throw new Exception(e);
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c4f7ff44/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/MemberHeapUsageService.java
----------------------------------------------------------------------
diff --git a/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/MemberHeapUsageService.java b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/MemberHeapUsageService.java
new file mode 100644
index 0000000..4e6956d
--- /dev/null
+++ b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/MemberHeapUsageService.java
@@ -0,0 +1,75 @@
+/*
+ * =========================================================================
+ *  Copyright (c) 2012-2014 Pivotal Software, Inc. All Rights Reserved.
+ *  This product is protected by U.S. and international copyright
+ *  and intellectual property laws. Pivotal products are covered by
+ *  more patents listed at http://www.pivotal.io/patents.
+ * ========================================================================
+ */
+
+package com.vmware.gemfire.tools.pulse.internal.service;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.springframework.context.annotation.Scope;
+import org.springframework.stereotype.Component;
+import org.springframework.stereotype.Service;
+
+import com.vmware.gemfire.tools.pulse.internal.data.Cluster;
+import com.vmware.gemfire.tools.pulse.internal.data.Repository;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONArray;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONException;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONObject;
+import com.vmware.gemfire.tools.pulse.internal.util.StringUtils;
+
+/**
+ * Class MemberHeapUsageService
+ * 
+ * This class contains implementations of getting Memeber's current Heap Usage
+ * and its trend over the time.
+ * 
+ * @author Sachin K
+ * @since version 7.5
+ */
+@Component
+@Service("MemberHeapUsage")
+@Scope("singleton")
+public class MemberHeapUsageService implements PulseService {
+
+  public JSONObject execute(final HttpServletRequest request) throws Exception {
+
+    // get cluster object
+    Cluster cluster = Repository.get().getCluster();
+
+    // json object to be sent as response
+    JSONObject responseJSON = new JSONObject();
+
+    // members list
+    try {
+      JSONObject requestDataJSON = new JSONObject(
+          request.getParameter("pulseData"));
+      String memberName = requestDataJSON.getJSONObject("MemberHeapUsage")
+          .getString("memberName");
+
+      Cluster.Member clusterMember = cluster.getMember(StringUtils
+          .makeCompliantName(memberName));
+      if (clusterMember != null) {
+        // response
+        responseJSON
+            .put(
+                "heapUsageTrend",
+                new JSONArray(
+                    clusterMember
+                        .getMemberStatisticTrend(Cluster.Member.MEMBER_STAT_HEAP_USAGE_SAMPLE)));
+        responseJSON
+            .put("currentHeapUsage", clusterMember.getCurrentHeapSize());
+      }
+
+      // Send json response
+      return responseJSON;
+
+    } catch (JSONException e) {
+      throw new Exception(e);
+    }
+  }
+}


Mime
View raw message