BlockStorageMovementCommand.BlockMovingInfo (Apache Hadoop HDFS 3.5.0 API)
Description: declaration: package: org.apache.hadoop.hdfs.server.protocol, class: BlockStorageMovementCommand, class: BlockMovingInfo

Package org.apache.hadoop.hdfs.server.protocol

# Class BlockStorageMovementCommand.BlockMovingInfo

java.lang.Object
org.apache.hadoop.hdfs.server.protocol.BlockStorageMovementCommand.BlockMovingInfo

Enclosing class:
  BlockStorageMovementCommand

public static class BlockStorageMovementCommand.BlockMovingInfo extends Object
Stores block to storage info that can be used for block movement.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `BlockMovingInfo(org.apache.hadoop.hdfs.protocol.Block block, org.apache.hadoop.hdfs.protocol.DatanodeInfo sourceDnInfo, org.apache.hadoop.hdfs.protocol.DatanodeInfo targetDnInfo, org.apache.hadoop.fs.StorageType srcStorageType, org.apache.hadoop.fs.StorageType targetStorageType)`
  Block to storage info constructor.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `addBlock(org.apache.hadoop.hdfs.protocol.Block block)`
  `org.apache.hadoop.hdfs.protocol.Block`
  `getBlock()`
  `org.apache.hadoop.hdfs.protocol.DatanodeInfo`
  `getSource()`
  `org.apache.hadoop.fs.StorageType`
  `getSourceStorageType()`
  `org.apache.hadoop.hdfs.protocol.DatanodeInfo`
  `getTarget()`
  `org.apache.hadoop.fs.StorageType`
  `getTargetStorageType()`
  `String`
  `toString()`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### BlockMovingInfo

    public BlockMovingInfo(org.apache.hadoop.hdfs.protocol.Block block, org.apache.hadoop.hdfs.protocol.DatanodeInfo sourceDnInfo, org.apache.hadoop.hdfs.protocol.DatanodeInfo targetDnInfo, org.apache.hadoop.fs.StorageType srcStorageType, org.apache.hadoop.fs.StorageType targetStorageType)
    Block to storage info constructor.
    Parameters:
      `block` - block info
      `sourceDnInfo` - node that can be the source of a block move
      `srcStorageType` - type of source storage media

- ## Method Details

  - ### addBlock

    public void addBlock(org.apache.hadoop.hdfs.protocol.Block block)

  - ### getBlock

    public org.apache.hadoop.hdfs.protocol.Block getBlock()

  - ### getSource

    public org.apache.hadoop.hdfs.protocol.DatanodeInfo getSource()

  - ### getTarget

    public org.apache.hadoop.hdfs.protocol.DatanodeInfo getTarget()

  - ### getTargetStorageType

    public org.apache.hadoop.fs.StorageType getTargetStorageType()

  - ### getSourceStorageType

    public org.apache.hadoop.fs.StorageType getSourceStorageType()

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`