org.apache.hadoop.hdfs.server.protocol
Class BalancerBandwidthCommand
java.lang.Object
org.apache.hadoop.hdfs.server.protocol.ServerCommand
org.apache.hadoop.hdfs.server.protocol.DatanodeCommand
org.apache.hadoop.hdfs.server.protocol.BalancerBandwidthCommand
- All Implemented Interfaces:
- org.apache.hadoop.io.Writable
public class BalancerBandwidthCommand
- extends org.apache.hadoop.hdfs.server.protocol.DatanodeCommand
Balancer bandwidth command instructs each datanode to change its value for
the max amount of network bandwidth it may use during the block balancing
operation.
The Balancer Bandwidth Command contains the new bandwidth value as its
payload. The bandwidth value is in bytes per second.
Nested classes/interfaces inherited from class org.apache.hadoop.hdfs.server.protocol.DatanodeCommand |
DatanodeCommand.Finalize |
Fields inherited from class org.apache.hadoop.hdfs.server.protocol.DatanodeCommand |
REGISTER |
Method Summary |
long |
getBalancerBandwidthValue()
Get current value of the max balancer bandwidth in bytes per second. |
void |
readFields(DataInput in)
Reads the bandwidth payload from the Balancer Bandwidth Command packet. |
void |
write(DataOutput out)
Writes the bandwidth payload to the Balancer Bandwidth Command packet. |
Methods inherited from class org.apache.hadoop.hdfs.server.protocol.ServerCommand |
getAction |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BalancerBandwidthCommand
public BalancerBandwidthCommand(long bandwidth)
- Balancer Bandwidth Command constructor.
- Parameters:
bandwidth
- Blanacer bandwidth in bytes per second.
getBalancerBandwidthValue
public long getBalancerBandwidthValue()
- Get current value of the max balancer bandwidth in bytes per second.
- Returns:
- bandwidth Blanacer bandwidth in bytes per second for this datanode.
write
public void write(DataOutput out)
throws IOException
- Writes the bandwidth payload to the Balancer Bandwidth Command packet.
- Specified by:
write
in interface org.apache.hadoop.io.Writable
- Overrides:
write
in class org.apache.hadoop.hdfs.server.protocol.ServerCommand
- Parameters:
out
- DataOutput stream used for writing commands to the datanode.
- Throws:
IOException
readFields
public void readFields(DataInput in)
throws IOException
- Reads the bandwidth payload from the Balancer Bandwidth Command packet.
- Specified by:
readFields
in interface org.apache.hadoop.io.Writable
- Overrides:
readFields
in class org.apache.hadoop.hdfs.server.protocol.ServerCommand
- Parameters:
in
- DataInput stream used for reading commands to the datanode.
- Throws:
IOException
Copyright © 2013 Apache Software Foundation. All Rights Reserved.