public class MetricParser extends Object
Constructor and Description |
---|
MetricParser() |
Modifier and Type | Method and Description |
---|---|
static com.fasterxml.jackson.databind.node.ArrayNode |
generateMetricFilterJsonArray(String metricString)
This function converts the string of metrics extracted from the url into ArrayNode.
|
public static com.fasterxml.jackson.databind.node.ArrayNode generateMetricFilterJsonArray(String metricString)
metricString
- An Api metric string eg:
metricString = metric1(AND(dim1|id-in[a,b],dim2|id-in[c,d])),metric2
{[{"filter":{"AND":{"dim2|id-in":["abc","xyz"],"dim3|id-in":["mobile","tablet"]}}, "name":"metric1"},
{"filter":{},"name":"metric2"}]}
IllegalArgumentException
- if metricString is empty or the metricString has unbalanced bracketsCopyright © 2016–2018 Yahoo! Inc.. All rights reserved.