def check_files_on_host(java_home, host, files, batch_size):
    """Check the files on the host. Files are grouped together in groups
    of batch_size files. The dump class will be executed on each batch,
    sequentially.

    :param java_home: the JAVA_HOME of the broker
    :type java_home: str
    :param host: the host where the tool will be executed
    :type host: str
    :param files: the list of files to be analyzed
    :type files: list of str
    :param batch_size: the size of each batch
    :type batch_size: int
    """
    with closing(ssh_client(host)) as ssh:
        for i, batch in enumerate(chunks(files, batch_size)):
            command = check_corrupted_files_cmd(java_home, batch)
            _, stdout, stderr = ssh.exec_command(command)
            report_stderr(host, stderr)
            print(
                "  {host}: file {n_file} of {total}".format(
                    host=host,
                    n_file=(i * DEFAULT_BATCH_SIZE),
                    total=len(files),
                )
            )
            parse_output(host, stdout)
Check the files on the host. Files are grouped together in groups
    of batch_size files. The dump class will be executed on each batch,
    sequentially.

    :param java_home: the JAVA_HOME of the broker
    :type java_home: str
    :param host: the host where the tool will be executed
    :type host: str
    :param files: the list of files to be analyzed
    :type files: list of str
    :param batch_size: the size of each batch
    :type batch_size: int