martinzink commented on code in PR #1877:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1877#discussion_r1820339212
##########
extensions/standard-processors/processors/TailFile.h:
##########
@@ -253,21 +253,21 @@ class TailFile : public core::Processor {
const std::filesystem::path& full_file_name,
TailState &state);
bool getStateFromStateManager(std::map<std::filesystem::path, TailState>
&new_tail_states) const;
- bool getStateFromLegacyStateFile(core::ProcessContext& context,
+ bool getStateFromLegacyStateFile(const core::ProcessContext& context,
std::map<std::filesystem::path, TailState>
&new_tail_states) const;
void doMultifileLookup(core::ProcessContext& context);
void checkForRemovedFiles();
void checkForNewFiles(core::ProcessContext& context);
static std::string baseDirectoryFromAttributes(const
controllers::AttributeProviderService::AttributeMap& attribute_map,
core::ProcessContext& context);
void updateFlowFileAttributes(const std::filesystem::path& full_file_name,
const TailState &state, const std::filesystem::path& fileName,
const std::string &baseName, const std::string
&extension,
- std::shared_ptr<core::FlowFile> &flow_file)
const;
+ core::FlowFile& flow_file) const;
static void updateStateAttributes(TailState &state, uint64_t size, uint64_t
checksum);
- bool isOldFileInitiallyRead(TailState &state) const;
+ bool isOldFileInitiallyRead(const TailState &state) const;
static const char *CURRENT_STR;
static const char *POSITION_STR;
- static const int BUFFER_SIZE = 512;
+ static constexpr int BUFFER_SIZE = 512;
Review Comment:
Good idea but I rather do that in a separate PR, I've created a jira so we
can address all of these inner buffer sizes together (possibly making them
configurable) https://issues.apache.org/jira/browse/MINIFICPP-2483
--
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]