void editAccounts(Collection<String> accountNames, boolean ignoreSnapshotVersion)
      throws IOException, InterruptedException, AccountServiceException {
    Path accountJsonPath = Files.createTempFile("account-update-", ".json");
    List<Account> accounts = accountNames.stream()
        .map(accountName -> Optional.ofNullable(accountService.getAccountByName(accountName))
            .orElseThrow(() -> new IllegalArgumentException("Could not find account: " + accountName)))
        .collect(Collectors.toList());
    try (BufferedWriter writer = Files.newBufferedWriter(accountJsonPath)) {
      new ObjectMapper().writer(new DefaultPrettyPrinter()).writeValue(writer, accounts);
    }
    ToolUtils.editFile(accountJsonPath);
    System.out.println("The following account metadata will be uploaded:");
    try (Stream<String> lines = Files.lines(accountJsonPath)) {
      lines.forEach(System.out::println);
    }
    if (ToolUtils.yesNoPrompt("Do you want to update these accounts?")) {
      updateAccountsFromFile(accountJsonPath.toAbsolutePath().toString(), ignoreSnapshotVersion);
    } else {
      System.out.println("Not updating any accounts");
    }
    Files.delete(accountJsonPath);
  }
Edit accounts in a text editor and upload them to zookeeper.
@param accountNames the name of the accounts to edit.
@param ignoreSnapshotVersion if {@code true}, don't verify the snapshot version.
@throws IOException
@throws InterruptedException
ambry-tools/src/main/java/com/github/ambry/account/AccountUpdateTool.java