You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@slider.apache.org by st...@apache.org on 2015/03/25 21:28:51 UTC
[22/25] incubator-slider git commit: SLIDER-830 sort target hosts by
reliability before choosing: cut out obsolete logic from OutstandingRequest
SLIDER-830 sort target hosts by reliability before choosing: cut out obsolete logic from OutstandingRequest
Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/10049668
Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/10049668
Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/10049668
Branch: refs/heads/develop
Commit: 10049668f0a2f37aafe466506904b3bdaafe1272
Parents: 6bcffb4
Author: Steve Loughran <st...@apache.org>
Authored: Wed Mar 25 17:57:04 2015 +0000
Committer: Steve Loughran <st...@apache.org>
Committed: Wed Mar 25 17:57:04 2015 +0000
----------------------------------------------------------------------
.../appmaster/state/OutstandingRequest.java | 19 +------------------
1 file changed, 1 insertion(+), 18 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/10049668/slider-core/src/main/java/org/apache/slider/server/appmaster/state/OutstandingRequest.java
----------------------------------------------------------------------
diff --git a/slider-core/src/main/java/org/apache/slider/server/appmaster/state/OutstandingRequest.java b/slider-core/src/main/java/org/apache/slider/server/appmaster/state/OutstandingRequest.java
index 12b4b53..e674835 100644
--- a/slider-core/src/main/java/org/apache/slider/server/appmaster/state/OutstandingRequest.java
+++ b/slider-core/src/main/java/org/apache/slider/server/appmaster/state/OutstandingRequest.java
@@ -184,23 +184,6 @@ public final class OutstandingRequest {
boolean relaxLocality;
boolean strictPlacement = role.isStrictPlacement();
NodeInstance target = this.node;
- if (target != null) {
- // there is a host specified; get its details
-
- // tell the node it is in play
- NodeEntry entry = target.getOrCreate(roleId);
- // failure count
- int numFailuresOnLastHost = entry != null ? entry.getFailedRecently() : 0;
-
- // which on non-strict placement may have some effect
- if (!strictPlacement && numFailuresOnLastHost > role.getNodeFailureThreshold()) {
- // too many failures for this node
- log.info("Recent node failures {} is higher than threshold {}. Not requesting host {}",
- numFailuresOnLastHost, role.getNodeFailureThreshold(), target.hostname);
- // reset the target node so this request is downgraded
- target = null;
- }
- }
if (target != null) {
// placed request. Hostname is used in request
@@ -212,8 +195,8 @@ public final class OutstandingRequest {
log.info("Submitting request for container on {}", hosts[0]);
// enable escalation for all but strict placements.
- mayEscalate = !strictPlacement;
escalated = false;
+ mayEscalate = !strictPlacement;
} else {
// no hosts
hosts = null;