Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,6 @@ public synchronized List<DatanodeAdminError> decommissionNodes(
boolean decommissionPossible = checkIfDecommissionPossible(dns, errors);
if (!decommissionPossible) {
LOG.error("Cannot decommission nodes as sufficient node are not available.");
errors.add(new DatanodeAdminError("AllHosts", "Sufficient nodes are not available."));
return errors;
}
} else {
Expand Down Expand Up @@ -436,10 +435,11 @@ private synchronized boolean checkIfDecommissionPossible(List<DatanodeDetails> d
}
int reqNodes = cif.getReplicationConfig().getRequiredNodes();
if ((inServiceTotal - numDecom) < reqNodes) {
LOG.info("Cannot decommission nodes. Tried to decommission {} nodes of which valid nodes = {}. " +
"Cluster state: In-service nodes = {}, nodes required for replication = {}. " +
"Failing due to datanode : {}, container : {}",
dns.size(), numDecom, inServiceTotal, reqNodes, dn, cid);
String errorMsg = "Insufficient nodes. Tried to decommission " + dns.size() +
" nodes of which " + numDecom + " nodes were valid. Cluster has " + inServiceTotal +
" IN-SERVICE nodes, " + reqNodes + " of which are required for minimum replication. ";
LOG.info(errorMsg + "Failing due to datanode : {}, container : {}", dn, cid);
errors.add(new DatanodeAdminError("AllHosts", errorMsg));
return false;
}
}
Expand Down Expand Up @@ -495,7 +495,6 @@ public synchronized List<DatanodeAdminError> startMaintenanceNodes(
boolean maintenancePossible = checkIfMaintenancePossible(dns, errors);
if (!maintenancePossible) {
LOG.error("Cannot put nodes to maintenance as sufficient node are not available.");
errors.add(new DatanodeAdminError("AllHosts", "Sufficient nodes are not available."));
return errors;
}
} else {
Expand Down Expand Up @@ -600,11 +599,11 @@ private synchronized boolean checkIfMaintenancePossible(List<DatanodeDetails> dn
minInService = maintenanceReplicaMinimum;
}
if ((inServiceTotal - numMaintenance) < minInService) {
LOG.info("Cannot enter nodes into maintenance. Tried to start maintenance for {} nodes " +
"of which valid nodes = {}. " +
"Cluster state: In-service nodes = {}, nodes required for replication = {}. " +
"Failing due to datanode : {}, container : {}",
dns.size(), numMaintenance, inServiceTotal, minInService, dn, cid);
String errorMsg = "Insufficient nodes. Tried to start maintenance for " + dns.size() +
" nodes of which " + numMaintenance + " nodes were valid. Cluster has " + inServiceTotal +
" IN-SERVICE nodes, " + minInService + " of which are required for minimum replication. ";
LOG.info(errorMsg + "Failing due to datanode : {}, container : {}", dn, cid);
errors.add(new DatanodeAdminError("AllHosts", errorMsg));
return false;
}
}
Expand Down