jteagles commented on a change in pull request #37: TEZ-4042: Speculative
attempts should avoid running on the same node
URL: https://github.com/apache/tez/pull/37#discussion_r259080912
##########
File path: tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/TaskImpl.java
##########
@@ -149,6 +152,8 @@
// track the status of TaskAttempt (true mean completed, false mean
uncompleted)
private final Map<Integer, Boolean> taskAttemptStatus = new
HashMap<Integer,Boolean>();
+ private final Set<NodeId> unhealthyNodesHistory = new HashSet<>();
Review comment:
Since this collection is accessed both with the TaskImpl event thread and
the TaskScheduler thread, I think there is a risk for concurrency issue.
Perhaps by implementing concurrent has set via Collections
.newSetFromMap(new ConcurrentHashMap<NodeId, Boolean>()) which gives
low-level synchronization and works with java versions previous to jdk 8
according to below article.
https://stackoverflow.com/questions/6992608/why-there-is-no-concurrenthashset-against-concurrenthashmap
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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