Class PerformanceStatisticsProcessor
- java.lang.Object
-
- org.apache.ignite.internal.processors.GridProcessorAdapter
-
- org.apache.ignite.internal.processors.performancestatistics.PerformanceStatisticsProcessor
-
- All Implemented Interfaces:
GridComponent,GridProcessor
public class PerformanceStatisticsProcessor extends GridProcessorAdapter
Performance statistics processor.Manages collecting performance statistics.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfacePerformanceStatisticsProcessor.PerformanceStatisticsStateListenerPerformance statistics state listener.-
Nested classes/interfaces inherited from interface org.apache.ignite.internal.GridComponent
GridComponent.DiscoveryDataExchangeType
-
-
Field Summary
-
Fields inherited from class org.apache.ignite.internal.processors.GridProcessorAdapter
ctx, diagnosticLog, log
-
-
Constructor Summary
Constructors Constructor Description PerformanceStatisticsProcessor(GridKernalContext ctx)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcacheOperation(OperationType type, int cacheId, long startTime, long duration)voidcacheStart(int cacheId, String name)voidcheckpoint(long beforeLockDuration, long lockWaitDuration, long listenersExecDuration, long markDuration, long lockHoldDuration, long pagesWriteDuration, long fsyncDuration, long walCpRecordFsyncDuration, long writeCpEntryDuration, long splitAndSortCpPagesDuration, long totalDuration, long cpStartTime, int pagesSize, int dataPagesWritten, int cowPagesWritten)booleanenabled()static StringindexQueryText(String cacheName, IndexQueryDesc desc)voidjob(IgniteUuid sesId, long queuedTime, long startTime, long duration, boolean timedOut)voidonDisconnected(IgniteFuture<?> reconnectFut)Client disconnected callback.voidonKernalStop(boolean cancel)Callback to notify that kernal is about to stop.voidpagesWriteThrottle(long endTime, long duration)voidquery(GridCacheQueryType type, String text, long id, long startTime, long duration, boolean success)voidqueryProperty(GridCacheQueryType type, UUID qryNodeId, long id, String name, String val)voidqueryReads(GridCacheQueryType type, UUID queryNodeId, long id, long logicalReads, long physicalReads)voidqueryRowsProcessed(GridCacheQueryType type, UUID qryNodeId, long id, String action, long rows)voidregisterStateListener(PerformanceStatisticsProcessor.PerformanceStatisticsStateListener lsnr)Registers state listener.voidrotateCollectStatistics()Rotate collecting performance statistics.voidstart()Starts grid component.voidstartCollectStatistics()Starts collecting performance statistics.voidstopCollectStatistics()Stops collecting performance statistics.voidtask(IgniteUuid sesId, String taskName, long startTime, long duration, int affPartId)voidtransaction(GridIntList cacheIds, long startTime, long duration, boolean commited)-
Methods inherited from class org.apache.ignite.internal.processors.GridProcessorAdapter
assertParameter, collectGridNodeData, collectJoiningNodeData, discoveryDataType, onGridDataReceived, onJoiningNodeDataReceived, onKernalStart, onReconnected, printMemoryStats, stop, toString, validateNode, validateNode
-
-
-
-
Constructor Detail
-
PerformanceStatisticsProcessor
public PerformanceStatisticsProcessor(GridKernalContext ctx)
- Parameters:
ctx- Kernal context.
-
-
Method Detail
-
start
public void start() throws IgniteCheckedExceptionStarts grid component.- Specified by:
startin interfaceGridComponent- Overrides:
startin classGridProcessorAdapter- Throws:
IgniteCheckedException- Throws in case of any errors.
-
registerStateListener
public void registerStateListener(PerformanceStatisticsProcessor.PerformanceStatisticsStateListener lsnr)
Registers state listener.
-
cacheStart
public void cacheStart(int cacheId, String name)- Parameters:
cacheId- Cache id.name- Cache name.
-
cacheOperation
public void cacheOperation(OperationType type, int cacheId, long startTime, long duration)
- Parameters:
type- Operation type.cacheId- Cache id.startTime- Start time in milliseconds.duration- Duration in nanoseconds.
-
transaction
public void transaction(GridIntList cacheIds, long startTime, long duration, boolean commited)
- Parameters:
cacheIds- Cache IDs.startTime- Start time in milliseconds.duration- Duration in nanoseconds.commited-Trueif commited.
-
query
public void query(GridCacheQueryType type, String text, long id, long startTime, long duration, boolean success)
- Parameters:
type- Cache query type.text- Query text in case of SQL query. Cache name in case of SCAN query. In case of an INDEX query, the text represents the pattern:<cacheName>:<indexName>:<valueType>:<comma separated fields>id- Query id.startTime- Start time in milliseconds.duration- Duration in nanoseconds.success- Success flag.
-
queryReads
public void queryReads(GridCacheQueryType type, UUID queryNodeId, long id, long logicalReads, long physicalReads)
- Parameters:
type- Cache query type.queryNodeId- Originating node id.id- Query id.logicalReads- Number of logical reads.physicalReads- Number of physical reads.
-
queryRowsProcessed
public void queryRowsProcessed(GridCacheQueryType type, UUID qryNodeId, long id, String action, long rows)
- Parameters:
type- Cache query type.qryNodeId- Originating node id.id- Query id.action- Action with rows.rows- Number of rows processed.
-
queryProperty
public void queryProperty(GridCacheQueryType type, UUID qryNodeId, long id, String name, String val)
- Parameters:
type- Cache query type.qryNodeId- Originating node id.id- Query id.name- Query property name.val- Query property value.
-
task
public void task(IgniteUuid sesId, String taskName, long startTime, long duration, int affPartId)
- Parameters:
sesId- Session id.taskName- Task name.startTime- Start time in milliseconds.duration- Duration.affPartId- Affinity partition id.
-
job
public void job(IgniteUuid sesId, long queuedTime, long startTime, long duration, boolean timedOut)
- Parameters:
sesId- Session id.queuedTime- Time job spent on waiting queue.startTime- Start time in milliseconds.duration- Job execution time.timedOut-Trueif job is timed out.
-
checkpoint
public void checkpoint(long beforeLockDuration, long lockWaitDuration, long listenersExecDuration, long markDuration, long lockHoldDuration, long pagesWriteDuration, long fsyncDuration, long walCpRecordFsyncDuration, long writeCpEntryDuration, long splitAndSortCpPagesDuration, long totalDuration, long cpStartTime, int pagesSize, int dataPagesWritten, int cowPagesWritten)- Parameters:
beforeLockDuration- Before lock duration.lockWaitDuration- Lock wait duration.listenersExecDuration- Listeners execute duration.markDuration- Mark duration.lockHoldDuration- Lock hold duration.pagesWriteDuration- Pages write duration.fsyncDuration- Fsync duration.walCpRecordFsyncDuration- Wal cp record fsync duration.writeCpEntryDuration- Write checkpoint entry duration.splitAndSortCpPagesDuration- Split and sort cp pages duration.totalDuration- Total duration in milliseconds.cpStartTime- Checkpoint start time in milliseconds.pagesSize- Pages size.dataPagesWritten- Data pages written.cowPagesWritten- Cow pages written.
-
pagesWriteThrottle
public void pagesWriteThrottle(long endTime, long duration)- Parameters:
endTime- End time in milliseconds.duration- Duration in milliseconds.
-
startCollectStatistics
public void startCollectStatistics() throws IgniteCheckedExceptionStarts collecting performance statistics.- Throws:
IgniteCheckedException- If starting failed.
-
stopCollectStatistics
public void stopCollectStatistics() throws IgniteCheckedExceptionStops collecting performance statistics.- Throws:
IgniteCheckedException- If stopping failed.
-
rotateCollectStatistics
public void rotateCollectStatistics() throws IgniteCheckedExceptionRotate collecting performance statistics.- Throws:
IgniteCheckedException- If rotation failed.
-
enabled
public boolean enabled()
- Returns:
Trueif collecting performance statistics is enabled.
-
onKernalStop
public void onKernalStop(boolean cancel)
Callback to notify that kernal is about to stop.- Specified by:
onKernalStopin interfaceGridComponent- Overrides:
onKernalStopin classGridProcessorAdapter- Parameters:
cancel- Flag indicating whether jobs should be canceled.
-
onDisconnected
public void onDisconnected(IgniteFuture<?> reconnectFut)
Client disconnected callback.- Specified by:
onDisconnectedin interfaceGridComponent- Overrides:
onDisconnectedin classGridProcessorAdapter- Parameters:
reconnectFut- Reconnect future.
-
indexQueryText
public static String indexQueryText(String cacheName, IndexQueryDesc desc)
- Returns:
- Text representation of index query.
-
-