This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import javax.net.ssl.SSLSocketFactory; | |
import com.mongodb.BasicDBObject; | |
import com.mongodb.DB; | |
import com.mongodb.DBCollection; | |
import com.mongodb.MongoClient; | |
import com.mongodb.MongoClientOptions; | |
public class SSLApp { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
ps aux | grep mongod | awk '{print $2}' | xargs kill -9 | |
ps aux | grep mongos | awk '{print $2}' | xargs kill -9 | |
data=~/cluster | |
options="--smallfiles --noprealloc --oplogSize 128 --storageEngine wiredTiger" | |
rm -rf $data/config/* | |
rm -rf $data/shard0/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# mongod - Startup script for mongod | |
# chkconfig: 35 85 15 | |
# description: Mongo is a scalable, document-oriented database. | |
# processname: mongod | |
# config: /etc/mongod.conf | |
# pidfile: /var/run/mongodb/mongod.pid |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# chkconfig: 35 84 14 | |
. /etc/rc.d/init.d/functions | |
echo "Applying MongoDB settings" | |
blockdev --setra 32 /dev/sdc | |
blockdev --setra 32 /dev/sdb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
### BEGIN INIT INFO | |
# Provides: disable-transparent-hugepages | |
# Required-Start: $local_fs | |
# Required-Stop: | |
# X-Start-Before: mongod mongodb-mms-automation-agent | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: Disable Linux transparent huge pages | |
# Description: Disable Linux transparent huge pages, to improve |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
ps aux | grep mongod | awk '{print $2}' | xargs kill -9 | |
ps aux | grep mongos | awk '{print $2}' | xargs kill -9 | |
data=~/cluster | |
options="--smallfiles --nojournal --noprealloc --oplogSize 128" | |
rm -rf $data/shard0/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo -n "Enter MongoDB hostname of any replica member: " | |
read host | |
primary=`mongo --quiet --host $host <<EOF | |
db.isMaster().primary | |
EOF` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# mongod - Startup script for mongod | |
# chkconfig: 35 85 15 | |
# description: Mongo is a scalable, document-oriented database. | |
# processname: mongod-blockstore | |
# config: /etc/mongod-blockstore.conf | |
. /etc/rc.d/init.d/functions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
### BEGIN INIT INFO | |
# Provides: disable-transparent-hugepages | |
# Required-Start: $local_fs | |
# Required-Stop: | |
# X-Start-Before: mongod mongodb-mms-automation-agent | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: Disable Linux transparent huge pages | |
# Description: Disable Linux transparent huge pages, to improve |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
ps aux | grep mongod | awk '{print $2}' | xargs kill -9 | |
data=~/cluster | |
options="" | |
rm -rf $data/shard0/* | |
mkdir -p $data/shard0/m0 |
OlderNewer