public void rollback(int version) throws Exception {
    Collection<String> accountJsons = viewAccountMetadata(version);
    Collection<Account> accounts = new ArrayList<>();
    ObjectMapper objectMapper = new ObjectMapper();
    for (String accountJson : accountJsons) {
      accounts.add(objectMapper.readValue(accountJson, Account.class));
    }
    updateAccounts(accounts);
  }
Roll the {@link Account} metadata back to a previous version. It fetches the {@link Account} metadata at the given
version and overwrites the current {@link Account} metadata with it, by creating a new version on top of the latest
version. For instance, if the current version is 10 and you rollback to version 8, then a new version 11 will be created
with the same content of version 8.
It will publish the new {@link Account} metadata to all the listener if the rollback operation succeeds.
@param version The version to roll back to.
@throws Exception Any unexpected error.
ambry-tools/src/main/java/com/github/ambry/account/AccountTool.java