Spring for Apache Hadoop

org.springframework.yarn.boot.support
Class EmbeddedAppmasterTrackService

java.lang.Object
  extended by org.springframework.yarn.boot.support.EmbeddedAppmasterTrackService
All Implemented Interfaces:
java.util.EventListener, org.springframework.context.ApplicationListener<org.springframework.context.ApplicationEvent>, AppmasterTrackService

public class EmbeddedAppmasterTrackService
extends java.lang.Object
implements AppmasterTrackService, org.springframework.context.ApplicationListener<org.springframework.context.ApplicationEvent>

A AppmasterTrackService which delegates to an EmbeddedServletContainer to find a configured port whether that is hard coded or set to be picked up automatically.

EmbeddedServletContainer is received from an ApplicationEvent send by boot to notify existence of AnnotationConfigEmbeddedWebApplicationContext.

Author:
Janne Valkealahti

Constructor Summary
EmbeddedAppmasterTrackService()
          Instantiates a new embedded appmaster track service with default wait time of 60 seconds.
EmbeddedAppmasterTrackService(long waitTime)
          Instantiates a new embedded appmaster track service.
 
Method Summary
 java.lang.String getTrackUrl()
          Gets a url of this track service.
 void onApplicationEvent(org.springframework.context.ApplicationEvent event)
           
 void setWaitTime(long waitTime)
          Sets the max time waiting for embedded container port.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EmbeddedAppmasterTrackService

public EmbeddedAppmasterTrackService()
Instantiates a new embedded appmaster track service with default wait time of 60 seconds.


EmbeddedAppmasterTrackService

public EmbeddedAppmasterTrackService(long waitTime)
Instantiates a new embedded appmaster track service.

Parameters:
waitTime - the wait time in millis
Method Detail

getTrackUrl

public java.lang.String getTrackUrl()
Description copied from interface: AppmasterTrackService
Gets a url of this track service.

Specified by:
getTrackUrl in interface AppmasterTrackService
Returns:
the track service url.

onApplicationEvent

public void onApplicationEvent(org.springframework.context.ApplicationEvent event)
Specified by:
onApplicationEvent in interface org.springframework.context.ApplicationListener<org.springframework.context.ApplicationEvent>

setWaitTime

public void setWaitTime(long waitTime)
Sets the max time waiting for embedded container port.

Parameters:
waitTime - the new wait time in millis

Spring for Apache Hadoop