public GenericEntityBatchReader(StreamReader reader) throws InstantiationException, IllegalAccessException { this.reader = reader; reader.register(this); }
public GenericEntityBatchReader(StreamReader reader) throws InstantiationException, IllegalAccessException{ this.reader = reader; reader.register(this); }
public GenericEntityBatchReader(String serviceName, SearchCondition condition) throws InstantiationException, IllegalAccessException { reader = new GenericEntityStreamReader(serviceName, condition); reader.register(this); }
public GenericEntityBatchReader(String serviceName, SearchCondition condition) throws InstantiationException, IllegalAccessException{ reader = new GenericEntityStreamReader(serviceName, condition); reader.register(this); }
public GenericEntityQuery(String serviceName, SearchCondition condition, String metricName) throws IllegalAccessException, InstantiationException { if(serviceName.equals(GenericMetricEntity.GENERIC_METRIC_SERVICE)){ if(LOG.isDebugEnabled()) LOG.debug("List metric query"); if(metricName == null || metricName.isEmpty()){ throw new IllegalArgumentException("metricName should not be empty for metric list query"); } if(!condition.getOutputFields().contains(GenericMetricEntity.VALUE_FIELD)){ condition.getOutputFields().add(GenericMetricEntity.VALUE_FIELD); } reader = new GenericEntityStreamReader(serviceName, condition,metricName); }else{ if(LOG.isDebugEnabled()) LOG.debug("List entity query"); reader = new GenericEntityStreamReader(serviceName, condition); } reader.register(this); }
reader = new GenericMetricEntityDecompactionStreamReader(this.prefix, searchCondition); reader.register(agg); reader.readAsStream(); ArrayList<Map.Entry<List<String>, List<Double>>> obj = new ArrayList<>(); searchCondition.getEndTime(), aggregateCondition.getIntervalMS()); reader.register(tsAgg); if (sortOptions != null) { sortAgg = new FlatAggregator(groupbyFields, sortFuncs, sortFields); reader.register(sortAgg);
LOG.info("Output: " + StringUtils.join(condition.getOutputFields(), ", ")); reader.register(agg); reader.readAsStream(); ArrayList<Map.Entry<List<String>, List<Double>>> obj = new ArrayList<Map.Entry<List<String>, List<Double>>>(); EntityCreationListener listener = EntityCreationListenerFactory.synchronizedEntityCreationListener(agg); StreamReader reader = new GenericEntityStreamReaderMT(serviceName, condition, parallel); reader.register(listener); reader.readAsStream(); ArrayList<Map.Entry<List<String>, List<Double>>> obj = new ArrayList<Map.Entry<List<String>, List<Double>>>(); condition.getStartTime(), condition.getEndTime(), intervalmin*60*1000); if(parallel <= 0){ reader.register(tsAgg); }else{ EntityCreationListener listener = EntityCreationListenerFactory.synchronizedEntityCreationListener(tsAgg); reader.register(listener); sortAgg = new FlatAggregator(groupbyFields, comp.sortFunctions(), comp.sortFields()); if(parallel <= 0){ reader.register(sortAgg); }else{ EntityCreationListener listener = EntityCreationListenerFactory.synchronizedEntityCreationListener(sortAgg); reader.register(listener);
LOG.info("Output: " + StringUtils.join(condition.getOutputFields(), ", ")); reader.register(agg); reader.readAsStream(); ArrayList<Map.Entry<List<String>, List<Double>>> obj = new ArrayList<Map.Entry<List<String>, List<Double>>>(); EntityCreationListener listener = EntityCreationListenerFactory.synchronizedEntityCreationListener(agg); StreamReader reader = new GenericEntityStreamReaderMT(serviceName, condition, parallel); reader.register(listener); reader.readAsStream(); ArrayList<Map.Entry<List<String>, List<Double>>> obj = new ArrayList<Map.Entry<List<String>, List<Double>>>(); DateTimeUtil.humanDateToDate(condition.getStartTime()).getTime(), DateTimeUtil.humanDateToDate(condition.getEndTime()).getTime(), intervalmin*60*1000); if(parallel <= 0){ reader.register(tsAgg); }else{ EntityCreationListener listener = EntityCreationListenerFactory.synchronizedEntityCreationListener(tsAgg); reader.register(listener); sortAgg = new FlatAggregator(groupbyFields, comp.sortFunctions(), comp.sortFields()); if(parallel <= 0){ reader.register(sortAgg); }else{ EntityCreationListener listener = EntityCreationListenerFactory.synchronizedEntityCreationListener(sortAgg); reader.register(listener);