lordgamez commented on code in PR #1586:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1586#discussion_r1234106443
##########
docker/test/integration/cluster/checkers/AwsChecker.py:
##########
@@ -29,6 +29,18 @@ def check_s3_server_object_data(self, container_name,
test_data):
(code, file_data) =
self.container_communicator.execute_command(container_name, ["cat", s3_mock_dir
+ "/binaryData"])
return code == 0 and file_data == test_data
+ @retry_check()
+ def check_s3_server_object_hash(self, container_name: str,
expected_file_hash: str):
+ (code, output) =
self.container_communicator.execute_command(container_name, ["find",
"/s3mockroot/test_bucket", "-mindepth", "1", "-maxdepth", "1", "-type", "d"])
+ if code != 0:
+ return False
+ s3_mock_dir = output.strip()
+ (code, md5_output) =
self.container_communicator.execute_command(container_name, ["md5sum",
s3_mock_dir + "/binaryData"])
+ if code != 0:
+ return False
+ file_hash = md5_output.split(' ')[0].strip()
+ return code == 0 and file_hash == expected_file_hash
Review Comment:
Removed in 5624af2c3ed7c36ecb55193c739d6845bf26d877
##########
extensions/aws/s3/MultipartUploadStateStorage.cpp:
##########
@@ -0,0 +1,165 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#include "MultipartUploadStateStorage.h"
+
+#include <unordered_map>
+
+#include "utils/StringUtils.h"
+
+namespace org::apache::nifi::minifi::aws::s3 {
+
+MultipartUploadStateStorage::MultipartUploadStateStorage(const std::string&
state_directory, const std::string& state_id) {
+ if (state_directory.empty()) {
+ char format[] = "/var/tmp/nifi-minifi-cpp.s3-multipart-upload.XXXXXX";
+ state_file_path_ =
minifi::utils::file::FileUtils::create_temp_directory(format);
+ } else {
+ state_file_path_ = std::filesystem::path(state_directory) /
std::string(state_id + "-s3-multipart-upload-state.properties");
+ if (!std::filesystem::exists(state_file_path_)) {
+ std::filesystem::create_directories(state_file_path_.parent_path());
+ std::ofstream ofs(state_file_path_);
Review Comment:
My mistake, removed in 5624af2c3ed7c36ecb55193c739d6845bf26d877
--
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]