Interface DistributedSystemMXBean


  • public interface DistributedSystemMXBean
    MBean that provides access to information and management operations for a DistributedSystem. 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 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 to true, 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
      • 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.Exception
        Sets 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 of Regions.
        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 written
        baselineDirPath - 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.Exception
        Returns 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.Exception
        Shuts 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 a MemberMXBean used to access this distributed member. allow anyone to access this method
        Returns:
        the object name for a MemberMXBean used to access this distributed member
      • getManagerObjectName

        javax.management.ObjectName getManagerObjectName()
        Returns the object name for a ManagerMXBean used to access the management service running on this distributed member.
        Returns:
        the object name for a ManagerMXBean used to access the management service running on this distributed member
      • listMemberObjectNames

        javax.management.ObjectName[] listMemberObjectNames()
        Returns a list of object names for the MemberMXBeans 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.Exception
        Returns the object name for a MemberMXBean used to access a distributed member.
        Parameters:
        member - Name or ID of the member.
        Returns:
        the object name for a MemberMXBean used 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.Exception
        Returns a list of object names for the RegionMXBeans 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 the DistributedRegionMXBeans 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.Exception
        Returns the object name for a DistributedRegionMXBean used to access a distributed region.
        Parameters:
        regionPath - Full path of the region.
        Returns:
        the object name for a DistributedRegionMXBean used 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.Exception
        Returns the object name for a RegionMXBean used to access a region.
        Parameters:
        member - Name or ID of the member.
        regionPath - Full path of the region.
        Returns:
        the object name for a GatewayReceiverMXBean used 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.Exception
        Returns the object name for a GatewaySenderMXBean used 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 GatewayReceiverMXBean used 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.Exception
        Returns the object name for a GatewayReceiverMXBean used to access a gateway receiver.
        Parameters:
        member - Name or ID of the member.
        Returns:
        the object name for a GatewayReceiverMXBean used 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 the GatewaySenderMXBeans 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.Exception
        Returns a list of object names for the GatewaySenderMXBeans 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 the GatewayReceiverMXBeans 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.Exception
        Returns the object name for a DistributedLockServiceMXBean used to access a distributed lock service.
        Parameters:
        lockServiceName - Name of the lock service.
        Returns:
        the object name for a DistributedLockServiceMXBean used 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.Exception
        Returns the object name for a LockServiceMXBean used 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 LockServiceMXBean used 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.Exception
        Returns object name of a DiskStoreMXBean for a given name and member
        Parameters:
        member - name or id of the member
        diskStoreName - 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.Exception
        Returns the object name for a CacheServerMXBean used to access a cache server.
        Parameters:
        member - Name or ID of the member.
        port - Port of the server.
        Returns:
        the object name for a CacheServerMXBean used 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 the CacheServerMXBeans 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.Exception
        This 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 query
        members - 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 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.Exception
        Functionality 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 query
        members - 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)