Skip to content

Instantly share code, notes, and snippets.

@jroyalty
Created January 19, 2015 04:07
Show Gist options
  • Save jroyalty/7821351299b4e39c3a99 to your computer and use it in GitHub Desktop.
Save jroyalty/7821351299b4e39c3a99 to your computer and use it in GitHub Desktop.
OpenTSDB KV match rule
public class Rule {
static enum MatchAction {
OUTPUT, OUTPUT_WITH_TAGS, IGNORE;
};
static enum OutputFormat {
KV, KV_DELIM, KV_JSON, LIST, LIST_DELIM, LIST_JSON, HASH;
};
private String metricMatch;
private String tagMatch;
private MatchAction action = MatchAction.IGNORE;
private OutputFormat format = OutputFormat.KV;
private int expiration = 0;
// match -> KEEP(default) | IGNORE | KEEP_TAGS |
// format: kv | kv_string | kv_json | hash | list | list_delim | list_json
// expiration: 10
public Rule() {
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment