Examples of BlockMetaDataInfo


Examples of org.apache.hadoop.hdfs.server.protocol.BlockMetaDataInfo

    Block stored = data.getStoredBlock(namespaceId, block.getBlockId());

    if (stored == null) {
      return null;
    }
    BlockMetaDataInfo info = new BlockMetaDataInfo(stored,
                                 blockScanner.getLastScanTime(namespaceId, stored));
    if (LOG.isDebugEnabled()) {
      LOG.debug("getBlockMetaDataInfo successful block=" + stored +
                " length " + stored.getNumBytes() +
                " genstamp " + stored.getGenerationStamp());
View Full Code Here

Examples of org.apache.hadoop.hdfs.server.protocol.BlockMetaDataInfo

      if (i < numblock - 1) {
        assertEquals(BLOCK_SIZE, size);
      }
      for(DatanodeInfo datanodeinfo : lb.getLocations()) {
        final DataNode dn = cluster.getDataNode(datanodeinfo.getIpcPort());
        final BlockMetaDataInfo metainfo = dn.getBlockMetaDataInfo(
            locatedblocks.getNamespaceID(), blk);
        assertEquals(size, metainfo.getNumBytes());
      }
    }
  }
View Full Code Here

Examples of org.apache.hadoop.hdfs.server.protocol.BlockMetaDataInfo

    Block stored = data.getStoredBlock(namespaceId, block.getBlockId());

    if (stored == null) {
      return null;
    }
    BlockMetaDataInfo info = new BlockMetaDataInfo(stored,
                                 blockScanner.getLastScanTime(namespaceId, stored));
    if (LOG.isDebugEnabled()) {
      LOG.debug("getBlockMetaDataInfo successful block=" + stored +
                " length " + stored.getNumBytes() +
                " genstamp " + stored.getGenerationStamp());
View Full Code Here

Examples of org.apache.hadoop.hdfs.server.protocol.BlockMetaDataInfo

* This tests InterDataNodeProtocol for block handling.
*/
public class TestInterDatanodeProtocol extends junit.framework.TestCase {
  public static void checkMetaInfo(int namespaceId, Block b, InterDatanodeProtocol idp,
      DataBlockScannerSet scanner) throws IOException {
    BlockMetaDataInfo metainfo = idp.getBlockMetaDataInfo(namespaceId, b);
    assertEquals(b.getBlockId(), metainfo.getBlockId());
    assertEquals(b.getNumBytes(), metainfo.getNumBytes());   
    if (scanner != null) {
      assertEquals(scanner.getLastScanTime(namespaceId, b),
          metainfo.getLastScanTime());
    }
  }
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.