org.apache.hadoop.yarn.api.records
Class PreemptionContract

java.lang.Object
  extended by org.apache.hadoop.yarn.api.records.PreemptionContract

@InterfaceAudience.Public
@InterfaceStability.Evolving
public abstract class PreemptionContract
extends Object

Description of resources requested back by the ResourceManager. The ApplicationMaster (AM) can satisfy this request according to its own priorities to prevent containers from being forcibly killed by the platform.

See Also:
PreemptionMessage

Constructor Summary
PreemptionContract()
           
 
Method Summary
abstract  Set<PreemptionContainer> getContainers()
          Assign the set of PreemptionContainer specifying which containers owned by the ApplicationMaster that may be reclaimed by the ResourceManager.
abstract  List<PreemptionResourceRequest> getResourceRequest()
          If the AM releases resources matching these requests, then the PreemptionContainers enumerated in getContainers() should not be evicted from the cluster.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PreemptionContract

public PreemptionContract()
Method Detail

getResourceRequest

@InterfaceAudience.Public
@InterfaceStability.Evolving
public abstract List<PreemptionResourceRequest> getResourceRequest()
If the AM releases resources matching these requests, then the PreemptionContainers enumerated in getContainers() should not be evicted from the cluster. Due to delays in propagating cluster state and sending these messages, there are conditions where satisfied contracts may not prevent the platform from killing containers.

Returns:
List of PreemptionResourceRequest to update the ApplicationMaster about resources requested back by the ResourceManager.
See Also:
AllocateRequest.setAskList(List)

getContainers

@InterfaceAudience.Public
@InterfaceStability.Evolving
public abstract Set<PreemptionContainer> getContainers()
Assign the set of PreemptionContainer specifying which containers owned by the ApplicationMaster that may be reclaimed by the ResourceManager. If the AM prefers a different set of containers, then it may checkpoint or kill containers matching the description in getResourceRequest().

Returns:
Set of containers at risk if the contract is not met.


Copyright © 2013 Apache Software Foundation. All Rights Reserved.