I'm thinking about developing an elasticsearch plugin and I would like to
be able to start elasticsearch with my plugin loaded from within IntelliJ.
I couldn't find how I should do this.
I would also like to be able to set breakpoints, I've seen some discussion
about debugging, and I've seen that people say they just log a lot (which I
personally don't like when debugging a complex algoritm).
So how would I set up:
starting elasticsearch with the plugin loaded (would love that from
within IntelliJ but commandline is also a good workflow for me).
set a breakpoint in my plugin code and let IntelliJ hit it.
and possibly:
3. attach the ElasticSearch source to IntelliJ for hard-core debugging.
I do this with all my plugins, not sure where your problem exactly is. As
long as you have an es-plugin.properties file pointing to your plugin in
your classpath, you do not have any problem, starting elasticsearch from
your IDE with the help of the NodeBuilder class.
You can start all those tests directly from your IDE, in debug mode, with
breakpoints attached.
This should help you to test all your plugin code in your favorite IDE. In
case of questions, just ask, I'm glad to help.
--Alex
On Mon, Mar 25, 2013 at 4:36 PM, Jaap Taal jaap@q42.nl wrote:
Hi,
I'm thinking about developing an elasticsearch plugin and I would like to
be able to start elasticsearch with my plugin loaded from within IntelliJ.
I couldn't find how I should do this.
I would also like to be able to set breakpoints, I've seen some discussion
about debugging, and I've seen that people say they just log a lot (which I
personally don't like when debugging a complex algoritm).
So how would I set up:
starting elasticsearch with the plugin loaded (would love that from
within IntelliJ but commandline is also a good workflow for me).
set a breakpoint in my plugin code and let IntelliJ hit it.
and possibly:
3. attach the Elasticsearch source to IntelliJ for hard-core debugging.
Install the IntelliJ TestNG plugin. Write your ES plugin test
framework (start node with plugin, stop node) as TestNG tests for maven
surefire (just like ES does in master). Use right-mouse-button popup
menu "Debug - All tests" (first entry is JUnit, second entry is TestNG)
to start tests. YMMV because a target JVM is started by IntelliJ und
controlled via a socket.
Just configure your breakpoints in the menu "Run" (Toggle ...
breakpoint)
Elasticsearch source can be easily added if you have cloned from
github und imported it into IntelliJ.
Maybe it's also possible to write ES test framework in JUnit. But I find
TestNG way more easier and it works like a charme.
I find extensive logging more useful because I was born on the command
line
Jörg
Am 25.03.13 16:36, schrieb Jaap Taal:
Hi,
I'm thinking about developing an elasticsearch plugin and I would like
to be able to start elasticsearch with my plugin loaded from within
IntelliJ.
I couldn't find how I should do this.
I would also like to be able to set breakpoints, I've seen some
discussion about debugging, and I've seen that people say they just
log a lot (which I personally don't like when debugging a complex
algoritm).
So how would I set up:
starting elasticsearch with the plugin loaded (would love that from
within IntelliJ but commandline is also a good workflow for me).
set a breakpoint in my plugin code and let IntelliJ hit it.
and possibly:
3. attach the Elasticsearch source to IntelliJ for hard-core debugging.
Thanks a lot guys, I'm going to try that, my problem was that I had no
clue how to start it all...
I was working on Jorg's elasticsearch-index-termlist and I did it with
repeatedly starting and stopping a standalone instance of
elasticsearch and installing the plugin with plugin.bat.
I was just lucky to get it right after a couple of tries, otherwise I
would have given up!
Jaap Taal
[ Q42 BV | tel 070 44523 42 | direct 070 44523 65 | http://q42.nl |
Waldorpstraat 17F, Den Haag | Vijzelstraat 72 unit 4.23, Amsterdam |
KvK 30164662 ]
Install the IntelliJ TestNG plugin. Write your ES plugin test framework
(start node with plugin, stop node) as TestNG tests for maven surefire (just
like ES does in master). Use right-mouse-button popup menu "Debug - All
tests" (first entry is JUnit, second entry is TestNG) to start tests. YMMV
because a target JVM is started by IntelliJ und controlled via a socket.
Just configure your breakpoints in the menu "Run" (Toggle ...
breakpoint)
Elasticsearch source can be easily added if you have cloned from github
und imported it into IntelliJ.
Maybe it's also possible to write ES test framework in JUnit. But I find
TestNG way more easier and it works like a charme.
I find extensive logging more useful because I was born on the command line
Jörg
Am 25.03.13 16:36, schrieb Jaap Taal:
Hi,
I'm thinking about developing an elasticsearch plugin and I would like to
be able to start elasticsearch with my plugin loaded from within IntelliJ.
I couldn't find how I should do this.
I would also like to be able to set breakpoints, I've seen some discussion
about debugging, and I've seen that people say they just log a lot (which I
personally don't like when debugging a complex algoritm).
So how would I set up:
starting elasticsearch with the plugin loaded (would love that from
within IntelliJ but commandline is also a good workflow for me).
set a breakpoint in my plugin code and let IntelliJ hit it.
and possibly:
3. attach the Elasticsearch source to IntelliJ for hard-core debugging.
Not sure if this is what you are looking for, but if you want to just see
your plugin running inside elasticsearch you can do this:
Copy config directory from elasticsearch Project to your plugin project
(optional)
Menu Run -> Edit Configurations -> "+" -> Application
On Application Dialog: Set
Main class to org.elasticsearch.bootstrap.Bootstrap
VM Options to -Des.foreground=true or if you didn't copy config in 1)
also add to VM Options -Des.path.home=*
some/directory/with/elasticsearch/config*
Click OK
Set breakpoint in your plugin
Menu Run -> Debug Bootstrap
On Monday, March 25, 2013 12:13:35 PM UTC-4, Jaap Taal wrote:
Thanks a lot guys, I'm going to try that, my problem was that I had no
clue how to start it all...
I was working on Jorg's elasticsearch-index-termlist and I did it with
repeatedly starting and stopping a standalone instance of
elasticsearch and installing the plugin with plugin.bat.
I was just lucky to get it right after a couple of tries, otherwise I
would have given up!
Jaap Taal
[ Q42 BV | tel 070 44523 42 | direct 070 44523 65 | http://q42.nl |
Waldorpstraat 17F, Den Haag | Vijzelstraat 72 unit 4.23, Amsterdam |
KvK 30164662 ]
On Mon, Mar 25, 2013 at 5:07 PM, Jörg Prante <joerg...@gmail.com<javascript:>>
wrote:
Install the IntelliJ TestNG plugin. Write your ES plugin test
framework
(start node with plugin, stop node) as TestNG tests for maven surefire
(just
like ES does in master). Use right-mouse-button popup menu "Debug - All
tests" (first entry is JUnit, second entry is TestNG) to start tests.
YMMV
because a target JVM is started by IntelliJ und controlled via a socket.
Just configure your breakpoints in the menu "Run" (Toggle ...
breakpoint)
Elasticsearch source can be easily added if you have cloned from
github
und imported it into IntelliJ.
Maybe it's also possible to write ES test framework in JUnit. But I find
TestNG way more easier and it works like a charme.
I find extensive logging more useful because I was born on the command
line
Jörg
Am 25.03.13 16:36, schrieb Jaap Taal:
Hi,
I'm thinking about developing an elasticsearch plugin and I would like
to
be able to start elasticsearch with my plugin loaded from within
IntelliJ.
I couldn't find how I should do this.
I would also like to be able to set breakpoints, I've seen some
discussion
about debugging, and I've seen that people say they just log a lot
(which I
personally don't like when debugging a complex algoritm).
So how would I set up:
starting elasticsearch with the plugin loaded (would love that from
within IntelliJ but commandline is also a good workflow for me).
set a breakpoint in my plugin code and let IntelliJ hit it.
and possibly:
3. attach the Elasticsearch source to IntelliJ for hard-core debugging.
Thanks!
Jaap
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 elasticsearc...@googlegroups.com <javascript:>.
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 elasticsearc...@googlegroups.com <javascript:>.
For more options, visit https://groups.google.com/groups/opt_out.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.