Class IgniteMXBeanImpl

    • Constructor Detail

      • IgniteMXBeanImpl

        public IgniteMXBeanImpl​(IgniteKernal kernal)
        Parameters:
        kernal - Ignite kernel to work with.
    • Method Detail

      • active

        public boolean active()
        Checks if Ignite grid is active. If Ignite grid is not active return False.
        Specified by:
        active in interface IgniteMXBean
        Returns:
        True if grid is active. False If grid is not active.
      • active

        public void active​(boolean active)
                    throws JMException
        Changes Ignite grid state to active or inactive.

        NOTE: Deactivation clears in-memory caches (without persistence) including the system caches.

        Specified by:
        active in interface IgniteMXBean
        Parameters:
        active - Activate/DeActivate flag.
        Throws:
        JMException - if deactivation is forbidden or stopped.
      • getCopyright

        public String getCopyright()
        Gets copyright statement for Ignite product.
        Specified by:
        getCopyright in interface IgniteMXBean
        Returns:
        Copyright statement for Ignite product.
      • getStartTimestamp

        public long getStartTimestamp()
        Get start timestamp of the kernal.
        Specified by:
        getStartTimestamp in interface IgniteMXBean
        Returns:
        Start timestamp of the kernal.
      • getStartTimestampFormatted

        public String getStartTimestampFormatted()
        Gets string presentation of the kernal start timestamp.
        Specified by:
        getStartTimestampFormatted in interface IgniteMXBean
        Returns:
        String presentation of the kernal start timestamp.
      • getUpTime

        public long getUpTime()
        Gets up-time of the kernal.
        Specified by:
        getUpTime in interface IgniteMXBean
        Returns:
        Up-time of the kernal.
      • getLongJVMPausesCount

        public long getLongJVMPausesCount()
        Gets long JVM pauses count.
        Specified by:
        getLongJVMPausesCount in interface IgniteMXBean
        Returns:
        Long JVM pauses count.
      • getLongJVMPausesTotalDuration

        public long getLongJVMPausesTotalDuration()
        Gets long JVM pauses total duration.
        Specified by:
        getLongJVMPausesTotalDuration in interface IgniteMXBean
        Returns:
        Long JVM pauses total duration.
      • getUpTimeFormatted

        public String getUpTimeFormatted()
        Gets string presentation of up-time for the kernal.
        Specified by:
        getUpTimeFormatted in interface IgniteMXBean
        Returns:
        String presentation of up-time for the kernal.
      • getFullVersion

        public String getFullVersion()
        Gets string presentation of the version.
        Specified by:
        getFullVersion in interface IgniteMXBean
        Returns:
        String presentation of the version.
      • getCheckpointSpiFormatted

        public String getCheckpointSpiFormatted()
        Gets a formatted instance of configured checkpoint SPI implementation.
        Specified by:
        getCheckpointSpiFormatted in interface IgniteMXBean
        Returns:
        Grid checkpoint SPI implementation.
      • getCurrentCoordinatorFormatted

        public String getCurrentCoordinatorFormatted()
        Gets a formatted properties of current coordinator.
        Specified by:
        getCurrentCoordinatorFormatted in interface IgniteMXBean
        Returns:
        String representation of current coordinator node.
      • isNodeInBaseline

        public boolean isNodeInBaseline()
        Gets a flag whether local node is in baseline. Returns false if baseline topology is not established.
        Specified by:
        isNodeInBaseline in interface IgniteMXBean
        Returns:
        Return a baseline flag.
      • getCommunicationSpiFormatted

        public String getCommunicationSpiFormatted()
        Gets a formatted instance of fully configured SPI communication implementation.
        Specified by:
        getCommunicationSpiFormatted in interface IgniteMXBean
        Returns:
        Grid communication SPI implementation.
      • getDeploymentSpiFormatted

        public String getDeploymentSpiFormatted()
        Gets a formatted instance of fully configured deployment SPI implementation.
        Specified by:
        getDeploymentSpiFormatted in interface IgniteMXBean
        Returns:
        Grid deployment SPI implementation.
      • getDiscoverySpiFormatted

        public String getDiscoverySpiFormatted()
        Gets a formatted instance of configured discovery SPI implementation.
        Specified by:
        getDiscoverySpiFormatted in interface IgniteMXBean
        Returns:
        Grid discovery SPI implementation.
      • getEventStorageSpiFormatted

        public String getEventStorageSpiFormatted()
        Gets a formatted instance of fully configured event SPI implementation.
        Specified by:
        getEventStorageSpiFormatted in interface IgniteMXBean
        Returns:
        Grid event SPI implementation.
      • getCollisionSpiFormatted

        public String getCollisionSpiFormatted()
        Gets a formatted instance of configured collision SPI implementations.
        Specified by:
        getCollisionSpiFormatted in interface IgniteMXBean
        Returns:
        Grid collision SPI implementations.
      • getFailoverSpiFormatted

        public String getFailoverSpiFormatted()
        Gets a formatted instance of fully configured failover SPI implementations.
        Specified by:
        getFailoverSpiFormatted in interface IgniteMXBean
        Returns:
        Grid failover SPI implementations.
      • getLoadBalancingSpiFormatted

        public String getLoadBalancingSpiFormatted()
        Gets a formatted instance of fully configured load balancing SPI implementations.
        Specified by:
        getLoadBalancingSpiFormatted in interface IgniteMXBean
        Returns:
        Grid load balancing SPI implementations.
      • getInstanceName

        public String getInstanceName()
        Gets optional kernal instance name. It can be null.
        Specified by:
        getInstanceName in interface IgniteMXBean
        Returns:
        Optional kernal instance name.
      • getExecutorServiceFormatted

        public String getExecutorServiceFormatted()
        Gets a formatted instance of fully configured thread pool that is used in grid.
        Specified by:
        getExecutorServiceFormatted in interface IgniteMXBean
        Returns:
        Thread pool implementation that is used in grid.
      • getIgniteHome

        public String getIgniteHome()
        Gets Ignite installation home folder.
        Specified by:
        getIgniteHome in interface IgniteMXBean
        Returns:
        Ignite installation home.
      • getGridLoggerFormatted

        public String getGridLoggerFormatted()
        Gets a formatted instance of logger that is in grid.
        Specified by:
        getGridLoggerFormatted in interface IgniteMXBean
        Returns:
        Logger that is used in grid.
      • getMBeanServerFormatted

        public String getMBeanServerFormatted()
        Gets a formatted instance of MBean server instance.
        Specified by:
        getMBeanServerFormatted in interface IgniteMXBean
        Returns:
        MBean server instance.
      • getLocalNodeId

        public UUID getLocalNodeId()
        Unique identifier for this node within grid.
        Specified by:
        getLocalNodeId in interface IgniteMXBean
        Returns:
        Unique identifier for this node within grid.
      • getUserAttributesFormatted

        public List<String> getUserAttributesFormatted()
        Gets a list of formatted user-defined attributes added to this node.

        Note that grid will add all System properties and environment properties to grid node attributes also. SPIs may also add node attributes that are used for SPI implementation.

        Specified by:
        getUserAttributesFormatted in interface IgniteMXBean
        Returns:
        User defined attributes for this node.
      • isPeerClassLoadingEnabled

        public boolean isPeerClassLoadingEnabled()
        Returns true if peer class loading is enabled, false otherwise. Default value is true.

        When peer class loading is enabled and task is not deployed on local node, local node will try to load classes from the node that initiated task execution. This way, a task can be physically deployed only on one node and then internally penetrate to all other nodes.

        Specified by:
        isPeerClassLoadingEnabled in interface IgniteMXBean
        Returns:
        true if peer class loading is enabled, false otherwise.
      • getLifecycleBeansFormatted

        public List<String> getLifecycleBeansFormatted()
        Gets toString() representation of of lifecycle beans configured with Ignite.
        Specified by:
        getLifecycleBeansFormatted in interface IgniteMXBean
        Returns:
        toString() representation of all lifecycle beans configured with Ignite.
      • lastClusterStateChangeTime

        public long lastClusterStateChangeTime()
        Gets last cluster state change operation.
        Specified by:
        lastClusterStateChangeTime in interface IgniteMXBean
        Returns:
        Unix time of last cluster state change operation.
      • removeCheckpoint

        public boolean removeCheckpoint​(String key)
        This method allows manually remove the checkpoint with given key.
        Specified by:
        removeCheckpoint in interface IgniteMXBean
        Parameters:
        key - Checkpoint key.
        Returns:
        true if specified checkpoint was indeed removed, false otherwise.
      • pingNode

        public boolean pingNode​(String nodeId)
        Pings node with given node ID to see whether it is alive.
        Specified by:
        pingNode in interface IgniteMXBean
        Parameters:
        nodeId - String presentation of node ID. See UUID.fromString(String) for details on string formatting.
        Returns:
        Whether or not node is alive.
      • undeployTaskFromGrid

        public void undeployTaskFromGrid​(String taskName)
                                  throws JMException
        Makes the best attempt to undeploy a task from the whole grid. Note that this method returns immediately and does not wait until the task will actually be undeployed on every node.

        Note that Ignite maintains internal versions for grid tasks in case of redeployment. This method will attempt to undeploy all versions on the grid task with given name.

        Specified by:
        undeployTaskFromGrid in interface IgniteMXBean
        Parameters:
        taskName - Name of the task to undeploy. If task class has ComputeTaskName annotation, then task was deployed under a name specified within annotation. Otherwise, full class name should be used as task's name.
        Throws:
        JMException - Thrown if undeploy failed.
      • executeTask

        public String executeTask​(String taskName,
                                  String arg)
                           throws JMException
        A shortcut method that executes given task assuming single java.lang.String argument and java.lang.String return type.
        Specified by:
        executeTask in interface IgniteMXBean
        Parameters:
        taskName - Name of the task to execute.
        arg - Single task execution argument (can be null).
        Returns:
        Task return value (assumed of java.lang.String type).
        Throws:
        JMException - Thrown in case when execution failed.
      • pingNodeByAddress

        public boolean pingNodeByAddress​(String host)
                                  throws JMException
        Pings node with given host name to see if it is alive.
        Specified by:
        pingNodeByAddress in interface IgniteMXBean
        Parameters:
        host - Host name or IP address of the node to ping.
        Returns:
        Whether or not node is alive.
        Throws:
        JMException - When ping failed.
      • dumpDebugInfo

        public void dumpDebugInfo()
        Dumps debug information for the current node.
        Specified by:
        dumpDebugInfo in interface IgniteMXBean
      • runIoTest

        public void runIoTest​(long warmup,
                              long duration,
                              int threads,
                              long maxLatency,
                              int rangesCnt,
                              int payLoadSize,
                              boolean procFromNioThread)
        Runs IO latency test against all remote server nodes in cluster.
        Specified by:
        runIoTest in interface IgniteMXBean
        Parameters:
        warmup - Warmup duration in milliseconds.
        duration - Test duration in milliseconds.
        threads - Thread count.
        maxLatency - Max latency in nanoseconds.
        rangesCnt - Ranges count in resulting histogram.
        payLoadSize - Payload size in bytes.
        procFromNioThread - True to process requests in NIO threads.
      • clusterState

        public void clusterState​(String state)
                          throws JMException
        Changes current cluster state.

        NOTE: Deactivation clears in-memory caches (without persistence) including the system caches.

        Specified by:
        clusterState in interface IgniteMXBean
        Parameters:
        state - String representation of new cluster state.
        Throws:
        JMException - if deactivation is forbidden or stopped.
      • clusterState

        public void clusterState​(String state,
                                 boolean forceDeactivation)
                          throws JMException
        Changes current cluster state.

        NOTE: Deactivation clears in-memory caches (without persistence) including the system caches.

        Specified by:
        clusterState in interface IgniteMXBean
        Parameters:
        state - String representation of new cluster state.
        forceDeactivation - If true, cluster deactivation will be forced.
        Throws:
        JMException - if deactivation is forbidden or stopped.
      • isRebalanceEnabled

        public boolean isRebalanceEnabled()
        Gets rebalance enabled flag.
        Specified by:
        isRebalanceEnabled in interface IgniteMXBean
        Returns:
        Rebalance enabled flag.
      • rebalanceEnabled

        public void rebalanceEnabled​(boolean rebalanceEnabled)
        Enable or disable cache partition rebalance per node.
        Specified by:
        rebalanceEnabled in interface IgniteMXBean
        Parameters:
        rebalanceEnabled - If true then set rebalance to enabled state.