Skip to content

Commit

Permalink
Fix displaying progress for some tasks
Browse files Browse the repository at this point in the history
(but more progress-displaying issues remain)
  • Loading branch information
mederly committed May 3, 2018
1 parent 4d01d1d commit eaeb3d4
Showing 1 changed file with 7 additions and 3 deletions.
Expand Up @@ -673,6 +673,10 @@ public boolean isCoordinator() {
return taskType.getWorkManagement() != null && taskType.getWorkManagement().getTaskKind() == TaskKindType.COORDINATOR;
}

public boolean isCoordinatedWorker() {
return taskType.getWorkManagement() != null && taskType.getWorkManagement().getTaskKind() == TaskKindType.WORKER;
}

public boolean hasBuckets() {
if (taskType.getWorkState() == null) {
return false;
Expand All @@ -690,14 +694,14 @@ public boolean hasBuckets() {
}
}

public boolean isBucketed() {
return isCoordinator() || hasBuckets();
public boolean isWorkStateHolder() {
return (isCoordinator() || hasBuckets()) && !isCoordinatedWorker();
}

private String getRealProgressDescription() {
if (isPartitionedMaster()) {
return getPartitionedTaskProgressDescription();
} else if (isBucketed()) {
} else if (isWorkStateHolder()) {
return getBucketedTaskProgressDescription();
} else {
return getPlainTaskProgressDescription();
Expand Down

0 comments on commit eaeb3d4

Please sign in to comment.