class LogStorageInfos {

    public static <E extends JobDescriptor.JobDescriptorExt> Map<String, String> toS3LogLocationTaskContext(Job<E> job) {
        Map<String, String> context = new HashMap<>();

        Map<String, String> attributes = job.getJobDescriptor().getContainer().getAttributes();
        Evaluators.applyNotNull(
                attributes.get(JobAttributes.JOB_CONTAINER_ATTRIBUTE_S3_BUCKET_NAME),
                value -> context.put(TaskAttributes.TASK_ATTRIBUTE_S3_BUCKET_NAME, value)
        );
        Evaluators.applyNotNull(
                attributes.get(JobAttributes.JOB_CONTAINER_ATTRIBUTE_S3_PATH_PREFIX),
                value -> context.put(TaskAttributes.TASK_ATTRIBUTE_S3_PATH_PREFIX, value)
        );

        return context;
    }

}