Guice and Hadoop

287 views
Skip to first unread message

egolan

unread,
Dec 28, 2011, 12:13:45 PM12/28/11
to google-guice
Hi everyone,
Is there some documentation regarding integration of Guice and Hadoop.
I am actually a newbie with Hadoop and have some experience with
Spring.
There is the Spring-Data project, which looks too much for what I want
and need.

Does anyone have experience with Guice and Hadoop?
Can I find some good documentation for it?

Thanks,

Eyal

jordi

unread,
Dec 30, 2011, 5:41:33 AM12/30/11
to google...@googlegroups.com
Hey Eyal

There's an old jira with a patch [1] to support Spring Beans, that replaces the ReflectionUtils class used to instantiate everything with a much proper object factory. But that issue was closes as won't fix saying that you can achieve similar behavior using Hadoop Configuration... but that way you'll use Guice much more like a service locator than anything else. This blog post [2] tells you how to use spring with regular config.

Spring Hadoop looks promising! But it seems that DI support will come after 1.0 release... I'll look how the implement DI with current Hadoop API

hope this helps,
jordi

--
You received this message because you are subscribed to the Google Groups "google-guice" group.
To post to this group, send email to google...@googlegroups.com.
To unsubscribe from this group, send email to google-guice...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-guice?hl=en.


egolan

unread,
Dec 30, 2011, 5:49:33 AM12/30/11
to google-guice
Thanks.

I am going to migrate a full scale java app that calculates massive
amount of data into a Hadoop process.
So I am just starting experimenting with the MR.

I am also practicing the DI concept in our architecture and this is
why I went into Guice (my preferable choice over Spring).

So I was wondering how to integrate them both.

On Dec 30, 12:41 pm, jordi <jo...@donky.org> wrote:
> Hey Eyal
>
> There's an old jira with a patch [1] to support Spring Beans, that replaces
> the ReflectionUtils class used to instantiate everything with a much proper
> object factory. But that issue was closes as won't fix saying that you can
> achieve similar behavior using Hadoop Configuration... but that way you'll
> use Guice much more like a service locator than anything else. This blog
> post [2] tells you how to use spring with regular config.
>
> Spring Hadoop looks promising! But it seems that DI support will come after
> 1.0 release... I'll look how the implement DI with current Hadoop API
>
> hope this helps,
> jordi
>
> [1]https://issues.apache.org/jira/browse/HADOOP-3261
> [2]http://esammer.blogspot.com/2009/09/map-reduce-and-dependency-injecti...

Owen O'Malley

unread,
Dec 30, 2011, 12:33:43 PM12/30/11
to google...@googlegroups.com
I replied over on the Hadoop lists, but your task should just create
the injector in the setup method.

-- Owen

jordi

unread,
Dec 30, 2011, 1:21:48 PM12/30/11
to google...@googlegroups.com
can you share the thread url? i can't find it

egolan

unread,
Dec 30, 2011, 5:32:28 PM12/30/11
to google-guice
Thanks Owen.
I saw the answer in the Hadoop mailing list as well.

So the solution is that simple?
Have a Module, instantiate it in the setup / configure and then use
the injector?
(I thought about it, but it sounded too easy and simple).

That is the first thing I will try.

On Dec 30, 7:33 pm, "Owen O'Malley" <omal...@apache.org> wrote:
> I replied over on the Hadoop lists, but your task should just create
> the injector in the setup method.
>
> -- Owen
>
Reply all
Reply to author
Forward
0 new messages