private double getHeapifyPriority(LlapCacheableBuffer buf, long time) {
    if (buf == null) {
      return Double.MAX_VALUE;
    }
    if (buf.lastUpdate != time && time >= 0) {
      buf.priority = expirePriority(time, buf.lastUpdate, buf.priority);
      buf.lastUpdate = time;
    }
    return buf.priority;
  }
Moves the minimum child of targetPos block up to targetPos; optionally compares priorities
and terminates if targetPos element has lesser value than either of its children.
@return the index of the child that was moved up; -1 if nothing was moved due to absence
        of the children, or a failed priority check.
llap-server/src/java/org/apache/hadoop/hive/llap/cache/LowLevelLrfuCachePolicy.java