Skip to content
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

Introduce close_eof harvster option #1914

Merged
merged 1 commit into from
Jun 28, 2016
Merged

Conversation

ruflin
Copy link
Member

@ruflin ruflin commented Jun 27, 2016

Depends on #1909


# Closes the file handler when the end of the file is reached. This is useful for files where
# content is only written to once. In case further content is added to the file later again
# it will be picked up with the previous state latest after scan_frequency.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In case reading goes faster then writing, Isn't there always a chance of hitting EOF?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. But I assume for files with 1 event, the hole event is flushed at once.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps I should not make an example here in the config file and only explain what it does. The example should be in the docs pages.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed it to:

  # Closes the file handler as soon as the harvesters reaches then end of the file.
  # The file will be picked up again by the harvester at previous known state
  # after scan_frequency in case the file can still be discovered by the prospector.
  #close_eof: false

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add note of potential data loss if file is deleted within close and scan_frequency

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will add it in #1915

@ruflin
Copy link
Member Author

ruflin commented Jun 28, 2016

@urso Changes applied and rebased.

@ruflin
Copy link
Member Author

ruflin commented Jun 28, 2016

jenkins, test it

@ruflin
Copy link
Member Author

ruflin commented Jun 28, 2016

@urso I triggered this build manually as Jenkins didn't want to start it initially: http://build-eu-00.elastic.co/job/Beats-PR/2217/console I will ping you when green.

@urso urso merged commit ee38038 into elastic:master Jun 28, 2016
@ruflin ruflin deleted the fb-close-eof branch June 28, 2016 14:00
@@ -176,6 +176,11 @@ filebeat.prospectors:
# Note: Potential data loss if file reading was not finished when file was removed.
#close_removed: false

# Closes the file handler as soon as the harvesters reaches then end of the file.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ruflin needs rephrase: Closes the file handler as soon as the harvester reaches end of the file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants