public static int resetTokens(String containerPrefix) throws BlobStorageException {
    AtomicInteger tokensDeleted = new AtomicInteger(0);
    ListBlobContainersOptions listOptions = new ListBlobContainersOptions().setPrefix(containerPrefix);
    storageAsyncClient.listBlobContainers(listOptions).toIterable().forEach(blobContainerItem -> {
      BlockBlobAsyncClient blockBlobAsyncClient =
          storageAsyncClient.getBlobContainerAsyncClient(blobContainerItem.getName())
              .getBlobAsyncClient(ReplicationConfig.REPLICA_TOKEN_FILE_NAME)
              .getBlockBlobAsyncClient();
      try {
        if (blockBlobAsyncClient.exists().toFuture().join()) {
          blockBlobAsyncClient.delete().toFuture().join();
          tokensDeleted.incrementAndGet();
          logger.info("Deleted token for partition {}", blobContainerItem.getName());
        }
      } catch (Exception exception) {
        exception = Utils.extractFutureExceptionCause(exception);
        logger.error("Failed delete for {}", blobContainerItem.getName(), exception);
      }
    });
    return tokensDeleted.get();
  }
Reset the offset token by deleting the blob from the container.
@param containerPrefix the prefix used to filter on Azure containers
                      (in case the storage account hosts multiple Ambry clusters).
@return the number of tokens successfully reset.
ambry-tools/src/main/java/com/github/ambry/tools/admin/AzureTokenResetTool.java