public void put(K key, V value) {
    // Update keyValueMap
    V oldValue = keyValueMap.put(key, value);

    // Update valueKeyMap
    if (oldValue != null) {
      Set<K> keysSet = valueKeysMap.get(oldValue);
      keysSet.remove(key);
      if (keysSet.isEmpty()) {
        valueKeysMap.remove(oldValue);
      }
    }
    valueKeysMap.computeIfAbsent(value, empty -> new HashSet<>()).add(key);
  }
Put or modify a key-value pair.

@param key Key
@param value Value
iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/structure/BalanceTreeMap.java