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

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

@InterfaceAudience.Public
@InterfaceStability.Stable
public abstract class ApplicationResourceUsageReport
extends Object

Contains various scheduling metrics to be reported by UI and CLI.


Constructor Summary
ApplicationResourceUsageReport()
           
 
Method Summary
abstract  long getMemorySeconds()
          Get the aggregated amount of memory (in megabytes) the application has allocated times the number of seconds the application has been running.
abstract  Resource getNeededResources()
          Get the needed Resource.
abstract  int getNumReservedContainers()
          Get the number of reserved containers.
abstract  int getNumUsedContainers()
          Get the number of used containers.
abstract  Resource getReservedResources()
          Get the reserved Resource.
abstract  Resource getUsedResources()
          Get the used Resource.
abstract  long getVcoreSeconds()
          Get the aggregated number of vcores that the application has allocated times the number of seconds the application has been running.
static ApplicationResourceUsageReport newInstance(int numUsedContainers, int numReservedContainers, Resource usedResources, Resource reservedResources, Resource neededResources, long memorySeconds, long vcoreSeconds)
           
abstract  void setMemorySeconds(long memory_seconds)
          Set the aggregated amount of memory (in megabytes) the application has allocated times the number of seconds the application has been running.
abstract  void setNeededResources(Resource needed_resources)
           
abstract  void setNumReservedContainers(int num_reserved_containers)
          Set the number of reserved containers
abstract  void setNumUsedContainers(int num_containers)
          Set the number of used containers
abstract  void setReservedResources(Resource reserved_resources)
           
abstract  void setUsedResources(Resource resources)
           
abstract  void setVcoreSeconds(long vcore_seconds)
          Set the aggregated number of vcores that the application has allocated times the number of seconds the application has been running.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ApplicationResourceUsageReport

public ApplicationResourceUsageReport()
Method Detail

newInstance

@InterfaceAudience.Private
@InterfaceStability.Unstable
public static ApplicationResourceUsageReport newInstance(int numUsedContainers,
                                                                                                               int numReservedContainers,
                                                                                                               Resource usedResources,
                                                                                                               Resource reservedResources,
                                                                                                               Resource neededResources,
                                                                                                               long memorySeconds,
                                                                                                               long vcoreSeconds)

getNumUsedContainers

@InterfaceAudience.Public
@InterfaceStability.Stable
public abstract int getNumUsedContainers()
Get the number of used containers. -1 for invalid/inaccessible reports.

Returns:
the number of used containers

setNumUsedContainers

@InterfaceAudience.Private
@InterfaceStability.Unstable
public abstract void setNumUsedContainers(int num_containers)
Set the number of used containers

Parameters:
num_containers - the number of used containers

getNumReservedContainers

@InterfaceAudience.Private
@InterfaceStability.Unstable
public abstract int getNumReservedContainers()
Get the number of reserved containers. -1 for invalid/inaccessible reports.

Returns:
the number of reserved containers

setNumReservedContainers

@InterfaceAudience.Private
@InterfaceStability.Unstable
public abstract void setNumReservedContainers(int num_reserved_containers)
Set the number of reserved containers

Parameters:
num_reserved_containers - the number of reserved containers

getUsedResources

@InterfaceAudience.Public
@InterfaceStability.Stable
public abstract Resource getUsedResources()
Get the used Resource. -1 for invalid/inaccessible reports.

Returns:
the used Resource

setUsedResources

@InterfaceAudience.Private
@InterfaceStability.Unstable
public abstract void setUsedResources(Resource resources)

getReservedResources

@InterfaceAudience.Public
@InterfaceStability.Stable
public abstract Resource getReservedResources()
Get the reserved Resource. -1 for invalid/inaccessible reports.

Returns:
the reserved Resource

setReservedResources

@InterfaceAudience.Private
@InterfaceStability.Unstable
public abstract void setReservedResources(Resource reserved_resources)

getNeededResources

@InterfaceAudience.Public
@InterfaceStability.Stable
public abstract Resource getNeededResources()
Get the needed Resource. -1 for invalid/inaccessible reports.

Returns:
the needed Resource

setNeededResources

@InterfaceAudience.Private
@InterfaceStability.Unstable
public abstract void setNeededResources(Resource needed_resources)

setMemorySeconds

@InterfaceAudience.Private
@InterfaceStability.Unstable
public abstract void setMemorySeconds(long memory_seconds)
Set the aggregated amount of memory (in megabytes) the application has allocated times the number of seconds the application has been running.

Parameters:
memory_seconds - the aggregated amount of memory seconds

getMemorySeconds

@InterfaceAudience.Public
@InterfaceStability.Unstable
public abstract long getMemorySeconds()
Get the aggregated amount of memory (in megabytes) the application has allocated times the number of seconds the application has been running.

Returns:
the aggregated amount of memory seconds

setVcoreSeconds

@InterfaceAudience.Private
@InterfaceStability.Unstable
public abstract void setVcoreSeconds(long vcore_seconds)
Set the aggregated number of vcores that the application has allocated times the number of seconds the application has been running.

Parameters:
vcore_seconds - the aggregated number of vcore seconds

getVcoreSeconds

@InterfaceAudience.Public
@InterfaceStability.Unstable
public abstract long getVcoreSeconds()
Get the aggregated number of vcores that the application has allocated times the number of seconds the application has been running.

Returns:
the aggregated number of vcore seconds


Copyright © 2014 Apache Software Foundation. All Rights Reserved.