gpt4 book ai didi

org.apache.hadoop.yarn.webapp.test.WebAppTests.testPage()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-21 05:13:05 28 4
gpt4 key购买 nike

本文整理了Java中org.apache.hadoop.yarn.webapp.test.WebAppTests.testPage()方法的一些代码示例,展示了WebAppTests.testPage()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WebAppTests.testPage()方法的具体详情如下:
包路径:org.apache.hadoop.yarn.webapp.test.WebAppTests
类名称:WebAppTests
方法名:testPage

WebAppTests.testPage介绍

暂无

代码示例

代码示例来源:origin: io.hops/hadoop-yarn-common

public static <T> Injector testPage(Class<? extends View> page, Class<T> api,
                  T impl, Module... modules) {
 return testPage(page, api, impl, null, modules);
}

代码示例来源:origin: ch.cern.hadoop/hadoop-yarn-common

public static <T> Injector testPage(Class<? extends View> page, Class<T> api,
                  T impl, Module... modules) {
 return testPage(page, api, impl, null, modules);
}

代码示例来源:origin: org.apache.hadoop/hadoop-yarn-common

public static <T> Injector testPage(Class<? extends View> page, Class<T> api,
                  T impl, Module... modules) {
 return testPage(page, api, impl, null, modules);
}

代码示例来源:origin: org.apache.hadoop/hadoop-yarn-common

@Test public void testUsual() {
 Injector injector = WebAppTests.testPage(TestView.class);
 PrintWriter out = injector.getInstance(PrintWriter.class);
 // Verify the HTML page has correct meta tags in the header
 verify(out).print(" http-equiv=\"X-UA-Compatible\"");
 verify(out).print(" content=\"IE=8\"");
 verify(out).print(" http-equiv=\"Content-type\"");
 verify(out).print(String.format(" content=\"%s\"", MimeType.HTML));
 verify(out).print("test");
 verify(out).print(" id=\"testid\"");
 verify(out).print("test note");
}

代码示例来源:origin: io.hops/hadoop-yarn-common

@Test public void testUsual() {
 Injector injector = WebAppTests.testPage(TestView.class);
 PrintWriter out = injector.getInstance(PrintWriter.class);
 // Verify the HTML page has correct meta tags in the header
 verify(out).print(" http-equiv=\"X-UA-Compatible\"");
 verify(out).print(" content=\"IE=8\"");
 verify(out).print(" http-equiv=\"Content-type\"");
 verify(out).print(String.format(" content=\"%s\"", MimeType.HTML));
 verify(out).print("test");
 verify(out).print(" id=\"testid\"");
 verify(out).print("test note");
}

代码示例来源:origin: io.hops/hadoop-yarn-common

@Test(expected=WebAppException.class) public void testShortPage() {
  WebAppTests.testPage(ShortPage.class);
 }
}

代码示例来源:origin: io.hops/hadoop-yarn-common

@Test(expected=WebAppException.class) public void testShort() {
  WebAppTests.testPage(ShortView.class);
 }
}

代码示例来源:origin: ch.cern.hadoop/hadoop-yarn-common

@Test(expected=WebAppException.class) public void testShort() {
  WebAppTests.testPage(ShortView.class);
 }
}

代码示例来源:origin: ch.cern.hadoop/hadoop-yarn-common

@Test public void testUsual() {
 Injector injector = WebAppTests.testPage(TestView.class);
 PrintWriter out = injector.getInstance(PrintWriter.class);
 // Verify the HTML page has correct meta tags in the header
 verify(out).print(" http-equiv=\"X-UA-Compatible\"");
 verify(out).print(" content=\"IE=8\"");
 verify(out).print(" http-equiv=\"Content-type\"");
 verify(out).print(String.format(" content=\"%s\"", MimeType.HTML));
 verify(out).print("test");
 verify(out).print(" id=\"testid\"");
 verify(out).print("test note");
}

代码示例来源:origin: org.apache.hadoop/hadoop-yarn-common

@Test(expected=WebAppException.class) public void testShort() {
  WebAppTests.testPage(ShortView.class);
 }
}

代码示例来源:origin: org.apache.hadoop/hadoop-yarn-common

@Test public void testErrorPage() {
 Injector injector = WebAppTests.testPage(ErrorPage.class);
}

代码示例来源:origin: org.apache.hadoop/hadoop-yarn-common

@Test(expected=WebAppException.class) public void testShortPage() {
  WebAppTests.testPage(ShortPage.class);
 }
}

代码示例来源:origin: org.apache.hadoop/hadoop-mapreduce-client-app

@Test public void testConfView() {
 WebAppTests.testPage(JobConfPage.class, AppContext.class,
            new MockAppContext(0, 1, 1, 1));
}

代码示例来源:origin: org.apache.hadoop/hadoop-mapreduce-client-app

@Test public void testAppView() {
 WebAppTests.testPage(AppView.class, AppContext.class, new MockAppContext(0, 1, 1, 1));
}

代码示例来源:origin: org.apache.hadoop/hadoop-mapreduce-client-app

@Test public void testJobView() {
 AppContext appContext = new MockAppContext(0, 1, 1, 1);
 Map<String, String> params = getJobParams(appContext);
 WebAppTests.testPage(JobPage.class, AppContext.class, appContext, params);
}

代码示例来源:origin: org.apache.hadoop/hadoop-mapreduce-client-app

@Test public void testTaskCountersView() {
 AppContext appContext = new MockAppContext(0, 1, 1, 1);
 Map<String, String> params = getTaskParams(appContext);
 WebAppTests.testPage(CountersPage.class, AppContext.class,
            appContext, params);
}

代码示例来源:origin: org.apache.hadoop/hadoop-mapreduce-client-app

@Test public void testCountersView() {
 AppContext appContext = new MockAppContext(0, 1, 1, 1);
 Map<String, String> params = getJobParams(appContext);
 WebAppTests.testPage(CountersPage.class, AppContext.class,
            appContext, params);
}

代码示例来源:origin: org.apache.hadoop/hadoop-mapreduce-client-app

@Test public void testSingleCounterView() {
 AppContext appContext = new MockAppContext(0, 1, 1, 1);
 Job job = appContext.getAllJobs().values().iterator().next();
 // add a failed task to the job without any counters
 Task failedTask = MockJobs.newTask(job.getID(), 2, 1, true);
 Map<TaskId,Task> tasks = job.getTasks();
 tasks.put(failedTask.getID(), failedTask);
 Map<String, String> params = getJobParams(appContext);
 params.put(AMParams.COUNTER_GROUP, 
   "org.apache.hadoop.mapreduce.FileSystemCounter");
 params.put(AMParams.COUNTER_NAME, "HDFS_WRITE_OPS");
 WebAppTests.testPage(SingleCounterPage.class, AppContext.class,
            appContext, params);
}

代码示例来源:origin: org.apache.hadoop/hadoop-mapreduce-client-app

@Test public void testTasksView() {
 AppContext appContext = new MockAppContext(0, 1, 1, 1);
 Map<String, String> params = getTaskParams(appContext);
 WebAppTests.testPage(TasksPage.class, AppContext.class, appContext, params);
}

代码示例来源:origin: org.apache.hadoop/hadoop-mapreduce-client-app

@Test public void testTaskView() {
 AppContext appContext = new MockAppContext(0, 1, 1, 1);
 Map<String, String> params = getTaskParams(appContext);
 App app = new App(appContext);
 app.setJob(appContext.getAllJobs().values().iterator().next());
 app.setTask(app.getJob().getTasks().values().iterator().next());
 WebAppTests.testPage(TaskPage.class, App.class, app, params);
}

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com