Package org.apache.blur.thrift.generated

Examples of org.apache.blur.thrift.generated.BlurQueryStatus


    // Mark running queries that can't be found as complete - unknown
    this.database.markOrphanedRunningQueriesComplete(CollectionUtils.subtract(this.database.getRunningQueries((long)tableId), currentQueries));
   

    for (String queryUUID : currentQueries) {
      BlurQueryStatus status;
      try {
        status = blurConnection.queryStatusById(tableName, queryUUID);
      } catch (Exception e) {
        log.error("Unable to get query status for query [" + queryUUID + "]." + e.getMessage());
        continue;
      }

      Map<String, Object> oldQuery = this.database.getQuery(this.tableId, queryUUID);

      String times;
      try {
        times = new ObjectMapper().writeValueAsString(status.getCpuTimes());
      } catch (Exception e) {
        log.error("Unable to parse cpu times.", e);
        times = null;
      }

      if (oldQuery == null) {
        Query query = status.getQuery().getQuery();
        long startTimeLong = status.getQuery().getStartTime();

        // Set the query creation time to now or given start time
        Date startTime = (startTimeLong > 0) ? TimeHelper.getAdjustedTime(startTimeLong).getTime() : TimeHelper.now().getTime();

        this.database.createQuery(status, query, times, startTime, this.tableId);
View Full Code Here

TOP

Related Classes of org.apache.blur.thrift.generated.BlurQueryStatus

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.