Examples of rollEditLog()


Examples of org.apache.hadoop.hdfs.DistributedFileSystem.rollEditLog()

    if (dfs == null) {
      System.err.println("FileSystem is " + getFS().getUri());
      return exitCode;
    }

    dfs.rollEditLog();
    exitCode = 0;
  
    return exitCode;
  }
View Full Code Here

Examples of org.apache.hadoop.hdfs.server.protocol.NamenodeProtocol.rollEditLog()

            force, interactive)) {
      return ERR_CODE_ALREADY_FORMATTED;
    }

    // Force the active to roll its log
    CheckpointSignature csig = proxy.rollEditLog();
    long imageTxId = csig.getMostRecentCheckpointTxId();
    long rollTxId = csig.getCurSegmentTxId();


    // Format the storage (writes VERSION file)
View Full Code Here

Examples of org.apache.hadoop.hdfs.server.protocol.NamenodeProtocols.rollEditLog()

      URL fsName = DFSUtil.getInfoServer(
          cluster.getNameNode().getServiceRpcAddress(), conf,
          DFSUtil.getHttpClientScheme(conf)).toURL();

      // Make a finalized log on the server side.
      nn.rollEditLog();
      RemoteEditLogManifest manifest = nn.getEditLogManifest(1);
      RemoteEditLog log = manifest.getLogs().get(0);
     
      NNStorage dstImage = Mockito.mock(NNStorage.class);
      Mockito.doReturn(Lists.newArrayList(new File("/wont-be-written")))
View Full Code Here

Examples of org.apache.hadoop.hdfs.server.protocol.NamenodeProtocols.rollEditLog()

          new File(sd1.getCurrentDir(), NNStorage.getImageFileName(2)));
     
      // Restore the good dir
      FileUtil.setExecutable(currentDir, true);
      nn.restoreFailedStorage("true");
      nn.rollEditLog();

      // Checkpoint again -- this should upload to both dirs
      secondary.doCheckpoint();
     
      assertNNHasCheckpoints(cluster, ImmutableList.of(8));
View Full Code Here

Examples of org.apache.hadoop.hdfs.server.protocol.NamenodeProtocols.rollEditLog()

      }
     
      // Restore the good dir
      assertEquals(0, FileUtil.chmod(currentDir.getAbsolutePath(), "755"));
      nn.restoreFailedStorage("true");
      nn.rollEditLog();

      // Checkpoint again -- this should upload to the restored name dir
      secondary.doCheckpoint();
     
      assertNNHasCheckpoints(cluster, ImmutableList.of(8));
View Full Code Here

Examples of org.apache.hadoop.hdfs.server.protocol.NamenodeProtocols.rollEditLog()

      NamenodeProtocols nnRpc = nn.getRpcServer();

      secondary = startSecondaryNameNode(conf);
      // prepare checkpoint image
      secondary.doCheckpoint();
      CheckpointSignature sig = nnRpc.rollEditLog();
      // manipulate the CheckpointSignature fields
      sig.setBlockpoolID("somerandomebpid");
      sig.clusterID = "somerandomcid";
      try {
        sig.validateStorageInfo(nn.getFSImage()); // this should fail
View Full Code Here

Examples of org.apache.hadoop.hdfs.server.protocol.NamenodeProtocols.rollEditLog()

    NamenodeProtocols nnRpc = nn.getRpcServer();

    SecondaryNameNode secondary = startSecondaryNameNode(conf);
    // prepare checkpoint image
    secondary.doCheckpoint();
    CheckpointSignature sig = nnRpc.rollEditLog();
    // manipulate the CheckpointSignature fields
    sig.setBlockpoolID("somerandomebpid");
    sig.clusterID = "somerandomcid";
    try {
      sig.validateStorageInfo(nn.getFSImage()); // this should fail
View Full Code Here

Examples of org.apache.hadoop.hdfs.server.protocol.NamenodeProtocols.rollEditLog()

      NamenodeProtocols nn = cluster.getNameNodeRpc();
      String fsName = NetUtils.getHostPortString(
          cluster.getNameNode().getHttpAddress());

      // Make a finalized log on the server side.
      nn.rollEditLog();
      RemoteEditLogManifest manifest = nn.getEditLogManifest(1);
      RemoteEditLog log = manifest.getLogs().get(0);
     
      NNStorage dstImage = Mockito.mock(NNStorage.class);
      Mockito.doReturn(Lists.newArrayList(new File("/wont-be-written")))
View Full Code Here

Examples of org.apache.hadoop.hdfs.server.protocol.NamenodeProtocols.rollEditLog()

          new File(sd1.getCurrentDir(), NNStorage.getImageFileName(2)));
     
      // Restore the good dir
      currentDir.setExecutable(true);
      nn.restoreFailedStorage("true");
      nn.rollEditLog();

      // Checkpoint again -- this should upload to both dirs
      secondary.doCheckpoint();
     
      assertNNHasCheckpoints(cluster, ImmutableList.of(8));
View Full Code Here

Examples of org.apache.hadoop.hdfs.server.protocol.NamenodeProtocols.rollEditLog()

      }
     
      // Restore the good dir
      currentDir.setExecutable(true);
      nn.restoreFailedStorage("true");
      nn.rollEditLog();

      // Checkpoint again -- this should upload to the restored name dir
      secondary.doCheckpoint();
     
      assertNNHasCheckpoints(cluster, ImmutableList.of(8));
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.