Package org.apache.hadoop.hdfs.MiniAvatarCluster

Examples of org.apache.hadoop.hdfs.MiniAvatarCluster.NameNodeInfo


  @Test
  public void testRuntimeDisallowedDatanodeShutdown() throws Exception {
    setUp();
    LOG.info("Update include file to not include datanode");
    NameNodeInfo nni = cluster.getNameNode(0);
    writeWrongIncludeFile(nni.conf);
    LOG.info("RefreshNodes with include file without datanode's hostname.");
    nni.avatars.get(0).avatar.namesystem.refreshNodes(nni.conf);
    nni.avatars.get(1).avatar.namesystem.refreshNodes(nni.conf);
    DataNodeProperties dnProp = cluster.getDataNodeProperties().get(0);
View Full Code Here


 
  @Test
  public void testStartupDisallowedDatanodeShutdown() throws Exception {
    setUp();
    LOG.info("Update include file to not include datanode");
    NameNodeInfo nni = cluster.getNameNode(0);
    writeWrongIncludeFile(nni.conf);
    LOG.info("Refresh hostReader internally with include file");
    nni.avatars.get(0).avatar.namesystem.getHostReader().refresh();
    nni.avatars.get(1).avatar.namesystem.getHostReader().refresh();
    LOG.info("Restart the datanode.");
View Full Code Here

    return zkClient.getPrimarySsId(address);
  }

  private void verifyStartup(boolean federation, int index)
      throws Exception {
    NameNodeInfo nnInfo = cluster.getNameNode(index);
    String[] normalArgs = { AvatarConstants.StartupOption.NODEZERO.getName() };
    String[] federationArgs = {
        AvatarConstants.StartupOption.NODEZERO.getName(),
        StartupOption.SERVICE.getName(), nnInfo.nameserviceId };
    String[] args = (federation) ? federationArgs : normalArgs;
View Full Code Here

  @Test
  public void test2NNRegistration()
      throws IOException, ConfigException, InterruptedException{
    MiniAvatarCluster cluster = new MiniAvatarCluster(conf, 1, true, null, null, 2, true);
    try {
      NameNodeInfo nn1 = cluster.getNameNode(0);
      NameNodeInfo nn2 = cluster.getNameNode(1);
      AvatarNode nn1zero = nn1.avatars.get(0).avatar;
      AvatarNode nn1one = nn1.avatars.get(1).avatar;
      AvatarNode nn2zero = nn2.avatars.get(0).avatar;
      AvatarNode nn2one = nn2.avatars.get(1).avatar;
      assertNotNull("cannot create nn1 avatar 0", nn1zero);
View Full Code Here

  @Test
  public void testFedSingleNN()
      throws IOException, ConfigException, InterruptedException {
    MiniAvatarCluster cluster = new MiniAvatarCluster(conf, 1, true, null, null, 1, true);
    try {
      NameNodeInfo nn1 = cluster.getNameNode(0);
      AvatarNode nn1zero = nn1.avatars.get(0).avatar;
      AvatarNode nn1one = nn1.avatars.get(1).avatar;
      assertNotNull("cannot create nn1 zero", nn1zero);
      assertNotNull("cannot create nn1 one", nn1one);
View Full Code Here

  @Test
  public void testRuntimeDisallowedDatanodeShutdown() throws Exception {
    setUp("testRuntimeDisallowedDatanodeShutdown");
    LOG.info("Update include file to not include datanode");
    NameNodeInfo nni = cluster.getNameNode(0);
    writeWrongIncludeFile(nni.conf);
    LOG.info("RefreshNodes with include file without datanode's hostname.");
    nni.avatars.get(0).avatar.namesystem.refreshNodes(nni.conf);
    nni.avatars.get(1).avatar.namesystem.refreshNodes(nni.conf);
    DataNodeProperties dnProp = cluster.getDataNodeProperties().get(0);
View Full Code Here

 
  @Test
  public void testStartupDisallowedDatanodeShutdown() throws Exception {
    setUp("testStartupDisallowedDatanodeShutdown");
    LOG.info("Update include file to not include datanode");
    NameNodeInfo nni = cluster.getNameNode(0);
    writeWrongIncludeFile(nni.conf);
    LOG.info("Refresh hostReader internally with include file");
    nni.avatars.get(0).avatar.namesystem.getHostReader().refresh();
    nni.avatars.get(1).avatar.namesystem.getHostReader().refresh();
    LOG.info("Restart the datanode.");
View Full Code Here

  private void verifyStartup(boolean federation, int index,
      boolean singleStartup, boolean standby, boolean forceStartup)
      throws Exception {
    MiniAvatarCluster.instantiationRetries = 2;
    NameNodeInfo nnInfo = cluster.getNameNode(index);
    String instance = (!standby) ? AvatarConstants.StartupOption.NODEZERO
        .getName() : AvatarConstants.StartupOption.NODEONE.getName();
    String force = (forceStartup) ? AvatarConstants.StartupOption.FORCE
        .getName() : instance;
    String[] primaryArgs = { instance, force };
View Full Code Here

TOP

Related Classes of org.apache.hadoop.hdfs.MiniAvatarCluster.NameNodeInfo

Copyright © 2018 www.massapicom. 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.