code: public Object setMetadata(String key, Object value) {
          return metadata.put(key, value);
      }
docs: Store a global metadata.
  
  @param key   of the metadata
  @param value of the metadata
  @return the previous value of metadata if existed or null