Package org.apache.hadoop.hdfs.server.namenode

Examples of org.apache.hadoop.hdfs.server.namenode.StandbySafeMode


    h.setIgnoreDatanodes(false);
    // Create test files.
    createTestFiles("/testDeadDatanodeFailover");
    cluster.shutDownDataNode(0);
    FSNamesystem ns = cluster.getStandbyAvatar(0).avatar.namesystem;
    StandbySafeMode safeMode = cluster.getStandbyAvatar(0).avatar.getStandbySafeMode();
    new ExitSafeMode(safeMode, ns).start();
    cluster.failOver();
    // One datanode should be removed after failover
    assertEquals(2,
        cluster.getPrimaryAvatar(0).avatar.namesystem
View Full Code Here


    h.setIgnoreDatanodes(false);
    // Create test files.
    createTestFiles("/testDeadDatanodeFailover");
    cluster.shutDownDataNode(0);
    FSNamesystem ns = cluster.getStandbyAvatar(0).avatar.namesystem;
    StandbySafeMode safeMode = cluster.getStandbyAvatar(0).avatar.getStandbySafeMode();
    new ExitSafeMode(safeMode, ns).start();
    cluster.failOver();
    // One datanode should be removed after failover
    assertEquals(2,
        cluster.getPrimaryAvatar(0).avatar.namesystem
View Full Code Here

    fsn.writeLock();
    // We need to capture all information under a namesystem lock, since we
    // might leave safemode and the safemode object might be set to null.
    try {
      isStandby = (nn.reportAvatar() == Avatar.STANDBY);
      StandbySafeMode sm = nn.getStandbySafeMode();
      if (sm == null && isStandby) {
        msg = standbyNull;
      } else if (sm == null) {
        msg = notStandby;
      } else {
        isFailover = sm.failoverInProgress();
        heartbeats = sm.getOutStandingHeartbeats();
        reports = sm.getOutStandingReports();
      }
    } finally {
      fsn.writeUnlock();
    }
View Full Code Here

TOP

Related Classes of org.apache.hadoop.hdfs.server.namenode.StandbySafeMode

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.