public static String maskIfPassword(String key, String value) {
    if (key!=null && value!=null) {
      if (key.toLowerCase().indexOf(KEY_TO_MASK_WITH) != -1) {
        return MASKED_VALUE;
      }
    }
    return value;
  }
Returns MASKED_VALUE if the key contains KEY_TO_MASK_WITH or the original property otherwise.
Used to mask environment variables, and properties in logs which contain passwords
@param key The property key to check
@param value The original value of the property
@return The masked property value
common/src/java/org/apache/hadoop/hive/common/LogUtils.java