Overriding the HystrixCommand#execute

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Overriding the HystrixCommand#execute

dcrissman
While working on the Graphite issue, I attempted to upgrade the Hystrix and Salvo libraries. I noticed that in the current version of Hystrix the HystrixCommand#execute method has been marked final, so the overrides in rdbms and mongo are made illegal. Sadly, upgrading the libraries did not solve the Graphite issue, but I assume eventually we will want to upgrade and at that time we'll need to deal with this.

So, what was the original intention of overriding this method? What would happen if we simply deleted the overrides?
Reply | Threaded
Open this post in threaded view
|

Re: Overriding the HystrixCommand#execute

lcestari
The idea was to use Hystrix to generate the metrics for Graphite.

So each service would have an specific unique name and metrics around it and the integration would be seamless. Also the Hystrix can enable us to maintain different thread pools for each services to avoid running out of thread just because a problem on a specific service (but I dont think that we are using this feature so far).

Naveen, please correct me if I said something wrong or any misunderstanding
Reply | Threaded
Open this post in threaded view
|

Re: Overriding the HystrixCommand#execute

jewzaam
Administrator
Luan, I think the question is simply around why is execute method overriden, not why we're using Hystrix.

Dennis, it was necessary to get at the underlying exception thrown by hystrix.  Without that the original cause of failure is lost.  Maybe there is a new way to get at it.


On Wed Feb 04 2015 at 3:06:34 PM lcestari [via lightblue-dev] <[hidden email]> wrote:
The idea was to use Hystrix to generate the metrics for Graphite.

So each service would have an specific unique name and metrics around it and the integration would be seamless. Also the Hystrix can enable us to maintain different thread pools for each services to avoid running out of thread just because a problem on a specific service (but I dont think that we are using this feature so far).

Naveen, please correct me if I said something wrong or any misunderstanding


If you reply to this email, your message will be added to the discussion below:
To start a new topic under lightblue-dev, email [hidden email]
To unsubscribe from lightblue-dev, click here.
NAML
Reply | Threaded
Open this post in threaded view
|

Re: Overriding the HystrixCommand#execute

dcrissman
jewzaam wrote
Luan, I think the question is simply around why is execute method
overriden, not why we're using Hystrix.
That is correct. Sorry if my question was unclear.

jewzaam wrote
Dennis, it was necessary to get at the underlying exception thrown by
hystrix.  Without that the original cause of failure is lost.  Maybe there
is a new way to get at it.

https://github.com/lightblue-platform/lightblue-mongo/blob/daaea6b10721bdfbef7cc8f067f6c78ac8b362b6/hystrix/src/main/java/com/redhat/lightblue/mongo/hystrix/AbstractMongoCommand.java#L60-L70
Lost? Wouldn't it still be in the stacktrace? Or do you mean that you wanted to be able to try/catch the underlying Exception somewhere else?
Reply | Threaded
Open this post in threaded view
|

Re: Overriding the HystrixCommand#execute

jewzaam
Administrator
Yes, try/catch the underlying exception elsewhere.  Sounds like we need to change it.


On Thu Feb 05 2015 at 4:09:49 PM dcrissman [via lightblue-dev] <[hidden email]> wrote:
jewzaam wrote
Luan, I think the question is simply around why is execute method
overriden, not why we're using Hystrix.
That is correct. Sorry if my question was unclear.

jewzaam wrote
Dennis, it was necessary to get at the underlying exception thrown by
hystrix.  Without that the original cause of failure is lost.  Maybe there
is a new way to get at it.

https://github.com/lightblue-platform/lightblue-mongo/blob/daaea6b10721bdfbef7cc8f067f6c78ac8b362b6/hystrix/src/main/java/com/redhat/lightblue/mongo/hystrix/AbstractMongoCommand.java#L60-L70
Lost? Wouldn't it still be in the stacktrace? Or do you mean that you wanted to be able to try/catch the underlying Exception somewhere else?


If you reply to this email, your message will be added to the discussion below:
To start a new topic under lightblue-dev, email [hidden email]
To unsubscribe from lightblue-dev, click here.
NAML