public DatanodeInfo(DatanodeID nodeID, string location, long capacity, long dfsUsed , long remaining, long blockPoolUsed, long cacheCapacity, long cacheUsed, long lastUpdate , long lastUpdateMonotonic, int xceiverCount, DatanodeInfo.AdminStates adminState ) : this(nodeID.GetIpAddr(), nodeID.GetHostName(), nodeID.GetDatanodeUuid(), nodeID .GetXferPort(), nodeID.GetInfoPort(), nodeID.GetInfoSecurePort(), nodeID.GetIpcPort (), capacity, dfsUsed, remaining, blockPoolUsed, cacheCapacity, cacheUsed, lastUpdate , lastUpdateMonotonic, xceiverCount, location, adminState) { }
/// <summary>Sets the admin state of this node.</summary> protected internal virtual void SetAdminState(DatanodeInfo.AdminStates newState) { if (newState == DatanodeInfo.AdminStates.Normal) { adminState = null; } else { adminState = newState; } }
public DatanodeInfo(DatanodeID nodeID) : base(nodeID) { this.capacity = 0L; this.dfsUsed = 0L; this.remaining = 0L; this.blockPoolUsed = 0L; this.cacheCapacity = 0L; this.cacheUsed = 0L; this.lastUpdate = 0L; this.lastUpdateMonotonic = 0L; this.xceiverCount = 0; this.adminState = null; }
public DatanodeInfo(DatanodeInfo from) : base(from) { this.capacity = from.GetCapacity(); this.dfsUsed = from.GetDfsUsed(); this.remaining = from.GetRemaining(); this.blockPoolUsed = from.GetBlockPoolUsed(); this.cacheCapacity = from.GetCacheCapacity(); this.cacheUsed = from.GetCacheUsed(); this.lastUpdate = from.GetLastUpdate(); this.lastUpdateMonotonic = from.GetLastUpdateMonotonic(); this.xceiverCount = from.GetXceiverCount(); this.location = from.GetNetworkLocation(); this.adminState = from.GetAdminState(); }
/// <summary>Constructor</summary> public DatanodeInfo(string ipAddr, string hostName, string datanodeUuid, int xferPort , int infoPort, int infoSecurePort, int ipcPort, long capacity, long dfsUsed, long remaining, long blockPoolUsed, long cacheCapacity, long cacheUsed, long lastUpdate , long lastUpdateMonotonic, int xceiverCount, string networkLocation, DatanodeInfo.AdminStates adminState) : base(ipAddr, hostName, datanodeUuid, xferPort, infoPort, infoSecurePort, ipcPort ) { this.capacity = capacity; this.dfsUsed = dfsUsed; this.remaining = remaining; this.blockPoolUsed = blockPoolUsed; this.cacheCapacity = cacheCapacity; this.cacheUsed = cacheUsed; this.lastUpdate = lastUpdate; this.lastUpdateMonotonic = lastUpdateMonotonic; this.xceiverCount = xceiverCount; this.location = networkLocation; this.adminState = adminState; }
/// <summary>Sets the admin state to indicate that decommission is complete.</summary> public virtual void SetDecommissioned() { adminState = DatanodeInfo.AdminStates.Decommissioned; }
/// <summary>Stop decommissioning a node.</summary> /// <remarks> /// Stop decommissioning a node. /// old state. /// </remarks> public virtual void StopDecommission() { adminState = null; }
/// <summary>Start decommissioning a node.</summary> /// <remarks> /// Start decommissioning a node. /// old state. /// </remarks> public virtual void StartDecommission() { adminState = DatanodeInfo.AdminStates.DecommissionInprogress; }