sharding

Mongo DB: Unable to create a sharding cluster in Ubuntu

断了今生、忘了曾经 提交于 2019-12-11 02:59:12
问题 I have installed MongoDB using http://docs.mongodb.org/manual/tutorial/install-mongodb-on-ubuntu/ in my Ubuntu machine and the mongo instance is working fine. I am able to do CRUD operations in the instance. I also installed the MonjaDB eclipse plugin and am able to see all databases/collections/documents in it. Now, I want to create a sharded cluster in my machine. I am trying to create this way: cluster = new ShardingTest({"shards" : 3, "chunksize" : 1}) It is giving the following error:

Error inserting a document in a MongoDB sharded collection created with the CLI

南笙酒味 提交于 2019-12-11 02:42:31
问题 Using the latest azure cli (2.0.21) I am trying to create in CosmosDB a sharded MongoDB collection with the following script (from powershell) : $resourceGroupName="RG-S01-APP-CASRWA-001" $name="marcoolandesetest" $databaseName="marco" $collectionName="fromcli" $originalThroughput=100000 $kind="MongoDB" $partition="/TaskId" az login az cosmosdb create --name $name --kind $kind --resource-group $resourceGroupName az cosmosdb database create --name $name --db-name $databaseName --resource-

Is there a way to shard and replicate neo4j data?

这一生的挚爱 提交于 2019-12-11 02:23:12
问题 I am considering the option of neo4j for some of the new projects I am working for. For the given data needs (inherently graph based) neo4j fits well and a quick prototype is giving good response time for me. What I want to understand is how to scale a neo4j deployment. Specifically: How do I shard my data across neo4j deployments. Since neo4j is deployed on a single machine, there is a limit to how much data I can store in a single machine and hence I would like to know how to distribute it.

Mongodb Sharding - no such command: 'addShard'

試著忘記壹切 提交于 2019-12-10 16:43:35
问题 I'm trying to configure sharding in one machine and I keep getting an error message when trying to add shards. I'm using the following website as a reference: http://www.javahotchocolate.com/notes/mongodb-sharding.html I'm using a single machine and using different ports to simulate the different IPs. I have a configuration as follows: Replica set members: mongod --dbpath \rs1_p\db --port 27017 --replSet rs1 mongod --dbpath \rs1_s1\db --port 27018 --replSet rs1 mongod --dbpath \rs1_s2\db -

Defining a shard-key automatically for a dynamic collection and suggestion on the design

时光毁灭记忆、已成空白 提交于 2019-12-10 10:54:33
问题 I want to implement Sharding for my MongoDb and need some of your suggestions. Insight We have lots of cron-job which collects various information about a machine & writes them to it's own collection. Collections are created dynamically. Each collection has millions of data. Structure1 for each collection is Name, Category, Subcategory, NodeId, Process-Start-Time, Process-End-Time, Value. Structure2 for each collection is Name, Category, Subcategory, Subtype, Date, Value. Structure3 for each

RavenDB - Planning for scalability

雨燕双飞 提交于 2019-12-10 03:36:12
问题 I have been learning RavenDB recently and would like to put it to use. I was wondering what advice or suggestions people had around building the system in a way that is ready to scale, specifically sharding the data across servers, but that can start on a single server and only grow as needed. Is it advisable, or even possible, to create multiple databases on a single instance and implement sharding across them. Then to scale it would simply be a matter of spreading these databases across the

How to change the shard key

我与影子孤独终老i 提交于 2019-12-10 00:45:39
问题 I Know that impossible to change shard key. But, when I set incorrect shard key, How to change that? 回答1: dump the collection you sharded.. import it again.. set the new shard key. 回答2: dump collection mongodump --host <hostname> --port <port> --collection <collection_name> --db <db_name> open mongos and drop database or collection(If you had more than 1 collection) mongo --host <hostname> --port <port> show dbs use <db_name> db.dropDatabase() //it's only if you hade ONE database in db exit

removing “scanAndOrder” : true in my MongoDB query result

自作多情 提交于 2019-12-09 18:25:49
问题 So i have a collection in my db with the following shardkey : {cl:"yyyy-mm", user_id:N} when I perform the follow query db.collection.find({ cl:"2012-03", user_id:{$in:users}, _id:{"$lt":new ObjectId('4f788b54204cfa4946000044')} }).sort({_id:-1}).limit(5).explain(true) it gives me this result: "clusteredType" : "ParallelSort", "shards" : { "set1/hostname.com:27018" : [ { "cursor" : "BtreeCursor cl_1_user_id_1 multi", "nscanned" : 21294, "nscannedObjects" : 21288, "n" : 5, "scanAndOrder" :

Mongo sharding fails to split large collection between shards

我与影子孤独终老i 提交于 2019-12-09 18:01:27
问题 I'm having problems with what seems to be a simple sharding setup in mongo. I have two shards, a single mongos instance, and a single config server set up like this: Machine A - 10.0.44.16 - config server, mongos Machine B - 10.0.44.10 - shard 1 Machine C - 10.0.44.11 - shard 2 I have a collection called 'Seeds' that has a shard key 'SeedType' which is a field that is present on every document in the collection, and contains one of four values (take a look at the sharding status below). Two

db.collection.count() returns a lot more documents for sharded collection in MongoDB

旧巷老猫 提交于 2019-12-09 13:15:26
问题 I have 2 shards with replication sets (3 instances each). When I do count() on a sharded collection, I get a lot more than the real number of documents (more than 2.5 millions documents difference). Same when I just do find() and incrementing counter in forEach() loop. How do I know real number of documents? First of all, I know the trend of increase, i.e. it can not increase so radically. Secondly, when I count documents with the following M/R script, I get real number of documents (as I