Class ApplicationAttemptStateData

java.lang.Object
org.apache.hadoop.yarn.server.resourcemanager.recovery.records.ApplicationAttemptStateData
Direct Known Subclasses:
ApplicationAttemptStateDataPBImpl

@Public @Unstable public abstract class ApplicationAttemptStateData extends Object
  • Constructor Details

    • ApplicationAttemptStateData

      public ApplicationAttemptStateData()
  • Method Details

    • newInstance

      public static ApplicationAttemptStateData newInstance(org.apache.hadoop.yarn.api.records.ApplicationAttemptId attemptId, org.apache.hadoop.yarn.api.records.Container container, org.apache.hadoop.security.Credentials attemptTokens, long startTime, RMAppAttemptState finalState, String finalTrackingUrl, String diagnostics, org.apache.hadoop.yarn.api.records.FinalApplicationStatus amUnregisteredFinalStatus, int exitStatus, long finishTime, Map<String,Long> resourceSecondsMap, Map<String,Long> preemptedResourceSecondsMap, int totalAllocatedContainers)
    • newInstance

      public static ApplicationAttemptStateData newInstance(org.apache.hadoop.yarn.api.records.ApplicationAttemptId attemptId, org.apache.hadoop.yarn.api.records.Container masterContainer, org.apache.hadoop.security.Credentials attemptTokens, long startTime, Map<String,Long> resourceSeondsMap, Map<String,Long> preemptedResourceSecondsMap, int totalAllocatedContainers)
    • getProto

      public abstract org.apache.hadoop.yarn.proto.YarnServerResourceManagerRecoveryProtos.ApplicationAttemptStateDataProto getProto()
    • getAttemptId

      @Public @Unstable public abstract org.apache.hadoop.yarn.api.records.ApplicationAttemptId getAttemptId()
      The ApplicationAttemptId for the application attempt
      Returns:
      ApplicationAttemptId for the application attempt
    • setAttemptId

      public abstract void setAttemptId(org.apache.hadoop.yarn.api.records.ApplicationAttemptId attemptId)
    • getMasterContainer

      @Public @Unstable public abstract org.apache.hadoop.yarn.api.records.Container getMasterContainer()
    • setMasterContainer

      public abstract void setMasterContainer(org.apache.hadoop.yarn.api.records.Container container)
    • getAppAttemptTokens

      @Public @Unstable public abstract org.apache.hadoop.security.Credentials getAppAttemptTokens()
      The application attempt tokens that belong to this attempt
      Returns:
      The application attempt tokens that belong to this attempt
    • setAppAttemptTokens

      public abstract void setAppAttemptTokens(org.apache.hadoop.security.Credentials attemptTokens)
    • getState

      public abstract RMAppAttemptState getState()
      Get the final state of the application attempt.
      Returns:
      the final state of the application attempt.
    • setState

      public abstract void setState(RMAppAttemptState state)
    • getFinalTrackingUrl

      public abstract String getFinalTrackingUrl()
      Get the original not-proxied final tracking url for the application. This is intended to only be used by the proxy itself.
      Returns:
      the original not-proxied final tracking url for the application
    • setFinalTrackingUrl

      public abstract void setFinalTrackingUrl(String url)
      Set the final tracking Url of the AM.
      Parameters:
      url - tracking url.
    • getDiagnostics

      public abstract String getDiagnostics()
      Get the diagnositic information of the attempt
      Returns:
      diagnositic information of the attempt
    • setDiagnostics

      public abstract void setDiagnostics(String diagnostics)
    • getStartTime

      public abstract long getStartTime()
      Get the start time of the application.
      Returns:
      start time of the application
    • setStartTime

      public abstract void setStartTime(long startTime)
    • getFinalApplicationStatus

      public abstract org.apache.hadoop.yarn.api.records.FinalApplicationStatus getFinalApplicationStatus()
      Get the final finish status of the application.
      Returns:
      final finish status of the application
    • setFinalApplicationStatus

      public abstract void setFinalApplicationStatus(org.apache.hadoop.yarn.api.records.FinalApplicationStatus finishState)
    • getAMContainerExitStatus

      public abstract int getAMContainerExitStatus()
    • setAMContainerExitStatus

      public abstract void setAMContainerExitStatus(int exitStatus)
    • getFinishTime

      public abstract long getFinishTime()
      Get the finish time of the application attempt.
      Returns:
      finish time of the application attempt
    • setFinishTime

      public abstract void setFinishTime(long finishTime)
    • getMemorySeconds

      @Public @Unstable public abstract long getMemorySeconds()
      Get the memory seconds (in MB seconds) of the application.
      Returns:
      memory seconds (in MB seconds) of the application
    • setMemorySeconds

      @Public @Unstable public abstract void setMemorySeconds(long memorySeconds)
    • getVcoreSeconds

      @Public @Unstable public abstract long getVcoreSeconds()
      Get the vcore seconds of the application.
      Returns:
      vcore seconds of the application
    • setVcoreSeconds

      @Public @Unstable public abstract void setVcoreSeconds(long vcoreSeconds)
    • getPreemptedMemorySeconds

      @Public @Unstable public abstract long getPreemptedMemorySeconds()
      Get the preempted memory seconds (in MB seconds) of the application.
      Returns:
      preempted memory seconds (in MB seconds) of the application
    • setPreemptedMemorySeconds

      @Public @Unstable public abstract void setPreemptedMemorySeconds(long memorySeconds)
    • getPreemptedVcoreSeconds

      @Public @Unstable public abstract long getPreemptedVcoreSeconds()
      Get the preempted vcore seconds of the application.
      Returns:
      preempted vcore seconds of the application
    • setPreemptedVcoreSeconds

      @Public @Unstable public abstract void setPreemptedVcoreSeconds(long vcoreSeconds)
    • getResourceSecondsMap

      @Public @Unstable public abstract Map<String,Long> getResourceSecondsMap()
      Get the aggregated number of resources preempted that the application has allocated times the number of seconds the application has been running.
      Returns:
      map containing the resource name and aggregated preempted resource-seconds
    • setResourceSecondsMap

      @Public @Unstable public abstract void setResourceSecondsMap(Map<String,Long> resourceSecondsMap)
      Set the aggregated number of resources that the application has allocated times the number of seconds the application has been running.
      Parameters:
      resourceSecondsMap - map containing the resource name and aggregated resource-seconds
    • getPreemptedResourceSecondsMap

      @Public @Unstable public abstract Map<String,Long> getPreemptedResourceSecondsMap()
      Get the aggregated number of resources preempted that the application has allocated times the number of seconds the application has been running.
      Returns:
      map containing the resource name and aggregated preempted resource-seconds
    • setPreemptedResourceSecondsMap

      @Public @Unstable public abstract void setPreemptedResourceSecondsMap(Map<String,Long> preemptedResourceSecondsMap)
      Set the aggregated number of resources preempted that the application has allocated times the number of seconds the application has been running.
      Parameters:
      preemptedResourceSecondsMap - map containing the resource name and aggregated preempted resource-seconds
    • getTotalAllocatedContainers

      @Public @Unstable public abstract int getTotalAllocatedContainers()
      Get total number of containers allocated for this attempt.
      Returns:
      total number of containers allocated for this attempt.
    • setTotalAllocatedContainers

      @Public @Unstable public abstract void setTotalAllocatedContainers(int totalAllocatedContainers)
      Set total number of containers allocated for this attempt.
      Parameters:
      totalAllocatedContainers - total number of containers