public class DefaultYarnEventPublisher extends java.lang.Object implements YarnEventPublisher, org.springframework.context.ApplicationEventPublisherAware
Constructor and Description |
---|
DefaultYarnEventPublisher()
Constructs default strategy without an event publisher.
|
DefaultYarnEventPublisher(org.springframework.context.ApplicationEventPublisher applicationEventPublisher)
Constructs default strategy with an event publisher.
|
Modifier and Type | Method and Description |
---|---|
void |
publishContainerAllocated(java.lang.Object source,
org.apache.hadoop.yarn.api.records.Container container)
Publish an application event containing information
about the allocated
Container . |
void |
publishContainerCompleted(java.lang.Object source,
org.apache.hadoop.yarn.api.records.ContainerStatus status)
Publish an application event containing information
about the completed
ContainerStatus . |
void |
publishContainerLaunched(java.lang.Object source,
org.apache.hadoop.yarn.api.records.Container container)
Publish an application event containing information
about the launched
Container . |
void |
publishContainerLaunchRequestFailed(java.lang.Object source,
org.apache.hadoop.yarn.api.records.Container container)
Publish an application event containing information
about the failed
Container launch request. |
void |
publishEvent(AbstractYarnEvent event)
Publish a general application event of type
AbstractYarnEvent . |
void |
setApplicationEventPublisher(org.springframework.context.ApplicationEventPublisher applicationEventPublisher) |
public DefaultYarnEventPublisher()
public DefaultYarnEventPublisher(org.springframework.context.ApplicationEventPublisher applicationEventPublisher)
applicationEventPublisher
- the event publisherpublic void setApplicationEventPublisher(org.springframework.context.ApplicationEventPublisher applicationEventPublisher)
setApplicationEventPublisher
in interface org.springframework.context.ApplicationEventPublisherAware
public void publishContainerAllocated(java.lang.Object source, org.apache.hadoop.yarn.api.records.Container container)
YarnEventPublisher
Container
.publishContainerAllocated
in interface YarnEventPublisher
source
- the component that published the event (never null
)container
- the Containerpublic void publishContainerLaunched(java.lang.Object source, org.apache.hadoop.yarn.api.records.Container container)
YarnEventPublisher
Container
.publishContainerLaunched
in interface YarnEventPublisher
source
- the component that published the event (never null
)container
- the Containerpublic void publishContainerLaunchRequestFailed(java.lang.Object source, org.apache.hadoop.yarn.api.records.Container container)
YarnEventPublisher
Container
launch request.publishContainerLaunchRequestFailed
in interface YarnEventPublisher
source
- the component that published the event (never null
)container
- the Containerpublic void publishContainerCompleted(java.lang.Object source, org.apache.hadoop.yarn.api.records.ContainerStatus status)
YarnEventPublisher
ContainerStatus
.publishContainerCompleted
in interface YarnEventPublisher
source
- the component that published the event (never null
)status
- the Container statuspublic void publishEvent(AbstractYarnEvent event)
YarnEventPublisher
AbstractYarnEvent
.publishEvent
in interface YarnEventPublisher
event
- the event