Developing Mongo Gridfs as DeepStorage

78 views
Skip to first unread message

Claudio Tajtelbaum

unread,
May 16, 2014, 11:10:39 AM5/16/14
to druid-de...@googlegroups.com
i developed a new storage module, because our company use mongo for all.

I use cassandra module as guide.

I copy mongo druid-gridfs-storage-0.6.106-SNAPSHOT.jar and mongo-java-driver-2.12.1.jar to the lib folder.

Node modes coordinator, historical, broker, overload is working fine.

The problem exists on realtime mode, is trying to register the module twice

The error: 

Exception in thread "main" com.google.inject.CreationException: Guice creation errors:

1) A binding to com.google.common.base.Supplier<io.druid.storage.gridfs.GridfsDataSegmentConfig> was already configured at io.druid.guice.JsonConfigProvider.bind(JsonConfigProvider.java:112).
  at io.druid.guice.JsonConfigProvider.bind(JsonConfigProvider.java:112)

2) A binding to io.druid.storage.gridfs.GridfsDataSegmentConfig was already configured at io.druid.guice.JsonConfigProvider.bind(JsonConfigProvider.java:113).
  at io.druid.guice.JsonConfigProvider.bind(JsonConfigProvider.java:113)

2 errors
at com.google.inject.internal.Errors.throwCreationExceptionIfErrorsExist(Errors.java:448)
at com.google.inject.internal.InternalInjectorCreator.initializeStatically(InternalInjectorCreator.java:155)
at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:107)
at com.google.inject.Guice.createInjector(Guice.java:96)
at com.google.inject.Guice.createInjector(Guice.java:73)
at com.google.inject.Guice.createInjector(Guice.java:62)
at io.druid.initialization.Initialization.makeInjectorWithModules(Initialization.java:344)
at io.druid.cli.GuiceRunnable.makeInjector(GuiceRunnable.java:56)
at io.druid.cli.ServerRunnable.run(ServerRunnable.java:39)
at io.druid.cli.Main.main(Main.java:92)

The  command:  java -Xmx256m -Duser.timezone=UTC -Dfile.encoding=UTF-8 -Ddruid.realtime.specFile=examples/indexing/wikipedia.spec -classpath lib/*:config/realtime/ io.druid.cli.Main server realtime


I am using wikipedia specfile.

Fangjin Yang

unread,
May 16, 2014, 1:40:32 PM5/16/14
to druid-de...@googlegroups.com
Hi Claudio, see inline.


On Friday, May 16, 2014 8:10:39 AM UTC-7, Claudio Tajtelbaum wrote:
i developed a new storage module, because our company use mongo for all.

I use cassandra module as guide.

I copy mongo druid-gridfs-storage-0.6.106-SNAPSHOT.jar and mongo-java-driver-2.12.1.jar to the lib folder.

For local development, you can maven install and just use the extensions config (you'll need to add the mongo dependency to the module pom):
e.g. druid.extensions.coordinates=["<artifact>:<module>:<version>"]
 
Node modes coordinator, historical, broker, overload is working fine.

The problem exists on realtime mode, is trying to register the module twice

Did you by any chance change the realtime module or CliRealtime to include binding for the config? Can you also include your runtime.properties for the rt node?

Thanks,
FJ

Claudio Tajtelbaum

unread,
May 16, 2014, 2:22:25 PM5/16/14
to druid-de...@googlegroups.com

Fangjin Yang

unread,
May 19, 2014, 5:28:27 PM5/19/14
to druid-de...@googlegroups.com
Hi Claudio, if you don't copy the jars to the lib folder and instead just run the code including the correct extensions config, do you still see this error?


On Friday, May 16, 2014 8:10:39 AM UTC-7, Claudio Tajtelbaum wrote:
Reply all
Reply to author
Forward
0 new messages