コード例 #1
0
 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)
 {
 }
コード例 #2
0
 /// <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;
     }
 }
コード例 #3
0
 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;
 }
コード例 #4
0
 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();
 }
コード例 #5
0
 /// <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;
 }
コード例 #6
0
 /// <summary>Sets the admin state to indicate that decommission is complete.</summary>
 public virtual void SetDecommissioned()
 {
     adminState = DatanodeInfo.AdminStates.Decommissioned;
 }
コード例 #7
0
 /// <summary>Stop decommissioning a node.</summary>
 /// <remarks>
 /// Stop decommissioning a node.
 /// old state.
 /// </remarks>
 public virtual void StopDecommission()
 {
     adminState = null;
 }
コード例 #8
0
 /// <summary>Start decommissioning a node.</summary>
 /// <remarks>
 /// Start decommissioning a node.
 /// old state.
 /// </remarks>
 public virtual void StartDecommission()
 {
     adminState = DatanodeInfo.AdminStates.DecommissionInprogress;
 }