belugabehr commented on a change in pull request #105:
URL: https://github.com/apache/tez/pull/105#discussion_r573771247
##########
File path:
tez-runtime-internals/src/main/java/org/apache/tez/runtime/InputReadyTracker.java
##########
@@ -18,165 +18,215 @@
package org.apache.tez.runtime;
+import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
+import java.util.Map;
import java.util.Set;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.ConcurrentMap;
import java.util.concurrent.TimeUnit;
-import java.util.concurrent.TimeoutException;
import java.util.concurrent.locks.Condition;
import java.util.concurrent.locks.ReentrantLock;
-import org.apache.tez.runtime.api.Input;
-import org.apache.tez.runtime.api.MergedLogicalInput;
+import javax.annotation.concurrent.GuardedBy;
import org.apache.tez.common.Preconditions;
-import com.google.common.collect.Lists;
-import com.google.common.collect.Maps;
+import org.apache.tez.runtime.api.Input;
+import org.apache.tez.runtime.api.MergedLogicalInput;
+/**
+ * A class for tracking a global list of ready {@code Inputs} and waiting for a
+ * certain subset of {@code Inputs} to appear in the global list.
+ */
public class InputReadyTracker {
- private final ConcurrentMap<Input, Boolean> readyInputs;
-
- private ConcurrentMap<Input, List<MergedLogicalInput>> inputToGroupMap;
+ @GuardedBy("lock")
Review comment:
Yup. Just a hint that this variables needs to be protected if accessed
by "lock"
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]