@InterfaceAudience.Private @InterfaceStability.Evolving public class BlockCommand extends DatanodeCommand
Modifier and Type | Field and Description |
---|---|
static long |
NO_ACK
This constant is used to indicate that the block deletion does not need
explicit ACK from the datanode.
|
Constructor and Description |
---|
BlockCommand(int action,
String poolId,
Block[] blocks)
Create BlockCommand for the given action
|
BlockCommand(int action,
String poolId,
Block[] blocks,
DatanodeInfo[][] targets)
Create BlockCommand for the given action
|
BlockCommand(int action,
String poolId,
List<DatanodeDescriptor.BlockTargetPair> blocktargetlist)
Create BlockCommand for transferring blocks to another datanode
|
Modifier and Type | Method and Description |
---|---|
String |
getBlockPoolId() |
Block[] |
getBlocks() |
DatanodeInfo[][] |
getTargets() |
getAction
public static final long NO_ACK
public BlockCommand(int action, String poolId, List<DatanodeDescriptor.BlockTargetPair> blocktargetlist)
blocktargetlist
- blocks to be transferredpublic BlockCommand(int action, String poolId, Block[] blocks)
blocks
- blocks related to the actionpublic BlockCommand(int action, String poolId, Block[] blocks, DatanodeInfo[][] targets)
blocks
- blocks related to the actionpublic String getBlockPoolId()
public Block[] getBlocks()
public DatanodeInfo[][] getTargets()
Copyright © 2013 Apache Software Foundation. All rights reserved.