Class QueryHistory
- java.lang.Object
-
- org.apache.ignite.internal.processors.query.running.QueryHistory
-
public class QueryHistory extends Object
Query history metrics.
-
-
Constructor Summary
Constructors Constructor Description QueryHistory(String qry, String schema, boolean loc, long startTime, long duration, boolean failed)Constructor with metrics.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description QueryHistoryaggregateWithNew(QueryHistory m)Aggregate new metrics with already existen.longexecutions()Gets total number execution of query.longfailures()Gets number of times a query execution failed.QueryHistoryKeykey()longlastStartTime()Gets latest query start time.ConcurrentLinkedDeque8.Node<QueryHistory>link()booleanlocal()longmaximumTime()Gets maximum execution time of query.longminimumTime()Gets minimum execution time of query.Stringquery()booleanreplaceLink(ConcurrentLinkedDeque8.Node<QueryHistory> expLink, ConcurrentLinkedDeque8.Node<QueryHistory> updatedLink)Atomically replace link to new.Stringschema()StringtoString()
-
-
-
Constructor Detail
-
QueryHistory
public QueryHistory(String qry, String schema, boolean loc, long startTime, long duration, boolean failed)
Constructor with metrics.- Parameters:
qry- Textual query representation.schema- Schema name.loc-truefor local query.startTime- Start time of query execution.duration- Duration of query execution.failed-Truequery executed unsuccessfullyfalseotherwise.
-
-
Method Detail
-
key
public QueryHistoryKey key()
- Returns:
- Metrics group key.
-
aggregateWithNew
public QueryHistory aggregateWithNew(QueryHistory m)
Aggregate new metrics with already existen.- Parameters:
m- Other metrics to take into account.- Returns:
- Aggregated metrics.
-
query
public String query()
- Returns:
- Textual representation of query.
-
schema
public String schema()
- Returns:
- Schema.
-
local
public boolean local()
- Returns:
trueFor query with enabled local flag.
-
executions
public long executions()
Gets total number execution of query.- Returns:
- Number of executions.
-
failures
public long failures()
Gets number of times a query execution failed.- Returns:
- Number of times a query execution failed.
-
minimumTime
public long minimumTime()
Gets minimum execution time of query.- Returns:
- Minimum execution time of query.
-
maximumTime
public long maximumTime()
Gets maximum execution time of query.- Returns:
- Maximum execution time of query.
-
lastStartTime
public long lastStartTime()
Gets latest query start time.- Returns:
- Latest time query was stared.
-
link
@Nullable public ConcurrentLinkedDeque8.Node<QueryHistory> link()
- Returns:
- Link to internal node in eviction deque.
-
replaceLink
public boolean replaceLink(ConcurrentLinkedDeque8.Node<QueryHistory> expLink, ConcurrentLinkedDeque8.Node<QueryHistory> updatedLink)
Atomically replace link to new.- Parameters:
expLink- Link which should be replaced.updatedLink- New link which should be set.- Returns:
trueIf link has been updated.
-
-