Reloading native script factory w/o ES downtime


(Colin Dellow) #1

I've implemented a native script factory to provide custom scoring,
and I'm wondering if it's possible to rev the jar and the underlying
implementation without having to restart ES.

Apologies if this is a naive question--I don't have much background in
either the JVM world or the ES world.

Is the answer just run a cluster with at least 2 nodes and cycle nodes
out of the cluster to restart them?

Cheers,
colin


(Shay Banon) #2

There is no way to reload native scripts, though it is optionally possible
to implement on the JVM (though tricky). Note though that you can provide
parameters to a native script, so you can have those affect the
calculations to a degree.

On Sun, Jun 10, 2012 at 11:49 PM, Colin Dellow cldellow@gmail.com wrote:

I've implemented a native script factory to provide custom scoring,
and I'm wondering if it's possible to rev the jar and the underlying
implementation without having to restart ES.

Apologies if this is a naive question--I don't have much background in
either the JVM world or the ES world.

Is the answer just run a cluster with at least 2 nodes and cycle nodes
out of the cluster to restart them?

Cheers,
colin


(Colin Dellow) #3

On Wednesday, 13 June 2012 13:55:48 UTC-4, kimchy wrote:

There is no way to reload native scripts, though it is optionally possible
to implement on the JVM (though tricky). Note though that you can provide
parameters to a native script, so you can have those affect the
calculations to a degree.

Thanks, Shay. I definitely don't want to get involved with crazy things
with the class loaders and we are currently using parameters, so hopefully
this is a rare occurrence (e.g. a bugfix).

I'm going to investigate if we can run 2 nodes on 1 box (1 master + 1
data), and then bring up another data node whenever we rev the jar.

Long term, I guess this would be a non-issue because we'd actually have a
proper cluster, but in the short term, hopefully this works.


(system) #4