Examples of injectBlocks()


Examples of org.apache.hadoop.dfs.SimulatedFSDataset.injectBlocks()

    // Inject blocks
    // Now reset fsdataset with an initial block report (Use the blocks we got above)
 
  
    SimulatedFSDataset sfsdataset = new SimulatedFSDataset(conf);
    sfsdataset.injectBlocks(blockReport);
    blockReport = sfsdataset.getBlockReport();
    assertEquals(NUMBLOCKS, blockReport.length);
    for (Block b: blockReport) {
      assertNotNull(b);
      assertEquals(blockIdToLen(b.blkid), b.len);
View Full Code Here

Examples of org.apache.hadoop.dfs.SimulatedFSDataset.injectBlocks()

    conf.setLong(SimulatedFSDataset.CONFIG_PROPERTY_CAPACITY, 10);
   
    try {
      sfsdataset = new SimulatedFSDataset(conf);
      sfsdataset.injectBlocks(blockReport);
      assertTrue("Expected an IO exception", false);
    } catch (IOException e) {
      // ok - as expected
    }
View Full Code Here

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

          // redistribute blocks
          final Block[][] blocksDN = TestBalancer.distributeBlocks(
              blocks[n], s.replication, distributionPerNN);
   
          for(int d = 0; d < blocksDN.length; d++)
            cluster.injectBlocks(n, d, Arrays.asList(blocksDN[d]));

          LOG.info("UNEVEN 13: n=" + n);
        }
   
        final long totalCapacity = TestBalancer.sum(capacities);
View Full Code Here

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

          // redistribute blocks
          final Block[][] blocksDN = TestBalancer.distributeBlocks(
              blocks[n], s.replication, distributionPerNN);
   
          for(int d = 0; d < blocksDN.length; d++)
            cluster.injectBlocks(n, d, Arrays.asList(blocksDN[d]));

          LOG.info("UNEVEN 13: n=" + n);
        }
   
        final long totalCapacity = TestBalancer.sum(capacities);
View Full Code Here

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

          // redistribute blocks
          final Block[][] blocksDN = TestBalancer.distributeBlocks(
              blocks[n], s.replication, distributionPerNN);
   
          for(int d = 0; d < blocksDN.length; d++)
            cluster.injectBlocks(n, d, Arrays.asList(blocksDN[d]));

          LOG.info("UNEVEN 13: n=" + n);
        }
   
        final long totalCapacity = TestBalancer.sum(capacities);
View Full Code Here

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

          // redistribute blocks
          final Block[][] blocksDN = TestBalancer.distributeBlocks(
              blocks[n], s.replication, distributionPerNN);
   
          for(int d = 0; d < blocksDN.length; d++)
            cluster.injectBlocks(n, d, Arrays.asList(blocksDN[d]));

          LOG.info("UNEVEN 13: n=" + n);
        }
   
        final long totalCapacity = TestBalancer.sum(capacities);
View Full Code Here

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

          // redistribute blocks
          final Block[][] blocksDN = TestBalancer.distributeBlocks(
              blocks[n], s.replication, distributionPerNN);
   
          for(int d = 0; d < blocksDN.length; d++)
            cluster.injectBlocks(n, d, Arrays.asList(blocksDN[d]));

          LOG.info("UNEVEN 13: n=" + n);
        }
   
        final long totalCapacity = TestBalancer.sum(capacities);
View Full Code Here

Examples of org.apache.hadoop.hdfs.server.datanode.SimulatedFSDataset.injectBlocks()

    FSDatasetInterface dataSet = dataNodes.get(dataNodeIndex).datanode.getFSDataset();
    if (!(dataSet instanceof SimulatedFSDataset)) {
      throw new IOException("injectBlocks is valid only for SimilatedFSDataset");
    }
    SimulatedFSDataset sdataset = (SimulatedFSDataset) dataSet;
    sdataset.injectBlocks(blocksToInject);
    dataNodes.get(dataNodeIndex).datanode.scheduleBlockReport(0);
  }
 
  /**
   * This method is valid only if the data nodes have simulated data
View Full Code Here

Examples of org.apache.hadoop.hdfs.server.datanode.SimulatedFSDataset.injectBlocks()

    FSDatasetInterface dataSet = dataNodes.get(dataNodeIndex).datanode.getFSDataset();
    if (!(dataSet instanceof SimulatedFSDataset)) {
      throw new IOException("injectBlocks is valid only for SimilatedFSDataset");
    }
    SimulatedFSDataset sdataset = (SimulatedFSDataset) dataSet;
    sdataset.injectBlocks(blocksToInject);
    dataNodes.get(dataNodeIndex).datanode.scheduleBlockReport(0);
  }
 
  /**
   * This method is valid only if the the data nodes have simulated data
View Full Code Here

Examples of org.apache.hadoop.hdfs.server.datanode.SimulatedFSDataset.injectBlocks()

    FSDatasetInterface dataSet = dataNodes.get(dataNodeIndex).datanode.getFSDataset();
    if (!(dataSet instanceof SimulatedFSDataset)) {
      throw new IOException("injectBlocks is valid only for SimilatedFSDataset");
    }
    SimulatedFSDataset sdataset = (SimulatedFSDataset) dataSet;
    sdataset.injectBlocks(getNameNode().getNamespaceID(), blocksToInject);
    dataNodes.get(dataNodeIndex).datanode.scheduleNSBlockReport(0);
  }
 
  /**
   * This method is valid only if the data nodes have simulated data
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.