NPE on indices.admin().indices().exists() operation

Hi there. I'm building a plugin that as part of its initialization it
creates an special index if one is not present. It seems though that the
admin operations are still not ready by the time I have my plugin started.
So I put this piece of code in one of the components of the plugin that is
created by the plugin's module.

Code can be found
here: https://gist.github.com/viniciusccarvalho/d27aa2b5aaf8dd8eb9d0

If this is not the right place to create an index, where should I put this
code? I did noticed that my plugin is started before other services in ES.

Regards

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

ES starts all plugins before node startup and completion of recovery.

Run your plugin in a separate thread, and wait for cluster state 'green'
(or 'yellow') before creating an index.

Jörg

On Mon, Jul 29, 2013 at 5:45 PM, Vinicius Carvalho <
viniciusccarvalho@gmail.com> wrote:

Hi there. I'm building a plugin that as part of its initialization it
creates an special index if one is not present. It seems though that the
admin operations are still not ready by the time I have my plugin started.
So I put this piece of code in one of the components of the plugin that is
created by the plugin's module.

Code can be found here:
Replicator · GitHub

If this is not the right place to create an index, where should I put this
code? I did noticed that my plugin is started before other services in ES.

Regards

--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.