<commit_before>package com.creactiviti.piper.taskhandler.s3;

import java.nio.file.Paths;

import org.springframework.stereotype.Component;

import com.creactiviti.piper.core.task.Task;
import com.creactiviti.piper.core.task.TaskHandler;

import software.amazon.awssdk.core.sync.ResponseTransformer;
import software.amazon.awssdk.services.s3.S3Client;
import software.amazon.awssdk.services.s3.model.GetObjectRequest;

/**
 * @author <NAME>
 * @since Feb, 19 2020
 */
@Component("s3/get")
class S3Get implements TaskHandler<Object> {

  @Override
  public Object handle (Task aTask) throws Exception {
    
    AmazonS3URI s3Uri = new AmazonS3URI(aTask.getRequiredString("uri"));<commit_msg>JavaDocs<commit_after>package com.creactiviti.piper.taskhandler.s3;

import java.nio.file.Paths;

import org.springframework.stereotype.Component;

import com.creactiviti.piper.core.task.Task;
import com.creactiviti.piper.core.task.TaskHandler;

import software.amazon.awssdk.core.sync.ResponseTransformer;
import software.amazon.awssdk.services.s3.S3Client;
import software.amazon.awssdk.services.s3.model.GetObjectRequest;

/**
 * Retrieves objects from Amazon S3. To use GET, Piper must have READ access to the object. 
 * 
 * @author <NAME>
 * @since Feb, 19 2020
 */
@Component("s3/get")
class S3Get implements TaskHandler<Object> {

  @Override
  public Object handle (Task aTask) throws Exception {
    
    AmazonS3URI s3Uri = new AmazonS3URI(aTask.getRequiredString("uri"));
{'fraction_non_alphanumeric': 0.11329715061058344, 'fraction_numerical': 0.02103120759837178, 'mean_word_length': 5.171548117154812, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6986090', 'n_tokens_mistral': 502, 'n_tokens_neox': 479, 'n_words': 93}