Java 类org.apache.hadoop.hdfs.server.protocol.BlockMetaDataInfo 实例源码

项目:hadoop-EAR    文件:DataNode.java   
/** {@inheritDoc} */
public BlockMetaDataInfo getBlockMetaDataInfo(int namespaceId, Block block
    ) throws IOException {
  if (LOG.isDebugEnabled()) {
    LOG.debug("block=" + block);
  }

  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());
  }

  // paranoia! verify that the contents of the stored block
  // matches the block file on disk.

  data.validateBlockMetadata(namespaceId, stored);
  return info;
}
项目:hadoop-on-lustre    文件:DataNode.java   
/** {@inheritDoc} */
public BlockMetaDataInfo getBlockMetaDataInfo(Block block
    ) throws IOException {
  if (LOG.isDebugEnabled()) {
    LOG.debug("block=" + block);
  }

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

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

  // paranoia! verify that the contents of the stored block
  // matches the block file on disk.
  data.validateBlockMetadata(stored);
  return info;
}
项目:RDFS    文件:DataNode.java   
/** {@inheritDoc} */
public BlockMetaDataInfo getBlockMetaDataInfo(int namespaceId, Block block
    ) throws IOException {
  if (LOG.isDebugEnabled()) {
    LOG.debug("block=" + block);
  }

  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());
  }

  // paranoia! verify that the contents of the stored block
  // matches the block file on disk.

  data.validateBlockMetadata(namespaceId, stored);
  return info;
}
项目:hadoop-0.20    文件:DataNode.java   
/** {@inheritDoc} */
public BlockMetaDataInfo getBlockMetaDataInfo(Block block
    ) throws IOException {
  if (LOG.isDebugEnabled()) {
    LOG.debug("block=" + block);
  }
  Block stored = data.getStoredBlock(block.getBlockId());

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

  // paranoia! verify that the contents of the stored block
  // matches the block file on disk.
  data.validateBlockMetadata(stored);
  return info;
}
项目:hortonworks-extension    文件:DataNode.java   
/** {@inheritDoc} */
public BlockMetaDataInfo getBlockMetaDataInfo(Block block
    ) throws IOException {
  if (LOG.isDebugEnabled()) {
    LOG.debug("block=" + block);
  }

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

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

  // paranoia! verify that the contents of the stored block
  // matches the block file on disk.
  data.validateBlockMetadata(stored);
  return info;
}
项目:hortonworks-extension    文件:DataNode.java   
/** {@inheritDoc} */
public BlockMetaDataInfo getBlockMetaDataInfo(Block block
    ) throws IOException {
  if (LOG.isDebugEnabled()) {
    LOG.debug("block=" + block);
  }

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

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

  // paranoia! verify that the contents of the stored block
  // matches the block file on disk.
  data.validateBlockMetadata(stored);
  return info;
}
项目:hadoop-gpu    文件:DataNode.java   
/** {@inheritDoc} */
public BlockMetaDataInfo getBlockMetaDataInfo(Block block
    ) throws IOException {
  if (LOG.isDebugEnabled()) {
    LOG.debug("block=" + block);
  }
  Block stored = data.getStoredBlock(block.getBlockId());

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

  // paranoia! verify that the contents of the stored block
  // matches the block file on disk.
  data.validateBlockMetadata(stored);
  return info;
}
项目:hadoop-EAR    文件:TestInterDatanodeProtocol.java   
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());
  }
}
项目:hadoop-on-lustre    文件:TestInterDatanodeProtocol.java   
public static void checkMetaInfo(Block b, InterDatanodeProtocol idp,
    DataBlockScanner scanner) throws IOException {
  BlockMetaDataInfo metainfo = idp.getBlockMetaDataInfo(b);
  assertEquals(b.getBlockId(), metainfo.getBlockId());
  assertEquals(b.getNumBytes(), metainfo.getNumBytes());
  if (scanner != null) {
    assertEquals(scanner.getLastScanTime(b),
        metainfo.getLastScanTime());
  }
}
项目:RDFS    文件:TestInterDatanodeProtocol.java   
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());
  }
}
项目:hadoop-0.20    文件:TestInterDatanodeProtocol.java   
public static void checkMetaInfo(Block b, InterDatanodeProtocol idp,
    DataBlockScanner scanner) throws IOException {
  BlockMetaDataInfo metainfo = idp.getBlockMetaDataInfo(b);
  assertEquals(b.getBlockId(), metainfo.getBlockId());
  assertEquals(b.getNumBytes(), metainfo.getNumBytes());
  if (scanner != null) {
    assertEquals(scanner.getLastScanTime(b),
        metainfo.getLastScanTime());
  }
}
项目:hortonworks-extension    文件:TestInterDatanodeProtocol.java   
public static void checkMetaInfo(Block b, InterDatanodeProtocol idp,
    DataBlockScanner scanner) throws IOException {
  BlockMetaDataInfo metainfo = idp.getBlockMetaDataInfo(b);
  assertEquals(b.getBlockId(), metainfo.getBlockId());
  assertEquals(b.getNumBytes(), metainfo.getNumBytes());
  if (scanner != null) {
    assertEquals(scanner.getLastScanTime(b),
        metainfo.getLastScanTime());
  }
}
项目:hortonworks-extension    文件:TestInterDatanodeProtocol.java   
public static void checkMetaInfo(Block b, InterDatanodeProtocol idp,
    DataBlockScanner scanner) throws IOException {
  BlockMetaDataInfo metainfo = idp.getBlockMetaDataInfo(b);
  assertEquals(b.getBlockId(), metainfo.getBlockId());
  assertEquals(b.getNumBytes(), metainfo.getNumBytes());
  if (scanner != null) {
    assertEquals(scanner.getLastScanTime(b),
        metainfo.getLastScanTime());
  }
}
项目:hadoop-gpu    文件:TestInterDatanodeProtocol.java   
public static void checkMetaInfo(Block b, InterDatanodeProtocol idp,
    DataBlockScanner scanner) throws IOException {
  BlockMetaDataInfo metainfo = idp.getBlockMetaDataInfo(b);
  assertEquals(b.getBlockId(), metainfo.getBlockId());
  assertEquals(b.getNumBytes(), metainfo.getNumBytes());
  if (scanner != null) {
    assertEquals(scanner.getLastScanTime(b),
        metainfo.getLastScanTime());
  }
}