2015年12月9日 星期三

2015年12月3日 星期四

Next Generation Eclipse ?

Che Eclipse : http://www.eclipse.org/che/



it's web based (browser) good theme , but no shortcut and assistant for me to ready use...

How to use maven launch embedded tomcat or jetty with plugin

Tomcat maven plugin

setup pom.xml

    org.apache.tomcat.maven
    tomcat7-maven-plugin
    2.2

$> mvn tomcat7:start

jetty maven plugin

  • http://www.eclipse.org/jetty/documentation/current/jetty-maven-plugin.html
  • resources in ${project.basedir}/src/main/webapp
  • classes in ${project.build.outputDirectory}
  • web.xml in ${project.basedir}/src/main/webapp/WEB-INF/

    
    org.eclipse.jetty
    jetty-maven-plugin
    9.3.1-SNAPSHOT
    
        10
        
            /test
        
    

$>mvn jetty:run

2015-12-3 digest


Maven

AWS

BigData

Github



2015年12月1日 星期二

MongoDB Clustor


MongoDB Clustor

  • Router (mongos) X2

sudo -u mongo /data/mongodb-3.0.0/bin/mongos --port 27017 --configdb CNF01:27017,CNF02:27017,CNF03.SJC1:27017 \ 
--logpath /data/logs/ROUTER.log --logappend --fork


  • Config DB Server X 3

/data/mongodb-3.0.0/bin/mongod --port 27017 --configsvr --dbpath /data/dbs/CNF \ 
--logpath /data/logs/CNF.log --logappend --fork


  • SRD X3 , ReplicaSet X3

ulimit -n 65535
sudo -u mongo  numactl --interleave=all /data/mongodb-3.0.0/bin/mongod --port 27001 --replSet ReplicaSet_01 --dbpath /data/dbs/SRD1  \
--logpath /data/logs/SRD1.log --logappend --fork   

  • Start with config file

$> mongod –f mongodb.conf

Setup


  • ReplicaSet


rs.initiate()
rs.conf()
rs.add("SRD2:27017")
rs.addArb("ARB1:27017")

Shards


  • Login to Router (mongos)

mongo> sh.addShard("ReplicaSet_01/SRD1:27017") # auto add rest replica

  • Enable shard

mongo> sh.enableSharding("Db")
sh.shardCollection("Db.collection", key: {"key":1})

2015-12-1 Read Note

2015-12-1 Read Note