Class EntityCacheItem
java.lang.Object
org.apache.hadoop.yarn.server.timeline.EntityCacheItem
Cache item for timeline server v1.5 reader cache. Each cache item has a
TimelineStore that can be filled with data within one entity group.
-
Constructor Summary
ConstructorsConstructorDescriptionEntityCacheItem(org.apache.hadoop.yarn.api.records.timeline.TimelineEntityGroupId gId, org.apache.hadoop.conf.Configuration config) -
Method Summary
Modifier and TypeMethodDescriptionvoidForce releasing the cache item for the given group id, even though there may be active references.org.apache.hadoop.yarn.server.timeline.EntityGroupFSTimelineStore.AppLogsorg.apache.hadoop.yarn.server.timeline.TimelineStoregetStore()org.apache.hadoop.yarn.server.timeline.TimelineStorerefreshCache(org.apache.hadoop.yarn.server.timeline.security.TimelineACLsManager aclManager, EntityGroupFSTimelineStoreMetrics metrics) Refresh this cache item if it needs refresh.voidsetAppLogs(org.apache.hadoop.yarn.server.timeline.EntityGroupFSTimelineStore.AppLogs incomingAppLogs) Set the application logs to this cache item.
-
Constructor Details
-
EntityCacheItem
public EntityCacheItem(org.apache.hadoop.yarn.api.records.timeline.TimelineEntityGroupId gId, org.apache.hadoop.conf.Configuration config)
-
-
Method Details
-
getAppLogs
public org.apache.hadoop.yarn.server.timeline.EntityGroupFSTimelineStore.AppLogs getAppLogs()- Returns:
- The application log associated to this cache item, may be null.
-
setAppLogs
public void setAppLogs(org.apache.hadoop.yarn.server.timeline.EntityGroupFSTimelineStore.AppLogs incomingAppLogs) Set the application logs to this cache item. The entity group should be associated with this application.- Parameters:
incomingAppLogs- Application logs this cache item mapped to
-
getStore
public org.apache.hadoop.yarn.server.timeline.TimelineStore getStore()- Returns:
- The timeline store, either loaded or unloaded, of this cache item. This method will not hold the storage from being reclaimed.
-
refreshCache
public org.apache.hadoop.yarn.server.timeline.TimelineStore refreshCache(org.apache.hadoop.yarn.server.timeline.security.TimelineACLsManager aclManager, EntityGroupFSTimelineStoreMetrics metrics) throws IOException Refresh this cache item if it needs refresh. This will enforce an appLogs rescan and then load new data. The refresh process is synchronized with other operations on the same cache item.- Parameters:
aclManager- ACL manager for the timeline storagemetrics- Metrics to trace the status of the entity group store- Returns:
- a
TimelineStoreobject filled with all entities in the group. - Throws:
IOException
-
forceRelease
public void forceRelease()Force releasing the cache item for the given group id, even though there may be active references.
-