private List<ReentrantLock> createSubCacheLocks(int numEntries) {
    List<ReentrantLock> lockList = new ArrayList<>();
    for (int i = 0; i < numEntries; i++) {
      lockList.add(i, new ReentrantLock());
    }
    return lockList;
  }
LlapObjectSubCache. A subcache which lives inside the LlapObjectCache.
The subcache maintains two lists
1. List of softreference to the objects
2. List of locks to access the objects.
ql/src/java/org/apache/hadoop/hive/ql/exec/tez/LlapObjectSubCache.java