Install plugin without a cluster restart?

Hey,
I've been playing with a couple of plugins (bigdesk and hunspell) and
have noticed that bigdesk does not require a restart while hunspell does.
I'm guessing this is because bigdesk is a site plugin while hunspell is a
jar based plugin.

Is it possible to install jar based plugins without restarting?
Alternatively, is it possible to update some plugin data (eg, the dict/aff
files for hunspell) without restarting the cluster. I know that with native
analyzers/filters (synonym token filter for example) it is possible to
update the synonym file and then that updated synonym file takes affect
when a new index is created that uses it. I also tried dynamically adding a
new locale to the jar which didn't work. My guess is that this is a
limitation of the hunspell plugin.

Thanks!
Paul

--

Hi Paul,

You can probably restart one by one node and your users won't see it, I guess...
Then, when all nodes are reloaded, you will be able to play with your new features.

HTH

David :wink:
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 12 nov. 2012 à 21:35, ppearcy ppearcy@gmail.com a écrit :

Hey,
I've been playing with a couple of plugins (bigdesk and hunspell) and have noticed that bigdesk does not require a restart while hunspell does. I'm guessing this is because bigdesk is a site plugin while hunspell is a jar based plugin.

Is it possible to install jar based plugins without restarting? Alternatively, is it possible to update some plugin data (eg, the dict/aff files for hunspell) without restarting the cluster. I know that with native analyzers/filters (synonym token filter for example) it is possible to update the synonym file and then that updated synonym file takes affect when a new index is created that uses it. I also tried dynamically adding a new locale to the jar which didn't work. My guess is that this is a limitation of the hunspell plugin.

Thanks!
Paul

--

Yes, it is kind of a shortcoming of the hunspell plugin, because of the
size of the dictionary, it is loaded as a singleton at plugin start time.
Feel free to submit a patch for dictionary load improvement!

There is a node restart API (well hidden in the docs but it should help).

Jörg

On Monday, November 12, 2012 9:35:29 PM UTC+1, ppearcy wrote:

Hey,
I've been playing with a couple of plugins (bigdesk and hunspell) and
have noticed that bigdesk does not require a restart while hunspell does.
I'm guessing this is because bigdesk is a site plugin while hunspell is a
jar based plugin.

Is it possible to install jar based plugins without restarting?
Alternatively, is it possible to update some plugin data (eg, the dict/aff
files for hunspell) without restarting the cluster. I know that with native
analyzers/filters (synonym token filter for example) it is possible to
update the synonym file and then that updated synonym file takes affect
when a new index is created that uses it. I also tried dynamically adding a
new locale to the jar which didn't work. My guess is that this is a
limitation of the hunspell plugin.

Thanks!
Paul

--

In my playings, I'm also not able to install jar-based plugins without
restarting. This problem does not seem limited to hunspell only.

Is there any way to install (or update) a jar-based plugin without rolling
the cluster, or how hard would it be to add? Thanks for any insight.

On Monday, November 12, 2012 12:35:29 PM UTC-8, ppearcy wrote:

Hey,
I've been playing with a couple of plugins (bigdesk and hunspell) and
have noticed that bigdesk does not require a restart while hunspell does.
I'm guessing this is because bigdesk is a site plugin while hunspell is a
jar based plugin.

Is it possible to install jar based plugins without restarting?
Alternatively, is it possible to update some plugin data (eg, the dict/aff
files for hunspell) without restarting the cluster. I know that with native
analyzers/filters (synonym token filter for example) it is possible to
update the synonym file and then that updated synonym file takes affect
when a new index is created that uses it. I also tried dynamically adding a
new locale to the jar which didn't work. My guess is that this is a
limitation of the hunspell plugin.

Thanks!
Paul

--

You could only do it via jvm hotswap (or similar
java - Is JRebel ever used in production environments? What can it reload on the JVM? - Stack Overflow, fakereplace · GitHubhttps://github.com/fakereplace/fakereplace
)

Please correct me if I'm wrong!

Peter.

On Wednesday, December 5, 2012 5:06:08 AM UTC+1, Jeffrey Gerard wrote:

In my playings, I'm also not able to install jar-based plugins without
restarting. This problem does not seem limited to hunspell only.

Is there any way to install (or update) a jar-based plugin without rolling
the cluster, or how hard would it be to add? Thanks for any insight.

On Monday, November 12, 2012 12:35:29 PM UTC-8, ppearcy wrote:

Hey,
I've been playing with a couple of plugins (bigdesk and hunspell) and
have noticed that bigdesk does not require a restart while hunspell does.
I'm guessing this is because bigdesk is a site plugin while hunspell is a
jar based plugin.

Is it possible to install jar based plugins without restarting?
Alternatively, is it possible to update some plugin data (eg, the dict/aff
files for hunspell) without restarting the cluster. I know that with native
analyzers/filters (synonym token filter for example) it is possible to
update the synonym file and then that updated synonym file takes affect
when a new index is created that uses it. I also tried dynamically adding a
new locale to the jar which didn't work. My guess is that this is a
limitation of the hunspell plugin.

Thanks!
Paul

--

This all looks like too much trickery and hacking. I believe there is a
much simpler way to do that. This should be possible to do in Elasticsearch
core - by explicitly unloading and then reloading the binaries loaded from
the plugins folder. Haven't looked into it yet though.

We will be needing this ourselves in the near future when deploying custom
plugins to a cluster with a couple of dozen servers, and the ability to
update a plugin without restarting the cluster can really come in handy.

We will be going to investigate this and probably contribute our work back,
but it's going to take some time until we get there. If anyone is going to
work on it before, we will be glad to help. And obviously, some hints from
ES core members are always welcome :slight_smile:

On Wed, Dec 5, 2012 at 10:19 AM, Karussell tableyourtime@gmail.com wrote:

You could only do it via jvm hotswap (or similar
java - Is JRebel ever used in production environments? What can it reload on the JVM? - Stack Overflow, fakereplace · GitHubhttps://github.com/fakereplace/fakereplace
)

Please correct me if I'm wrong!

Peter.

On Wednesday, December 5, 2012 5:06:08 AM UTC+1, Jeffrey Gerard wrote:

In my playings, I'm also not able to install jar-based plugins without
restarting. This problem does not seem limited to hunspell only.

Is there any way to install (or update) a jar-based plugin without
rolling the cluster, or how hard would it be to add? Thanks for any
insight.

On Monday, November 12, 2012 12:35:29 PM UTC-8, ppearcy wrote:

Hey,
I've been playing with a couple of plugins (bigdesk and hunspell) and
have noticed that bigdesk does not require a restart while hunspell does.
I'm guessing this is because bigdesk is a site plugin while hunspell is a
jar based plugin.

Is it possible to install jar based plugins without restarting?
Alternatively, is it possible to update some plugin data (eg, the dict/aff
files for hunspell) without restarting the cluster. I know that with native
analyzers/filters (synonym token filter for example) it is possible to
update the synonym file and then that updated synonym file takes affect
when a new index is created that uses it. I also tried dynamically adding a
new locale to the jar which didn't work. My guess is that this is a
limitation of the hunspell plugin.

Thanks!
Paul

--

--

Hey,

This should be possible to do in Elasticsearch core

yes, one would think so. But the same trickery with
classloaders/hotswapping would be necessary ... so, I doubt it will be
included! But one could implement this in a plugin itself :slight_smile:

And if you only need to install (no reinstall!) the plugin you could
probably use:

Regards,
Peter.

On Wednesday, December 5, 2012 9:35:30 AM UTC+1, Itamar Syn-Hershko wrote:

This all looks like too much trickery and hacking. I believe there is a
much simpler way to do that. This should be possible to do in Elasticsearch
core - by explicitly unloading and then reloading the binaries loaded from
the plugins folder. Haven't looked into it yet though.

We will be needing this ourselves in the near future when deploying custom
plugins to a cluster with a couple of dozen servers, and the ability to
update a plugin without restarting the cluster can really come in handy.

We will be going to investigate this and probably contribute our work
back, but it's going to take some time until we get there. If anyone is
going to work on it before, we will be glad to help. And obviously, some
hints from ES core members are always welcome :slight_smile:

On Wed, Dec 5, 2012 at 10:19 AM, Karussell <tabley...@gmail.com<javascript:>

wrote:

You could only do it via jvm hotswap (or similar
java - Is JRebel ever used in production environments? What can it reload on the JVM? - Stack Overflow, fakereplace · GitHubhttps://github.com/fakereplace/fakereplace
)

Please correct me if I'm wrong!

Peter.

On Wednesday, December 5, 2012 5:06:08 AM UTC+1, Jeffrey Gerard wrote:

In my playings, I'm also not able to install jar-based plugins without
restarting. This problem does not seem limited to hunspell only.

Is there any way to install (or update) a jar-based plugin without
rolling the cluster, or how hard would it be to add? Thanks for any
insight.

On Monday, November 12, 2012 12:35:29 PM UTC-8, ppearcy wrote:

Hey,
I've been playing with a couple of plugins (bigdesk and hunspell) and
have noticed that bigdesk does not require a restart while hunspell does.
I'm guessing this is because bigdesk is a site plugin while hunspell is a
jar based plugin.

Is it possible to install jar based plugins without restarting?
Alternatively, is it possible to update some plugin data (eg, the dict/aff
files for hunspell) without restarting the cluster. I know that with native
analyzers/filters (synonym token filter for example) it is possible to
update the synonym file and then that updated synonym file takes affect
when a new index is created that uses it. I also tried dynamically adding a
new locale to the jar which didn't work. My guess is that this is a
limitation of the hunspell plugin.

Thanks!
Paul

--

--