/** * Enrich the <code>fetchResults</code> with NaN values for all <code>sources</code> which do not have values in the <code>fetchResults</code>. * * @param fetchResults * @param sources */ public static void fillMissingValues(FetchResults fetchResults, List<Source> sources) { Objects.requireNonNull(fetchResults); Objects.requireNonNull(sources); final int rowCount = fetchResults.getTimestamps().length; for (Source eachSource : sources) { if (!fetchResults.getColumns().containsKey(eachSource.getLabel())) { fetchResults.getColumns().put(eachSource.getLabel(), createNaNArray(rowCount)); } } }
/** * Enrich the <code>fetchResults</code> with NaN values for all <code>sources</code> which do not have values in the <code>fetchResults</code>. * * @param fetchResults * @param sources */ public static void fillMissingValues(FetchResults fetchResults, List<Source> sources) { Objects.requireNonNull(fetchResults); Objects.requireNonNull(sources); final int rowCount = fetchResults.getTimestamps().length; for (Source eachSource : sources) { if (!fetchResults.getColumns().containsKey(eachSource.getLabel())) { fetchResults.getColumns().put(eachSource.getLabel(), createNaNArray(rowCount)); } } }
jexl.getFunctions().put("jexl", jexlEvaluateFunctions); final long timestamps[] = results.getTimestamps(); final Map<String, double[]> columns = results.getColumns(); final int numRows = timestamps.length;
jexl.getFunctions().put("jexl", jexlEvaluateFunctions); final long timestamps[] = results.getTimestamps(); final Map<String, double[]> columns = results.getColumns(); final int numRows = timestamps.length;
response.setEnd(request.getEnd()); response.setStep(results.getStep()); response.setTimestamps(results.getTimestamps()); response.setColumns(results.getColumns()); response.setConstants(results.getConstants());
response.setEnd(request.getEnd()); response.setStep(results.getStep()); response.setTimestamps(results.getTimestamps()); response.setColumns(results.getColumns()); response.setConstants(results.getConstants());