Add codec to http source#5694
Conversation
Signed-off-by: Hai Yan <oeyh@amazon.com>
| httpRequestExceptionHandler = new HttpRequestExceptionHandler(pluginMetrics); | ||
| final PluginModel codecConfiguration = sourceConfig.getCodec(); | ||
| if (codecConfiguration == null) { | ||
| codec = null; |
There was a problem hiding this comment.
Can we initialize the json codec here itself.
There was a problem hiding this comment.
I'm not sure I follow here. Can you clarify a bit more?
Do you mean you want it to be a JsonInputCodec and disallow other type of input codecs? If so, we can add a validation on the sourceConfig to prevent the use of other codecs that don't fit here.
There was a problem hiding this comment.
Sync'ed up and resolved offline.
Signed-off-by: Hai Yan <oeyh@amazon.com>
|
@oeyh , The current implementation is pretty much the same as the |
@dlvenable I needed the functionality introduced in #5054 in JsonInputCodec to parse CloudWatch Logs data |
* Add codec to http source Signed-off-by: Hai Yan <oeyh@amazon.com> * Add a test with sample data Signed-off-by: Hai Yan <oeyh@amazon.com> --------- Signed-off-by: Hai Yan <oeyh@amazon.com>
Description
Add codec to http source so it can use the functionality introduced in #5054 to parse CloudWatch Logs data.
The config would look like this:
Issues Resolved
N/A
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.