Context interface is too basic requiring boilerplate user code
--------------------------------------------------------------
Key: FLUME-978
URL: https://issues.apache.org/jira/browse/FLUME-978
Project: Flume
Issue Type: Improvement
Reporter: Brock Noland
Assignee: Brock Noland
Flume is filled with examples like so:
batchSize = Integer.parseInt(context.get("batch-size", String.class));
if (batchSize == null) {
batchSize = defaultBatchSize;
}
from AvroSink. The Context object should provide at a minimum:
* getBoolean(key)
* getBoolean(key, default)
* getInteger(key)
* getInteger(key, default)
* getLong(key)
* getLong(key, default)
Additionally, the Context object outside of tests, is populated via
FlumeConfiguration which in the end is a properties file. In this common case,
all the values in the Context object will be Strings. Despite this, the users
of the context should be able to use the above convenience methods.
--
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