This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="http://jasmine.github.io/2.0/lib/jasmine.js" type="text/javascript"> | |
<script src="http://jasmine.github.io/2.0/lib/jasmine-html.js" type="text/javascript"> | |
<script src="http://jasmine.github.io/2.0/lib/boot.js" type="text/javascript"> | |
<link href="http://jasmine.github.io/2.0/lib/jasmine.css" type="text/css" rel="stylesheet"> | |
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.0/angular.js" type="text/javascript"> | |
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.0/angular-mocks.js" type="text/javascript"> | |
<!-- add your js resources here --> |
This file contains hidden or 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
MongoDB shell version: 2.6.3 | |
connecting to: 127.0.0.1:61017/test | |
type "help" for help | |
--- Sharding Status --- | |
sharding version: { | |
"_id" : 1, | |
"version" : 4, | |
"minCompatibleVersion" : 4, | |
"currentVersion" : 5, | |
"clusterId" : ObjectId("53a96331481074c25a3fd0d8") |
This file contains hidden or 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
db.adminCommand({"addshard":"s1/localhost:37017"}); | |
db.adminCommand({"addshard":"s2/localhost:47017"}); | |
db.adminCommand({"enablesharding":"test"}); | |
db.adminCommand({"shardcollection":"test.users","key":{"_id":1}}); | |
sh.status(); |
This file contains hidden or 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
configS2 = { | |
"_id" : "s2", | |
"members" : [ | |
{ | |
"_id" : 1, | |
"host" : "localhost:47017" | |
}, | |
{ | |
"_id" : 2, | |
"host" : "localhost:47018" |
This file contains hidden or 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
configS1 = { | |
"_id" : "s1", | |
"members" : [ | |
{ | |
"_id" : 1, | |
"host" : "localhost:37017" | |
}, | |
{ | |
"_id" : 2, | |
"host" : "localhost:37018" |
This file contains hidden or 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
REM -------------------------------------------------------------------------------------- | |
REM Batch script to deploy MongoDB shard cluster. | |
REM For more detail on MongoDB shard cluster, see : http://docs.mongodb.org/manual/tutorial/deploy-shard-cluster/ | |
REM -------------------------------------------------------------------------------------- | |
@echo off | |
echo Start | |
set mongo_home_path=C:\Program Files\MongoDB 2.6 Standard\bin | |
set root_path=D:\temp\mongodb | |
set data_path=%root_path%\data_sharded |
This file contains hidden or 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
root <---- folder root (will contain mongos log) | |
├───cfg-a <---- folder of first config database of a sharded cluster (will contain data and log of that node) | |
├───cfg-b <---- folder of second config database of a sharded cluster (will contain data and log of that node) | |
├───cfg-c <---- folder of third config database of a sharded cluster (will contain data and log of that node) | |
├───s1 <---- folder of shard #1 with one replicatSet s1 | |
│ ├───a <---- folder of first node of replicatSet s1 (will contain data and log of that node) | |
│ ├───b <---- folder of second node of replicatSet s1 (will contain data and log of that node) | |
│ └───c <---- folder of third node of replicatSet s1 (will contain data and log of that node) | |
└───s2 <---- folder of shard #2 with one replicatSet s2 | |
├───a <---- folder of first node of replicatSet s2 (will contain data and log of that node) |
This file contains hidden or 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
<polymer-filesystem></polymer-filesystem> |
This file contains hidden or 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
<link rel="import" href="elements/filesystem.html"> |
This file contains hidden or 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
(function() { | |
// Start polymer | |
Polymer('polymer-filesystem', { | |
created: function() { | |
console.log("created"); | |
// bind function 'callBackRefreshList' and 'callBackFsmChangeState' with 'this' current context | |
this.fsm = new fileSystemManager(this.callBackFsmChangeState.bind(this)); | |
this.fsm.setCallBackAfterLoad(this.callBackRefreshList.bind(this)); | |
console.log("fin created"); |