Skip to content

Commit

Permalink
enable multithreading on PutSplunkHTTP
Browse files Browse the repository at this point in the history
  • Loading branch information
martinzink committed Jan 5, 2022
1 parent e130d7d commit 3283a3a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
4 changes: 4 additions & 0 deletions extensions/splunk/PutSplunkHTTP.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ class PutSplunkHTTP final : public SplunkHECProcessor {
void onTrigger(const std::shared_ptr<core::ProcessContext> &context, const std::shared_ptr<core::ProcessSession> &session) override;
void initialize() override;
void onSchedule(const std::shared_ptr<core::ProcessContext> &context, const std::shared_ptr<core::ProcessSessionFactory> &sessionFactory) override;

bool isSingleThreaded() const override {
return false;
}
};

} // namespace org::apache::nifi::minifi::extensions::splunk
Expand Down
4 changes: 4 additions & 0 deletions extensions/splunk/QuerySplunkIndexingStatus.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ class QuerySplunkIndexingStatus final : public SplunkHECProcessor {
void initialize() override;
void onSchedule(const std::shared_ptr<core::ProcessContext> &context, const std::shared_ptr<core::ProcessSessionFactory> &sessionFactory) override;

bool isSingleThreaded() const override {
return true;
}

protected:
uint32_t batch_size_ = 1000;
std::chrono::milliseconds max_age_ = std::chrono::hours(1);
Expand Down
4 changes: 0 additions & 4 deletions extensions/splunk/SplunkHECProcessor.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,6 @@ class SplunkHECProcessor : public core::Processor {
void initialize() override;
void onSchedule(const std::shared_ptr<core::ProcessContext> &context, const std::shared_ptr<core::ProcessSessionFactory> &sessionFactory) override;

bool isSingleThreaded() const override {
return true;
}

core::annotation::Input getInputRequirement() const override {
return core::annotation::Input::INPUT_REQUIRED;
}
Expand Down

0 comments on commit 3283a3a

Please sign in to comment.