@Test public void testMultiTimeQuery() throws FoxtrotException, JsonProcessingException { Query query = new Query(); query.setTable(TestUtils.TEST_TABLE_NAME); ResultSort resultSort = new ResultSort(); resultSort.setOrder(ResultSort.Order.asc); resultSort.setField("_timestamp"); query.setSort(resultSort); BetweenFilter betweenFilter = new BetweenFilter("_timestamp", 1397658117000L, 1397658118005L, false); query.setFilters(Arrays.asList(betweenFilter)); Duration duration = Duration.days(1); MultiTimeQueryRequest multiTimeQueryRequest = new MultiTimeQueryRequest(1, duration, query); ActionResponse actionResponse = getQueryExecutor().execute(multiTimeQueryRequest); MultiTimeQueryResponse multiTimeQueryResponse = null; if(actionResponse instanceof MultiTimeQueryResponse) { multiTimeQueryResponse = (MultiTimeQueryResponse)actionResponse; } assertNotNull(multiTimeQueryResponse); QueryResponse queryResponse = (QueryResponse)multiTimeQueryResponse.getResponses() .get("1397658117000"); assertEquals(9, queryResponse.getTotalHits()); }
@Override public ActionResponse execute(MultiTimeQueryRequest parameter) { MultiTimeQueryResponse multiTimeQueryResponse = new MultiTimeQueryResponse(); multiTimeQueryResponse.setResponses(((MultiQueryResponse)action.execute(multiQueryRequest)).getResponses()); return multiTimeQueryResponse; }
MultiTimeQueryAction extends Action<MultiTimeQueryRequest> { @Override public ActionResponse execute(MultiTimeQueryRequest parameter) { MultiTimeQueryResponse multiTimeQueryResponse = new MultiTimeQueryResponse(); multiTimeQueryResponse.setResponses(((MultiQueryResponse)action.execute(multiQueryRequest)).getResponses()); return multiTimeQueryResponse; } }
MultiTimeQueryAction extends Action<MultiTimeQueryRequest> { @Override public ActionResponse execute(MultiTimeQueryRequest parameter) { MultiTimeQueryResponse multiTimeQueryResponse = new MultiTimeQueryResponse(); multiTimeQueryResponse.setResponses(((MultiQueryResponse)action.execute(multiQueryRequest)).getResponses()); return multiTimeQueryResponse; } MultiTimeQueryAction(MultiTimeQueryRequest parameter, AnalyticsLoader analyticsLoader); }
MultiTimeQueryAction extends Action<MultiTimeQueryRequest> { @Override public ActionResponse execute(MultiTimeQueryRequest parameter) { MultiTimeQueryResponse multiTimeQueryResponse = new MultiTimeQueryResponse(); multiTimeQueryResponse.setResponses(((MultiQueryResponse)action.execute(multiQueryRequest)).getResponses()); return multiTimeQueryResponse; } MultiTimeQueryAction(MultiTimeQueryRequest parameter, AnalyticsLoader analyticsLoader); @Override void preprocess(); @Override String getMetricKey(); @Override String getRequestCacheKey(); @Override void validateImpl(MultiTimeQueryRequest parameter); @Override ActionResponse execute(MultiTimeQueryRequest parameter); @Override ActionRequestBuilder getRequestBuilder(MultiTimeQueryRequest parameter); @Override ActionResponse getResponse(org.elasticsearch.action.ActionResponse multiSearchResponse, MultiTimeQueryRequest parameter); }
MultiTimeQueryAction extends Action<MultiTimeQueryRequest> { @Override public ActionResponse execute(MultiTimeQueryRequest parameter) { MultiTimeQueryResponse multiTimeQueryResponse = new MultiTimeQueryResponse(); multiTimeQueryResponse.setResponses(((MultiQueryResponse)action.execute(multiQueryRequest)).getResponses()); return multiTimeQueryResponse; } MultiTimeQueryAction(MultiTimeQueryRequest parameter, AnalyticsLoader analyticsLoader); @Override void preprocess(); @Override String getMetricKey(); @Override String getRequestCacheKey(); @Override void validateImpl(MultiTimeQueryRequest parameter); @Override ActionResponse execute(MultiTimeQueryRequest parameter); @Override ActionRequestBuilder getRequestBuilder(MultiTimeQueryRequest parameter); @Override ActionResponse getResponse(org.elasticsearch.action.ActionResponse multiSearchResponse, MultiTimeQueryRequest parameter);  }