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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

NullPointerException on using repeated field for JSON body template in HTTP sink #156

Closed
prakharmathur82 opened this issue Feb 18, 2022 · 2 comments 路 Fixed by #162
Closed
Assignees
Labels
bug Something isn't working

Comments

@prakharmathur82
Copy link
Member

馃悰 Bug Report

For HTTP Sink JSON Templatised body, if there is a repeated field being used for JSON body creation, then firehose silently fails with NullPointerException while reporting metrics

java.lang.NullPointerException: null
	at java.time.Duration.between(Duration.java:473)
	at io.odpf.firehose.metrics.StatsDReporter.captureDurationSince(StatsDReporter.java:53)
	at io.odpf.firehose.metrics.Instrumentation.captureSinkExecutionTelemetry(Instrumentation.java:165)
	at io.odpf.firehose.sink.AbstractSink.pushMessage(AbstractSink.java:56)
	at io.odpf.firehose.sinkdecorator.SinkDecorator.pushMessage(SinkDecorator.java:28)

Expected Behavior

Firehose should throw proper errors for non-supported field types

Steps to Reproduce

Steps to reproduce the behavior.

  1. Use an input proto having repeated field
  2. Use that repeated field in JSON body template
  3. Run firehose
@prakharmathur82 prakharmathur82 added the bug Something isn't working label Feb 18, 2022
@lavkesh
Copy link
Member

lavkesh commented Mar 15, 2022

It's happening in the prepare method, the exception is not handled properly.

@prakharmathur82
Copy link
Member Author

It is happening for normal HTTP sink as well, if you leave extra spaces in the service url

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants