Examples of transitionToStandby()


Examples of org.apache.hadoop.hdfs.MiniDFSCluster.transitionToStandby()

          nn1t1, nn1t1 > nn0t0);
         
      Thread.sleep(5); // make sure time advances!
     
      LOG.info("Failing over to NN 1");
      cluster.transitionToStandby(0);
      cluster.transitionToActive(1);
      long nn1t2 = NameNodeAdapter.getLeaseRenewalTime(nn1, TEST_FILE_STR);
      assertTrue("Lease should have been renewed by failover process",
          nn1t2 > nn1t1);
    } finally {
View Full Code Here

Examples of org.apache.hadoop.hdfs.MiniDFSCluster.transitionToStandby()

      String renewer = UserGroupInformation.getLoginUser().getUserName();
      Token<DelegationTokenIdentifier> token = nn1.getRpcServer()
          .getDelegationToken(new Text(renewer));

      LOG.info("Failing over to NN 1");
      cluster.transitionToStandby(0);
      cluster.transitionToActive(1);

      nn2.getRpcServer().renewDelegationToken(token);
      nn2.getRpcServer().cancelDelegationToken(token);
      token = nn2.getRpcServer().getDelegationToken(new Text(renewer));
View Full Code Here

Examples of org.apache.hadoop.hdfs.MiniDFSCluster.transitionToStandby()

      assertEquals("active", nn0.getHAState());
      assertEquals(0, nn0.getMillisSinceLastLoadedEdits());
      assertEquals("standby", nn1.getHAState());
      assertTrue(0 < nn1.getMillisSinceLastLoadedEdits());
     
      cluster.transitionToStandby(0);
      cluster.transitionToActive(1);
     
      assertEquals("standby", nn0.getHAState());
      assertTrue(0 < nn0.getMillisSinceLastLoadedEdits());
      assertEquals("active", nn1.getHAState());
View Full Code Here

Examples of org.apache.hadoop.hdfs.MiniDFSCluster.transitionToStandby()

      fs.mkdirs(new Path("/test1"));
      fs.mkdirs(new Path("/test2"));
     
      runFsck(conf);
     
      cluster.transitionToStandby(0);
      cluster.transitionToActive(1);
     
      runFsck(conf);
    } finally {
      if (fs != null) {
View Full Code Here

Examples of org.apache.hadoop.hdfs.MiniDFSCluster.transitionToStandby()

      // write another block and a half
      AppendTestUtil.write(stm, BLOCK_AND_A_HALF, BLOCK_AND_A_HALF);
      stm.hflush();
     
      LOG.info("Failing back to NN 0");
      cluster.transitionToStandby(1);
      cluster.transitionToActive(0);
     
      cluster.stopDataNode(1);
     
      AppendTestUtil.write(stm, BLOCK_AND_A_HALF*2, BLOCK_AND_A_HALF);
View Full Code Here

Examples of org.apache.hadoop.hdfs.MiniDFSCluster.transitionToStandby()

      AppendTestUtil.write(stm, 0, BLOCK_AND_A_HALF);
      stm.hflush();
     
      LOG.info("Failing over to NN 1");
     
      cluster.transitionToStandby(0);
      cluster.transitionToActive(1);
     
      assertTrue(fs.exists(TEST_PATH));

      FileSystem fsOtherUser = createFsAsOtherUser(cluster, conf);
View Full Code Here

Examples of org.apache.hadoop.hdfs.MiniDFSCluster.transitionToStandby()

     
      AppendTestUtil.check(fs, TEST_PATH, BLOCK_AND_A_HALF);
     
      // Fail back to ensure that the block locations weren't lost on the
      // original node.
      cluster.transitionToStandby(1);
      cluster.transitionToActive(0);
      AppendTestUtil.check(fs, TEST_PATH, BLOCK_AND_A_HALF);     
    } finally {
      IOUtils.closeStream(stm);
      cluster.shutdown();
View Full Code Here

Examples of org.apache.hadoop.hdfs.MiniDFSCluster.transitionToStandby()

      LOG.info("Waiting for commitBlockSynchronization call from primary");
      delayer.waitForCall();

      LOG.info("Failing over to NN 1");
     
      cluster.transitionToStandby(0);
      cluster.transitionToActive(1);
     
      // Let the commitBlockSynchronization call go through, and check that
      // it failed with the correct exception.
      delayer.proceed();
View Full Code Here

Examples of org.apache.hadoop.hdfs.MiniDFSCluster.transitionToStandby()

          cluster.getConfiguration(1));
      assertEquals(0, rc);
     
      // Now restart NN1 and make sure that we can do ops against that as well.
      cluster.restartNameNode(1);
      cluster.transitionToStandby(0);
      cluster.transitionToActive(1);
      assertTrue(fs.mkdirs(new Path("/foo4")));
     
      assertCTimesEqual(cluster);
     
View Full Code Here

Examples of org.apache.hadoop.hdfs.MiniDFSCluster.transitionToStandby()

      assertTrue(fs.mkdirs(new Path("/foo4")));
     
      assertCTimesEqual(cluster);
     
      // Now there's no active NN.
      cluster.transitionToStandby(1);

      try {
        runFinalizeCommand(cluster);
        fail("Should not have been able to finalize upgrade with no NN active");
      } catch (IOException ioe) {
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.