Code Monkey home page Code Monkey logo

Comments (7)

hbs avatar hbs commented on May 26, 2024

Can't you use SHRINK?

from warp10-platform.

hbs avatar hbs commented on May 26, 2024

Or you can call BUCKETIZE with bucketizer.last and adapted last bucket + bucketcount

from warp10-platform.

PierreZ avatar PierreZ commented on May 26, 2024

I don't think SHRINK or bucketizer.last will help me to have clear control on what I'm removing. Here's the type of WarpScript that I want to write:

[ SWAP mapper.whatever $pre $post 0 ] MAP
$pre DROPFIRSTBUCKETS
$post DROPLASTBUCKETS

from warp10-platform.

hbs avatar hbs commented on May 26, 2024

You have complete control of what you want to remove using BUCKETIZE as you can chose the last bucket timestamp, the span and the count to remove buckets on either end of the GTS.

If your GTS is filled, you can also use STRICTMAPPER to only apply the mapper on windows which have the specified number of elements.

from warp10-platform.

PierreZ avatar PierreZ commented on May 26, 2024

Yes, but using this method, I need to deal with bucket timestamp, span and count. I was thinking about dealing with buckets in the case of bucketized GTS.

from warp10-platform.

hbs avatar hbs commented on May 26, 2024

Timestamp of the last bucket, bucket span and bucket count can be extracted from a GTS using the functions

LASTBUCKET
BUCKETSPAN
BUCKETCOUNT

It's then very easy to build a macro which does what you want.

from warp10-platform.

PierreZ avatar PierreZ commented on May 26, 2024

Ok, I'll do a macro, thanks!

from warp10-platform.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.