本文整理汇总了Java中org.apache.hadoop.yarn.api.protocolrecords.GetApplicationAttemptReportRequest.newInstance方法的典型用法代码示例。如果您正苦于以下问题:Java GetApplicationAttemptReportRequest.newInstance方法的具体用法?Java GetApplicationAttemptReportRequest.newInstance怎么用?Java GetApplicationAttemptReportRequest.newInstance使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.hadoop.yarn.api.protocolrecords.GetApplicationAttemptReportRequest
的用法示例。
在下文中一共展示了GetApplicationAttemptReportRequest.newInstance方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testApplicationAttemptReport
import org.apache.hadoop.yarn.api.protocolrecords.GetApplicationAttemptReportRequest; //导入方法依赖的package包/类
@Test
public void testApplicationAttemptReport() throws IOException, YarnException {
ApplicationId appId = ApplicationId.newInstance(0, 1);
ApplicationAttemptId appAttemptId =
ApplicationAttemptId.newInstance(appId, 1);
writeApplicationAttemptStartData(appAttemptId);
writeApplicationAttemptFinishData(appAttemptId);
GetApplicationAttemptReportRequest request =
GetApplicationAttemptReportRequest.newInstance(appAttemptId);
GetApplicationAttemptReportResponse response =
historyServer.getClientService().getClientHandler()
.getApplicationAttemptReport(request);
ApplicationAttemptReport attemptReport =
response.getApplicationAttemptReport();
Assert.assertNotNull(attemptReport);
Assert.assertEquals("appattempt_0_0001_000001", attemptReport
.getApplicationAttemptId().toString());
}
示例2: testApplicationAttemptReport
import org.apache.hadoop.yarn.api.protocolrecords.GetApplicationAttemptReportRequest; //导入方法依赖的package包/类
@Test
public void testApplicationAttemptReport() throws IOException, YarnException {
ApplicationId appId = ApplicationId.newInstance(0, 1);
ApplicationAttemptId appAttemptId =
ApplicationAttemptId.newInstance(appId, 1);
GetApplicationAttemptReportRequest request =
GetApplicationAttemptReportRequest.newInstance(appAttemptId);
GetApplicationAttemptReportResponse response =
clientService.getApplicationAttemptReport(request);
ApplicationAttemptReport attemptReport =
response.getApplicationAttemptReport();
Assert.assertNotNull(attemptReport);
Assert.assertEquals("appattempt_0_0001_000001", attemptReport
.getApplicationAttemptId().toString());
}
示例3: getApplicationAttemptReport
import org.apache.hadoop.yarn.api.protocolrecords.GetApplicationAttemptReportRequest; //导入方法依赖的package包/类
@Override
public ApplicationAttemptReport getApplicationAttemptReport(
ApplicationAttemptId applicationAttemptId) throws YarnException,
IOException {
GetApplicationAttemptReportRequest request = GetApplicationAttemptReportRequest
.newInstance(applicationAttemptId);
GetApplicationAttemptReportResponse response = ahsClient
.getApplicationAttemptReport(request);
return response.getApplicationAttemptReport();
}
示例4: testApplicationAttemptReport
import org.apache.hadoop.yarn.api.protocolrecords.GetApplicationAttemptReportRequest; //导入方法依赖的package包/类
@Test
public void testApplicationAttemptReport() throws IOException, YarnException {
ApplicationId appId = ApplicationId.newInstance(0, 1);
ApplicationAttemptId appAttemptId =
ApplicationAttemptId.newInstance(appId, 1);
GetApplicationAttemptReportRequest request =
GetApplicationAttemptReportRequest.newInstance(appAttemptId);
GetApplicationAttemptReportResponse response =
clientService.getClientHandler().getApplicationAttemptReport(request);
ApplicationAttemptReport attemptReport =
response.getApplicationAttemptReport();
Assert.assertNotNull(attemptReport);
Assert.assertEquals("appattempt_0_0001_000001", attemptReport
.getApplicationAttemptId().toString());
}