String getBucketName() { return s3obj.getBucketName(); }
throw ace; } else { LOG.info("Retry the download of object " + s3Object.getKey() + " (bucket " + s3Object.getBucketName() + ")", ace); hasRetried = true;
closeQuietly(wrapped, log); throw new SecurityException("Instruction file not found for S3 object with bucket name: " + retrieved.getBucketName() + ", key: " + retrieved.getKey()); + "Returning object without decryption.", retrieved.getKey(), retrieved.getBucketName()));
throw ace; } else { LOG.info("Retry the download of object " + s3Object.getKey() + " (bucket " + s3Object.getBucketName() + ")", ace); hasRetried = true;
/** * Creates and returns a {@link PutObjectRequest} for the instruction file * with the specified suffix. */ public PutObjectRequest createPutObjectRequest(S3Object s3Object) { if (!s3Object.getBucketName().equals(s3ObjectId.getBucket()) || !s3Object.getKey().equals(s3ObjectId.getKey())) { throw new IllegalArgumentException("s3Object passed inconsistent with the instruction file being created"); } InstructionFileId ifid= s3ObjectId.instructionFileId(suffix); // ObjectMetadata metadata = s3Object.getObjectMetadata(); return new PutObjectRequest(ifid.getBucket(), ifid.getKey(), redirectLocation) .withAccessControlList(accessControlList) .withCannedAcl(cannedAcl) // .withFile(file) // .withInputStream(inputStream) // don't want the metadata for the new instruction file // .withMetadata(metadata == null ? null : metadata.clone()) .withStorageClass(storageClass) .withGeneralProgressListener(getGeneralProgressListener()) .withRequestMetricCollector(getRequestMetricCollector()) ; } }
try (final S3Object s3Object = client.getObject(request)) { flowFile = session.importFrom(s3Object.getObjectContent(), flowFile); attributes.put("s3.bucket", s3Object.getBucketName());
/** * The name of the bucket where the object is being downloaded from. * * @return The name of the bucket where the object is being downloaded from. */ @Override public String getBucketName() { return s3Object.getBucketName(); }
String getBucketName() { return s3obj.getBucketName(); }
String.format( "Necessary encryption info not found in the instruction file '%s' in bucket '%s'", instructionFile.getKey(), instructionFile.getBucketName())); instructionFile.getKey(), instructionFile.getBucketName()));
String.format( "Necessary encryption info not found in the headers of file '%s' in bucket '%s'", object.getKey(), object.getBucketName())); String.format("Unable to retrieve the encryption materials that originally " + "encrypted file '%s' in bucket '%s'.", object.getKey(), object.getBucketName()));
/** * Creates and returns a {@link PutObjectRequest} for the instruction file * with the specified suffix. */ public PutObjectRequest createPutObjectRequest(S3Object s3Object) { if (!s3Object.getBucketName().equals(s3ObjectId.getBucket()) || !s3Object.getKey().equals(s3ObjectId.getKey())) { throw new IllegalArgumentException("s3Object passed inconsistent with the instruction file being created"); } InstructionFileId ifid= s3ObjectId.instructionFileId(suffix); // ObjectMetadata metadata = s3Object.getObjectMetadata(); return new PutObjectRequest(ifid.getBucket(), ifid.getKey(), redirectLocation) .withAccessControlList(accessControlList) .withCannedAcl(cannedAcl) // .withFile(file) // .withInputStream(inputStream) // don't want the metadata for the new instruction file // .withMetadata(metadata == null ? null : metadata.clone()) .withStorageClass(storageClass) .withGeneralProgressListener(getGeneralProgressListener()) .withRequestMetricCollector(getRequestMetricCollector()) ; } }
closeQuietly(wrapped, log); throw new SecurityException("Instruction file not found for S3 object with bucket name: " + retrieved.getBucketName() + ", key: " + retrieved.getKey()); + "Returning object without decryption.", retrieved.getKey(), retrieved.getBucketName()));
/** * The name of the bucket where the object is being downloaded from. * * @return The name of the bucket where the object is being downloaded from. */ @Override public String getBucketName() { return s3Object.getBucketName(); }
@Override public String getBucketName() { return wrapped.getBucketName(); }
String getBucketName() { return s3obj.getBucketName(); }
} else { log.info("Retry the download of object " + s3Object.getKey() + " (bucket " + s3Object.getBucketName() + ")", ace); hasRetried = true;
/** * A simple set. Reads S3 object and put into the Set. * @param name String. The name of the object. * @param object S3Object. The S3 object to read. * @throws Exception on S3 or I/O options. */ public SimpleSet(String name, S3Object object) throws Exception { InputStream objectData = object.getObjectContent(); BufferedReader br=new BufferedReader(new InputStreamReader(objectData)); message = "Initialize Simple Membership: " + object.getBucketName() + " as " + name; makeSet(br); symbols.put(name, this); }
@Override public int compareTo(S3Object o) { if (getBucketName().compareTo(o.getBucketName()) == 0) { return getKey().compareTo(o.getKey()); } else { return getBucketName().compareTo(o.getBucketName()); } }
@Override public boolean exists() { return s3.doesObjectExist(s3Object.getBucketName(), s3Object.getKey()); }
@Override public boolean exists() { return s3.doesObjectExist(s3Object.getBucketName(), s3Object.getKey()); }