[java] Setting up HRD with WTP (web tools platform) in Eclipse 4.3

66 views
Skip to first unread message

Jon Stevens

unread,
Aug 11, 2013, 4:21:52 PM8/11/13
to google-a...@googlegroups.com
I'm using the new WTP functionality in Eclipse 4.3 with the latest Google Plugin for Eclipse to run my local AppEngine war file. I'm using Maven for my build too.

I can't seem to setup HRD support though. The launch configuration that is generated doesn't have   -Ddatastore.default_high_rep_job_policy_unapplied_job_pct=#    defined and if I try to add it to the launch configuration, it seems to get removed by whatever is automatically generating it.

Honestly, there seems to be a lot of half baked stuff in this. It is like it is _almost_ there, but the last 90% is the hardest part. I'd love to give some feedback to someone who is working on this stuff to try to help make it better.

thanks,

jon

Nick

unread,
Aug 12, 2013, 7:33:38 PM8/12/13
to google-a...@googlegroups.com
The GPE has been pretty buggy over its lifetime, particularly wrt the HRD config.

To fix your problem (and other problems relating to GPE run/debug) configs:

If you open up your project properties and navigate to 
Google -> App Engine
As well as ticking 'Use Google App Engine', make sure 'Enable local HRD support' is ticked too.

If this box is greyed out (i.e. disabled) and unticked, you'll have to work around it. You can do this by opening up <project>/.settings/com.google.appengine.eclipse.core.prefs in an editor, and change the property 'gaeHrdEnabled' to true

To set the unapplied job percentage, in your run/debug config, use the tab 'App Engine'. If you need to hack around this not working, then setting '-Ddatastore.default_high_rep_job_policy_unapplied_job_pct=50' in your run/debug VM arguments will work.

Im not sure what all the triggers are, but when you make changes in the GPE preferences panel, the App Engine tab in run/config and some other places the run configuration is automatically updated.

This is why even when you add unnapplied job policy manually, it gets removed. This is a worse issue when other plugins want to modify your run config as well (for example, with jrebel they have a contest to see who can add the most javaagents). 

The best workaround we've found for this is to get your run/debug config as you wish it, the on the 'Common' tab, choose Shared file. You can then make the file read-only on the file system which will prevent any plugins (GPE, JRebel, anything else) from undoing your changes.

I hope that helps,

Jon Stevens

unread,
Aug 12, 2013, 8:03:19 PM8/12/13
to google-a...@googlegroups.com, google-a...@googlegroups.com
Nick, that advice is outdated with latest WTP support while using maven projects imported with m2eclipse.

You can no longer enable 'use appengine' in the preferences. That will really mess things up.

Even worse is that you also can't edit the run configs. They get reset to whatever the WTP support wants for things.

The fix I've hacked in so far is to set that system property in my appenengine-web.xml. It seems to do the trick.

Why the API still defaults to master/slave when that is deprecated functionality for many moons now is beyond my comprehension.

Jon
--
You received this message because you are subscribed to a topic in the Google Groups "Google App Engine" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-appengine/NHHGGilDfmk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-appengi...@googlegroups.com.
To post to this group, send email to google-a...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine.
For more options, visit https://groups.google.com/groups/opt_out.

Rajeev Dayal

unread,
Aug 13, 2013, 1:40:29 PM8/13/13
to google-a...@googlegroups.com
Jon,

Sorry - this stuff is still in preview, and I guess we didn't make that clear. We'll update the docs appropriately. 

We haven't added the HRD stuff in for the Google App Engine runtime that's part of WTP as yet. We'll do that shortly. 

You shouldn't be using the Web Application launch configurations for WTP-based projects; you should be using "Run on Server". Again, this is something we haven't made clear.

You're right, this stuff isn't done. We're planning to do a lot more work and polish on it. You'll see lots of progress over the next couple of months. 

Rajeev Dayal

unread,
Aug 13, 2013, 1:58:48 PM8/13/13
to google-a...@googlegroups.com


On Monday, August 12, 2013 7:33:38 PM UTC-4, Nick wrote:
The GPE has been pretty buggy over its lifetime, particularly wrt the HRD config.

Sorry about this. We're going to make a change  to default the HRD config to "on". We're also going to clean up the launch config logic. There are too many problems with us trying to control the values in the "Arguments" tab. We're going to make a change that gives the user the option to let GPE manage the launch configuration arguments (in which case, things will be controlled by the UI), or lets the user manage the arguments (in which case, the user is on their own). That way, we'll stop doing this business where we add/remove the users args.


To fix your problem (and other problems relating to GPE run/debug) configs:

If you open up your project properties and navigate to 
Google -> App Engine
As well as ticking 'Use Google App Engine', make sure 'Enable local HRD support' is ticked too.

If this box is greyed out (i.e. disabled) and unticked, you'll have to work around it. You can do this by opening up <project>/.settings/com.google.appengine.eclipse.core.prefs in an editor, and change the property 'gaeHrdEnabled' to true

To set the unapplied job percentage, in your run/debug config, use the tab 'App Engine'. If you need to hack around this not working, then setting '-Ddatastore.default_high_rep_job_policy_unapplied_job_pct=50' in your run/debug VM arguments will work.

Im not sure what all the triggers are, but when you make changes in the GPE preferences panel, the App Engine tab in run/config and some other places the run configuration is automatically updated.

This is why even when you add unnapplied job policy manually, it gets removed. This is a worse issue when other plugins want to modify your run config as well (for example, with jrebel they have a contest to see who can add the most javaagents). 

Yeah, this was silly. We have a fix coming out in GPE 3.4 to deal with this specific issue. As mentioned above, we need to fix the more general issue though.

Jon Stevens

unread,
Aug 14, 2013, 1:34:26 AM8/14/13
to google-a...@googlegroups.com
No apologies necessary... I'm pretty aware that I'm probably one of the only people outside of Google actually using this stuff.

I'm no longer using the WebApp launch config... it doesn't work at all with WTP anyway. The Run on Server stuff is really great except for the inability to override the launch config.

If you want more feedback on this stuff, feel free to contact me privately too. Looking forward to the progress!

best,

jon



Reply all
Reply to author
Forward
0 new messages