Package org.apache.hadoop.hdfs

Examples of org.apache.hadoop.hdfs.MiniAvatarCluster.shutDown()


      List<AvatarDataNode> datanodes = cluster.getDataNodes();
      Assert.assertEquals(datanodes.size(), 1);
      checkMXBean(datanodes.get(0));
    } finally {
      if (cluster != null) {
        cluster.shutDown();
      }
      MiniAvatarCluster.shutDownZooKeeper();
    }
  }
 
View Full Code Here


      setupAddress(conf2, new int[]{0,2,3});
      dn.refreshNamenodes(conf2);
      waitDataNodeInitialized(dn);
      compareAddress(cluster, dn, nns);
    } finally {
      cluster.shutDown();
    }
  }

  @AfterClass
  public static void shutDownClass() throws Exception {
View Full Code Here

      setupAddress(conf2, new int[]{0,2,3});
      dn.refreshNamenodes(conf2);
      waitDataNodeInitialized(dn);
      compareAddress(cluster, dn, nns);
    } finally {
      cluster.shutDown();
    }
  }

  @AfterClass
  public static void shutDownClass() throws Exception {
View Full Code Here

      assertEquals("wrong nn address", nsos2.getNNSocketAddress(),
          nn2zero.getNameNodeDNAddress());
      assertEquals("wrong nsid", nsos1.getNamespaceId(), ns1zero);
      assertEquals("wrong nsid", nsos2.getNamespaceId(), ns2zero);
    } finally {
      cluster.shutDown();
    }
  }

  /**
   * starts single nn and single dn and verifies registration and handshake
View Full Code Here

      nsos1.scheduleBlockReport(0);

      assertEquals("wrong nn address", nsos1.getNNSocketAddress(),
          nn1zero.getNameNodeDNAddress());
      assertEquals("wrong nsid", nsos1.getNamespaceId(), nsid1zero);
      cluster.shutDown();
     
      // Ensure all the BPOfferService threads are shutdown
      assertEquals(0, dn.getAllNamespaceServices().length);
      cluster = null;
    } finally {
View Full Code Here

      // Ensure all the BPOfferService threads are shutdown
      assertEquals(0, dn.getAllNamespaceServices().length);
      cluster = null;
    } finally {
      if (cluster != null) {
        cluster.shutDown();
      }
    }
  }
 
  @Test
View Full Code Here

    Assert.assertEquals("(1)Should be 2 namenodes", 2, cluster.getNumNameNodes());
   
    // add a node
    cluster.addNameNode(conf);
    Assert.assertEquals("(1)Should be 3 namenodes", 3, cluster.getNumNameNodes());
    cluster.shutDown();
       
    // 2. start with Federation flag set
    conf = new Configuration();
    cluster = new MiniAvatarCluster(conf, 1, true, null, null, 1, true);
    Assert.assertNotNull(cluster);
View Full Code Here

    Assert.assertEquals("(2)Should be 1 namenodes", 1, cluster.getNumNameNodes());
   
    // add a node
    cluster.addNameNode(conf);  
    Assert.assertEquals("(2)Should be 2 namenodes", 2, cluster.getNumNameNodes());
    cluster.shutDown();

    // 3. start non-federated
    conf = new Configuration();
    cluster = new MiniAvatarCluster(conf, 1, true, null, null);
    Assert.assertNotNull(cluster);
View Full Code Here

    } catch (IOException e) {
      // correct
      Assert.assertTrue(e.getMessage().startsWith("cannot add namenode"));
      Assert.assertEquals("(3)Should be 1 namenodes", 1, cluster.getNumNameNodes());
    } finally {
      cluster.shutDown();
    }
  }
 
  /**
   * Test that file data becomes available before file is closed.
View Full Code Here

          assertEquals(SimulatedFSDataset.DEFAULT_CAPACITY-fileSize*(i+1),
              dn.getFSDataset().getRemaining());
        }
      }
    } finally {
      cluster.shutDown();
    }
  }
 
  /**
   * Test that file data becomes available before file is closed.
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.