New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better task balancing #1482

Merged
merged 73 commits into from Jun 8, 2017
Commits
Jump to file or symbol
Failed to load files and symbols.
+8 鈭1
Diff settings

Always

Just for now

Viewing a subset of changes. View all

handle invalid taskIds

  • Loading branch information...
darcatron committed May 19, 2017
commit d7077acbece3aa995cc02f1afab981ab576d3eea
@@ -12,6 +12,7 @@
import com.google.inject.Inject;
import com.hubspot.mesos.client.MesosClient;
import com.hubspot.mesos.json.MesosTaskMonitorObject;
import com.hubspot.singularity.InvalidSingularityTaskIdException;
import com.hubspot.singularity.SingularityDeployStatistics;
import com.hubspot.singularity.SingularityRequestWithState;
import com.hubspot.singularity.SingularitySlave;
@@ -86,7 +87,13 @@ public void runActionOnPoll() {
for (MesosTaskMonitorObject taskUsage : allTaskUsage) {
String taskId = taskUsage.getSource();
SingularityTaskId task = SingularityTaskId.valueOf(taskId);
SingularityTaskId task;
try {
task = SingularityTaskId.valueOf(taskId);
} catch (InvalidSingularityTaskIdException e) {
LOG.error("Couldn't get SingularityTaskId for {}", taskUsage);
continue;
}

This comment has been minimized.

@darcatron

darcatron May 23, 2017

Contributor

added this try catch for the potentially incorrect taskId types

@darcatron

darcatron May 23, 2017

Contributor

added this try catch for the potentially incorrect taskId types

SingularityTaskUsage usage = getUsage(taskUsage);
ProTip! Use n and p to navigate between commits in a pull request.