private static DatabaseMetadata tryReadV2(final File metadataFile) throws IOException {
    final V2 v2 = MAPPER.readValue(metadataFile, V2.class);
    return new DatabaseMetadata(fromV2(v2.v2));
  }
Write to directory.

@param dataDir the data dir
@throws IOException the io exception
plugins/rocksdb/src/main/java/org/hyperledger/besu/plugin/services/storage/rocksdb/configuration/DatabaseMetadata.java