Package com.rackspacecloud.blueflood.service

Examples of com.rackspacecloud.blueflood.service.SingleRollupWriteContext


        ColumnFamily<Locator, Long> destCF = CassandraModel.getColumnFamily(BasicRollup.class, destGranularity);
        ArrayList<SingleRollupWriteContext> writeContexts = new ArrayList<SingleRollupWriteContext>();
        for (Range range : Range.rangesForInterval(destGranularity, from, to)) {
            Points<SimpleNumber> input = AstyanaxReader.getInstance().getDataToRoll(SimpleNumber.class, locator, range, CassandraModel.CF_METRICS_FULL);
            Rollup basicRollup = BasicRollup.buildRollupFromRawSamples(input);
            writeContexts.add(new SingleRollupWriteContext(basicRollup, locator, destGranularity, destCF, range.getStart()));
        }


        AstyanaxWriter.getInstance().insertRollups(writeContexts);
    }
View Full Code Here


    public void run() {
        Timer.Context rollupTimerContext = rollupTimer.time();
        try {
            Rollup.Type rollupComputer = RollupRunnable.getRollupComputer(RollupType.BF_BASIC, Granularity.FULL);
            Rollup rollup = rollupComputer.compute(points);
            writer.enqueueRollupForWrite(new SingleRollupWriteContext(rollup, loc, Granularity.MIN_5, CassandraModel.CF_METRICS_5M, range.getStart()));
            log.info("Calculated and queued rollup for "+loc+" within range "+range);
        } catch (Exception e) {
            // I want to be very harsh with exceptions encountered while validating and computing rollups. Just stop everything.
            log.error("Error encountered while validating and calculating rollups", e);
            rollupValidationAndComputeFailed.inc();
View Full Code Here

TOP

Related Classes of com.rackspacecloud.blueflood.service.SingleRollupWriteContext

Copyright © 2018 www.massapicom. 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.