MCPcopy Index your code
hub / github.com/OpenTSDB/opentsdb / AbstractQuery

Class AbstractQuery

src/core/AbstractQuery.java:17–66  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15import org.hbase.async.HBaseException;
16
17public abstract class AbstractQuery implements Query {
18 /**
19 * Runs this query.
20 *
21 * @return The data points matched by this query.
22 * <p>
23 * Each element in the non-{@code null} but possibly empty array returned
24 * corresponds to one time series for which some data points have been
25 * matched by the query.
26 * @throws HBaseException if there was a problem communicating with HBase to
27 * perform the search.
28 */
29 @Override
30 public DataPoints[] run() throws HBaseException {
31 try {
32 return runAsync().joinUninterruptibly();
33 } catch (RuntimeException e) {
34 throw e;
35 } catch (Exception e) {
36 throw new RuntimeException("Should never be here", e);
37 }
38 }
39
40 /**
41 * Runs this query.
42 *
43 * @return The data points matched by this query and applied with percentile calculation
44 * <p>
45 * Each element in the non-{@code null} but possibly empty array returned
46 * corresponds to one time series for which some data points have been
47 * matched by the query.
48 * @throws HBaseException if there was a problem communicating with HBase to
49 * perform the search.
50 * @throws IllegalStateException if the query is not a histogram query
51 */
52 @Override
53 public DataPoints[] runHistogram() throws HBaseException {
54 if (!isHistogramQuery()) {
55 throw new RuntimeException("Should never be here");
56 }
57
58 try {
59 return runHistogramAsync().joinUninterruptibly();
60 } catch (RuntimeException e) {
61 throw e;
62 } catch (Exception e) {
63 throw new RuntimeException("Should never be here", e);
64 }
65 }
66}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…