org.apache.hadoop.yarn.server.nodemanager.containermanager.localizer
Class LocalizedResource

java.lang.Object
  extended by 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 Summary
LocalizedResource(LocalResourceRequest rsrc, org.apache.hadoop.yarn.event.Dispatcher dispatcher)
           
 
Method Summary
 org.apache.hadoop.fs.Path getLocalPath()
           
 int getRefCount()
           
 LocalResourceRequest getRequest()
           
 long getSize()
           
 org.apache.hadoop.yarn.server.nodemanager.containermanager.localizer.ResourceState getState()
           
 long getTimestamp()
           
 void handle(ResourceEvent event)
           
 String toString()
           
 boolean tryAcquire()
           
 void unlock()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LocalizedResource

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

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()

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>


Copyright © 2013 Apache Software Foundation. All Rights Reserved.