Search in sources :

Example 1 with Identifier

use of org.apache.hadoop.yarn.api.records.timelineservice.TimelineEntity.Identifier in project hadoop by apache.

the class NMTimelinePublisher method createContainerEntity.

private static ContainerEntity createContainerEntity(ContainerId containerId) {
    ContainerEntity entity = new ContainerEntity();
    entity.setId(containerId.toString());
    Identifier parentIdentifier = new Identifier();
    parentIdentifier.setType(TimelineEntityType.YARN_APPLICATION_ATTEMPT.name());
    parentIdentifier.setId(containerId.getApplicationAttemptId().toString());
    entity.setParent(parentIdentifier);
    return entity;
}
Also used : Identifier(org.apache.hadoop.yarn.api.records.timelineservice.TimelineEntity.Identifier) ContainerEntity(org.apache.hadoop.yarn.api.records.timelineservice.ContainerEntity)

Example 2 with Identifier

use of org.apache.hadoop.yarn.api.records.timelineservice.TimelineEntity.Identifier in project hadoop by apache.

the class TimelineServiceV2Publisher method createContainerEntity.

private static ContainerEntity createContainerEntity(ContainerId containerId) {
    ContainerEntity entity = new ContainerEntity();
    entity.setId(containerId.toString());
    entity.setParent(new Identifier(TimelineEntityType.YARN_APPLICATION_ATTEMPT.name(), containerId.getApplicationAttemptId().toString()));
    return entity;
}
Also used : Identifier(org.apache.hadoop.yarn.api.records.timelineservice.TimelineEntity.Identifier) ContainerEntity(org.apache.hadoop.yarn.api.records.timelineservice.ContainerEntity)

Example 3 with Identifier

use of org.apache.hadoop.yarn.api.records.timelineservice.TimelineEntity.Identifier in project hadoop by apache.

the class TimelineServiceV2Publisher method createAppAttemptEntity.

private static ApplicationAttemptEntity createAppAttemptEntity(ApplicationAttemptId appAttemptId) {
    ApplicationAttemptEntity entity = new ApplicationAttemptEntity();
    entity.setId(appAttemptId.toString());
    entity.setParent(new Identifier(TimelineEntityType.YARN_APPLICATION.name(), appAttemptId.getApplicationId().toString()));
    return entity;
}
Also used : Identifier(org.apache.hadoop.yarn.api.records.timelineservice.TimelineEntity.Identifier) ApplicationAttemptEntity(org.apache.hadoop.yarn.api.records.timelineservice.ApplicationAttemptEntity)

Aggregations

Identifier (org.apache.hadoop.yarn.api.records.timelineservice.TimelineEntity.Identifier)3 ContainerEntity (org.apache.hadoop.yarn.api.records.timelineservice.ContainerEntity)2 ApplicationAttemptEntity (org.apache.hadoop.yarn.api.records.timelineservice.ApplicationAttemptEntity)1