Issue 1107 in tungsten-replicator: MongoDB: Support URL in the form mongodb://...

1 view
Skip to first unread message

tungsten-...@googlecode.com

unread,
Mar 12, 2015, 2:46:59 AM3/12/15
to tungsten-repl...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium FoundIn

New issue 1107 by ngo...@mobilus.co.jp: MongoDB: Support URL in the form
mongodb://...
https://code.google.com/p/tungsten-replicator/issues/detail?id=1107

Related to issue #1102:
https://code.google.com/p/tungsten-replicator/issues/detail?id=1102

Currently, Tungsten only supports MongoDB on the local machine. It doesn't
support MongoDB on the cloud, like Compose.io:
https://www.compose.io/

It it because MongoDB on the cloud like Compose.io only allows connect
string in this form:
mongodb://...

See:
http://api.mongodb.org/java/current/com/mongodb/MongoClientURI.html

In order to support the above:
* Please update MongoDB client lib (issue #1102).
* Modify MongoApplier.java like this:

if (connectString == null)
m = new MongoClient();
else if (connectString.startsWith("mongodb://"))
m = new MongoClient(new MongoClientURI(connectString));
else
m = new MongoClient(connectString);

See:
https://code.google.com/p/tungsten-replicator/source/browse/trunk/replicator/src/java/com/continuent/tungsten/replicator/applier/MongoApplier.java#559

After that, we can install MongoDB applier like this (Tungsten 3.0.1, the
extractor runs on the same local machine):

./tools/tpm configure defaults --reset

./tools/tpm configure dfs_main \
--datasource-type=mongodb \
--property=replicator.applier.dbms.connectString=mongodb://username:password@server:port/dbname
\
--property=replicator.applier.dbms.autoIndex=true \
--install-directory=~/opt/tungsten/mongodb_applier \
--java-file-encoding=UTF8 \
--master=127.0.0.1 \
--members=localhost \
--svc-parallelization-type=none \
--topology=master-slave \
--enable-heterogenous-slave=true \
--rmi-port=10002 \
--master-thl-port=2112 \
--master-thl-host=127.0.0.1 \
--thl-port=2113 \
--start=true \
--skip-validation-check=InstallerMasterSlaveCheck,HostsFileCheck

./tools/tpm install


--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

tungsten-...@googlecode.com

unread,
Mar 12, 2015, 3:09:42 AM3/12/15
to tungsten-repl...@googlegroups.com
Updates:
Status: Accepted
Labels: -Type-Defect -Priority-Medium -FoundIn Type-Enhancement
Priority-Low FoundIn-3.0.0

Comment #1 on issue 1107 by g.maxia: MongoDB: Support URL in the form
mongodb://...
https://code.google.com/p/tungsten-replicator/issues/detail?id=1107

(No comment was entered for this change.)
Reply all
Reply to author
Forward
0 new messages