Configuring MongoDB Java driver logging from Clojure using timbre

Timo Geusch from The Lone C++ Coder's Blog

I’ve mentioned in the past how you can configure the MongoDB Java driver output from Java. Most Clojure applications that use MongoDB use a database driver that wraps the official MongoDB Java driver. I personally use monger for a lot of my projects, but also occasionally created my own wrapper. The methods described in this […]

The post Configuring MongoDB Java driver logging from Clojure using timbre appeared first on The Lone C++ Coder's Blog.

MongoDB tips – How to find documents containing a non-empty array in MongoDB

Timo Geusch from The Lone C++ Coder's Blog

Why do we need another post cluttering up the Interpipes on how to find a set of documents in a MongoDB collection that contain a non-empty array field? It’s not like we suddenly have a shortage of posts and articles on this topic after all. Well, it maybe a shocking revelation but not all of […]

The post MongoDB tips – How to find documents containing a non-empty array in MongoDB appeared first on The Lone C++ Coder's Blog.

How to rename a database in MongoDB

Timo Geusch from The Lone C++ Coder's Blog

MongoDB has a handy command to rename a collection, db.collectionName.renameCollection(). There is currently no equivalent to rename a database. Now if we accept that from time to time, one positively, absolutely just has to rename a database in MongoDB, well, there are a couple of options. Unfortunately they aren’t quite as straight forward as single […]

The post How to rename a database in MongoDB appeared first on The Lone C++ Coder's Blog.

Talk – Getting started with geospatial data in MongoDB (MDBW 2017)

Timo Geusch from The Lone C++ Coder's Blog

I’ve been meaning to post this link for quite a while now but keep forgetting to do so. If you are planning to store geospatial data in MongoDB, the database offers you a variety of ways to deal with geospatial-specific data storage and queries. I gave an introductory talk on this subject at MongoDB World […]

The post Talk – Getting started with geospatial data in MongoDB (MDBW 2017) appeared first on The Lone C++ Coder's Blog.

Using tuned.conf to disable mongod startup warnings on RHEL/CentOS 7

Timo Geusch from The Lone C++ Coder's Blog

RHEL 7 – and CentOS 7, which I used for this test – use tuned.conf to set a lot of system settings. Several of the tuned settings affect MongoDB’s performance; some are important enough that mongod actually triggers startup warnings. The main setting is transparent huge pages, which is a setting that does not work […]

The post Using tuned.conf to disable mongod startup warnings on RHEL/CentOS 7 appeared first on The Lone C++ Coder's Blog.

How to enable logging in the MongoDB Java driver

Timo Geusch from The Lone C++ Coder's Blog

I will show you how to enable logging in the MongoDB Java driver and also how to set and change the log level. The official mongoDB Java driver uses java.util.logging as its default logging framework or sl4j if the latter is present. It can be very useful to enable logging in the MongoDB drivers to […]

The post How to enable logging in the MongoDB Java driver appeared first on The Lone C++ Coder's Blog.