Package alluxio.wire
Class BlockMasterInfo
- java.lang.Object
-
- alluxio.wire.BlockMasterInfo
-
- All Implemented Interfaces:
java.io.Serializable
@NotThreadSafe public final class BlockMasterInfo extends java.lang.Object implements java.io.Serializable
The Alluxio block master information.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
BlockMasterInfo.BlockMasterInfoField
Enum representing the fields of the block master info.
-
Constructor Summary
Constructors Constructor Description BlockMasterInfo()
Creates a new instance ofBlockMasterInfo
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
static BlockMasterInfo
fromProto(alluxio.grpc.BlockMasterInfo info)
Creates a new instance ofBlockMasterInfo
from a proto representation.long
getCapacityBytes()
java.util.Map<java.lang.String,java.lang.Long>
getCapacityBytesOnTiers()
long
getFreeBytes()
int
getLiveWorkerNum()
int
getLostWorkerNum()
long
getUsedBytes()
java.util.Map<java.lang.String,java.lang.Long>
getUsedBytesOnTiers()
int
hashCode()
BlockMasterInfo
setCapacityBytes(long capacityBytes)
BlockMasterInfo
setCapacityBytesOnTiers(java.util.Map<java.lang.String,java.lang.Long> capacityBytesOnTiers)
BlockMasterInfo
setFreeBytes(long freeBytes)
BlockMasterInfo
setLiveWorkerNum(int liveWorkerNum)
BlockMasterInfo
setLostWorkerNum(int lostWorkerNum)
BlockMasterInfo
setUsedBytes(long usedBytes)
BlockMasterInfo
setUsedBytesOnTiers(java.util.Map<java.lang.String,java.lang.Long> usedBytesOnTiers)
protected alluxio.grpc.BlockMasterInfo
toProto()
java.lang.String
toString()
-
-
-
Constructor Detail
-
BlockMasterInfo
public BlockMasterInfo()
Creates a new instance ofBlockMasterInfo
.
-
-
Method Detail
-
getCapacityBytes
public long getCapacityBytes()
- Returns:
- the total capacity bytes
-
getCapacityBytesOnTiers
public java.util.Map<java.lang.String,java.lang.Long> getCapacityBytesOnTiers()
- Returns:
- the total capacity bytes on tiers
-
getFreeBytes
public long getFreeBytes()
- Returns:
- the free capacity in bytes
-
getLiveWorkerNum
public int getLiveWorkerNum()
- Returns:
- the live worker number
-
getLostWorkerNum
public int getLostWorkerNum()
- Returns:
- the lost worker number
-
getUsedBytes
public long getUsedBytes()
- Returns:
- the used capacity bytes
-
getUsedBytesOnTiers
public java.util.Map<java.lang.String,java.lang.Long> getUsedBytesOnTiers()
- Returns:
- the used capacity bytes on tiers
-
setCapacityBytes
public BlockMasterInfo setCapacityBytes(long capacityBytes)
- Parameters:
capacityBytes
- the total capacity bytes to use- Returns:
- the block master information
-
setCapacityBytesOnTiers
public BlockMasterInfo setCapacityBytesOnTiers(java.util.Map<java.lang.String,java.lang.Long> capacityBytesOnTiers)
- Parameters:
capacityBytesOnTiers
- the total capacity bytes on tiers to use- Returns:
- the block master information
-
setFreeBytes
public BlockMasterInfo setFreeBytes(long freeBytes)
- Parameters:
freeBytes
- the free capacity bytes to use- Returns:
- the block master information
-
setLiveWorkerNum
public BlockMasterInfo setLiveWorkerNum(int liveWorkerNum)
- Parameters:
liveWorkerNum
- the live worker number- Returns:
- the block master information
-
setLostWorkerNum
public BlockMasterInfo setLostWorkerNum(int lostWorkerNum)
- Parameters:
lostWorkerNum
- the lost worker number- Returns:
- the block master information
-
setUsedBytes
public BlockMasterInfo setUsedBytes(long usedBytes)
- Parameters:
usedBytes
- the used capacity bytes to use- Returns:
- the block master information
-
setUsedBytesOnTiers
public BlockMasterInfo setUsedBytesOnTiers(java.util.Map<java.lang.String,java.lang.Long> usedBytesOnTiers)
- Parameters:
usedBytesOnTiers
- the used capacity bytes on tiers to use- Returns:
- the block master information
-
toProto
protected alluxio.grpc.BlockMasterInfo toProto()
- Returns:
- proto representation of the block master information
-
fromProto
public static BlockMasterInfo fromProto(alluxio.grpc.BlockMasterInfo info)
Creates a new instance ofBlockMasterInfo
from a proto representation.- Parameters:
info
- the proto representation of a block master information- Returns:
- the instance
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-