-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] Rename prospector to input #5944
Conversation
Uses type aliases and variable aliases to move all the execution into the input package
Since we are using type aliasing to make the backward compatibility works and this feature is only available in golang 1.9, we should fails hard if you try to use it in a previous golang release.
skip the file directory for now
0b923cd
to
0af0e45
Compare
@ruflin After changing the name from prospector to input, I believe we should also change of harvester, It sound weird in the context of TCP/UDP and also redis. I don't have a proposal yet for that.
|
Agree. I think I had in the past discussions with @urso about this. There are at least 2 cases here. In same cases what we have as harvester is not needed anymore. For example for An option could be to call it One additional note for the prospector / input. For the file case (and probably some others) there is a specific Let's keep it "simple" for now and do only the prospector -> input renaming and I'm pretty sure if we add more inputs some of the names become more obvious. |
Agree lets do it in multiple steps, naming things are hard :) |
about harvester: From my point of view the prospectors are the inputs. If an input/prospector can handle the input directly, it should not be required to create another go-routine doing the actual work. The harvesters to date are basically just the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was looking at this because I wanted to see where you are at with the renaming. I've added a few minor comments about stuff I noticed while reading through the message and config-related changes.
# Each - is a prospector. Most options can be set at the prospector level, so | ||
# you can use different prospectors for various configurations. | ||
# Below are the prospector specific configurations. | ||
# List of input to fetch data. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd say inputs (plural)
# | ||
# Possible options are: | ||
# * log: Reads every line of the log file (default) | ||
# * stdin: Reads the standard in | ||
|
||
#------------------------------ Log prospector -------------------------------- | ||
#------------------------------ Log input -------------------------------- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we change this to say "Input" instead of "Log input" given the various types we now support?
@@ -980,13 +980,13 @@ def test_restart_state(self): | |||
# Make sure all 4 states are persisted | |||
self.wait_until( | |||
lambda: self.log_contains( | |||
"Prospector states cleaned up. Before: 4, After: 4", logfile="filebeat2.log"), | |||
"input states cleaned up. Before: 4, After: 4", logfile="filebeat2.log"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this be capitalized?
max_timeout=10) | ||
|
||
# Wait until registry file is cleaned | ||
self.wait_until( | ||
lambda: self.log_contains( | ||
"Prospector states cleaned up. Before: 0, After: 0", logfile="filebeat2.log"), | ||
"input states cleaned up. Before: 0, After: 0", logfile="filebeat2.log"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as previous comment
@dedemorton Thanks for the check :) |
@ph Ping me when you think this needs a review. |
closing opening followup PRs. |
Rename usage of prospector to input inside the code base to align with the wording or other product like Logstash and also its better name for UDP and TCP.
This PR use type aliasing to make the old types works with the new names, this mean it should be backward compatible with the community beats without requiring them to changes their code. They will need golang 1.9 to leverage that feature, we have guards in place to fails the build in other version.
Also the usage of
prospectors
in the configuration and in the module definition will work until 7.0.TODO