Java Code Examples for org.apache.hadoop.yarn.webapp.SubView

The following examples show how to use org.apache.hadoop.yarn.webapp.SubView. These examples are extracted from open source projects. 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 Project: XLearning   Source File: InfoPage.java    License: Apache License 2.0 5 votes vote down vote up
@Override
protected Class<? extends SubView> content() {
  if ($(APP_TYPE).equals("Tensorflow") || $(APP_TYPE).equals("Mxnet") || $(APP_TYPE).equals("Lightlda") || $(APP_TYPE).equals("Xflow")) {
    return InfoBlock.class;
  } else {
    return SingleInfoBlock.class;
  }
}
 
Example 2
Source Project: XLearning   Source File: InfoPage.java    License: Apache License 2.0 5 votes vote down vote up
@Override
protected  Class<? extends SubView> header() {
  try {
    if (WebApps.Builder.class.getMethod("build", WebApp.class) != null) {
      return HeaderBlock.class;
    }
  } catch (NoSuchMethodException e) {
    LOG.debug("current hadoop version don't have the method build of Class " + WebApps.class.toString() + ". For More Detail: " + e);
    return org.apache.hadoop.yarn.webapp.view.HeaderBlock.class;
  }
  return null;
}
 
Example 3
Source Project: hadoop   Source File: HamletImpl.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * Sub-classes should override this to do something interesting.
 * @param cls the sub-view class
 */
protected void subView(Class<? extends SubView> cls) {
  indent(of(ENDTAG)); // not an inline view
  sb.setLength(0);
  out.print(sb.append('[').append(cls.getName()).append(']').toString());
  out.println();
}
 
Example 4
Source Project: hadoop   Source File: WebAppTests.java    License: Apache License 2.0 5 votes vote down vote up
public static <T> Injector testBlock(Class<? extends SubView> block,
    Class<T> api, T impl, Module... modules) {
  Injector injector = createMockInjector(api, impl, modules);
  injector.getInstance(block).renderPartial();
  flushOutput(injector);
  return injector;
}
 
Example 5
Source Project: big-c   Source File: WebAppTests.java    License: Apache License 2.0 5 votes vote down vote up
public static <T> Injector testBlock(Class<? extends SubView> block,
    Class<T> api, T impl, Module... modules) {
  Injector injector = createMockInjector(api, impl, modules);
  injector.getInstance(block).renderPartial();
  flushOutput(injector);
  return injector;
}
 
Example 6
Source Project: big-c   Source File: HsAboutPage.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * The content of this page is the attempts block
 * @return AttemptsBlock.class
 */
@Override protected Class<? extends SubView> content() {
  HistoryInfo info = new HistoryInfo();
  info("History Server").
    _("BuildVersion", info.getHadoopBuildVersion()
      + " on " + info.getHadoopVersionBuiltOn()).
    _("History Server started on", Times.format(info.getStartedOn()));
  return InfoBlock.class;
}
 
Example 7
Source Project: hadoop   Source File: HsAboutPage.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * The content of this page is the attempts block
 * @return AttemptsBlock.class
 */
@Override protected Class<? extends SubView> content() {
  HistoryInfo info = new HistoryInfo();
  info("History Server").
    _("BuildVersion", info.getHadoopBuildVersion()
      + " on " + info.getHadoopVersionBuiltOn()).
    _("History Server started on", Times.format(info.getStartedOn()));
  return InfoBlock.class;
}
 
Example 8
Source Project: XLearning   Source File: InfoPage.java    License: Apache License 2.0 4 votes vote down vote up
@Override
protected Class<? extends SubView> nav() {
  return NavBlock.class;
}
 
Example 9
Source Project: big-c   Source File: InfoPage.java    License: Apache License 2.0 4 votes vote down vote up
@Override protected Class<? extends SubView> content() {
  return InfoBlock.class;
}
 
Example 10
Source Project: big-c   Source File: ContainerPage.java    License: Apache License 2.0 4 votes vote down vote up
@Override
protected Class<? extends SubView> content() {
  return ContainerBlock.class;
}
 
Example 11
Source Project: hadoop   Source File: TwoColumnLayout.java    License: Apache License 2.0 4 votes vote down vote up
/**
 * @return the class that will render the header of the page.
 */
protected Class<? extends SubView> header() {
  return HeaderBlock.class;
}
 
Example 12
Source Project: hadoop   Source File: TwoColumnLayout.java    License: Apache License 2.0 4 votes vote down vote up
/**
 * @return the class that will render the content of the page.
 */
protected Class<? extends SubView> content() {
  return LipsumBlock.class;
}
 
Example 13
Source Project: hadoop   Source File: TwoColumnLayout.java    License: Apache License 2.0 4 votes vote down vote up
/**
 * @return the class that will render the navigation bar.
 */
protected Class<? extends SubView> nav() {
  return NavBlock.class;
}
 
Example 14
Source Project: hadoop   Source File: TwoColumnLayout.java    License: Apache License 2.0 4 votes vote down vote up
/**
 * @return the class that will render the footer.
 */
protected Class<? extends SubView> footer() {
  return FooterBlock.class;
}
 
Example 15
Source Project: big-c   Source File: ContainerLogsPage.java    License: Apache License 2.0 4 votes vote down vote up
@Override
protected Class<? extends SubView> content() {
  return ContainersLogsBlock.class;
}
 
Example 16
Source Project: hadoop   Source File: TwoColumnCssLayout.java    License: Apache License 2.0 4 votes vote down vote up
protected Class<? extends SubView> header() {
  return HeaderBlock.class;
}
 
Example 17
Source Project: hadoop   Source File: TwoColumnCssLayout.java    License: Apache License 2.0 4 votes vote down vote up
protected Class<? extends SubView> content() {
  return LipsumBlock.class;
}
 
Example 18
Source Project: hadoop   Source File: TwoColumnCssLayout.java    License: Apache License 2.0 4 votes vote down vote up
protected Class<? extends SubView> nav() {
  return NavBlock.class;
}
 
Example 19
Source Project: hadoop   Source File: TwoColumnCssLayout.java    License: Apache License 2.0 4 votes vote down vote up
protected Class<? extends SubView> footer() {
  return FooterBlock.class;
}
 
Example 20
Source Project: big-c   Source File: AHSView.java    License: Apache License 2.0 4 votes vote down vote up
@Override
protected Class<? extends SubView> nav() {
  return NavBlock.class;
}
 
Example 21
Source Project: hadoop   Source File: AggregatedLogsPage.java    License: Apache License 2.0 4 votes vote down vote up
@Override
protected Class<? extends SubView> content() {
  return AggregatedLogsBlock.class;
}
 
Example 22
Source Project: hadoop   Source File: AggregatedLogsPage.java    License: Apache License 2.0 4 votes vote down vote up
@Override
protected Class<? extends SubView> nav() {
  return AggregatedLogsNavBlock.class;
}
 
Example 23
Source Project: big-c   Source File: SCMOverviewPage.java    License: Apache License 2.0 4 votes vote down vote up
@Override
protected Class<? extends SubView> nav() {
  return SCMOverviewNavBlock.class;
}
 
Example 24
Source Project: hadoop   Source File: HamletImpl.java    License: Apache License 2.0 4 votes vote down vote up
protected void _v(Class<? extends SubView> cls) {
  closeAttrs();
  subView(cls);
}
 
Example 25
Source Project: hadoop   Source File: WebAppTests.java    License: Apache License 2.0 4 votes vote down vote up
public static <T> Injector testBlock(Class<? extends SubView> block) {
  return testBlock(block, null, null);
}
 
Example 26
Source Project: hadoop   Source File: SCMOverviewPage.java    License: Apache License 2.0 4 votes vote down vote up
@Override protected Class<? extends SubView> content() {
  return SCMOverviewBlock.class;
}
 
Example 27
Source Project: hadoop   Source File: SCMOverviewPage.java    License: Apache License 2.0 4 votes vote down vote up
@Override
protected Class<? extends SubView> nav() {
  return SCMOverviewNavBlock.class;
}
 
Example 28
Source Project: hadoop   Source File: AllApplicationsPage.java    License: Apache License 2.0 4 votes vote down vote up
@Override
protected Class<? extends SubView> content() {
  return AllApplicationsBlock.class;
}
 
Example 29
Source Project: hadoop   Source File: ApplicationPage.java    License: Apache License 2.0 4 votes vote down vote up
@Override
protected Class<? extends SubView> content() {
  return ApplicationBlock.class;
}
 
Example 30
Source Project: hadoop   Source File: AllContainersPage.java    License: Apache License 2.0 4 votes vote down vote up
@Override
protected Class<? extends SubView> content() {
  return AllContainersBlock.class;
}