[WIP] Rename prospector to input#5944
[WIP] Rename prospector to input#5944ph wants to merge 63 commits intoelastic:masterfrom ph:refactor/rename-prospector-to-input
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
|
@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 |
dedemorton
left a comment
There was a problem hiding this comment.
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. |
| # * stdin: Reads the standard in | ||
|
|
||
| #------------------------------ Log prospector -------------------------------- | ||
| #------------------------------ Log input -------------------------------- |
There was a problem hiding this comment.
Should we change this to say "Input" instead of "Log input" given the various types we now support?
| 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.
Shouldn't this be capitalized?
| 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.
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
prospectorsin the configuration and in the module definition will work until 7.0.TODO