Esempio n. 1
0
 public virtual void StopDecommission(DatanodeDescriptor node)
 {
     if (node.IsDecommissionInProgress() || node.IsDecommissioned())
     {
         // Update DN stats maintained by HeartbeatManager
         hbManager.StopDecommission(node);
         // Over-replicated blocks will be detected and processed when
         // the dead node comes back and send in its full block report.
         if (node.isAlive)
         {
             blockManager.ProcessOverReplicatedBlocksOnReCommission(node);
         }
         // Remove from tracking in DecommissionManager
         pendingNodes.Remove(node);
         Sharpen.Collections.Remove(decomNodeBlocks, node);
     }
     else
     {
         Log.Trace("stopDecommission: Node {} in {}, nothing to do." + node, node.GetAdminState
                       ());
     }
 }
Esempio n. 2
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
                       ());
     }
 }