public static Pair<Short, Short> getAccountAndContainerIds(String idStr) throws IOException {
    BlobIdPreamble blobIdPreamble =
        new BlobIdPreamble(new DataInputStream(new ByteBufferInputStream(ByteBuffer.wrap(Base64.decodeBase64(idStr)))));
    return new Pair<>(blobIdPreamble.accountId, blobIdPreamble.containerId);
  }
Returns the account id and container id associated with the given blob. Note that the blob id may not have a valid
account and container id associated with it, in which case this will return {@link Account#UNKNOWN_ACCOUNT_ID} and
{@link Container#UNKNOWN_CONTAINER_ID} respectively.
@param idStr the id of the blob for which the account and container ids are to be fetched.
@return a {@link Pair} whose first value is the account id and the second value is the container id of this blob.
@throws IOException if the input is not a valid Blob id.
ambry-commons/src/main/java/com/github/ambry/commons/BlobId.java