helix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1407678 [45/47] - in /incubator/helix/site-content: ./ apidocs/assets/ apidocs/reference/ apidocs/reference/org/apache/helix/ apidocs/reference/org/apache/helix/alerts/ apidocs/reference/org/apache/helix/controller/ apidocs/reference/org/a...
Date Fri, 09 Nov 2012 22:55:15 GMT
Modified: incubator/helix/site-content/xref/org/apache/helix/tools/LocalZKServer.html
URL: http://svn.apache.org/viewvc/incubator/helix/site-content/xref/org/apache/helix/tools/LocalZKServer.html?rev=1407678&r1=1407677&r2=1407678&view=diff
==============================================================================
--- incubator/helix/site-content/xref/org/apache/helix/tools/LocalZKServer.html (original)
+++ incubator/helix/site-content/xref/org/apache/helix/tools/LocalZKServer.html Fri Nov  9
22:54:26 2012
@@ -36,57 +36,56 @@
 <a class="jxr_linenumber" name="26" href="#26">26</a>  <em class="jxr_javadoccomment">/**</em>
 <a class="jxr_linenumber" name="27" href="#27">27</a>  <em class="jxr_javadoccomment">
* Provides ability to start zookeeper locally on a particular port</em>
 <a class="jxr_linenumber" name="28" href="#28">28</a>  <em class="jxr_javadoccomment">
* </em>
-<a class="jxr_linenumber" name="29" href="#29">29</a>  <em class="jxr_javadoccomment">
* @author kgopalak</em>
-<a class="jxr_linenumber" name="30" href="#30">30</a>  <em class="jxr_javadoccomment">
* </em>
-<a class="jxr_linenumber" name="31" href="#31">31</a>  <em class="jxr_javadoccomment">
*/</em>
-<a class="jxr_linenumber" name="32" href="#32">32</a>  <strong class="jxr_keyword">public</strong>
<strong class="jxr_keyword">class</strong> <a href="../../../../org/apache/helix/tools/LocalZKServer.html">LocalZKServer</a>
-<a class="jxr_linenumber" name="33" href="#33">33</a>  {
-<a class="jxr_linenumber" name="34" href="#34">34</a>    <strong class="jxr_keyword">public</strong>
<strong class="jxr_keyword">void</strong> start(<strong class="jxr_keyword">int</strong>
port, String dataDir, String logDir) <strong class="jxr_keyword">throws</strong>
Exception
-<a class="jxr_linenumber" name="35" href="#35">35</a>    {
-<a class="jxr_linenumber" name="36" href="#36">36</a>  
-<a class="jxr_linenumber" name="37" href="#37">37</a>      IDefaultNameSpace
defaultNameSpace = <strong class="jxr_keyword">new</strong> IDefaultNameSpace()
-<a class="jxr_linenumber" name="38" href="#38">38</a>      {
-<a class="jxr_linenumber" name="39" href="#39">39</a>  
-<a class="jxr_linenumber" name="40" href="#40">40</a>        @Override
-<a class="jxr_linenumber" name="41" href="#41">41</a>        <strong class="jxr_keyword">public</strong>
<strong class="jxr_keyword">void</strong> createDefaultNameSpace(ZkClient zkClient)
-<a class="jxr_linenumber" name="42" href="#42">42</a>        {
-<a class="jxr_linenumber" name="43" href="#43">43</a>  
-<a class="jxr_linenumber" name="44" href="#44">44</a>        }
-<a class="jxr_linenumber" name="45" href="#45">45</a>      };
-<a class="jxr_linenumber" name="46" href="#46">46</a>      ZkServer server =
<strong class="jxr_keyword">new</strong> ZkServer(dataDir, logDir, defaultNameSpace,
port);
-<a class="jxr_linenumber" name="47" href="#47">47</a>      server.start();
-<a class="jxr_linenumber" name="48" href="#48">48</a>      Thread.currentThread().join();
-<a class="jxr_linenumber" name="49" href="#49">49</a>    }
-<a class="jxr_linenumber" name="50" href="#50">50</a>  
-<a class="jxr_linenumber" name="51" href="#51">51</a>    <strong class="jxr_keyword">public</strong>
<strong class="jxr_keyword">static</strong> <strong class="jxr_keyword">void</strong>
main(String[] args) <strong class="jxr_keyword">throws</strong> Exception
-<a class="jxr_linenumber" name="52" href="#52">52</a>    {
-<a class="jxr_linenumber" name="53" href="#53">53</a>      <strong class="jxr_keyword">int</strong>
port = 2199;
-<a class="jxr_linenumber" name="54" href="#54">54</a>      String rootDir = System.getProperty(<span
class="jxr_string">"java.io.tmpdir"</span>) + <span class="jxr_string">"/zk-helix/"</span>
-<a class="jxr_linenumber" name="55" href="#55">55</a>          + System.currentTimeMillis();
-<a class="jxr_linenumber" name="56" href="#56">56</a>      String dataDir = rootDir
+ <span class="jxr_string">"/dataDir"</span>;
-<a class="jxr_linenumber" name="57" href="#57">57</a>      String logDir = rootDir
+ <span class="jxr_string">"/logDir"</span>;
-<a class="jxr_linenumber" name="58" href="#58">58</a>  
-<a class="jxr_linenumber" name="59" href="#59">59</a>      <strong class="jxr_keyword">if</strong>
(args.length &gt; 0)
-<a class="jxr_linenumber" name="60" href="#60">60</a>      {
-<a class="jxr_linenumber" name="61" href="#61">61</a>        port = Integer.parseInt(args[0]);
-<a class="jxr_linenumber" name="62" href="#62">62</a>      }
-<a class="jxr_linenumber" name="63" href="#63">63</a>      <strong class="jxr_keyword">if</strong>
(args.length &gt; 1)
-<a class="jxr_linenumber" name="64" href="#64">64</a>      {
-<a class="jxr_linenumber" name="65" href="#65">65</a>        dataDir = args[1];
-<a class="jxr_linenumber" name="66" href="#66">66</a>        logDir = args[1];
-<a class="jxr_linenumber" name="67" href="#67">67</a>      }
-<a class="jxr_linenumber" name="68" href="#68">68</a>  
-<a class="jxr_linenumber" name="69" href="#69">69</a>      <strong class="jxr_keyword">if</strong>
(args.length &gt; 2)
-<a class="jxr_linenumber" name="70" href="#70">70</a>      {
-<a class="jxr_linenumber" name="71" href="#71">71</a>        logDir = args[2];
-<a class="jxr_linenumber" name="72" href="#72">72</a>      }
-<a class="jxr_linenumber" name="73" href="#73">73</a>      System.out.println(<span
class="jxr_string">"Starting Zookeeper locally at port:"</span> + port
-<a class="jxr_linenumber" name="74" href="#74">74</a>          + <span class="jxr_string">"
dataDir:"</span> + dataDir + <span class="jxr_string">" logDir:"</span>
+ logDir);
-<a class="jxr_linenumber" name="75" href="#75">75</a>      <a href="../../../../org/apache/helix/tools/LocalZKServer.html">LocalZKServer</a>
localZKServer = <strong class="jxr_keyword">new</strong> <a href="../../../../org/apache/helix/tools/LocalZKServer.html">LocalZKServer</a>();
-<a class="jxr_linenumber" name="76" href="#76">76</a>      
-<a class="jxr_linenumber" name="77" href="#77">77</a>      localZKServer.start(port,
dataDir, logDir);
-<a class="jxr_linenumber" name="78" href="#78">78</a>    }
-<a class="jxr_linenumber" name="79" href="#79">79</a>  }
+<a class="jxr_linenumber" name="29" href="#29">29</a>  <em class="jxr_javadoccomment">
* </em>
+<a class="jxr_linenumber" name="30" href="#30">30</a>  <em class="jxr_javadoccomment">
*/</em>
+<a class="jxr_linenumber" name="31" href="#31">31</a>  <strong class="jxr_keyword">public</strong>
<strong class="jxr_keyword">class</strong> <a href="../../../../org/apache/helix/tools/LocalZKServer.html">LocalZKServer</a>
+<a class="jxr_linenumber" name="32" href="#32">32</a>  {
+<a class="jxr_linenumber" name="33" href="#33">33</a>    <strong class="jxr_keyword">public</strong>
<strong class="jxr_keyword">void</strong> start(<strong class="jxr_keyword">int</strong>
port, String dataDir, String logDir) <strong class="jxr_keyword">throws</strong>
Exception
+<a class="jxr_linenumber" name="34" href="#34">34</a>    {
+<a class="jxr_linenumber" name="35" href="#35">35</a>  
+<a class="jxr_linenumber" name="36" href="#36">36</a>      IDefaultNameSpace
defaultNameSpace = <strong class="jxr_keyword">new</strong> IDefaultNameSpace()
+<a class="jxr_linenumber" name="37" href="#37">37</a>      {
+<a class="jxr_linenumber" name="38" href="#38">38</a>  
+<a class="jxr_linenumber" name="39" href="#39">39</a>        @Override
+<a class="jxr_linenumber" name="40" href="#40">40</a>        <strong class="jxr_keyword">public</strong>
<strong class="jxr_keyword">void</strong> createDefaultNameSpace(ZkClient zkClient)
+<a class="jxr_linenumber" name="41" href="#41">41</a>        {
+<a class="jxr_linenumber" name="42" href="#42">42</a>  
+<a class="jxr_linenumber" name="43" href="#43">43</a>        }
+<a class="jxr_linenumber" name="44" href="#44">44</a>      };
+<a class="jxr_linenumber" name="45" href="#45">45</a>      ZkServer server =
<strong class="jxr_keyword">new</strong> ZkServer(dataDir, logDir, defaultNameSpace,
port);
+<a class="jxr_linenumber" name="46" href="#46">46</a>      server.start();
+<a class="jxr_linenumber" name="47" href="#47">47</a>      Thread.currentThread().join();
+<a class="jxr_linenumber" name="48" href="#48">48</a>    }
+<a class="jxr_linenumber" name="49" href="#49">49</a>  
+<a class="jxr_linenumber" name="50" href="#50">50</a>    <strong class="jxr_keyword">public</strong>
<strong class="jxr_keyword">static</strong> <strong class="jxr_keyword">void</strong>
main(String[] args) <strong class="jxr_keyword">throws</strong> Exception
+<a class="jxr_linenumber" name="51" href="#51">51</a>    {
+<a class="jxr_linenumber" name="52" href="#52">52</a>      <strong class="jxr_keyword">int</strong>
port = 2199;
+<a class="jxr_linenumber" name="53" href="#53">53</a>      String rootDir = System.getProperty(<span
class="jxr_string">"java.io.tmpdir"</span>) + <span class="jxr_string">"/zk-helix/"</span>
+<a class="jxr_linenumber" name="54" href="#54">54</a>          + System.currentTimeMillis();
+<a class="jxr_linenumber" name="55" href="#55">55</a>      String dataDir = rootDir
+ <span class="jxr_string">"/dataDir"</span>;
+<a class="jxr_linenumber" name="56" href="#56">56</a>      String logDir = rootDir
+ <span class="jxr_string">"/logDir"</span>;
+<a class="jxr_linenumber" name="57" href="#57">57</a>  
+<a class="jxr_linenumber" name="58" href="#58">58</a>      <strong class="jxr_keyword">if</strong>
(args.length &gt; 0)
+<a class="jxr_linenumber" name="59" href="#59">59</a>      {
+<a class="jxr_linenumber" name="60" href="#60">60</a>        port = Integer.parseInt(args[0]);
+<a class="jxr_linenumber" name="61" href="#61">61</a>      }
+<a class="jxr_linenumber" name="62" href="#62">62</a>      <strong class="jxr_keyword">if</strong>
(args.length &gt; 1)
+<a class="jxr_linenumber" name="63" href="#63">63</a>      {
+<a class="jxr_linenumber" name="64" href="#64">64</a>        dataDir = args[1];
+<a class="jxr_linenumber" name="65" href="#65">65</a>        logDir = args[1];
+<a class="jxr_linenumber" name="66" href="#66">66</a>      }
+<a class="jxr_linenumber" name="67" href="#67">67</a>  
+<a class="jxr_linenumber" name="68" href="#68">68</a>      <strong class="jxr_keyword">if</strong>
(args.length &gt; 2)
+<a class="jxr_linenumber" name="69" href="#69">69</a>      {
+<a class="jxr_linenumber" name="70" href="#70">70</a>        logDir = args[2];
+<a class="jxr_linenumber" name="71" href="#71">71</a>      }
+<a class="jxr_linenumber" name="72" href="#72">72</a>      System.out.println(<span
class="jxr_string">"Starting Zookeeper locally at port:"</span> + port
+<a class="jxr_linenumber" name="73" href="#73">73</a>          + <span class="jxr_string">"
dataDir:"</span> + dataDir + <span class="jxr_string">" logDir:"</span>
+ logDir);
+<a class="jxr_linenumber" name="74" href="#74">74</a>      <a href="../../../../org/apache/helix/tools/LocalZKServer.html">LocalZKServer</a>
localZKServer = <strong class="jxr_keyword">new</strong> <a href="../../../../org/apache/helix/tools/LocalZKServer.html">LocalZKServer</a>();
+<a class="jxr_linenumber" name="75" href="#75">75</a>      
+<a class="jxr_linenumber" name="76" href="#76">76</a>      localZKServer.start(port,
dataDir, logDir);
+<a class="jxr_linenumber" name="77" href="#77">77</a>    }
+<a class="jxr_linenumber" name="78" href="#78">78</a>  }
 </pre>
 <hr/><div id="footer">This page was automatically generated by <a href="http://maven.apache.org/">Maven</a></div></body>
 </html>



Mime
View raw message