@InterfaceAudience.Public @InterfaceStability.Unstable public class FileSystemApplicationHistoryStore extends org.apache.hadoop.service.AbstractService implements ApplicationHistoryStore
ApplicationHistoryStore. In this
implementation, one application will have just one file in the file system,
which contains all the history data of one application, and its attempts and
containers. applicationStarted(ApplicationStartData) is supposed to
be invoked first when writing any history data of one application and it will
open a file, while applicationFinished(ApplicationFinishData) is
supposed to be last writing operation and will close the file.| Constructor and Description |
|---|
FileSystemApplicationHistoryStore() |
| Modifier and Type | Method and Description |
|---|---|
void |
applicationAttemptFinished(ApplicationAttemptFinishData appAttemptFinish)
This method writes the information of
RMAppAttempt that is
available when it finishes. |
void |
applicationAttemptStarted(ApplicationAttemptStartData appAttemptStart)
This method writes the information of
RMAppAttempt that is
available when it starts. |
void |
applicationFinished(ApplicationFinishData appFinish)
This method writes the information of
RMApp that is available
when it finishes. |
void |
applicationStarted(ApplicationStartData appStart)
This method writes the information of
RMApp that is available
when it starts. |
void |
containerFinished(ContainerFinishData containerFinish)
This method writes the information of
RMContainer that is
available when it finishes. |
void |
containerStarted(ContainerStartData containerStart)
This method writes the information of
RMContainer that is
available when it starts. |
Map<org.apache.hadoop.yarn.api.records.ApplicationId,ApplicationHistoryData> |
getAllApplications()
This method returns all Application
ApplicationHistoryDatas |
ContainerHistoryData |
getAMContainer(org.apache.hadoop.yarn.api.records.ApplicationAttemptId appAttemptId)
This method returns
ContainerHistoryData for specified
ApplicationAttemptId. |
ApplicationHistoryData |
getApplication(org.apache.hadoop.yarn.api.records.ApplicationId appId)
This method returns Application
ApplicationHistoryData for the
specified ApplicationId. |
ApplicationAttemptHistoryData |
getApplicationAttempt(org.apache.hadoop.yarn.api.records.ApplicationAttemptId appAttemptId)
This method returns
ApplicationAttemptHistoryData for specified
ApplicationId. |
Map<org.apache.hadoop.yarn.api.records.ApplicationAttemptId,ApplicationAttemptHistoryData> |
getApplicationAttempts(org.apache.hadoop.yarn.api.records.ApplicationId appId)
Application can have multiple application attempts
ApplicationAttemptHistoryData. |
ContainerHistoryData |
getContainer(org.apache.hadoop.yarn.api.records.ContainerId containerId)
This method returns
ContainerHistoryData for specified
ContainerId. |
Map<org.apache.hadoop.yarn.api.records.ContainerId,ContainerHistoryData> |
getContainers(org.apache.hadoop.yarn.api.records.ApplicationAttemptId appAttemptId)
|
protected org.apache.hadoop.fs.FileSystem |
getFileSystem(org.apache.hadoop.fs.Path path,
org.apache.hadoop.conf.Configuration conf) |
void |
serviceStart() |
void |
serviceStop() |
close, getBlockers, getConfig, getFailureCause, getFailureState, getLifecycleHistory, getName, getServiceState, getStartTime, init, isInState, noteFailure, putBlocker, registerGlobalListener, registerServiceListener, removeBlocker, serviceInit, setConfig, start, stop, toString, unregisterGlobalListener, unregisterServiceListener, waitForServiceToStopprotected org.apache.hadoop.fs.FileSystem getFileSystem(org.apache.hadoop.fs.Path path,
org.apache.hadoop.conf.Configuration conf)
throws Exception
Exceptionpublic void serviceStart()
throws Exception
serviceStart in class org.apache.hadoop.service.AbstractServiceExceptionpublic void serviceStop()
throws Exception
serviceStop in class org.apache.hadoop.service.AbstractServiceExceptionpublic ApplicationHistoryData getApplication(org.apache.hadoop.yarn.api.records.ApplicationId appId) throws IOException
ApplicationHistoryReaderApplicationHistoryData for the
specified ApplicationId.getApplication in interface ApplicationHistoryReaderApplicationHistoryData for the ApplicationId.IOExceptionpublic Map<org.apache.hadoop.yarn.api.records.ApplicationId,ApplicationHistoryData> getAllApplications() throws IOException
ApplicationHistoryReaderApplicationHistoryDatasgetAllApplications in interface ApplicationHistoryReaderApplicationId to ApplicationHistoryDatas.IOExceptionpublic Map<org.apache.hadoop.yarn.api.records.ApplicationAttemptId,ApplicationAttemptHistoryData> getApplicationAttempts(org.apache.hadoop.yarn.api.records.ApplicationId appId) throws IOException
ApplicationHistoryReaderApplicationAttemptHistoryData. This method returns the all
ApplicationAttemptHistoryDatas for the Application.getApplicationAttempts in interface ApplicationHistoryReaderApplicationAttemptHistoryDatas for the Application.IOExceptionpublic ApplicationAttemptHistoryData getApplicationAttempt(org.apache.hadoop.yarn.api.records.ApplicationAttemptId appAttemptId) throws IOException
ApplicationHistoryReaderApplicationAttemptHistoryData for specified
ApplicationId.getApplicationAttempt in interface ApplicationHistoryReaderappAttemptId - ApplicationAttemptIdApplicationAttemptHistoryData for ApplicationAttemptIdIOExceptionpublic ContainerHistoryData getContainer(org.apache.hadoop.yarn.api.records.ContainerId containerId) throws IOException
ApplicationHistoryReaderContainerHistoryData for specified
ContainerId.getContainer in interface ApplicationHistoryReadercontainerId - ContainerIdContainerHistoryData for ContainerIdIOExceptionpublic ContainerHistoryData getAMContainer(org.apache.hadoop.yarn.api.records.ApplicationAttemptId appAttemptId) throws IOException
ApplicationHistoryReaderContainerHistoryData for specified
ApplicationAttemptId.getAMContainer in interface ApplicationHistoryReaderappAttemptId - ApplicationAttemptIdContainerHistoryData for ApplicationAttemptIdIOExceptionpublic Map<org.apache.hadoop.yarn.api.records.ContainerId,ContainerHistoryData> getContainers(org.apache.hadoop.yarn.api.records.ApplicationAttemptId appAttemptId) throws IOException
ApplicationHistoryReadergetContainers in interface ApplicationHistoryReaderappAttemptId - ApplicationAttemptIdContainerId to ContainerHistoryData for
ApplicationAttemptIdIOExceptionpublic void applicationStarted(ApplicationStartData appStart) throws IOException
ApplicationHistoryWriterRMApp that is available
when it starts.applicationStarted in interface ApplicationHistoryWriterappStart - the record of the information of RMApp that is
available when it startsIOExceptionpublic void applicationFinished(ApplicationFinishData appFinish) throws IOException
ApplicationHistoryWriterRMApp that is available
when it finishes.applicationFinished in interface ApplicationHistoryWriterappFinish - the record of the information of RMApp that is
available when it finishesIOExceptionpublic void applicationAttemptStarted(ApplicationAttemptStartData appAttemptStart) throws IOException
ApplicationHistoryWriterRMAppAttempt that is
available when it starts.applicationAttemptStarted in interface ApplicationHistoryWriterappAttemptStart - the record of the information of RMAppAttempt that is
available when it startsIOExceptionpublic void applicationAttemptFinished(ApplicationAttemptFinishData appAttemptFinish) throws IOException
ApplicationHistoryWriterRMAppAttempt that is
available when it finishes.applicationAttemptFinished in interface ApplicationHistoryWriterappAttemptFinish - the record of the information of RMAppAttempt that is
available when it finishesIOExceptionpublic void containerStarted(ContainerStartData containerStart) throws IOException
ApplicationHistoryWriterRMContainer that is
available when it starts.containerStarted in interface ApplicationHistoryWritercontainerStart - the record of the information of RMContainer that is
available when it startsIOExceptionpublic void containerFinished(ContainerFinishData containerFinish) throws IOException
ApplicationHistoryWriterRMContainer that is
available when it finishes.containerFinished in interface ApplicationHistoryWritercontainerFinish - the record of the information of RMContainer that is
available when it finishesIOExceptionCopyright © 2008–2024 Apache Software Foundation. All rights reserved.