List of usage examples for java.util.concurrent ConcurrentSkipListMap entrySet
EntrySet entrySet
To view the source code for java.util.concurrent ConcurrentSkipListMap entrySet.
Click Source Link
From source file:org.apache.hadoop.hbase.client.coprocessor.TimeseriesAggregationClient.java
/** * This is the client side interface/handle for calling the average method for a given cf-cq * combination. It was necessary to add one more call stack as its return type should be a decimal * value, irrespective of what columninterpreter says. So, this methods collects the necessary * parameters to compute the average and returs the double value. * @param table/*from w w w . j a va2s . c o m*/ * @param ci * @param scan * @return <R, S> * @throws Throwable */ public <R, S, P extends Message, Q extends Message, T extends Message> ConcurrentSkipListMap<Long, Double> avg( final HTable table, final ColumnInterpreter<R, S, P, Q, T> ci, Scan scan) throws Throwable { ConcurrentSkipListMap<Long, Pair<S, Long>> p = getAvgArgs(table, ci, scan); ConcurrentSkipListMap<Long, Double> avg = new ConcurrentSkipListMap<Long, Double>(); for (Map.Entry<Long, Pair<S, Long>> entry : p.entrySet()) { avg.put(entry.getKey(), ci.divideForAvg(entry.getValue().getFirst(), entry.getValue().getSecond())); } return avg; }
From source file:org.apache.hadoop.hbase.coprocessor.client.TimeseriesAggregationClient.java
/** * This is the client side interface/handle for calling the average method for a given cf-cq * combination. It was necessary to add one more call stack as its return type should be a decimal * value, irrespective of what columninterpreter says. So, this methods collects the necessary * parameters to compute the average and returs the double value. * @param table/* w w w. j a v a 2s . c o m*/ * @param ci * @param scan * @return <R, S> * @throws Throwable */ public <R, S, P extends Message, Q extends Message, T extends Message> ConcurrentSkipListMap<Long, Double> avg( final Table table, final ColumnInterpreter<R, S, P, Q, T> ci, Scan scan) throws Throwable { ConcurrentSkipListMap<Long, Pair<S, Long>> p = getAvgArgs(table, ci, scan); ConcurrentSkipListMap<Long, Double> avg = new ConcurrentSkipListMap<Long, Double>(); for (Map.Entry<Long, Pair<S, Long>> entry : p.entrySet()) { avg.put(entry.getKey(), ci.divideForAvg(entry.getValue().getFirst(), entry.getValue().getSecond())); } return avg; }