Skip to content
Merged
Show file tree
Hide file tree
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 @@ -225,8 +225,7 @@ private void scheduleTopology(TopologyDetails td, Cluster cluster, final User to
}
//Only place we fall though to do the loop over again...
} else { //Any other failure result
//The assumption is that the strategy set the status...
topologySubmitter.markTopoUnsuccess(td, cluster);
topologySubmitter.markTopoUnsuccess(td, cluster, result.toString());
return;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,15 +79,18 @@ public TreeSet<TopologyDetails> getPendingTopologies(ISchedulingState cluster) {
return ret;
}

public void markTopoUnsuccess(TopologyDetails topo, Cluster cluster) {
public void markTopoUnsuccess(TopologyDetails topo, Cluster cluster, String msg) {
unsuccess.add(topo);
if (cluster != null) {
cluster.setStatus(topo.getId(), "Scheduling Attempted but topology is invalid");
if (msg == null) {
msg = "Scheduling Attempted but topology is invalid";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

failed to schedule does not necessarily the topology is invalid.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That message is a generic default - same as prior default. I believe there is one other caller to this method.

}
cluster.setStatus(topo.getId(), msg);
}
}

public void markTopoUnsuccess(TopologyDetails topo) {
this.markTopoUnsuccess(topo, null);
this.markTopoUnsuccess(topo, null, null);
}

public double getResourcePoolAverageUtilization(ISchedulingState cluster) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,10 @@ public SchedulingResult schedule(Cluster cluster, TopologyDetails td) {
int daemonMaxStateSearch = ObjectReader.getInt(cluster.getConf().get(DaemonConfig.RESOURCE_AWARE_SCHEDULER_MAX_STATE_SEARCH));
final int maxStateSearch = Math.min(daemonMaxStateSearch, confMaxStateSearch);

final long maxTimeMs = ObjectReader.getInt(td.getConf().get(Config.TOPOLOGY_RAS_CONSTRAINT_MAX_TIME_SECS), -1) * 1000L;
// expect to be killed by DaemonConfig.SCHEDULING_TIMEOUT_SECONDS_PER_TOPOLOGY seconds, terminate slightly before
int daemonMaxTimeSec = ObjectReader.getInt(td.getConf().get(DaemonConfig.SCHEDULING_TIMEOUT_SECONDS_PER_TOPOLOGY), 60);
int confMaxTimeSec = ObjectReader.getInt(td.getConf().get(Config.TOPOLOGY_RAS_CONSTRAINT_MAX_TIME_SECS), daemonMaxTimeSec);
final long maxTimeMs = (confMaxTimeSec >= daemonMaxTimeSec) ? daemonMaxTimeSec * 1000L - 200L : confMaxTimeSec * 1000L;

favoredNodeIds = makeHostToNodeIds((List<String>) td.getConf().get(Config.TOPOLOGY_SCHEDULER_FAVORED_NODES));
unFavoredNodeIds = makeHostToNodeIds((List<String>) td.getConf().get(Config.TOPOLOGY_SCHEDULER_UNFAVORED_NODES));
Expand Down