@Test public void testFind() throws InterruptedException { long timestamp = System.currentTimeMillis() - 10 * 60 * 1000 * 60; String metric = "jvm_memory.Usage"; Map<String, String> tags = new HashMap<String, String>(); tags.put("APP", "trace"); tags.put("IP", "10.101.3.111"); long value = 10; Aggregator function = Aggregators.MAX; boolean rate = true; DataPoints[] dataPoints = storageRepository.find(timestamp, System.currentTimeMillis(), metric, tags, function, rate); TimeUnit.SECONDS.sleep(1); for (int i = 0; i < dataPoints.length; i++) { System.out.println(dataPoints[i].toString()); } }
public DataPoints[] find(long start, String metric, Map<String, String> tags, Aggregator function, boolean rate) { return RepositoryFactory.getMetricRepository().find(start, metric, tags, function, rate); }
StorageRepository { public DataPoints[] find(long start, String metric, Map<String, String> tags, Aggregator function, boolean rate) { return RepositoryFactory.getMetricRepository().find(start, metric, tags, function, rate); } }
StorageRepository { public DataPoints[] find(long start, String metric, Map<String, String> tags, Aggregator function, boolean rate) { return RepositoryFactory.getMetricRepository().find(start, metric, tags, function, rate); }  }
StorageRepository { public DataPoints[] find(long start, String metric, Map<String, String> tags, Aggregator function, boolean rate) { return RepositoryFactory.getMetricRepository().find(start, metric, tags, function, rate); }  static StorageRepository getStorageRepository(); void createHBaseTable(); void dropHBaseTable(); void initHBaseTable(); void save(TraceIndexTable appTable); void save(TraceOverviewTable traceTable); void save(Span span); void save(SystemData systemData); void save(ExceptionData exception); void save(MetricData metric); List<Map<String, Object>> findExceptionIndex(); List<ExceptionData> findExceptionData(Map<String, String> query); DataPoints[] find(long start,
                             String metric, Map<String, String> tags,
                             Aggregator function, boolean rate); DataPoints[] find(long start, long end,
                             String metric, Map<String, String> tags,
                             Aggregator function, boolean rate); List<Map<String, Object>> findSystemIndex(); SystemData findSystemData(Map<String, String> query); List<Map<String, Object>> findTraceIndex(); List<TraceOverviewTable> findTraceList(Map<String, String> query); Map<String, Integer> findSpanName(String traceId); List<Span> findTrace(String traceId); }
StorageRepository { public DataPoints[] find(long start, String metric, Map<String, String> tags, Aggregator function, boolean rate) { return RepositoryFactory.getMetricRepository().find(start, metric, tags, function, rate); }  static StorageRepository getStorageRepository(); void createHBaseTable(); void dropHBaseTable(); void initHBaseTable(); void save(TraceIndexTable appTable); void save(TraceOverviewTable traceTable); void save(Span span); void save(SystemData systemData); void save(ExceptionData exception); void save(MetricData metric); List<Map<String, Object>> findExceptionIndex(); List<ExceptionData> findExceptionData(Map<String, String> query); DataPoints[] find(long start,
                             String metric, Map<String, String> tags,
                             Aggregator function, boolean rate); DataPoints[] find(long start, long end,
                             String metric, Map<String, String> tags,
                             Aggregator function, boolean rate); List<Map<String, Object>> findSystemIndex(); SystemData findSystemData(Map<String, String> query); List<Map<String, Object>> findTraceIndex(); List<TraceOverviewTable> findTraceList(Map<String, String> query); Map<String, Integer> findSpanName(String traceId); List<Span> findTrace(String traceId);  }