diff options
author | Eliot Horowitz <eliot@10gen.com> | 2009-02-26 10:14:50 -0500 |
---|---|---|
committer | Eliot Horowitz <eliot@10gen.com> | 2009-02-26 10:14:50 -0500 |
commit | 2212fb89743f0294a6704ae68220164352971771 (patch) | |
tree | 79aa651cb74a9f222b06cd532b6b61e40ca0c4ef | |
parent | a49b8578874a1269f6f4f0337f5a170977850afa (diff) | |
download | mongo-2212fb89743f0294a6704ae68220164352971771.tar.gz |
use ShardKeyPattern
-rw-r--r-- | s/config.cpp | 4 | ||||
-rw-r--r-- | s/config.h | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/s/config.cpp b/s/config.cpp index df50c077e64..a113fb22889 100644 --- a/s/config.cpp +++ b/s/config.cpp @@ -101,8 +101,8 @@ namespace mongo { if ( _sharded.size() > 0 ){ BSONObjBuilder a; - for ( map<string,BSONObj>::reverse_iterator i=_sharded.rbegin(); i != _sharded.rend(); i++){ - a.append( i->first.c_str() , i->second ); + for ( map<string,ShardKeyPattern>::reverse_iterator i=_sharded.rbegin(); i != _sharded.rend(); i++){ + a.append( i->first.c_str() , i->second.key() ); } to.appendArray( "sharded" , a.obj() ); } diff --git a/s/config.h b/s/config.h index 6a2ea00eac0..9dc4810932b 100644 --- a/s/config.h +++ b/s/config.h @@ -26,6 +26,7 @@ #include "../db/namespace.h" #include "../client/dbclient.h" #include "../client/model.h" +#include "shardkey.h" namespace mongo { @@ -93,7 +94,7 @@ namespace mongo { string _primary; // e.g. localhost , mongo.foo.com:9999 bool _partitioned; - map<string,BSONObj> _sharded; // { "alleyinsider.blog.posts" : { ts : 1 } , ... ] - all ns that are sharded + map<string,ShardKeyPattern> _sharded; // { "alleyinsider.blog.posts" : { ts : 1 } , ... ] - all ns that are sharded map<string,ShardInfo*> _shards; // this will only have entries for things that have been looked at friend class Grid; |