Class QueryHistory


  • public class QueryHistory
    extends Object
    Query history metrics.
    • 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 - true for local query.
        startTime - Start time of query execution.
        duration - Duration of query execution.
        failed - True query executed unsuccessfully false otherwise.
    • Method Detail

      • 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:
        true For 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.