Examples of MasterStatusTmpl


Examples of com.alibaba.wasp.tmpl.master.MasterStatusTmpl

    List<ServerName> servers = master.getFServerManager()
        .getOnlineServersList();
    Set<ServerName> deadServers = master.getFServerManager().getDeadServers();

    response.setContentType("text/html");
    MasterStatusTmpl tmpl = new MasterStatusTmpl()
        .setShowAppendWarning(shouldShowAppendWarning(conf))
        .setServers(servers).setDeadServers(deadServers);
    if (request.getParameter("filter") != null)
      tmpl.setFilter(request.getParameter("filter"));
    if (request.getParameter("format") != null)
      tmpl.setFormat(request.getParameter("format"));
    tmpl.render(response.getWriter(), master, admin);
  }
View Full Code Here

Examples of org.apache.hadoop.hbase.tmpl.master.MasterStatusTmpl

    Mockito.doReturn(tables).when(admin).listTables();
  }
 
  @Test
  public void testStatusTemplateNoTables() throws IOException {
    new MasterStatusTmpl().render(new StringWriter(),
        master, admin);
  }
View Full Code Here

Examples of org.apache.hadoop.hbase.tmpl.master.MasterStatusTmpl

        master, admin);
  }
 
  @Test
  public void testStatusTemplateRootAvailable() throws IOException {
    new MasterStatusTmpl()
      .setRootLocation(new ServerName("rootserver:123,12345"))
      .render(new StringWriter(),
        master, admin);
  }
View Full Code Here

Examples of org.apache.hadoop.hbase.tmpl.master.MasterStatusTmpl

 
  @Test
  public void testStatusTemplateRootAndMetaAvailable() throws IOException {
    setupMockTables();
   
    new MasterStatusTmpl()
      .setRootLocation(new ServerName("rootserver:123,12345"))
      .setMetaLocation(new ServerName("metaserver:123,12345"))
      .render(new StringWriter(),
        master, admin);
  }
View Full Code Here

Examples of org.apache.hadoop.hbase.tmpl.master.MasterStatusTmpl

        Lists.newArrayList(
        new ServerName("badserver:123,12345"),
        new ServerName("uglyserver:123,12345"))
    );

    new MasterStatusTmpl()
      .setRootLocation(new ServerName("rootserver:123,12345"))
      .setMetaLocation(new ServerName("metaserver:123,12345"))
      .setServers(servers)
      .setDeadServers(deadServers)
      .render(new StringWriter(),
View Full Code Here

Examples of org.apache.hadoop.hbase.tmpl.master.MasterStatusTmpl

      servers = master.getServerManager().getOnlineServersList();
      deadServers = master.getServerManager().getDeadServers();
    }

    response.setContentType("text/html");
    MasterStatusTmpl tmpl = new MasterStatusTmpl()
      .setFrags(frags)
      .setShowAppendWarning(shouldShowAppendWarning(conf))
      .setRootLocation(rootLocation)
      .setMetaLocation(metaLocation)
      .setServers(servers)
      .setDeadServers(deadServers);
    if (request.getParameter("filter") != null)
      tmpl.setFilter(request.getParameter("filter"));
    if (request.getParameter("format") != null)
      tmpl.setFormat(request.getParameter("format"));
    tmpl.render(response.getWriter(),
          master, admin);
  }
View Full Code Here

Examples of org.apache.hadoop.hbase.tmpl.master.MasterStatusTmpl

    Mockito.doReturn(tables).when(admin).listTables();
  }
 
  @Test
  public void testStatusTemplateNoTables() throws IOException {
    new MasterStatusTmpl().render(new StringWriter(),
        master, admin);
  }
View Full Code Here

Examples of org.apache.hadoop.hbase.tmpl.master.MasterStatusTmpl

  @Test
  public void testStatusTemplateMetaAvailable() throws IOException {
    setupMockTables();
   
    new MasterStatusTmpl()
      .setMetaLocation(new ServerName("metaserver:123,12345"))
      .render(new StringWriter(),
        master, admin);
  }
View Full Code Here

Examples of org.apache.hadoop.hbase.tmpl.master.MasterStatusTmpl

        Lists.newArrayList(
        new ServerName("badserver:123,12345"),
        new ServerName("uglyserver:123,12345"))
    );

    new MasterStatusTmpl()
      .setMetaLocation(new ServerName("metaserver:123,12345"))
      .setServers(servers)
      .setDeadServers(deadServers)
      .render(new StringWriter(),
        master, admin);
View Full Code Here

Examples of org.apache.hadoop.hbase.tmpl.master.MasterStatusTmpl

    Mockito.doReturn(tables).when(admin).listTables();
  }
 
  @Test
  public void testStatusTemplateNoTables() throws IOException {
    new MasterStatusTmpl().render(new StringWriter(),
        master, admin);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.