public abstract class TimeseriesUtils extends Object
| Modifier and Type | Field and Description |
|---|---|
static boolean |
DISABLE_INDEXING |
static int |
TTL |
| Constructor and Description |
|---|
TimeseriesUtils() |
| Modifier and Type | Method and Description |
|---|---|
static void |
addIndicesToAttributes(ResourcePath path,
Map<String,String> attributes)
Extends the attribute map with indices used by the
TimeseriesResourceStorageDao. |
static org.opennms.newts.api.Sample |
createSampleForIndexingStrings(org.opennms.newts.api.Context context,
org.opennms.newts.api.Resource resource)
Creates a sample used to index string attributes.
|
static org.opennms.newts.api.search.Query |
findResourcesWithMetricsAtDepth(ResourcePath path,
int depth)
Constructs a query used to find all of the resources that have
one or more metrics at the given depth bellow the path.
|
static String |
toMetricName(String resourceId)
Extracts the metric name from the resource id.
|
static String |
toResourceId(ResourcePath path)
Converts a
ResourcePath to a Newts resource id. |
static ResourcePath |
toResourcePath(String resourceId)
Converts a Newts resource id to a
ResourcePath. |
public static final boolean DISABLE_INDEXING
public static final int TTL
public static void addIndicesToAttributes(ResourcePath path, Map<String,String> attributes)
TimeseriesResourceStorageDao.
A resource path of the form [a, b, c, d] will be indexed with:
public static org.opennms.newts.api.search.Query findResourcesWithMetricsAtDepth(ResourcePath path, int depth)
addIndicesToAttributes(org.opennms.netmgt.model.ResourcePath, java.util.Map<java.lang.String, java.lang.String>).public static String toResourceId(ResourcePath path)
ResourcePath to a Newts resource id.path - path to convertpublic static ResourcePath toResourcePath(String resourceId)
ResourcePath.resourceId - Newts resource idpublic static String toMetricName(String resourceId)
resourceId - Newts resource idpublic static org.opennms.newts.api.Sample createSampleForIndexingStrings(org.opennms.newts.api.Context context,
org.opennms.newts.api.Resource resource)
Copyright © 2020. All rights reserved.