org.apache.hadoop.yarn.webapp.View Java Examples

The following examples show how to use org.apache.hadoop.yarn.webapp.View. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: WebAppTests.java    From hadoop with Apache License 2.0 5 votes vote down vote up
public static <T> Injector testPage(Class<? extends View> page, Class<T> api,
                                    T impl, Map<String,String> params, Module... modules) {
  Injector injector = createMockInjector(api, impl, modules);
  View view = injector.getInstance(page);
  if(params != null) {
    for(Map.Entry<String, String> entry: params.entrySet()) {
      view.set(entry.getKey(), entry.getValue());
    }
  }
  view.render();
  flushOutput(injector);
  return injector;
}
 
Example #2
Source File: WebAppTests.java    From big-c with Apache License 2.0 5 votes vote down vote up
public static <T> Injector testPage(Class<? extends View> page, Class<T> api,
                                    T impl, Map<String,String> params, Module... modules) {
  Injector injector = createMockInjector(api, impl, modules);
  View view = injector.getInstance(page);
  if(params != null) {
    for(Map.Entry<String, String> entry: params.entrySet()) {
      view.set(entry.getKey(), entry.getValue());
    }
  }
  view.render();
  flushOutput(injector);
  return injector;
}
 
Example #3
Source File: AppController.java    From big-c with Apache License 2.0 4 votes vote down vote up
/**
 * @return the page that will be used to render the /conf page
 */
protected Class<? extends View> confPage() {
  return JobConfPage.class;
}
 
Example #4
Source File: TestBlocks.java    From big-c with Apache License 2.0 4 votes vote down vote up
protected void render(Class<? extends View> cls) {
  clazz = cls;
}
 
Example #5
Source File: WebAppTests.java    From big-c with Apache License 2.0 4 votes vote down vote up
public static <T> Injector testPage(Class<? extends View> page, Class<T> api,
                                    T impl, Module... modules) {
  return testPage(page, api, impl, null, modules);
}
 
Example #6
Source File: WebAppTests.java    From big-c with Apache License 2.0 4 votes vote down vote up
public static <T> Injector testPage(Class<? extends View> page) {
  return testPage(page, null, null);
}
 
Example #7
Source File: AppController.java    From big-c with Apache License 2.0 4 votes vote down vote up
/**
 * @return The class that will render the /job page
 */
protected Class<? extends View> jobPage() {
  return JobPage.class;
}
 
Example #8
Source File: AppController.java    From big-c with Apache License 2.0 4 votes vote down vote up
/**
 * @return the class that will render the /jobcounters page
 */
protected Class<? extends View> countersPage() {
  return CountersPage.class;
}
 
Example #9
Source File: AppController.java    From big-c with Apache License 2.0 4 votes vote down vote up
/**
 * @return the class that will render the /singlejobcounter page
 */
protected Class<? extends View> singleCounterPage() {
  return SingleCounterPage.class;
}
 
Example #10
Source File: AppController.java    From big-c with Apache License 2.0 4 votes vote down vote up
/**
 * @return the class that will render the /tasks page
 */
protected Class<? extends View> tasksPage() {
  return TasksPage.class;
}
 
Example #11
Source File: AppController.java    From big-c with Apache License 2.0 4 votes vote down vote up
/**
 * @return the class that will render the /task page
 */
protected Class<? extends View> taskPage() {
  return TaskPage.class;
}
 
Example #12
Source File: AppController.java    From big-c with Apache License 2.0 4 votes vote down vote up
/**
 * @return the class that will render the /attempts page
 */
protected Class<? extends View> attemptsPage() {
  return AttemptsPage.class;
}
 
Example #13
Source File: HsController.java    From XLearning with Apache License 2.0 4 votes vote down vote up
protected Class<? extends View> jobPage() {
  return HsJobPage.class;
}
 
Example #14
Source File: HsController.java    From big-c with Apache License 2.0 4 votes vote down vote up
@Override
protected Class<? extends View> jobPage() {
  return HsJobPage.class;
}
 
Example #15
Source File: HsController.java    From big-c with Apache License 2.0 4 votes vote down vote up
@Override
public Class<? extends View> countersPage() {
  return HsCountersPage.class;
}
 
Example #16
Source File: HsController.java    From big-c with Apache License 2.0 4 votes vote down vote up
@Override
protected Class<? extends View> tasksPage() {
  return HsTasksPage.class;
}
 
Example #17
Source File: HsController.java    From big-c with Apache License 2.0 4 votes vote down vote up
@Override
protected Class<? extends View> taskPage() {
  return HsTaskPage.class;
}
 
Example #18
Source File: HsController.java    From big-c with Apache License 2.0 4 votes vote down vote up
@Override
protected Class<? extends View> attemptsPage() {
  return HsAttemptsPage.class;
}
 
Example #19
Source File: HsController.java    From big-c with Apache License 2.0 4 votes vote down vote up
/**
 * @return the page that will be used to render the /conf page
 */
@Override
protected Class<? extends View> confPage() {
  return HsConfPage.class;
}
 
Example #20
Source File: HsController.java    From big-c with Apache License 2.0 4 votes vote down vote up
/**
 * @return the page about the current server.
 */
protected Class<? extends View> aboutPage() {
  return HsAboutPage.class;
}
 
Example #21
Source File: HsController.java    From big-c with Apache License 2.0 4 votes vote down vote up
@Override
protected Class<? extends View> singleCounterPage() {
  return HsSingleCounterPage.class;
}
 
Example #22
Source File: AppController.java    From hadoop with Apache License 2.0 4 votes vote down vote up
/**
 * @return the page that will be used to render the /conf page
 */
protected Class<? extends View> confPage() {
  return JobConfPage.class;
}
 
Example #23
Source File: WebAppTests.java    From hadoop with Apache License 2.0 4 votes vote down vote up
public static <T> Injector testPage(Class<? extends View> page, Class<T> api,
                                    T impl, Module... modules) {
  return testPage(page, api, impl, null, modules);
}
 
Example #24
Source File: WebAppTests.java    From hadoop with Apache License 2.0 4 votes vote down vote up
public static <T> Injector testPage(Class<? extends View> page) {
  return testPage(page, null, null);
}
 
Example #25
Source File: AppController.java    From hadoop with Apache License 2.0 4 votes vote down vote up
/**
 * @return The class that will render the /job page
 */
protected Class<? extends View> jobPage() {
  return JobPage.class;
}
 
Example #26
Source File: AppController.java    From hadoop with Apache License 2.0 4 votes vote down vote up
/**
 * @return the class that will render the /jobcounters page
 */
protected Class<? extends View> countersPage() {
  return CountersPage.class;
}
 
Example #27
Source File: AppController.java    From hadoop with Apache License 2.0 4 votes vote down vote up
/**
 * @return the class that will render the /singlejobcounter page
 */
protected Class<? extends View> singleCounterPage() {
  return SingleCounterPage.class;
}
 
Example #28
Source File: AppController.java    From hadoop with Apache License 2.0 4 votes vote down vote up
/**
 * @return the class that will render the /tasks page
 */
protected Class<? extends View> tasksPage() {
  return TasksPage.class;
}
 
Example #29
Source File: AppController.java    From hadoop with Apache License 2.0 4 votes vote down vote up
/**
 * @return the class that will render the /task page
 */
protected Class<? extends View> taskPage() {
  return TaskPage.class;
}
 
Example #30
Source File: AppController.java    From hadoop with Apache License 2.0 4 votes vote down vote up
/**
 * @return the class that will render the /attempts page
 */
protected Class<? extends View> attemptsPage() {
  return AttemptsPage.class;
}