java.lang.Object
org.apache.hadoop.yarn.server.nodemanager.containermanager.localizer.LocalizedResource
All Implemented Interfaces:
org.apache.hadoop.yarn.event.EventHandler<ResourceEvent>

public class LocalizedResource extends Object implements org.apache.hadoop.yarn.event.EventHandler<ResourceEvent>
Datum representing a localized resource. Holds the statemachine of a resource. State of the resource is one of ResourceState.
  • Constructor Details

    • LocalizedResource

      public LocalizedResource(LocalResourceRequest rsrc, org.apache.hadoop.yarn.event.Dispatcher dispatcher)
  • Method Details

    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getState

      public org.apache.hadoop.yarn.server.nodemanager.containermanager.localizer.ResourceState getState()
    • getRequest

      public LocalResourceRequest getRequest()
    • getLocalPath

      public org.apache.hadoop.fs.Path getLocalPath()
    • setLocalPath

      public void setLocalPath(org.apache.hadoop.fs.Path localPath)
    • getTimestamp

      public long getTimestamp()
    • getSize

      public long getSize()
    • getRefCount

      public int getRefCount()
    • tryAcquire

      public boolean tryAcquire()
    • unlock

      public void unlock()
    • handle

      public void handle(ResourceEvent event)
      Specified by:
      handle in interface org.apache.hadoop.yarn.event.EventHandler<ResourceEvent>