YARN-5962. Spelling errors in logging and exceptions for resource manager code (gsohn via rkanter)

This commit is contained in:
Robert Kanter 2016-12-27 13:35:34 -08:00
parent e216e8e233
commit 1bbd023275
11 changed files with 25 additions and 25 deletions

View File

@ -410,7 +410,7 @@ public class ClientRMService extends AbstractService implements
response = GetApplicationAttemptReportResponse.newInstance(attemptReport); response = GetApplicationAttemptReportResponse.newInstance(attemptReport);
}else{ }else{
throw new YarnException("User " + callerUGI.getShortUserName() throw new YarnException("User " + callerUGI.getShortUserName()
+ " does not have privilage to see this attempt " + appAttemptId); + " does not have privilege to see this attempt " + appAttemptId);
} }
return response; return response;
} }
@ -450,7 +450,7 @@ public class ClientRMService extends AbstractService implements
response = GetApplicationAttemptsResponse.newInstance(listAttempts); response = GetApplicationAttemptsResponse.newInstance(listAttempts);
} else { } else {
throw new YarnException("User " + callerUGI.getShortUserName() throw new YarnException("User " + callerUGI.getShortUserName()
+ " does not have privilage to see this application " + appId); + " does not have privilege to see this application " + appId);
} }
return response; return response;
} }
@ -501,7 +501,7 @@ public class ClientRMService extends AbstractService implements
.createContainerReport()); .createContainerReport());
} else { } else {
throw new YarnException("User " + callerUGI.getShortUserName() throw new YarnException("User " + callerUGI.getShortUserName()
+ " does not have privilage to see this application " + appId); + " does not have privilege to see this application " + appId);
} }
return response; return response;
} }
@ -554,7 +554,7 @@ public class ClientRMService extends AbstractService implements
response = GetContainersResponse.newInstance(listContainers); response = GetContainersResponse.newInstance(listContainers);
} else { } else {
throw new YarnException("User " + callerUGI.getShortUserName() throw new YarnException("User " + callerUGI.getShortUserName()
+ " does not have privilage to see this application " + appId); + " does not have privilege to see this application " + appId);
} }
return response; return response;
} }

View File

@ -162,7 +162,7 @@ public class MemoryRMStateStore extends RMStateStore {
ApplicationStateData removed = state.appState.remove(appId); ApplicationStateData removed = state.appState.remove(appId);
if (removed == null) { if (removed == null) {
throw new YarnRuntimeException("Removing non-exsisting application state"); throw new YarnRuntimeException("Removing non-existing application state");
} }
} }

View File

@ -263,7 +263,7 @@ public class InMemoryPlan implements Plan {
reservationTable.put(inMemReservation.getReservationId(), reservationTable.put(inMemReservation.getReservationId(),
inMemReservation); inMemReservation);
incrementAllocation(inMemReservation); incrementAllocation(inMemReservation);
LOG.info("Sucessfully added reservation: {} to plan.", LOG.info("Successfully added reservation: {} to plan.",
inMemReservation.getReservationId()); inMemReservation.getReservationId());
return true; return true;
} finally { } finally {
@ -301,7 +301,7 @@ public class InMemoryPlan implements Plan {
reservation.getReservationId(), e.getMessage()); reservation.getReservationId(), e.getMessage());
} }
if (result) { if (result) {
LOG.info("Sucessfully updated reservation: {} in plan.", LOG.info("Successfully updated reservation: {} in plan.",
reservation.getReservationId()); reservation.getReservationId());
return result; return result;
} else { } else {

View File

@ -148,7 +148,7 @@ public class ReservationInputValidator {
plan.getTotalCapacity(), maxGangSize, plan.getTotalCapacity()) plan.getTotalCapacity(), maxGangSize, plan.getTotalCapacity())
&& type != ReservationRequestInterpreter.R_ANY) { && type != ReservationRequestInterpreter.R_ANY) {
message = message =
"The size of the largest gang in the reservation refinition (" "The size of the largest gang in the reservation definition ("
+ maxGangSize + ") exceed the capacity available (" + maxGangSize + ") exceed the capacity available ("
+ plan.getTotalCapacity() + " )"; + plan.getTotalCapacity() + " )";
RMAuditLogger.logFailure("UNKNOWN", auditConstant, RMAuditLogger.logFailure("UNKNOWN", auditConstant,

View File

@ -719,7 +719,7 @@ public class RMNodeImpl implements RMNode, EventHandler<RMNodeEvent> {
metrics.decrDecommissioningNMs(); metrics.decrDecommissioningNMs();
break; break;
default : default :
LOG.warn("Unexpcted initial state"); LOG.warn("Unexpected initial state");
} }
switch (finalState) { switch (finalState) {

View File

@ -265,7 +265,7 @@ public class SchedulerUtils {
// we don't allow specify label expression with more than one node labels now // we don't allow specify label expression with more than one node labels now
if (labelExp != null && labelExp.contains("&&")) { if (labelExp != null && labelExp.contains("&&")) {
throw new InvalidLabelResourceRequestException( throw new InvalidLabelResourceRequestException(
"Invailid resource request, queue=" + queueInfo.getQueueName() "Invalid resource request, queue=" + queueInfo.getQueueName()
+ " specified more than one node label " + " specified more than one node label "
+ "in a node label expression, node label expression = " + "in a node label expression, node label expression = "
+ labelExp); + labelExp);

View File

@ -199,7 +199,7 @@ public class RegularContainerAllocator extends AbstractContainerAllocator {
LOG.debug("Skip app_attempt=" + application.getApplicationAttemptId() LOG.debug("Skip app_attempt=" + application.getApplicationAttemptId()
+ " priority=" + schedulerKey.getPriority() + " priority=" + schedulerKey.getPriority()
+ " because missed-non-partitioned-resource-request" + " because missed-non-partitioned-resource-request"
+ " opportunity under requred:" + " Now=" + " opportunity under required:" + " Now="
+ missedNonPartitionedRequestSchedulingOpportunity + " required=" + missedNonPartitionedRequestSchedulingOpportunity + " required="
+ rmContext.getScheduler().getNumClusterNodes()); + rmContext.getScheduler().getNumClusterNodes());
} }

View File

@ -330,7 +330,7 @@ public class FifoScheduler extends
FifoAppAttempt application = getApplicationAttempt(applicationAttemptId); FifoAppAttempt application = getApplicationAttempt(applicationAttemptId);
if (application == null) { if (application == null) {
LOG.error("Calling allocate on removed " + LOG.error("Calling allocate on removed " +
"or non existant application " + applicationAttemptId); "or non-existent application " + applicationAttemptId);
return EMPTY_ALLOCATION; return EMPTY_ALLOCATION;
} }

View File

@ -368,7 +368,7 @@ class CapacitySchedulerPage extends RmView {
.append(" }).fail(function(data){") .append(" }).fail(function(data){")
.append( .append(
" alert(\"Scheduler log generation failed. Please check the" " alert(\"Scheduler log generation failed. Please check the"
+ " ResourceManager log for more informtion.\");") + " ResourceManager log for more information.\");")
.append(" console.log(data);").append(" });").append(" }") .append(" console.log(data);").append(" });").append(" }")
.append("}"); .append("}");

View File

@ -123,7 +123,7 @@ public class TestContainerResourceUsage {
AggregateAppResourceUsage ru = calculateContainerResourceMetrics(rmContainer); AggregateAppResourceUsage ru = calculateContainerResourceMetrics(rmContainer);
rmAppMetrics = app0.getRMAppMetrics(); rmAppMetrics = app0.getRMAppMetrics();
Assert.assertEquals("Unexcpected MemorySeconds value", Assert.assertEquals("Unexpected MemorySeconds value",
ru.getMemorySeconds(), rmAppMetrics.getMemorySeconds()); ru.getMemorySeconds(), rmAppMetrics.getMemorySeconds());
Assert.assertEquals("Unexpected VcoreSeconds value", Assert.assertEquals("Unexpected VcoreSeconds value",
ru.getVcoreSeconds(), rmAppMetrics.getVcoreSeconds()); ru.getVcoreSeconds(), rmAppMetrics.getVcoreSeconds());
@ -223,7 +223,7 @@ public class TestContainerResourceUsage {
} }
RMAppMetrics metricsBefore = app0.getRMAppMetrics(); RMAppMetrics metricsBefore = app0.getRMAppMetrics();
Assert.assertEquals("Unexcpected MemorySeconds value", Assert.assertEquals("Unexpected MemorySeconds value",
memorySeconds, metricsBefore.getMemorySeconds()); memorySeconds, metricsBefore.getMemorySeconds());
Assert.assertEquals("Unexpected VcoreSeconds value", Assert.assertEquals("Unexpected VcoreSeconds value",
vcoreSeconds, metricsBefore.getVcoreSeconds()); vcoreSeconds, metricsBefore.getVcoreSeconds());
@ -392,7 +392,7 @@ public class TestContainerResourceUsage {
RMAppMetrics rmAppMetrics = app.getRMAppMetrics(); RMAppMetrics rmAppMetrics = app.getRMAppMetrics();
Assert.assertEquals("Unexcpected MemorySeconds value", Assert.assertEquals("Unexpected MemorySeconds value",
memorySeconds, rmAppMetrics.getMemorySeconds()); memorySeconds, rmAppMetrics.getMemorySeconds());
Assert.assertEquals("Unexpected VcoreSeconds value", Assert.assertEquals("Unexpected VcoreSeconds value",
vcoreSeconds, rmAppMetrics.getVcoreSeconds()); vcoreSeconds, rmAppMetrics.getVcoreSeconds());
@ -426,4 +426,4 @@ public class TestContainerResourceUsage {
* usedMillis / DateUtils.MILLIS_PER_SECOND; * usedMillis / DateUtils.MILLIS_PER_SECOND;
return new AggregateAppResourceUsage(memorySeconds, vcoreSeconds); return new AggregateAppResourceUsage(memorySeconds, vcoreSeconds);
} }
} }

View File

@ -261,10 +261,10 @@ public class TestReservationInputValidator {
} catch (YarnException e) { } catch (YarnException e) {
Assert.assertNull(plan); Assert.assertNull(plan);
String message = e.getMessage(); String message = e.getMessage();
Assert Assert.assertTrue(message.startsWith(
.assertTrue(message "The size of the largest gang in the reservation definition"));
.startsWith("The size of the largest gang in the reservation refinition")); Assert.assertTrue(message.contains(
Assert.assertTrue(message.contains("exceed the capacity available ")); "exceed the capacity available "));
LOG.info(message); LOG.info(message);
} }
} }
@ -493,10 +493,10 @@ public class TestReservationInputValidator {
} catch (YarnException e) { } catch (YarnException e) {
Assert.assertNull(plan); Assert.assertNull(plan);
String message = e.getMessage(); String message = e.getMessage();
Assert Assert.assertTrue(message.startsWith(
.assertTrue(message "The size of the largest gang in the reservation definition"));
.startsWith("The size of the largest gang in the reservation refinition")); Assert.assertTrue(message.contains(
Assert.assertTrue(message.contains("exceed the capacity available ")); "exceed the capacity available "));
LOG.info(message); LOG.info(message);
} }
} }