public class IOContextMap
extends Object
NOTE: before LLAP branch merge, there's no LLAP code here.
There used to be a global static map of IOContext-s inside IOContext (Hive style!).
Unfortunately, due to variety of factors, this is now a giant fustercluck.
1) LLAP has lots of tasks in the same process so globals no longer cut it either.
2) However, Tez runs 2+ threads for one task (e.g. TezTaskEventRouter and TezChild), and these
surprisingly enough need the same context. Tez, in its infinite wisdom, doesn't allow them
to communicate in any way nor provide any shared context.
So we are going to...
1) Keep the good ol' global map for MR and Tez. Hive style!
2) Create inheritable (TADA!) threadlocal with attemptId, only set in LLAP; that will propagate
to all the little Tez threads, and we will keep a map per attempt. Hive style squared!