Examples of BatchMetricsQuery


Examples of com.rackspacecloud.blueflood.types.BatchMetricsQuery

        HTTPRequestWithDecodedQueryParams requestWithParams = (HTTPRequestWithDecodedQueryParams) request;

        final Timer.Context httpBatchMetricsFetchTimerContext = httpBatchMetricsFetchTimer.time();
        try {
            RollupsQueryParams params = PlotRequestParser.parseParams(requestWithParams.getQueryParams());
            BatchMetricsQuery query = new BatchMetricsQuery(locators, params.getRange(), params.getGranularity());
            Map<Locator, MetricData> results = new BatchMetricsQueryHandler(executor, AstyanaxReader.getInstance())
                                                        .execute(query, queryTimeout);
            JSONObject metrics = serializer.transformRollupData(results, params.getStats());
            final JsonElement element = parser.parse(metrics.toString());
            final String jsonStringRep = gson.toJson(element);
View Full Code Here

Examples of com.rackspacecloud.blueflood.types.BatchMetricsQuery

        tooManyLocators.addAll(locators);
        // generate arbitrarily large number of locators so we slow down the query so we can test a timeout
        for (int i = 0; i < 50; i++) {
            tooManyLocators.add(Locator.createLocatorFromDbKey(UUID.randomUUID().toString()));
        }
        BatchMetricsQuery query = new BatchMetricsQuery(tooManyLocators, range, gran);

        // Now test a bad case with extremely low timeout. We shouldn't throw any exceptions.
        Map<Locator, MetricData> results = batchMetricsQueryHandler.execute(query, new TimeValue(1, TimeUnit.MILLISECONDS));
        // Make sure there were things still in progress and nothing breaks.
        Assert.assertNull(results);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.