Skip to content

Commit 84866ac

Browse files
committed
Further touching
1 parent cd62aba commit 84866ac

File tree

2 files changed

+13
-28
lines changed

2 files changed

+13
-28
lines changed

components/core/src/clp/clo/OutputHandler.hpp

+10-25
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
#include <queue>
77
#include <string>
8+
#include <string_view>
89

910
#include <mongocxx/client.hpp>
1011
#include <mongocxx/collection.hpp>
@@ -29,14 +30,14 @@ class OutputHandler {
2930
// Methods
3031
/**
3132
* Adds a query result to a batch or sends it to the destination.
32-
* @param original_path The original path of the file input log event belongs to.
33-
* @param original_path The original id of the file input log event belongs to.
33+
* @param orig_file_path The original path of the file that input log event belongs to.
34+
* @param orig_file_id The original id of the file that input log event belongs to.
3435
* @param encoded_message The encoded log event
35-
* @param decompressed_message The content of the log event.
36+
* @param decompressed_message The decompressed log event.
3637
* @return ErrorCode_Success if the result was added successfully, an error code otherwise.
3738
*/
3839
virtual ErrorCode add_result(
39-
std::string_view original_path,
40+
std::string_view orig_file_path,
4041
std::string_view orig_file_id,
4142
streaming_archive::reader::Message const& encoded_message,
4243
std::string_view decompressed_message
@@ -87,13 +88,9 @@ class NetworkOutputHandler : public OutputHandler {
8788
// Methods inherited from Client
8889
/**
8990
* Sends a result to the network destination.
90-
* @param original_path The original path of the file input log event belongs to.
91-
* @param original_path The original id of the file input log event belongs to.
92-
* @param encoded_message The encoded log event
93-
* @param message The content of the log event.
9491
*/
9592
ErrorCode add_result(
96-
std::string_view original_path,
93+
std::string_view orig_file_path,
9794
std::string_view orig_file_id,
9895
streaming_archive::reader::Message const& encoded_message,
9996
std::string_view decompressed_message
@@ -172,14 +169,10 @@ class ResultsCacheOutputHandler : public OutputHandler {
172169
// Methods inherited from OutputHandler
173170
/**
174171
* Adds a result to the batch.
175-
* @param original_path The original path of the file input log event belongs to.
176-
* @param original_path The original id of the file input log event belongs to.
177-
* @param encoded_message The encoded log event
178-
* @param message The content of the log event.
179-
* @return
172+
* @return ErrorCode_Success
180173
*/
181174
ErrorCode add_result(
182-
std::string_view original_path,
175+
std::string_view orig_file_path,
183176
std::string_view orig_file_id,
184177
streaming_archive::reader::Message const& encoded_message,
185178
std::string_view decompressed_message
@@ -234,16 +227,8 @@ class CountOutputHandler : public OutputHandler {
234227
explicit CountOutputHandler(int reducer_socket_fd);
235228

236229
// Methods inherited from OutputHandler
237-
/**
238-
* Adds a result.
239-
* @param original_path The original path of the file input log event belongs to.
240-
* @param original_path The original id of the file input log event belongs to.
241-
* @param encoded_message The encoded log event
242-
* @param message The content of the log event.
243-
* @return Errorcode
244-
*/
245230
ErrorCode add_result(
246-
std::string_view original_path,
231+
std::string_view orig_file_path,
247232
std::string_view orig_file_id,
248233
streaming_archive::reader::Message const& encoded_message,
249234
std::string_view decompressed_message
@@ -274,7 +259,7 @@ class CountByTimeOutputHandler : public OutputHandler {
274259

275260
// Methods inherited from OutputHandler
276261
ErrorCode add_result(
277-
std::string_view original_path,
262+
std::string_view orig_file_path,
278263
std::string_view orig_file_id,
279264
streaming_archive::reader::Message const& encoded_message,
280265
std::string_view decompressed_message

components/core/src/clp/clo/clo.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ static SearchFilesResult search_file(
9898
std::unique_ptr<OutputHandler>& output_handler
9999
) {
100100
File compressed_file;
101-
Message compressed_message;
101+
Message encoded_message;
102102
string decompressed_message;
103103

104104
ErrorCode error_code = archive.open_file(compressed_file, file_metadata_ix);
@@ -119,15 +119,15 @@ static SearchFilesResult search_file(
119119
query,
120120
archive,
121121
compressed_file,
122-
compressed_message,
122+
encoded_message,
123123
decompressed_message
124124
))
125125
{
126126
if (ErrorCode_Success
127127
!= output_handler->add_result(
128128
compressed_file.get_orig_path(),
129129
compressed_file.get_orig_file_id_as_string(),
130-
compressed_message,
130+
encoded_message,
131131
decompressed_message
132132
))
133133
{

0 commit comments

Comments
 (0)