parquet-hadoop/src/main/java/org/apache/parquet/hadoop/MemoryManager.java
public void registerScaleCallBack(String callBackName, Runnable callBack) {
    Preconditions.checkNotNull(callBackName, "callBackName");
    Preconditions.checkNotNull(callBack, "callBack");

    if (callBacks.containsKey(callBackName)) {
      throw new IllegalArgumentException("The callBackName " + callBackName +
          " is duplicated and has been registered already.");
    } else {
      callBacks.put(callBackName, callBack);
    }
  }
public void registerScaleCallBack(String callBackName, Runnable callBack) {
    Preconditions.checkNotNull(callBackName, "callBackName");
    Preconditions.checkNotNull(callBack, "callBack");

    if (callBacks.containsKey(callBackName)) {
      throw new IllegalArgumentException("The callBackName " + callBackName +
          " is duplicated and has been registered already.");
    } else {
      callBacks.put(callBackName, callBack);
    }
  }
Register callback and deduplicate it if any.
@param callBackName the name of callback. It should be identical.
@param callBack the callback passed in from upper layer, such as Hive.