Examples of Stats


Examples of org.elasticsearch.hadoop.rest.stats.Stats

                if (client != null) {
                    client.close();
                }

            } finally {
                Stats stats = new Stats();
                if (client != null) {
                    stats.aggregate(client.stats());
                    client = null;
                }
                if (scrollQuery != null) {
                    stats.aggregate(scrollQuery.stats());
                    scrollQuery = null;
                }
                ReportingUtils.report(progressable, stats);
            }
        }
View Full Code Here

Examples of org.elasticsearch.hadoop.rest.stats.Stats

        return (Boolean.TRUE.equals(get(sb.toString(), "timed_out")));
    }

    @Override
    public Stats stats() {
        Stats copy = new Stats(stats);
        if (network != null) {
            copy.aggregate(network.stats());
        }
        return copy;
    }
View Full Code Here

Examples of org.elasticsearch.hadoop.rest.stats.Stats

        }
    }

    @Override
    public Stats stats() {
        Stats copy = new Stats(stats);
        if (currentTransport != null) {
            copy.aggregate(currentTransport.stats());
        }
        return copy;
    }
View Full Code Here

Examples of org.elasticsearch.hadoop.rest.stats.Stats

        return client.health(resourceW.index(), RestClient.HEALTH.YELLOW, TimeValue.timeValueSeconds(10));
    }

    @Override
    public Stats stats() {
        Stats copy = new Stats(stats);
        if (client != null) {
            copy.aggregate(client.stats());
        }
        return copy;
    }
View Full Code Here

Examples of org.elasticsearch.hadoop.rest.stats.Stats

    }

    @Override
    public Stats stats() {
        // there's no need to do aggregation
        return new Stats(stats);
    }
View Full Code Here

Examples of org.elasticsearch.threadpool.ThreadPoolStats.Stats

    private boolean isBulkProcessorAvailable() {
        NodesStatsResponse response = client.admin().cluster().prepareNodesStats().setThreadPool(true).get();
        for (NodeStats nodeStats : response.getNodes()) {
            Iterator<Stats> iterator = nodeStats.getThreadPool().iterator();
            while (iterator.hasNext()) {
                Stats stats = iterator.next();
                if ("bulk".equals(stats.getName())) {
                    int queue = stats.getQueue();
                    logger.trace("bulkQueueSize [{}] - queue [{}] - availability [{}]", bulkQueueSize, queue, 1 - (queue / bulkQueueSize));
                    return 1 - (queue / bulkQueueSize) > 0.1;
                }
            }
        }
View Full Code Here

Examples of org.gtugs.domain.Stats

    PersistenceManager pm = getPersistenceManager();

    try {
      return pm.getObjectById(Stats.class, KEY_NAME);
    } catch (javax.jdo.JDOObjectNotFoundException e) {
      return new Stats(KEY_NAME);
    } finally {
      pm.close();
    }
  }
View Full Code Here

Examples of org.gtugs.domain.Stats

      pm.close();
    }
  }

  public void updateField(Field field, Object value) {
    Stats stats = getStats();

    if (field.equals(Field.NUM_CHAPTERS)) {
      stats.setNumChapters((Integer) value);
    } else if (field.equals(Field.NUM_COUNTRIES)) {
      stats.setNumCountries((Integer) value);
    } else if (field.equals(Field.NUM_EVENTS)) {
      stats.setNumEvents((Integer) value);
    } else if (field.equals(Field.CHAPTERS_SORTED_BY_NUM_EVENTS)) {
      stats.setChaptersSortedByNumEvents((List<Chapter>) value);
    } else if (field.equals(Field.COUNTRIES_SORTED_BY_NUM_EVENTS)) {
      stats.setCountriesSortedByNumEvents((List<Country>) value);
    } else if (field.equals(Field.TOPICS_SORTED_BY_NUM_EVENTS)) {
      stats.setTopicsSortedByNumEvents((List<Topic>) value);
    }

    getJdoTemplate().makePersistent(stats);
  }
View Full Code Here

Examples of org.infinispan.stats.Stats

    *
    * @return the number of hits
    */
   @Override
   public long getCacheGets() {
      Stats stats = cache.getStats();
      return stats.getHits() + stats.getMisses();
   }
View Full Code Here

Examples of org.infinispan.stats.Stats

    *
    * @return the number of removals
    */
   @Override
   public long getCacheRemovals() {
      Stats stats = cache.getStats();
      return mapToSpecValidStat(stats.getRemoveHits() + stats.getRemoveMisses());
   }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.