Package org.apache.ignite.internal.processors.diagnostic

## Class DiagnosticProcessor

- java.lang.Object
- - org.apache.ignite.internal.processors.GridProcessorAdapter
  - - org.apache.ignite.internal.processors.diagnostic.DiagnosticProcessor

All Implemented Interfaces:
  `GridComponent`, `GridProcessor`

    public class DiagnosticProcessor
    extends GridProcessorAdapter

Processor which contained helper methods for different diagnostic cases.

### Nested Class Summary

### Nested classes/interfaces inherited from interface org.apache.ignite.internal.GridComponent

`GridComponent.DiscoveryDataExchangeType`

### Field Summary

Fields
`static String` `DEFAULT_TARGET_FOLDER` Folder name for store diagnostic info.
`static boolean` `DFLT_DUMP_PAGE_LOCK_ON_FAILURE`

### Fields inherited from class org.apache.ignite.internal.processors.GridProcessorAdapter

`ctx, diagnosticLog, log`

### Constructor Summary

Constructors
`DiagnosticProcessor​(GridKernalContext ctx)` Constructor.

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`static File` `corruptedPagesFile​(Path dirPath, FileIOFactory ioFactory, int grpId, long... pageIds)` Creation and filling of a file with pages that can be corrupted.
`void` `onFailure​(FailureContext failureCtx)` Print diagnostic info about failure occurred on `ignite` instance.

### Methods inherited from class org.apache.ignite.internal.processors.GridProcessorAdapter

`assertParameter, collectGridNodeData, collectJoiningNodeData, discoveryDataType, onDisconnected, onGridDataReceived, onJoiningNodeDataReceived, onKernalStart, onKernalStop, onReconnected, printMemoryStats, start, stop, toString, validateNode, validateNode`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Field Detail

#### DFLT_DUMP_PAGE_LOCK_ON_FAILURE

    public static final boolean DFLT_DUMP_PAGE_LOCK_ON_FAILURE

See Also:
  `IgniteSystemProperties.IGNITE_DUMP_PAGE_LOCK_ON_FAILURE`, Constant Field Values

#### DEFAULT_TARGET_FOLDER

    public static final String DEFAULT_TARGET_FOLDER

Folder name for store diagnostic info.

See Also:
  Constant Field Values

### Constructor Detail

#### DiagnosticProcessor

    public DiagnosticProcessor​(GridKernalContext ctx)
                        throws IgniteCheckedException

Constructor.

Parameters:
  `ctx` - Kernal context.
Throws:
  `IgniteCheckedException`

### Method Detail

#### onFailure

    public void onFailure​(FailureContext failureCtx)

Print diagnostic info about failure occurred on `ignite` instance. Failure details is contained in `failureCtx`.

Parameters:
  `failureCtx` - Failure context.

#### corruptedPagesFile

    public static File corruptedPagesFile​(Path dirPath,
                                          FileIOFactory ioFactory,
                                          int grpId,
                                          long... pageIds)
                                   throws IOException

Creation and filling of a file with pages that can be corrupted. Pages are written on each line in format "grpId:pageId". File name format "corruptedPages_yyyy-MM-dd'_'HH-mm-ss_SSS.txt".

Parameters:
  `dirPath` - Path to the directory where the file will be created.
  `ioFactory` - File I/O factory.
  `grpId` - Cache group id.
  `pageIds` - PageId's that can be corrupted.
Returns:
  Created and filled file.
Throws:
  `IOException` - If an I/O error occurs.