예제 #1
0
 public virtual void StartDecommission(DatanodeDescriptor node)
 {
     if (!node.IsDecommissionInProgress() && !node.IsDecommissioned())
     {
         // Update DN stats maintained by HeartbeatManager
         hbManager.StartDecommission(node);
         // hbManager.startDecommission will set dead node to decommissioned.
         if (node.IsDecommissionInProgress())
         {
             foreach (DatanodeStorageInfo storage in node.GetStorageInfos())
             {
                 Log.Info("Starting decommission of {} {} with {} blocks", node, storage, storage.
                          NumBlocks());
             }
             node.decommissioningStatus.SetStartTime(Time.MonotonicNow());
             pendingNodes.AddItem(node);
         }
     }
     else
     {
         Log.Trace("startDecommission: Node {} in {}, nothing to do." + node, node.GetAdminState
                       ());
     }
 }