@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
ApplicationHistoryData s |
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, waitForServiceToStop
protected org.apache.hadoop.fs.FileSystem getFileSystem(org.apache.hadoop.fs.Path path, org.apache.hadoop.conf.Configuration conf) throws Exception
Exception
public void serviceStart() throws Exception
serviceStart
in class org.apache.hadoop.service.AbstractService
Exception
public void serviceStop() throws Exception
serviceStop
in class org.apache.hadoop.service.AbstractService
Exception
public ApplicationHistoryData getApplication(org.apache.hadoop.yarn.api.records.ApplicationId appId) throws IOException
ApplicationHistoryReader
ApplicationHistoryData
for the
specified ApplicationId
.getApplication
in interface ApplicationHistoryReader
ApplicationHistoryData
for the ApplicationId.IOException
public Map<org.apache.hadoop.yarn.api.records.ApplicationId,ApplicationHistoryData> getAllApplications() throws IOException
ApplicationHistoryReader
ApplicationHistoryData
sgetAllApplications
in interface ApplicationHistoryReader
ApplicationId
to ApplicationHistoryData
s.IOException
public Map<org.apache.hadoop.yarn.api.records.ApplicationAttemptId,ApplicationAttemptHistoryData> getApplicationAttempts(org.apache.hadoop.yarn.api.records.ApplicationId appId) throws IOException
ApplicationHistoryReader
ApplicationAttemptHistoryData
. This method returns the all
ApplicationAttemptHistoryData
s for the Application.getApplicationAttempts
in interface ApplicationHistoryReader
ApplicationAttemptHistoryData
s for the Application.IOException
public ApplicationAttemptHistoryData getApplicationAttempt(org.apache.hadoop.yarn.api.records.ApplicationAttemptId appAttemptId) throws IOException
ApplicationHistoryReader
ApplicationAttemptHistoryData
for specified
ApplicationId
.getApplicationAttempt
in interface ApplicationHistoryReader
appAttemptId
- ApplicationAttemptId
ApplicationAttemptHistoryData
for ApplicationAttemptIdIOException
public ContainerHistoryData getContainer(org.apache.hadoop.yarn.api.records.ContainerId containerId) throws IOException
ApplicationHistoryReader
ContainerHistoryData
for specified
ContainerId
.getContainer
in interface ApplicationHistoryReader
containerId
- ContainerId
ContainerHistoryData
for ContainerIdIOException
public ContainerHistoryData getAMContainer(org.apache.hadoop.yarn.api.records.ApplicationAttemptId appAttemptId) throws IOException
ApplicationHistoryReader
ContainerHistoryData
for specified
ApplicationAttemptId
.getAMContainer
in interface ApplicationHistoryReader
appAttemptId
- ApplicationAttemptId
ContainerHistoryData
for ApplicationAttemptIdIOException
public Map<org.apache.hadoop.yarn.api.records.ContainerId,ContainerHistoryData> getContainers(org.apache.hadoop.yarn.api.records.ApplicationAttemptId appAttemptId) throws IOException
ApplicationHistoryReader
getContainers
in interface ApplicationHistoryReader
appAttemptId
- ApplicationAttemptId
ContainerId
to ContainerHistoryData
for
ApplicationAttemptIdIOException
public void applicationStarted(ApplicationStartData appStart) throws IOException
ApplicationHistoryWriter
RMApp
that is available
when it starts.applicationStarted
in interface ApplicationHistoryWriter
appStart
- the record of the information of RMApp
that is
available when it startsIOException
public void applicationFinished(ApplicationFinishData appFinish) throws IOException
ApplicationHistoryWriter
RMApp
that is available
when it finishes.applicationFinished
in interface ApplicationHistoryWriter
appFinish
- the record of the information of RMApp
that is
available when it finishesIOException
public void applicationAttemptStarted(ApplicationAttemptStartData appAttemptStart) throws IOException
ApplicationHistoryWriter
RMAppAttempt
that is
available when it starts.applicationAttemptStarted
in interface ApplicationHistoryWriter
appAttemptStart
- the record of the information of RMAppAttempt
that is
available when it startsIOException
public void applicationAttemptFinished(ApplicationAttemptFinishData appAttemptFinish) throws IOException
ApplicationHistoryWriter
RMAppAttempt
that is
available when it finishes.applicationAttemptFinished
in interface ApplicationHistoryWriter
appAttemptFinish
- the record of the information of RMAppAttempt
that is
available when it finishesIOException
public void containerStarted(ContainerStartData containerStart) throws IOException
ApplicationHistoryWriter
RMContainer
that is
available when it starts.containerStarted
in interface ApplicationHistoryWriter
containerStart
- the record of the information of RMContainer
that is
available when it startsIOException
public void containerFinished(ContainerFinishData containerFinish) throws IOException
ApplicationHistoryWriter
RMContainer
that is
available when it finishes.containerFinished
in interface ApplicationHistoryWriter
containerFinish
- the record of the information of RMContainer
that is
available when it finishesIOException
Copyright © 2008–2021 Apache Software Foundation. All rights reserved.