def extract_file_name(line: str):
    """
    Extract the file name from a line getting by a line of string that contains a directory like `/path/to/file`,
    where `file` will be extracted.
    :param line: A line of string
    :return: The extracted tuple of absolute path and filename
    """
    start_idx = line.rfind('hdfs://')
    if start_idx == -1:
        absolute_path = line
    else:
        absolute_path = line[start_idx:]
    idx = absolute_path.rfind('/')
    filename = absolute_path[idx + 1:]
    if filename.startswith('.'):
        return None, None

    return absolute_path, filename