[
https://issues.apache.org/jira/browse/FLUME-823?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13154408#comment-13154408
]
Will McQueen commented on FLUME-823:
------------------------------------
Arvind -- yes, the problem I was originally referring to was wrt a user calling
the 'flumeng' script directly, you're right. And in the case of a bootstrapping
VM (like Eric describes) where init would call a flume service, that flume
service calls flumeng-daemon.sh (not yet implemented), which in turn would call
the "flumeng" script... so ultimately the 'flumeng' script is called either
way. If I'm catching your wavelength here, I think what you have in mind is
that either the flume service script or the 'flumeng-daemon.sh' script would
export some boolean env var flag that flumeng script would check, like:
export CALLED_FROM_SERVICE=true
The fail-fast logic would be activated in the Java code (after passing the env
var to the Java main class as a sysprop, like -Dcalled.from.service={true,}),
depending on the value of that var. For example:
1) If Flume NG is invoked directly via 'flumeng' script, then
CALLED_FROM_SERVICE wasn't set and:
a) If the user specified file, then:
i) If the config file doesn't exist, then fail fast
ii) If the config file exists but is invalid, then agent continues
running in unprovisioned mode, but enters a polling state. Warning is issued.
b) If the user didn't specify a file, then:
i) fail fast
2) If Flume NG is invoked via 'flume-daemon.sh' from a service script in
/etc/init.d or from flume-daemon.sh script in FLUME_HOME/bin, then:
a) The config file will be searched-for in some well-known location,
provided to 'flumeng' script by flume-daemon.sh.
b) If the file doesn't exist, then enter polling state and issue warning
(Eric's scenario)
c) If the config file exists but is invalid, then agent continues running
in unprovisioned mode, and enters a polling state. Warning is issued.
Was that similar to what you were thinking?
> The properties configuration provider should fail if the configuration file
> is not found
> ----------------------------------------------------------------------------------------
>
> Key: FLUME-823
> URL: https://issues.apache.org/jira/browse/FLUME-823
> Project: Flume
> Issue Type: Bug
> Components: Configuration
> Affects Versions: NG alpha 1
> Reporter: Will McQueen
> Assignee: Arvind Prabhakar
> Fix For: NG alpha 2
>
>
> When specifying a props file (eg, flume.properties) that doesn't exist, the
> logs don't indicate any failure to read the config file. The configuration
> provider should probably just fail if the config file isn't found.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira