public final class DocumentStoreUtils
extends java.lang.Object
DocumentStoreVendor.| Modifier and Type | Method | Description |
|---|---|---|
static java.util.Map<java.lang.String,java.lang.String> |
applyConfigFilter(org.apache.hadoop.yarn.server.timelineservice.reader.filter.TimelineFilterList configsToRetrieve,
java.util.Map<java.lang.String,java.lang.String> configs) |
|
static java.lang.String |
constructFlowActivityDocId(org.apache.hadoop.yarn.server.timelineservice.collector.TimelineCollectorContext collectorContext,
long eventTimestamp) |
Creates a composite key for storing
FlowActivityDocument. |
static java.lang.String |
constructFlowRunDocId(org.apache.hadoop.yarn.server.timelineservice.collector.TimelineCollectorContext collectorContext) |
Creates a composite key for storing
FlowRunDocument. |
static java.lang.String |
constructTimelineEntityDocId(org.apache.hadoop.yarn.server.timelineservice.collector.TimelineCollectorContext collectorContext,
java.lang.String type) |
Creates a composite key for storing
TimelineEntityDocument. |
static java.lang.String |
constructTimelineEntityDocId(org.apache.hadoop.yarn.server.timelineservice.collector.TimelineCollectorContext collectorContext,
java.lang.String type,
java.lang.String id) |
Creates a composite key for storing
TimelineEntityDocument. |
static com.microsoft.azure.cosmosdb.rx.AsyncDocumentClient |
createCosmosDBAsyncClient(org.apache.hadoop.conf.Configuration conf) |
Creates CosmosDB Async Document Client.
|
static org.apache.hadoop.yarn.api.records.timelineservice.TimelineEntity |
createEntityToBeReturned(TimelineEntityDocument timelineEntityDocument,
org.apache.hadoop.yarn.server.timelineservice.reader.filter.TimelineFilterList confsToRetrieve,
org.apache.hadoop.yarn.server.timelineservice.reader.filter.TimelineFilterList metricsToRetrieve) |
Creates the final entity to be returned as the result.
|
static org.apache.hadoop.yarn.api.records.timelineservice.TimelineEntity |
createEntityToBeReturned(TimelineEntityDocument timelineEntityDocument,
org.apache.hadoop.yarn.server.timelineservice.reader.TimelineDataToRetrieve dataToRetrieve) |
Creates the final entity to be returned as the result.
|
static org.apache.hadoop.yarn.api.records.timelineservice.TimelineEvent |
fetchEvent(org.apache.hadoop.yarn.api.records.timelineservice.TimelineEntity timelineEntity,
java.lang.String eventType) |
Retrieves a
TimelineEvent from TimelineEntity.events. |
static java.lang.String |
getCosmosDBDatabaseName(org.apache.hadoop.conf.Configuration conf) |
|
static DocumentStoreVendor |
getStoreVendor(org.apache.hadoop.conf.Configuration conf) |
Retrieves
DocumentStoreVendor configured. |
static long |
getTopOfTheDayTimestamp(long timeStamp) |
Returns the timestamp of the day's start (which is midnight 00:00:00 AM)
for a given input timestamp.
|
static boolean |
isNullOrEmpty(java.lang.String... values) |
Checks if the string is null or empty.
|
static java.util.Set<org.apache.hadoop.yarn.api.records.timelineservice.TimelineMetric> |
transformMetrics(org.apache.hadoop.yarn.server.timelineservice.reader.filter.TimelineFilterList metricsToRetrieve,
java.util.Map<java.lang.String,java.util.Set<TimelineMetricSubDoc>> metrics) |
|
static void |
validateCosmosDBConf(org.apache.hadoop.conf.Configuration conf) |
Checks whether the cosmosdb conf are set properly in yarn-site.xml conf.
|
public static void validateCosmosDBConf(org.apache.hadoop.conf.Configuration conf)
throws org.apache.hadoop.yarn.exceptions.YarnException
conf - related to yarnorg.apache.hadoop.yarn.exceptions.YarnException - if required config properties are missingpublic static DocumentStoreVendor getStoreVendor(org.apache.hadoop.conf.Configuration conf)
DocumentStoreVendor configured.conf - related to yarnDocumentStoreVendor that is configured, else
uses DocumentStoreVendor.COSMOS_DB as defaultpublic static org.apache.hadoop.yarn.api.records.timelineservice.TimelineEvent fetchEvent(org.apache.hadoop.yarn.api.records.timelineservice.TimelineEntity timelineEntity,
java.lang.String eventType)
TimelineEvent from TimelineEntity.events.timelineEntity - from which the set of events are examined.eventType - that has to be checked.TimelineEvent if found else nullpublic static boolean isNullOrEmpty(java.lang.String... values)
values - array of string to be checkedpublic static com.microsoft.azure.cosmosdb.rx.AsyncDocumentClient createCosmosDBAsyncClient(org.apache.hadoop.conf.Configuration conf)
conf - to retrieve cosmos db endpoint and keypublic static long getTopOfTheDayTimestamp(long timeStamp)
timeStamp - Timestamp.public static java.lang.String constructTimelineEntityDocId(org.apache.hadoop.yarn.server.timelineservice.collector.TimelineCollectorContext collectorContext,
java.lang.String type)
TimelineEntityDocument.collectorContext - of the timeline writertype - of the entitypublic static java.lang.String constructTimelineEntityDocId(org.apache.hadoop.yarn.server.timelineservice.collector.TimelineCollectorContext collectorContext,
java.lang.String type,
java.lang.String id)
TimelineEntityDocument.collectorContext - of the timeline writertype - of the entityid - of the entitypublic static java.lang.String constructFlowRunDocId(org.apache.hadoop.yarn.server.timelineservice.collector.TimelineCollectorContext collectorContext)
FlowRunDocument.collectorContext - of the timeline writerpublic static java.lang.String constructFlowActivityDocId(org.apache.hadoop.yarn.server.timelineservice.collector.TimelineCollectorContext collectorContext,
long eventTimestamp)
FlowActivityDocument.collectorContext - of the timeline writereventTimestamp - of the timeline entitypublic static java.lang.String getCosmosDBDatabaseName(org.apache.hadoop.conf.Configuration conf)
public static org.apache.hadoop.yarn.api.records.timelineservice.TimelineEntity createEntityToBeReturned(TimelineEntityDocument timelineEntityDocument, org.apache.hadoop.yarn.server.timelineservice.reader.TimelineDataToRetrieve dataToRetrieve)
timelineEntityDocument - which has all the information for the entitydataToRetrieve - specifies filters and fields to retrieveTimelineEntity as the resultpublic static org.apache.hadoop.yarn.api.records.timelineservice.TimelineEntity createEntityToBeReturned(TimelineEntityDocument timelineEntityDocument, org.apache.hadoop.yarn.server.timelineservice.reader.filter.TimelineFilterList confsToRetrieve, org.apache.hadoop.yarn.server.timelineservice.reader.filter.TimelineFilterList metricsToRetrieve)
timelineEntityDocument - which has all the information for the entityconfsToRetrieve - specifies config filters to be appliedmetricsToRetrieve - specifies metric filters to be appliedTimelineEntity as the resultpublic static java.util.Set<org.apache.hadoop.yarn.api.records.timelineservice.TimelineMetric> transformMetrics(org.apache.hadoop.yarn.server.timelineservice.reader.filter.TimelineFilterList metricsToRetrieve,
java.util.Map<java.lang.String,java.util.Set<TimelineMetricSubDoc>> metrics)
public static java.util.Map<java.lang.String,java.lang.String> applyConfigFilter(org.apache.hadoop.yarn.server.timelineservice.reader.filter.TimelineFilterList configsToRetrieve,
java.util.Map<java.lang.String,java.lang.String> configs)
Copyright © 2008–2025 Apache Software Foundation. All rights reserved.