Skip to content

Commit

Permalink
Site updated at 2013-03-17 02:55:52 UTC
Browse files Browse the repository at this point in the history
  • Loading branch information
utopia.zh@gmail.com committed Mar 17, 2013
1 parent a106747 commit a75d39f
Show file tree
Hide file tree
Showing 24 changed files with 1,375 additions and 57 deletions.
71 changes: 70 additions & 1 deletion atom.xml
Expand Up @@ -4,7 +4,7 @@
<title><![CDATA[Coding For Fun]]></title> <title><![CDATA[Coding For Fun]]></title>
<link href="http://utopiazh.github.com/atom.xml" rel="self"/> <link href="http://utopiazh.github.com/atom.xml" rel="self"/>
<link href="http://utopiazh.github.com/"/> <link href="http://utopiazh.github.com/"/>
<updated>2013-03-10T21:15:08+08:00</updated> <updated>2013-03-17T10:55:50+08:00</updated>
<id>http://utopiazh.github.com/</id> <id>http://utopiazh.github.com/</id>
<author> <author>
<name><![CDATA[Hang Zhou]]></name> <name><![CDATA[Hang Zhou]]></name>
Expand All @@ -13,6 +13,75 @@
<generator uri="http://octopress.org/">Octopress</generator> <generator uri="http://octopress.org/">Octopress</generator>




<entry>
<title type="html"><![CDATA[Configure Sharded MongoDB on single host]]></title>
<link href="http://utopiazh.github.com/blog/2013/03/17/configure-sharded-mongodb-on-single-host/"/>
<updated>2013-03-17T10:54:00+08:00</updated>
<id>http://utopiazh.github.com/blog/2013/03/17/configure-sharded-mongodb-on-single-host</id>
<content type="html"><![CDATA[<h1>Configure Sharded MongoDB on single host</h1>
<p>The default configuration of mongodb only use a single thread, which will be
bottleneck.</p>
<h2>Config and Start mongodb</h2>
<p>Start 3 config server</p>
<pre><code>mongod --configsvr --dbpath /var/lib/mongodb/configdb/27019 --port 27019 --logpath /var/log/mongodb/mongod-27019.log --logappend &amp;
mongod --configsvr --dbpath /var/lib/mongodb/configdb/27119 --port 27119 --logpath /var/log/mongodb/mongod-27119.log --logappend &amp;
mongod --configsvr --dbpath /var/lib/mongodb/configdb/27219 --port 27219 --logpath /var/log/mongodb/mongod-27219.log --logappend &amp;
</code></pre>
<p>Start 3 data server</p>
<pre><code>mongod --dbpath /var/lib/mongodb/datadb/27029 --port 27029 --logpath /var/log/mongodb/mongod-27029.log --logappend &amp;
mongod --dbpath /var/lib/mongodb/datadb/27129 --port 27129 --logpath /var/log/mongodb/mongod-27129.log --logappend &amp;
mongod --dbpath /var/lib/mongodb/datadb/27229 --port 27229 --logpath /var/log/mongodb/mongod-27229.log --logappend &amp;
</code></pre>
<p>Start mongos server</p>
<pre><code>mongos --configdb 127.0.0.1:27019,127.0.0.1:27119,127.0.0.1:27219 --port 27017 --logpath /var/log/mongodb/mongos-27017.log --logappend &amp;
</code></pre>
<h2>Add shard for standalone mongod</h2>
<p>Connect to mongos</p>
<pre><code># mongo
MongoDB shell version: 2.0.6
connecting to: test
mongos&gt; sh.addShard("127.0.0.1:27029")
mongos&gt; sh.addShard("127.0.0.1:27129")
mongos&gt; sh.addShard("127.0.0.1:27229")
</code></pre>
<p>Enable shard for DB</p>
<p> mongos> sh.enableSharding(&#8220;github&#8221;)</p>
<p>Create Index on the to-be-sharded key</p>
<pre><code>mongos&gt; use github
mongos&gt; db.repos.ensureIndex({"id" :1})
</code></pre>
<p>Enable shard for collection</p>
<pre><code>mongos&gt; sh.shardCollection("github.repos", {"id": 1})
</code></pre>
]]></content>
</entry>

<entry>
<title type="html"><![CDATA[CodeReading: SolrCloud - Sharding]]></title>
<link href="http://utopiazh.github.com/blog/2013/03/10/codereading-solrcloud-sharding/"/>
<updated>2013-03-10T21:20:00+08:00</updated>
<id>http://utopiazh.github.com/blog/2013/03/10/codereading-solrcloud-sharding</id>
<content type="html"><![CDATA[<h1>Working in progress</h1>
]]></content>
</entry>

<entry> <entry>
<title type="html"><![CDATA[Notes:Practical Machine Learning in Python]]></title> <title type="html"><![CDATA[Notes:Practical Machine Learning in Python]]></title>
<link href="http://utopiazh.github.com/blog/2013/03/10/notes-practical-machine-learning-in-python/"/> <link href="http://utopiazh.github.com/blog/2013/03/10/notes-practical-machine-learning-in-python/"/>
Expand Down
Expand Up @@ -285,19 +285,23 @@ <h1>Recent Posts</h1>
<ul id="recent_posts"> <ul id="recent_posts">


<li class="post"> <li class="post">
<a href="/blog/2013/03/10/notes-practical-machine-learning-in-python/">Notes:Practical Machine Learning in Python</a> <a href="/blog/2013/03/17/configure-sharded-mongodb-on-single-host/">Configure Sharded MongoDB on single host</a>
</li> </li>


<li class="post"> <li class="post">
<a href="/blog/2013/03/10/multi-tenancies-of-hbase-in-facebook/">Multi-tenant of HBase in FaceBook</a> <a href="/blog/2013/03/10/codereading-solrcloud-sharding/">CodeReading: SolrCloud - Sharding</a>
</li> </li>


<li class="post"> <li class="post">
<a href="/blog/2013/03/10/configure-ubuntu-with-dual-monitor/">Configure Ubuntu with Dual Monitor</a> <a href="/blog/2013/03/10/notes-practical-machine-learning-in-python/">Notes:Practical Machine Learning in Python</a>
</li> </li>


<li class="post"> <li class="post">
<a href="/blog/2013/01/13/how-to-use-octopress-and-github-to-write-blog/">How to use octopress and github to write blog</a> <a href="/blog/2013/03/10/multi-tenancies-of-hbase-in-facebook/">Multi-tenant of HBase in FaceBook</a>
</li>

<li class="post">
<a href="/blog/2013/03/10/configure-ubuntu-with-dual-monitor/">Configure Ubuntu with Dual Monitor</a>
</li> </li>


</ul> </ul>
Expand Down
261 changes: 261 additions & 0 deletions blog/2013/03/10/codereading-solrcloud-sharding/index.html
@@ -0,0 +1,261 @@

<!DOCTYPE html>
<!--[if IEMobile 7 ]><html class="no-js iem7"><![endif]-->
<!--[if lt IE 9]><html class="no-js lte-ie8"><![endif]-->
<!--[if (gt IE 8)|(gt IEMobile 7)|!(IEMobile)|!(IE)]><!--><html class="no-js" lang="en"><!--<![endif]-->
<head>
<meta charset="utf-8">
<title>CodeReading: SolrCloud - Sharding - Coding For Fun</title>
<meta name="author" content="Hang Zhou">


<meta name="description" content="Working in progress
">


<!-- http://t.co/dKP3o1e -->
<meta name="HandheldFriendly" content="True">
<meta name="MobileOptimized" content="320">
<meta name="viewport" content="width=device-width, initial-scale=1">


<link rel="canonical" href="http://utopiazh.github.com/blog/2013/03/10/codereading-solrcloud-sharding/">
<link href="/favicon.png" rel="icon">
<link href="/stylesheets/screen.css" media="screen, projection" rel="stylesheet" type="text/css">
<script src="/javascripts/modernizr-2.0.js"></script>
<script src="/javascripts/ender.js"></script>
<script src="/javascripts/octopress.js" type="text/javascript"></script>
<link href="/atom.xml" rel="alternate" title="Coding For Fun" type="application/atom+xml">
<!--Fonts from Google"s Web font directory at http://google.com/webfonts -->
<!--
<link href="http://fonts.googleapis.com/css?family=PT+Serif:regular,italic,bold,bolditalic" rel="stylesheet" type="text/css">
<link href="http://fonts.googleapis.com/css?family=PT+Sans:regular,italic,bold,bolditalic" rel="stylesheet" type="text/css">
-->



</head>

<body >
<header role="banner"><hgroup>
<h1><a href="/">Coding For Fun</a></h1>

<h2>March 20 miles every day</h2>

</hgroup>

</header>
<nav role="navigation"><ul class="subscription" data-subscription="rss">
<li><a href="/atom.xml" rel="subscribe-rss" title="subscribe via RSS">RSS</a></li>

</ul>

<form action="http://google.com/search" method="get">
<fieldset role="search">
<input type="hidden" name="q" value="site:utopiazh.github.com" />
<input class="search" type="text" name="q" results="0" placeholder="Search"/>
</fieldset>
</form>

<ul class="main-navigation">
<li><a href="/">Blog</a></li>
<li><a href="/blog/archives">Archives</a></li>
</ul>

</nav>
<div id="main">
<div id="content">
<div>
<article class="hentry" role="article">

<header>

<h1 class="entry-title">CodeReading: SolrCloud - Sharding</h1>


<p class="meta">












<time datetime="2013-03-10T21:20:00+08:00" pubdate data-updated="true">Mar 10<span>th</span>, 2013</time>

</p>

</header>


<div class="entry-content"><h1>Working in progress</h1>
</div>


<footer>
<p class="meta">



<span class="byline author vcard">Posted by <span class="fn">Hang Zhou</span></span>













<time datetime="2013-03-10T21:20:00+08:00" pubdate data-updated="true">Mar 10<span>th</span>, 2013</time>


<span class="categories">

<a class='category' href='/blog/categories/search/'>search</a>

</span>


</p>

<div class="sharing">




<!-- JiaThis Button BEGIN -->
<div class="jiathis_style">
<a class="jiathis_button_qzone"></a>
<a class="jiathis_button_tsina"></a>
<a class="jiathis_button_tqq"></a>
<a class="jiathis_button_renren"></a>
<a class="jiathis_button_kaixin001"></a>
<a href="http://www.jiathis.com/share"
class="jiathis jiathis_txt jtico
jtico_jiathis" target="_blank"></a>
<a class="jiathis_counter_style"></a>
</div>
<script type="text/javascript"
src="http://v3.jiathis.com/code/jia.js?uid=1358053663737765"
charset="utf-8"></script>
<!-- JiaThis Button END -->

<!-- UY BEGIN -->
<div id="uyan_frame"></div>
<script type="text/javascript" id="UYScript"
src="http://v1.uyan.cc/js/iframe.js?UYUserId=1731955" async=""></script>
<!-- UY END -->



</div>


<p class="meta">

<a class="basic-alignment left" href="/blog/2013/03/10/notes-practical-machine-learning-in-python/" title="Previous Post: Notes:Practical Machine Learning in Python">&laquo; Notes:Practical Machine Learning in Python</a>


<a class="basic-alignment right" href="/blog/2013/03/17/configure-sharded-mongodb-on-single-host/" title="Next Post: Configure Sharded MongoDB on single host">Configure Sharded MongoDB on single host &raquo;</a>

</p>
</footer>
</article>

</div>

<aside class="sidebar">

<section>
<h1>Recent Posts</h1>
<ul id="recent_posts">

<li class="post">
<a href="/blog/2013/03/17/configure-sharded-mongodb-on-single-host/">Configure Sharded MongoDB on single host</a>
</li>

<li class="post">
<a href="/blog/2013/03/10/codereading-solrcloud-sharding/">CodeReading: SolrCloud - Sharding</a>
</li>

<li class="post">
<a href="/blog/2013/03/10/notes-practical-machine-learning-in-python/">Notes:Practical Machine Learning in Python</a>
</li>

<li class="post">
<a href="/blog/2013/03/10/multi-tenancies-of-hbase-in-facebook/">Multi-tenant of HBase in FaceBook</a>
</li>

<li class="post">
<a href="/blog/2013/03/10/configure-ubuntu-with-dual-monitor/">Configure Ubuntu with Dual Monitor</a>
</li>

</ul>
</section>

<section>
<h1>GitHub Repos</h1>
<ul id="gh_repos">
<li class="loading">Status updating...</li>
</ul>

<a href="https://github.com/utopiazh">@utopiazh</a> on GitHub

<script type="text/javascript">
$.domReady(function(){
if (!window.jXHR){
var jxhr = document.createElement('script');
jxhr.type = 'text/javascript';
jxhr.src = '/javascripts/libs/jXHR.js';
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(jxhr, s);
}

github.showRepos({
user: 'utopiazh',
count: 3,
skip_forks: true,
target: '#gh_repos'
});
});
</script>
<script src="/javascripts/github.js" type="text/javascript"> </script>
</section>



</aside>


</div>
</div>
<footer role="contentinfo"><p>
Copyright &copy; 2013 - Hang Zhou -
<span class="credit">Powered by <a href="http://octopress.org">Octopress</a></span>
</p>

</footer>












</body>
</html>

0 comments on commit a75d39f

Please sign in to comment.