@Override
  public PartitionId getPartitionIdFromStream(InputStream stream) throws IOException {
    DuplicatingInputStream duplicatingInputStream = new DuplicatingInputStream(stream);
    duplicatingInputStream.mark(0);
    PartitionId partitionIdStatic = null;
    try {
      partitionIdStatic = staticClusterManager.getPartitionIdFromStream(duplicatingInputStream);
    } catch (IOException e) {
      // for composite blob, it has the list of Blob IDs. It may not exist in the static cluster map.
      // swallow the exception and try with helixClusterManager
      logger.error("staticClusterManager getPartitionIdFromStream throws {}", e.getMessage());
    }

    if (partitionIdStatic == null) {
      duplicatingInputStream.reset();
      partitionIdStatic = helixClusterManager.getPartitionIdFromStream(duplicatingInputStream);
      logger.trace("DR: partition doesn't exist in staticClusterManager, try helixClusterManager {}", partitionIdStatic);
    }
    return partitionIdStatic;
  }
Construct a RecoveryTestClusterManager instance.
@param staticClusterManager the {@link StaticClusterManager} object.
@param helixClusterManager the {@link HelixClusterManager} object.
ambry-clustermap/src/main/java/com/github/ambry/clustermap/RecoveryTestClusterManager.java