szaszm commented on code in PR #1586:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1586#discussion_r1258328212


##########
extensions/aws/processors/PutS3Object.h:
##########
@@ -97,54 +111,46 @@ class PutS3Object : public S3Processor {
 
   class ReadCallback {
    public:
-    static constexpr uint64_t MAX_SIZE = 5_GiB;
-    static constexpr uint64_t BUFFER_SIZE = 4_KiB;
-
-    ReadCallback(uint64_t flow_size, const 
minifi::aws::s3::PutObjectRequestParameters& options, aws::s3::S3Wrapper& 
s3_wrapper)
-      : flow_size_(flow_size)
-      , options_(options)
-      , s3_wrapper_(s3_wrapper) {
+    ReadCallback(uint64_t flow_size, const 
minifi::aws::s3::PutObjectRequestParameters& options, aws::s3::S3Wrapper& 
s3_wrapper,
+          uint64_t multipart_threshold, uint64_t multipart_size, 
core::logging::Logger& logger)

Review Comment:
   I think the class definition could be moved to the .cpp file, too. I don't 
think it's used anywhere outside this processor.



##########
extensions/aws/s3/S3Wrapper.cpp:
##########
@@ -75,42 +71,158 @@ std::string 
S3Wrapper::getEncryptionString(Aws::S3::Model::ServerSideEncryption
   return "";
 }
 
-std::optional<PutObjectResult> S3Wrapper::putObject(const 
PutObjectRequestParameters& put_object_params, const 
std::shared_ptr<Aws::IOStream>& data_stream) {
-  Aws::S3::Model::PutObjectRequest request;
-  request.SetBucket(put_object_params.bucket);
-  request.SetKey(put_object_params.object_key);
-  
request.SetStorageClass(STORAGE_CLASS_MAP.at(put_object_params.storage_class));
-  
request.SetServerSideEncryption(SERVER_SIDE_ENCRYPTION_MAP.at(put_object_params.server_side_encryption));
-  request.SetContentType(put_object_params.content_type);
-  request.SetMetadata(put_object_params.user_metadata_map);
+std::shared_ptr<Aws::StringStream> S3Wrapper::readFlowFileStream(const 
std::shared_ptr<io::InputStream>& stream, uint64_t read_limit, uint64_t& 
read_size_out) {

Review Comment:
   We could return the StringStream by value with no downside as far as I can 
see.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to