Spring for Apache Hadoop

org.springframework.yarn.event
Class DefaultYarnEventPublisher

java.lang.Object
  extended by org.springframework.yarn.event.DefaultYarnEventPublisher
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.context.ApplicationEventPublisherAware, YarnEventPublisher

public class DefaultYarnEventPublisher
extends java.lang.Object
implements YarnEventPublisher, org.springframework.context.ApplicationEventPublisherAware

The default strategy for publishing Yarn events.

Author:
Janne Valkealahti

Constructor Summary
DefaultYarnEventPublisher()
          Constructs default strategy without an event publisher.
DefaultYarnEventPublisher(org.springframework.context.ApplicationEventPublisher applicationEventPublisher)
          Constructs default strategy with an event publisher.
 
Method Summary
 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 publishEvent(AbstractYarnEvent event)
          Publish a general application event of type AbstractYarnEvent.
 void setApplicationEventPublisher(org.springframework.context.ApplicationEventPublisher applicationEventPublisher)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultYarnEventPublisher

public DefaultYarnEventPublisher()
Constructs default strategy without an event publisher.


DefaultYarnEventPublisher

public DefaultYarnEventPublisher(org.springframework.context.ApplicationEventPublisher applicationEventPublisher)
Constructs default strategy with an event publisher.

Parameters:
applicationEventPublisher - the event publisher
Method Detail

setApplicationEventPublisher

public void setApplicationEventPublisher(org.springframework.context.ApplicationEventPublisher applicationEventPublisher)
Specified by:
setApplicationEventPublisher in interface org.springframework.context.ApplicationEventPublisherAware

publishContainerAllocated

public void publishContainerAllocated(java.lang.Object source,
                                      org.apache.hadoop.yarn.api.records.Container container)
Description copied from interface: YarnEventPublisher
Publish an application event containing information about the allocated Container.

Specified by:
publishContainerAllocated in interface YarnEventPublisher
Parameters:
source - the component that published the event (never null)
container - the Container

publishContainerLaunched

public void publishContainerLaunched(java.lang.Object source,
                                     org.apache.hadoop.yarn.api.records.Container container)
Description copied from interface: YarnEventPublisher
Publish an application event containing information about the launched Container.

Specified by:
publishContainerLaunched in interface YarnEventPublisher
Parameters:
source - the component that published the event (never null)
container - the Container

publishContainerCompleted

public void publishContainerCompleted(java.lang.Object source,
                                      org.apache.hadoop.yarn.api.records.ContainerStatus status)
Description copied from interface: YarnEventPublisher
Publish an application event containing information about the completed ContainerStatus.

Specified by:
publishContainerCompleted in interface YarnEventPublisher
Parameters:
source - the component that published the event (never null)
status - the Container status

publishEvent

public void publishEvent(AbstractYarnEvent event)
Description copied from interface: YarnEventPublisher
Publish a general application event of type AbstractYarnEvent.

Specified by:
publishEvent in interface YarnEventPublisher
Parameters:
event - the event

Spring for Apache Hadoop