MongoDB bi connector v2.0.1, schemaDirectory option

This post is to show that mongosqld schemaDirectory option requires the process to restart in order for the new drdl file to be picked up by the process.


Identify mongosqld version

[root@msdlva-dsnavl04 smartDrdl]# mongosqld --version
mongosqld version v2.0.1
git version: 932107fa830951b6601b28cab2df234806cb3cd2


I have started the mongosqld as such 

[root@msdlva-dsnavl04 smartDrdl]# ps -ef | grep mongosqld
root     18506 14799  0 13:37 pts/1    00:00:01 mongosqld --addr=10.155.208.169:3307 --schemaDirectory=/apps/drdl --mongo-uri mongodb://xxx/?replicaSet=yyy --logPath /apps/biLog/mongoBI.log --sslPEMKeyFile=/apps/certs/mongodb.pem --sslAllowInvalidCertificates --auth --verbose=5


Let's check what files are in the drdl directory:

[root@msdlva-dsnavl04 drdl]# ls -altr
total 36
-rw-r--r--  1 root    root    11793 Jul 19 13:35 equipStatus.drdl
-rw-r--r--  1 root    root    18764 Jul 19 13:36 personnel_status.drdl
drwxr-xr-x 11 default default  4096 Jul 19 13:44 ..
drwxr-xr-x  2 root    root       57 Jul 19 13:44 .


Now I am connecting to mongosqld via mysql workbench


We can see the two databases connected correspond to the two files in the directory



Let's move a drdl into the directory

[root@msdlva-dsnavl04 drdl]# cp ../taskStatus.drdl .
[root@msdlva-dsnavl04 drdl]# ls
equipStatus.drdl  personnel_status.drdl  taskStatus.drdl


mongosqld is still running

[root@msdlva-dsnavl04 drdl]# ps -ef | grep mongosqld
root     18506 14799  0 13:37 pts/1    00:00:01 mongosqld --addr=10.155.208.169:3307 --schemaDirectory=/apps/drdl --mongo-uri mongodb://xxx/?replicaSet=yyy --logPath /apps/biLog/mongoBI.log --sslPEMKeyFile=/apps/certs/mongodb.pem --sslAllowInvalidCertificates --auth --verbose=5

Once we refresh the connection via mysql client, we still see only two databases


Now we refresh the process itself by restarting it.

We now see three databases which is consistent with the files we stored in the directory. 

Comments

Popular posts from this blog

MongoDB Tips: Kill long running processes

Oracle Goldengate Extract, Pump, and Replicat

MongoDB Ops Manager Basic Installation and Configuration