Package org.apache.hadoop.hdfs.server.datanode

Examples of org.apache.hadoop.hdfs.server.datanode.FSDataset.updateBlock()


        DataNode datanode = cluster.getDataNode(datanodeinfo.ipcPort);
        FSDataset dataset = (FSDataset)datanode.data;
        Block b = dataset.getStoredBlock(nsId, locatedblock.getBlock().getBlockId());
        Block newBlock = new Block(b);
        newBlock.setGenerationStamp(6661);
        dataset.updateBlock(nsId, b, newBlock);

        Block newBlock1 = new Block(b);
        newBlock1.setGenerationStamp(6662);
        boolean hitException = false;
        try {
View Full Code Here


        Block newBlock1 = new Block(b);
        newBlock1.setGenerationStamp(6662);
        boolean hitException = false;
        try {
          dataset.updateBlock(nsId, b, newBlock1);
        } catch (IOException e) {
          hitException = true;
        }
        TestCase.assertTrue("Shouldn't allow update block when generation doesn't match", hitException);
        dataset.updateBlock(nsId, newBlock, newBlock1);
View Full Code Here

          dataset.updateBlock(nsId, b, newBlock1);
        } catch (IOException e) {
          hitException = true;
        }
        TestCase.assertTrue("Shouldn't allow update block when generation doesn't match", hitException);
        dataset.updateBlock(nsId, newBlock, newBlock1);
      }
    } finally {
      IOUtils.closeStream(dfs);
      cluster.shutdown();
    }
View Full Code Here

        DataNode datanode = cluster.getDataNode(datanodeinfo.ipcPort);
        FSDataset dataset = (FSDataset)datanode.data;
        Block b = dataset.getStoredBlock(nsId, locatedblock.getBlock().getBlockId());
        Block newBlock = new Block(b);
        newBlock.setGenerationStamp(6661);
        dataset.updateBlock(nsId, b, newBlock);

        Block newBlock1 = new Block(b);
        newBlock1.setGenerationStamp(6662);
        boolean hitException = false;
        try {
View Full Code Here

        Block newBlock1 = new Block(b);
        newBlock1.setGenerationStamp(6662);
        boolean hitException = false;
        try {
          dataset.updateBlock(nsId, b, newBlock1);
        } catch (IOException e) {
          hitException = true;
        }
        TestCase.assertTrue("Shouldn't allow update block when generation doesn't match", hitException);
        dataset.updateBlock(nsId, newBlock, newBlock1);
View Full Code Here

          dataset.updateBlock(nsId, b, newBlock1);
        } catch (IOException e) {
          hitException = true;
        }
        TestCase.assertTrue("Shouldn't allow update block when generation doesn't match", hitException);
        dataset.updateBlock(nsId, newBlock, newBlock1);
      }
    } finally {
      IOUtils.closeStream(dfs);
      cluster.shutdown();
    }
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.