rmatharu commented on a change in pull request #1297: SAMZA-2379: Support
Container Placements for job running in degraded state
URL: https://github.com/apache/samza/pull/1297#discussion_r387925005
##########
File path:
samza-core/src/main/java/org/apache/samza/clustermanager/ContainerManager.java
##########
@@ -464,7 +488,8 @@ private boolean
deQueueAction(ContainerPlacementRequestMessage requestMessage) {
Boolean invalidAction = false;
String errorMessage = null;
if
(!samzaApplicationState.runningProcessors.containsKey(requestMessage.getProcessorId())
&&
-
!samzaApplicationState.pendingProcessors.containsKey(requestMessage.getProcessorId())
+
!samzaApplicationState.pendingProcessors.containsKey(requestMessage.getProcessorId())
&&
+
!samzaApplicationState.failedProcessors.containsKey(requestMessage.getProcessorId())
Review comment:
To make this readable, maybe define variables for each of the lookups and
define the if to be
if (inRunning || inPending || inFailed) {//do blah}
else {
this
}
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services