VMware GemFire Java API Reference
Package org.apache.geode.management
Interface DistributedSystemMXBean
-
public interface DistributedSystemMXBeanMBean that provides access to information and management operations for aDistributedSystem. It also provides an API for navigating the other MBeans exposed by the GemFire distributed system. There will be one DistributedSystemMBean per GemFire cluster.ObjectName : GemFire:service=System,type=Distributed
List of notifications emitted by this MBean.
Notifications Notification Type Notification Source Message gemfire.distributedsystem.cache.member.joined Name or ID of member who joined Member Joined <Member Name or ID> gemfire.distributedsystem.cache.member.departed Name or ID of member who departed Member Departed <Member Name or ID> has crashed = <true/false> gemfire.distributedsystem.cache.member.suspect Name or ID of member who is suspected Member Suspected <Member Name or ID> By <Who Suspected> system.alert DistributedSystem("<DistributedSystem ID">) Alert Message - Since:
- GemFire 7.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description DiskBackupStatusbackupAllMembers(java.lang.String targetDirPath, java.lang.String baselineDirPath)Performs a backup on all members.voidchangeAlertLevel(java.lang.String alertLevel)Sets the minimum level for alerts to be delivered to listeners.javax.management.ObjectNamefetchCacheServerObjectName(java.lang.String member, int port)Returns the object name for aCacheServerMXBeanused to access a cache server.javax.management.ObjectNamefetchDiskStoreObjectName(java.lang.String member, java.lang.String diskStoreName)Returns object name of aDiskStoreMXBeanfor a given name and memberjavax.management.ObjectNamefetchDistributedLockServiceObjectName(java.lang.String lockServiceName)Returns the object name for aDistributedLockServiceMXBeanused to access a distributed lock service.javax.management.ObjectNamefetchDistributedRegionObjectName(java.lang.String regionPath)Returns the object name for aDistributedRegionMXBeanused to access a distributed region.javax.management.ObjectNamefetchGatewayReceiverObjectName(java.lang.String member)Returns the object name for aGatewayReceiverMXBeanused to access a gateway receiver.javax.management.ObjectNamefetchGatewaySenderObjectName(java.lang.String member, java.lang.String senderId)Returns the object name for aGatewaySenderMXBeanused to access a gateway sender.javax.management.ObjectNamefetchLockServiceObjectName(java.lang.String member, java.lang.String lockService)Returns the object name for aLockServiceMXBeanused to access a lock service.GemFirePropertiesfetchMemberConfiguration(java.lang.String member)Returns the configuration information for a distributed member.javax.management.ObjectNamefetchMemberObjectName(java.lang.String member)Returns the object name for aMemberMXBeanused to access a distributed member.longfetchMemberUpTime(java.lang.String member)Returns the total time (in seconds) since a distributed member was started.javax.management.ObjectNamefetchRegionObjectName(java.lang.String member, java.lang.String regionPath)Returns the object name for aRegionMXBeanused to access a region.javax.management.ObjectName[]fetchRegionObjectNames(javax.management.ObjectName memberMBeanName)Returns a list of object names for theRegionMXBeans used to access all regions on a distributed member.longgetActiveCQCount()Returns the number of active (currently executing) CQs for all cache servers.java.lang.StringgetAlertLevel()Returns the minimum level set for alerts to be delivered to listeners.floatgetAverageReads()Returns the average number of reads per second for all members.floatgetAverageWrites()Returns the average writes per second, including both put and putAll operations, for all members.longgetDiskFlushAvgLatency()Returns the average disk flush latency time.floatgetDiskReadsRate()Returns the average number of disk reads per second across all distributed members.floatgetDiskWritesRate()Returns the average number of disk writes per second across all distributed members.intgetDistributedSystemId()Returns the ID of the DistributedSystem.longgetGarbageCollectionCount()Returns the number of garbage collection operations for all members.longgetJVMPauses()Returns the number JVM pauses (which may or may not include full garbage collection pauses) detected by GemFire.intgetLocatorCount()Returns the number of locators in the distributed system.javax.management.ObjectNamegetManagerObjectName()Returns the object name for aManagerMXBeanused to access the management service running on this distributed member.intgetMemberCount()Returns the number of members in the distributed system.javax.management.ObjectNamegetMemberObjectName()Returns the object name for aMemberMXBeanused to access this distributed member.intgetNumClients()Returns the number of connected clients.intgetNumInitialImagesInProgress()Returns the number of initial images in progress.intgetNumRunningFunctions()Returns the number of map-reduce jobs currently running on all members in the distributed system.intgetNumSubscriptions()Returns the number of subscriptions for all members.intgetQueryCollectionsDepth()Number of elements in a collection to be shown in queryData operation if query results contain collections like Map, List etc.floatgetQueryRequestRate()Returns the average number of queries per second across all distributed members.intgetQueryResultSetLimit()Number of rows DistributedSystemMXBean.queryData() operation will return.longgetRegisteredCQCount()Returns the number of CQs registers on all members.intgetSystemDiskStoreCount()Returns the number of disks stores in the distributed system.intgetTotalBackupInProgress()Returns the number of backups currently in progress for all disk stores.longgetTotalDiskUsage()Returns the number of bytes used on all disks.longgetTotalHeapSize()Returns the total available heap (in megabytes) across all distributed members.intgetTotalHitCount()Returns the number of times that a hit occurred for all regions.intgetTotalMissCount()Returns the number of times that a cache miss occurred for all regions.intgetTotalRegionCount()Returns the number ofRegions.longgetTotalRegionEntryCount()Returns the total number of entries in all regions.intgetTransactionCommitted()Returns the number of committed transactions across all members.intgetTransactionRolledBack()Returns the number of transactions that were rolled back across all members.longgetUsedHeapSize()Returns the total heap used on all members.java.lang.String[]listAllRegionPaths()Returns a list of full paths for all regions.javax.management.ObjectName[]listCacheServerObjectNames()Returns a list of object names for theCacheServerMXBeans used to access all cache servers.java.lang.String[]listCacheServers()Returns a list of names for all cache servers which are able to serve requests from GemFire clients.javax.management.ObjectName[]listDistributedRegionObjectNames()Returns a list of object names for theDistributedRegionMXBeans used to access all distributed regions.javax.management.ObjectName[]listGatewayReceiverObjectNames()Returns a list of object names for theGatewayReceiverMXBeans used to access all gateway senders.java.lang.String[]listGatewayReceivers()Returns a list of IDs for all gateway receivers.javax.management.ObjectName[]listGatewaySenderObjectNames()Returns a list of object names for theGatewaySenderMXBeans used to access all gateway senders.javax.management.ObjectName[]listGatewaySenderObjectNames(java.lang.String member)Returns a list of object names for theGatewaySenderMXBeans used to access all gateway senders on a member.java.lang.String[]listGatewaySenders()Returns a list of IDs for all gateway senders.java.lang.String[]listGroups()Returns a list of names for all groups.java.lang.String[]listLocatorMembers(boolean onlyStandAloneLocators)Returns a list of names for locator members.java.lang.String[]listLocators()Returns a list of IDs for all locators.java.util.Map<java.lang.String,java.lang.String[]>listMemberDiskstore()Returns a map of allDistributedMembers and theirDiskStores.javax.management.ObjectName[]listMemberObjectNames()Returns a list of object names for theMemberMXBeans used to access all distributed members.java.lang.String[]listMembers()Returns a list of names for all members.PersistentMemberDetails[]listMissingDiskStores()Returns a list of details for disk stores which have been determined to be unavailable during the recovery of region.java.lang.String[]listRegions()Returns a list of names for all regions.java.lang.String[]listServers()Returns a list of names for all servers where server means any long-running GemFire process that was started with "start server" command from GFSH.java.lang.StringqueryData(java.lang.String queryString, java.lang.String members, int limit)This API is used to query data from GemFire system.byte[]queryDataForCompressedResult(java.lang.String queryString, java.lang.String members, int limit)Functionality is same as queryData() method.booleanrevokeMissingDiskStores(java.lang.String diskStoreId)Removes a disk store from the distributed system.voidsetQueryCollectionsDepth(int queryCollectionsDepth)voidsetQueryResultSetLimit(int queryResultSetLimit)DiskMetricsshowDiskMetrics(java.lang.String member)Returns disk metrics for a distributed member.JVMMetricsshowJVMMetrics(java.lang.String member)Returns JVM metrics for a distributed member.NetworkMetricsshowNetworkMetric(java.lang.String member)Returns network metrics for a distributed member.OSMetricsshowOSMetrics(java.lang.String member)Returns operating system metrics for a distributed member.java.lang.String[]shutDownAllMembers()Shuts down all members of a distributed system except for the managing member.java.util.Map<java.lang.String,java.lang.Boolean>viewRemoteClusterStatus()Returns a map of remote distributed system IDs and the current connection status for each.
-
-
-
Method Detail
-
getDistributedSystemId
int getDistributedSystemId()
Returns the ID of the DistributedSystem. allow anyone to access this method- Returns:
- The DistributedSystem ID or -1 if not set.
-
getMemberCount
int getMemberCount()
Returns the number of members in the distributed system.- Returns:
- the number of members in the distributed system
-
listMembers
java.lang.String[] listMembers()
Returns a list of names for all members.- Returns:
- an array of names for all members
-
listLocatorMembers
java.lang.String[] listLocatorMembers(boolean onlyStandAloneLocators)
Returns a list of names for locator members.- Parameters:
onlyStandAloneLocators- if set totrue, includes only stand alone locator members.- Returns:
- a list of names for locator members.
-
listGroups
java.lang.String[] listGroups()
Returns a list of names for all groups.- Returns:
- an array of names for all groups
-
getLocatorCount
int getLocatorCount()
Returns the number of locators in the distributed system.- Returns:
- the number of locators in the distributed system
-
listLocators
java.lang.String[] listLocators()
Returns a list of IDs for all locators.- Returns:
- an array of IDs for all locators.
-
getSystemDiskStoreCount
int getSystemDiskStoreCount()
Returns the number of disks stores in the distributed system.- Returns:
- the number of disks stores in the distributed system
-
listMemberDiskstore
java.util.Map<java.lang.String,java.lang.String[]> listMemberDiskstore()
Returns a map of allDistributedMembers and theirDiskStores.- Returns:
- a map of all
DistributedMembers and theirDiskStores
-
listGatewaySenders
java.lang.String[] listGatewaySenders()
Returns a list of IDs for all gateway senders.- Returns:
- a list of IDs for all gateway senders
-
listGatewayReceivers
java.lang.String[] listGatewayReceivers()
Returns a list of IDs for all gateway receivers.- Returns:
- a list of IDs for all gateway receivers
-
getAlertLevel
java.lang.String getAlertLevel()
Returns the minimum level set for alerts to be delivered to listeners.- Returns:
- the minimum level set for alerts to be delivered to listeners
-
changeAlertLevel
void changeAlertLevel(java.lang.String alertLevel) throws java.lang.ExceptionSets the minimum level for alerts to be delivered to listeners.- Parameters:
alertLevel- Minimum level for alerts to be delivered. Must be one of: WARNING, ERROR, SEVERE or NONE.- Throws:
java.lang.Exception- if the alertLevel is invalid
-
getTotalHeapSize
long getTotalHeapSize()
Returns the total available heap (in megabytes) across all distributed members.- Returns:
- the total available heap (in megabytes) across all distributed members
-
getTotalRegionEntryCount
long getTotalRegionEntryCount()
Returns the total number of entries in all regions.- Returns:
- the total number of entries in all regions
-
getTotalRegionCount
int getTotalRegionCount()
Returns the number ofRegions.- Returns:
- the number of
Regions
-
getTotalMissCount
int getTotalMissCount()
Returns the number of times that a cache miss occurred for all regions.- Returns:
- the number of times that a cache miss occurred for all regions
-
getTotalHitCount
int getTotalHitCount()
Returns the number of times that a hit occurred for all regions.- Returns:
- the number of times that a hit occurred for all regions
-
getNumClients
int getNumClients()
Returns the number of connected clients.- Returns:
- the number of connected clients
-
getDiskReadsRate
float getDiskReadsRate()
Returns the average number of disk reads per second across all distributed members.- Returns:
- the average number of disk reads per second across all distributed members
-
getDiskWritesRate
float getDiskWritesRate()
Returns the average number of disk writes per second across all distributed members.- Returns:
- the average number of disk writes per second across all distributed members
-
getDiskFlushAvgLatency
long getDiskFlushAvgLatency()
Returns the average disk flush latency time.- Returns:
- the average disk flush latency time
-
getTotalBackupInProgress
int getTotalBackupInProgress()
Returns the number of backups currently in progress for all disk stores.- Returns:
- the number of backups currently in progress for all disk stores
-
getNumInitialImagesInProgress
int getNumInitialImagesInProgress()
Returns the number of initial images in progress.- Returns:
- the number of initial images in progress
-
getActiveCQCount
long getActiveCQCount()
Returns the number of active (currently executing) CQs for all cache servers.- Returns:
- the number of active (currently executing) CQs for all cache servers
-
getQueryRequestRate
float getQueryRequestRate()
Returns the average number of queries per second across all distributed members.- Returns:
- the average number of queries per second across all distributed members
-
backupAllMembers
DiskBackupStatus backupAllMembers(java.lang.String targetDirPath, java.lang.String baselineDirPath) throws java.lang.Exception
Performs a backup on all members.- Parameters:
targetDirPath- Directory to which backup files will be writtenbaselineDirPath- path of the directory for baseline backup.- Returns:
- The results of the backup request.
- Throws:
java.lang.Exception- is an exception is encountered while backing up members
-
fetchMemberConfiguration
GemFireProperties fetchMemberConfiguration(java.lang.String member) throws java.lang.Exception
Returns the configuration information for a distributed member.- Parameters:
member- Name or ID of the member.- Returns:
- The configuration information for a member.
- Throws:
java.lang.Exception- for an invalid member ID.
-
fetchMemberUpTime
long fetchMemberUpTime(java.lang.String member) throws java.lang.ExceptionReturns the total time (in seconds) since a distributed member was started.- Parameters:
member- Name or ID of the member.- Returns:
- The total time (in seconds) since a member was started.
- Throws:
java.lang.Exception- for an invalid member ID.
-
listCacheServers
java.lang.String[] listCacheServers()
Returns a list of names for all cache servers which are able to serve requests from GemFire clients.- Returns:
- an array of names for all cache servers which are able to serve requests from GemFire clients
-
listServers
java.lang.String[] listServers()
Returns a list of names for all servers where server means any long-running GemFire process that was started with "start server" command from GFSH.- Returns:
- an array of names for all servers
-
showJVMMetrics
JVMMetrics showJVMMetrics(java.lang.String member) throws java.lang.Exception
Returns JVM metrics for a distributed member.- Parameters:
member- Name or ID of the member.- Returns:
- VM metrics for a distributed member
- Throws:
java.lang.Exception- for an invalid member ID.
-
showOSMetrics
OSMetrics showOSMetrics(java.lang.String member) throws java.lang.Exception
Returns operating system metrics for a distributed member.- Parameters:
member- Name or ID of the member.- Returns:
- operating system metrics for a distributed member
- Throws:
java.lang.Exception- for an invalid member ID.
-
showNetworkMetric
NetworkMetrics showNetworkMetric(java.lang.String member) throws java.lang.Exception
Returns network metrics for a distributed member.- Parameters:
member- Name or ID of the member.- Returns:
- network metrics for a distributed member
- Throws:
java.lang.Exception- for an invalid member ID.
-
showDiskMetrics
DiskMetrics showDiskMetrics(java.lang.String member) throws java.lang.Exception
Returns disk metrics for a distributed member.- Parameters:
member- Name or ID of the member.- Returns:
- disk metrics for a distributed member
- Throws:
java.lang.Exception- for an invalid member ID.
-
shutDownAllMembers
java.lang.String[] shutDownAllMembers() throws java.lang.ExceptionShuts down all members of a distributed system except for the managing member.- Returns:
- List of names of all distributed members that were shutdown.
- Throws:
java.lang.Exception- if an exception is encountered when shutting down the members
-
listRegions
java.lang.String[] listRegions()
Returns a list of names for all regions.- Returns:
- an array of names for all regions
-
listAllRegionPaths
java.lang.String[] listAllRegionPaths()
Returns a list of full paths for all regions. Returns an empty array if no region exists- Returns:
- an array of full paths for all regions
-
revokeMissingDiskStores
boolean revokeMissingDiskStores(java.lang.String diskStoreId)
Removes a disk store from the distributed system.- Parameters:
diskStoreId- UUID of the disk store to remove- Returns:
- True if the request is successful, false otherwise.
-
listMissingDiskStores
PersistentMemberDetails[] listMissingDiskStores()
Returns a list of details for disk stores which have been determined to be unavailable during the recovery of region.- Returns:
- an array of details for disk stores which have been determined to be unavailable during the recovery of region
-
getMemberObjectName
javax.management.ObjectName getMemberObjectName()
Returns the object name for aMemberMXBeanused to access this distributed member. allow anyone to access this method- Returns:
- the object name for a
MemberMXBeanused to access this distributed member
-
getManagerObjectName
javax.management.ObjectName getManagerObjectName()
Returns the object name for aManagerMXBeanused to access the management service running on this distributed member.- Returns:
- the object name for a
ManagerMXBeanused to access the management service running on this distributed member
-
listMemberObjectNames
javax.management.ObjectName[] listMemberObjectNames()
Returns a list of object names for theMemberMXBeans used to access all distributed members.- Returns:
- an array of object names for the
MemberMXBeans used to access all distributed members
-
fetchMemberObjectName
javax.management.ObjectName fetchMemberObjectName(java.lang.String member) throws java.lang.ExceptionReturns the object name for aMemberMXBeanused to access a distributed member.- Parameters:
member- Name or ID of the member.- Returns:
- the object name for a
MemberMXBeanused to access a distributed member - Throws:
java.lang.Exception- if the member cannot be found
-
fetchRegionObjectNames
javax.management.ObjectName[] fetchRegionObjectNames(javax.management.ObjectName memberMBeanName) throws java.lang.ExceptionReturns a list of object names for theRegionMXBeans used to access all regions on a distributed member.- Parameters:
memberMBeanName- ObjectName of the member.- Returns:
- An array of object names or an empty array if no regions are found.
- Throws:
java.lang.Exception- if the member cannot be found
-
listDistributedRegionObjectNames
javax.management.ObjectName[] listDistributedRegionObjectNames()
Returns a list of object names for theDistributedRegionMXBeans used to access all distributed regions.- Returns:
- An array of object names or an empty array if no distributed regions are found.
-
fetchDistributedRegionObjectName
javax.management.ObjectName fetchDistributedRegionObjectName(java.lang.String regionPath) throws java.lang.ExceptionReturns the object name for aDistributedRegionMXBeanused to access a distributed region.- Parameters:
regionPath- Full path of the region.- Returns:
- the object name for a
DistributedRegionMXBeanused to access a distributed region - Throws:
java.lang.Exception- if the member cannot be found
-
fetchRegionObjectName
javax.management.ObjectName fetchRegionObjectName(java.lang.String member, java.lang.String regionPath) throws java.lang.ExceptionReturns the object name for aRegionMXBeanused to access a region.- Parameters:
member- Name or ID of the member.regionPath- Full path of the region.- Returns:
- the object name for a
GatewayReceiverMXBeanused to access a region - Throws:
java.lang.Exception- if the member name is invalid or the member cannot be found
-
fetchGatewaySenderObjectName
javax.management.ObjectName fetchGatewaySenderObjectName(java.lang.String member, java.lang.String senderId) throws java.lang.ExceptionReturns the object name for aGatewaySenderMXBeanused to access a gateway sender.- Parameters:
member- Name or ID of the member.senderId- ID of a gateway sender.- Returns:
- the object name for a
GatewayReceiverMXBeanused to access a gateway sender - Throws:
java.lang.Exception- if the member name is invalid or the member cannot be found
-
fetchGatewayReceiverObjectName
javax.management.ObjectName fetchGatewayReceiverObjectName(java.lang.String member) throws java.lang.ExceptionReturns the object name for aGatewayReceiverMXBeanused to access a gateway receiver.- Parameters:
member- Name or ID of the member.- Returns:
- the object name for a
GatewayReceiverMXBeanused to access a gateway receiver - Throws:
java.lang.Exception- if the member name is invalid or the member cannot be found
-
listGatewaySenderObjectNames
javax.management.ObjectName[] listGatewaySenderObjectNames()
Returns a list of object names for theGatewaySenderMXBeans used to access all gateway senders.- Returns:
- An array of object names or an empty array if no gateway senders are found.
-
listGatewaySenderObjectNames
javax.management.ObjectName[] listGatewaySenderObjectNames(java.lang.String member) throws java.lang.ExceptionReturns a list of object names for theGatewaySenderMXBeans used to access all gateway senders on a member.- Parameters:
member- Name or ID of the member.- Returns:
- An array of object names or an empty array if no gateway senders are found.
- Throws:
java.lang.Exception- if the member name is invalid or the member cannot be found
-
listGatewayReceiverObjectNames
javax.management.ObjectName[] listGatewayReceiverObjectNames()
Returns a list of object names for theGatewayReceiverMXBeans used to access all gateway senders.- Returns:
- An array of object names or an empty array if no gateway receivers are found.
-
fetchDistributedLockServiceObjectName
javax.management.ObjectName fetchDistributedLockServiceObjectName(java.lang.String lockServiceName) throws java.lang.ExceptionReturns the object name for aDistributedLockServiceMXBeanused to access a distributed lock service.- Parameters:
lockServiceName- Name of the lock service.- Returns:
- the object name for a
DistributedLockServiceMXBeanused to access a distributed lock service - Throws:
java.lang.Exception- if the member name is invalid or the member cannot be found
-
fetchLockServiceObjectName
javax.management.ObjectName fetchLockServiceObjectName(java.lang.String member, java.lang.String lockService) throws java.lang.ExceptionReturns the object name for aLockServiceMXBeanused to access a lock service.- Parameters:
member- Name or Id of the member.lockService- Name of the lock service.- Returns:
- the object name for a
LockServiceMXBeanused to access a lock service - Throws:
java.lang.Exception- if the member name is invalid or the member cannot be found
-
fetchDiskStoreObjectName
javax.management.ObjectName fetchDiskStoreObjectName(java.lang.String member, java.lang.String diskStoreName) throws java.lang.ExceptionReturns object name of aDiskStoreMXBeanfor a given name and member- Parameters:
member- name or id of the memberdiskStoreName- name of the disk store- Returns:
- an ObjectName
- Throws:
java.lang.Exception- if the member name is invalid or the member cannot be found
-
fetchCacheServerObjectName
javax.management.ObjectName fetchCacheServerObjectName(java.lang.String member, int port) throws java.lang.ExceptionReturns the object name for aCacheServerMXBeanused to access a cache server.- Parameters:
member- Name or ID of the member.port- Port of the server.- Returns:
- the object name for a
CacheServerMXBeanused to access a cache server - Throws:
java.lang.Exception- if the member name is invalid or the member cannot be found
-
listCacheServerObjectNames
javax.management.ObjectName[] listCacheServerObjectNames()
Returns a list of object names for theCacheServerMXBeans used to access all cache servers.- Returns:
- a list of object names for the
CacheServerMXBeans used to access all cache servers
-
getNumRunningFunctions
int getNumRunningFunctions()
Returns the number of map-reduce jobs currently running on all members in the distributed system.- Returns:
- the number of map-reduce jobs currently running on all members in the distributed system
-
getRegisteredCQCount
long getRegisteredCQCount()
Returns the number of CQs registers on all members.- Returns:
- the number of CQs registers on all members
-
getTotalDiskUsage
long getTotalDiskUsage()
Returns the number of bytes used on all disks.- Returns:
- the number of bytes used on all disks
-
getUsedHeapSize
long getUsedHeapSize()
Returns the total heap used on all members.- Returns:
- the total heap used on all members
-
getAverageReads
float getAverageReads()
Returns the average number of reads per second for all members.- Returns:
- the average number of reads per second for all members
-
getAverageWrites
float getAverageWrites()
Returns the average writes per second, including both put and putAll operations, for all members.- Returns:
- the average writes per second, including both put and putAll operations, for all members
-
getNumSubscriptions
int getNumSubscriptions()
Returns the number of subscriptions for all members.- Returns:
- the number of subscriptions for all members
-
getGarbageCollectionCount
long getGarbageCollectionCount()
Returns the number of garbage collection operations for all members.- Returns:
- the number of garbage collection operations for all members
-
viewRemoteClusterStatus
java.util.Map<java.lang.String,java.lang.Boolean> viewRemoteClusterStatus()
Returns a map of remote distributed system IDs and the current connection status for each.- Returns:
- a map of remote distributed system IDs and the current connection status for each
-
getJVMPauses
long getJVMPauses()
Returns the number JVM pauses (which may or may not include full garbage collection pauses) detected by GemFire.- Returns:
- the number JVM pauses detected
-
queryData
java.lang.String queryData(java.lang.String queryString, java.lang.String members, int limit) throws java.lang.ExceptionThis API is used to query data from GemFire system. This returns a JSON formatted String having data and it's type. Type and value of data makes an array , type preceding the value. e.g. {"result":[["java.lang.String","v"],["java.lang.String","b"]]} GemFire PDXInstances are also supported. The type of PDXInstance is PDXInstance and value will be key value pair. There is no marker to know the "IdentityField" of the PDXInstance. If the query is executed on the cluster and no member list is given in input first key of the JSON string will be "result" followed by the result set in JSON format. If the query is executed on one or more specific members then returned string will have an array of "member" and "result" keys. For query on replicated region data from a random node which have the region is shown, if no member input is given. For PR regions data from all the nodes are collected and shown. User must be careful to query on a PR if the region is big and hosted on a lot of nodes Join queries on PR mandates that user provide one member as input. If the member does not host the regions or the regions are not co-located error string will be returned.- Parameters:
queryString- GemFire supported OQL querymembers- comma separated list of members on which the query is to be executed. It is not mandatory to give this input barring join queries on PR. If member list is not provided, the query will be executed on every member of the cluster.limit- result set limit. If not set or 0 is passed default limit of 1000 will be set.- Returns:
- a JSON formatted string containing data and its type
- Throws:
java.lang.Exception- if an exception is encountered while executing the query
-
queryDataForCompressedResult
byte[] queryDataForCompressedResult(java.lang.String queryString, java.lang.String members, int limit) throws java.lang.ExceptionFunctionality is same as queryData() method. Only difference being the resultant JSON string is compressed with Java GZIP with UTF-8 encoding. Any client application can de compress the byte[] using GZIP. e.g. GZIPInputStream gis = new GZIPInputStream(new ByteArrayInputStream(bytes)); BufferedReader bf = new BufferedReader(new InputStreamReader(gis,"UTF-8")); String outStr = ""; String line; while ((line = bf.readLine()) != null) { outStr += line; }- Parameters:
queryString- GemFire supported OQL querymembers- comma separated list of members on which the query is to be executed. It is not mandatory to give this input barring join queries on PR. If member list is not provided query will be for the whole cluster.limit- result set limit. If not set or 0 is passed default limit of 1000 will be set.- Returns:
- a byte[] which is a compressed JSON string.
- Throws:
java.lang.Exception- if an exception is encountered while executing the query
-
getTransactionCommitted
int getTransactionCommitted()
Returns the number of committed transactions across all members. It gives point in time value i.e. Number of tx committed at the time of reading this value- Returns:
- the number of committed transactions across all members
-
getTransactionRolledBack
int getTransactionRolledBack()
Returns the number of transactions that were rolled back across all members. It gives point in time value i.e. Number of tx rolled back at the time of reading this value- Returns:
- the number of transactions that were rolled back across all members
-
getQueryResultSetLimit
int getQueryResultSetLimit()
Number of rows DistributedSystemMXBean.queryData() operation will return. By default it will be 1000. User can modify this to control number of rows to be shown on Pulse, as Pulse DataBrowser internally uses DistributedSystemMXBean.queryData()- Returns:
- the number of rows DistributedSystemMXBean.queryData() operation will return
-
setQueryResultSetLimit
void setQueryResultSetLimit(int queryResultSetLimit)
-
getQueryCollectionsDepth
int getQueryCollectionsDepth()
Number of elements in a collection to be shown in queryData operation if query results contain collections like Map, List etc.- Returns:
- the number of elements in a collection to be shown in queryData operation if query results contain collections
-
setQueryCollectionsDepth
void setQueryCollectionsDepth(int queryCollectionsDepth)
-
-