Examples of DataNodeProperties


Examples of org.apache.hadoop.hdfs.MiniDFSCluster.DataNodeProperties

      DFSOutputStream dfso = (DFSOutputStream)stm.getWrappedStream();
      dfso.abortForTests();

      // close the primary DN
      DataNodeProperties badDN = cluster.stopDataNode(0);

      // Truncate the block on the primary DN
      corruptDataNode(0, corrupt);

      // Start the DN back up
View Full Code Here

Examples of org.apache.hadoop.hdfs.MiniDFSCluster.DataNodeProperties

      DFSOutputStream dfso = (DFSOutputStream)stm.getWrappedStream();
      dfso.abortForTests();

      // close the DNs
      DataNodeProperties badDN = cluster.stopDataNode(0);
      DataNodeProperties badDN2 = cluster.stopDataNode(0); // what was 1 is now 0
      assertNotNull(badDN);
      assertNotNull(badDN2);

      // Truncate one of them as if its journal got corrupted
      corruptDataNode(0, CorruptionType.TRUNCATE_BLOCK_HALF);
View Full Code Here

Examples of org.apache.hadoop.hdfs.MiniDFSCluster.DataNodeProperties

    assertTrue("Need DFSOutputStream.getPipeline() for this test",
                getPipeline != null);
    Object repl = getPipeline.invoke(stm, new Object []{} /*NO_ARGS*/);
    DatanodeInfo[] pipeline = (DatanodeInfo[]) repl;
    assertTrue(pipeline.length == fs.getDefaultReplication());
    DataNodeProperties dnprop = dfsCluster.stopDataNode(pipeline[0].getName());
    assertTrue(dnprop != null);

    // this write should succeed, but trigger a log roll
    writeData(table, 2);
    long newFilenum = log.getFilenum();
View Full Code Here

Examples of org.apache.hadoop.hdfs.MiniDFSCluster.DataNodeProperties

      ExtendedBlock block = DFSTestUtil.getFirstBlock(fs, filePath);
      assertTrue(MiniDFSCluster.changeGenStampOfBlock(0, block, 900));
     
      // Stop the DN so the replica with the changed gen stamp will be reported
      // when this DN starts up.
      DataNodeProperties dnProps = cluster.stopDataNode(0);
     
      // Restart the namenode so that when the DN comes up it will see an initial
      // block report.
      cluster.restartNameNode(1, false);
      assertTrue(cluster.restartDataNode(dnProps, true));
View Full Code Here

Examples of org.apache.hadoop.hdfs.MiniDFSCluster.DataNodeProperties

  }
 
  private static boolean wipeAndRestartDn(MiniDFSCluster cluster, int dnIndex)
      throws IOException {
    // stop the DN, reformat it, then start it again with the same xfer port.
    DataNodeProperties dnProps = cluster.stopDataNode(dnIndex);
    cluster.formatDataNodeDirs();
    return cluster.restartDataNode(dnProps, true);
  }
View Full Code Here

Examples of org.apache.hadoop.hdfs.MiniDFSCluster.DataNodeProperties

      DFSTestUtil.waitReplication(fs, fileName, (short)3);
     
      // corrupt the block on datanode 0
      ExtendedBlock block = DFSTestUtil.getFirstBlock(fs, fileName);
      assertTrue(TestDatanodeBlockScanner.corruptReplica(block, 0));
      DataNodeProperties dnProps = cluster.stopDataNode(0);
      // remove block scanner log to trigger block scanning
      File scanLog = new File(MiniDFSCluster.getFinalizedDir(
          cluster.getInstanceStorageDir(0, 0),
          cluster.getNamesystem().getBlockPoolId()).getParent().toString()
          + "/../dncp_block_verification.log.prev");
View Full Code Here

Examples of org.apache.hadoop.hdfs.MiniDFSCluster.DataNodeProperties

     
      DFSOutputStream dfso = (DFSOutputStream)stm.getWrappedStream();
      dfso.abortForTests();
     
      // close the primary DN
      DataNodeProperties badDN = cluster.stopDataNode(0);
     
      // Truncate the block on the primary DN
      corruptDataNode(0, corrupt);

      // Start the DN back up
View Full Code Here

Examples of org.apache.hadoop.hdfs.MiniDFSCluster.DataNodeProperties

     
      DFSOutputStream dfso = (DFSOutputStream)stm.getWrappedStream();
      dfso.abortForTests();
     
      // close the DNs
      DataNodeProperties badDN = cluster.stopDataNode(0);
      DataNodeProperties badDN2 = cluster.stopDataNode(0); // what was 1 is now 0
      assertNotNull(badDN);
      assertNotNull(badDN2);
     
      // Truncate one of them as if its journal got corrupted
      corruptDataNode(0, CorruptionType.TRUNCATE_BLOCK_HALF);
View Full Code Here

Examples of org.apache.hadoop.hdfs.MiniDFSCluster.DataNodeProperties

      DFSTestUtil.waitReplication(fs, fileName, (short)3);
     
      // corrupt the block on datanode 0
      ExtendedBlock block = DFSTestUtil.getFirstBlock(fs, fileName);
      assertTrue(TestDatanodeBlockScanner.corruptReplica(block, 0));
      DataNodeProperties dnProps = cluster.stopDataNode(0);
      // remove block scanner log to trigger block scanning
      File scanLog = new File(MiniDFSCluster.getFinalizedDir(
          cluster.getInstanceStorageDir(0, 0),
          cluster.getNamesystem().getBlockPoolId()).getParent().toString()
          + "/../dncp_block_verification.log.prev");
View Full Code Here

Examples of org.apache.hadoop.hdfs.MiniDFSCluster.DataNodeProperties

      cluster.startDataNodes(conf, 2, true, null, null);
      cluster.waitActive();
     
      // bring down first datanode
      DatanodeDescriptor datanode = datanodes[0];
      DataNodeProperties dnprop = cluster.stopDataNode(datanode.getName());
      // make sure that NN detects that the datanode is down
      synchronized (namesystem.heartbeats) {
        datanode.setLastUpdate(0); // mark it dead
        namesystem.heartbeatCheck();
      }
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.