Managing Data Operating System
Also available as:
PDF
loading table of contents...

Publish Per-framework Data in Applications

Developers can define the information they would like to record for their applications by composing TimelineEntity and TimelineEvent objects, and then putting the entities and events to the Timeline server using TimelineClient.

Create and start the timeline client.
Consider the following example of defining the timeline client.
 // Create and start the Timeline client
 TimelineClient client = TimelineClient.createTimelineClient();
 client.init(conf);
 client.start();

 TimelineEntity entity = null;
 // Compose the entity
 try {
 TimelinePutResponse response = client.putEntities(entity);
 } catch (IOException e) {
 // Handle the exception
 } catch (YarnException e) {
 // Handle the exception
 }

 // Stop the Timeline client
 client.stop();