helix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1428210 [22/29] - in /incubator/helix/site-content: ./ apidocs/assets/ apidocs/reference/ apidocs/reference/org/apache/helix/ apidocs/reference/org/apache/helix/manager/zk/ apidocs/reference/org/apache/helix/tools/ apidocs/reference/org/ap...
Date Thu, 03 Jan 2013 08:21:29 GMT
Modified: incubator/helix/site-content/xref-test/org/apache/helix/integration/TestExpandCluster.html
URL: http://svn.apache.org/viewvc/incubator/helix/site-content/xref-test/org/apache/helix/integration/TestExpandCluster.html?rev=1428210&r1=1428209&r2=1428210&view=diff
==============================================================================
--- incubator/helix/site-content/xref-test/org/apache/helix/integration/TestExpandCluster.html
(original)
+++ incubator/helix/site-content/xref-test/org/apache/helix/integration/TestExpandCluster.html
Thu Jan  3 08:21:23 2013
@@ -34,71 +34,72 @@
 <a class="jxr_linenumber" name="24" href="#24">24</a>  <strong class="jxr_keyword">import</strong>
org.apache.helix.TestEspressoStorageClusterIdealState;
 <a class="jxr_linenumber" name="25" href="#25">25</a>  <strong class="jxr_keyword">import</strong>
org.apache.helix.model.IdealState;
 <a class="jxr_linenumber" name="26" href="#26">26</a>  <strong class="jxr_keyword">import</strong>
org.apache.helix.tools.ClusterSetup;
-<a class="jxr_linenumber" name="27" href="#27">27</a>  <strong class="jxr_keyword">import</strong>
org.testng.Assert;
-<a class="jxr_linenumber" name="28" href="#28">28</a>  <strong class="jxr_keyword">import</strong>
org.testng.annotations.Test;
-<a class="jxr_linenumber" name="29" href="#29">29</a>  
+<a class="jxr_linenumber" name="27" href="#27">27</a>  <strong class="jxr_keyword">import</strong>
org.apache.helix.util.RebalanceUtil;
+<a class="jxr_linenumber" name="28" href="#28">28</a>  <strong class="jxr_keyword">import</strong>
org.testng.Assert;
+<a class="jxr_linenumber" name="29" href="#29">29</a>  <strong class="jxr_keyword">import</strong>
org.testng.annotations.Test;
 <a class="jxr_linenumber" name="30" href="#30">30</a>  
-<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/integration/TestExpandCluster.html">TestExpandCluster</a>
<strong class="jxr_keyword">extends</strong> <a href="../../../../org/apache/helix/integration/ZkStandAloneCMTestBase.html">ZkStandAloneCMTestBase</a>
-<a class="jxr_linenumber" name="32" href="#32">32</a>  {
-<a class="jxr_linenumber" name="33" href="#33">33</a>  @Test
-<a class="jxr_linenumber" name="34" href="#34">34</a>    <strong class="jxr_keyword">public</strong>
<strong class="jxr_keyword">void</strong> testExpandCluster() <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>      String DB2 = <span
class="jxr_string">"TestDB2"</span>;
-<a class="jxr_linenumber" name="37" href="#37">37</a>      <strong class="jxr_keyword">int</strong>
partitions = 100;
-<a class="jxr_linenumber" name="38" href="#38">38</a>      <strong class="jxr_keyword">int</strong>
replica = 3;
-<a class="jxr_linenumber" name="39" href="#39">39</a>      _setupTool.addResourceToCluster(CLUSTER_NAME,
DB2, partitions, STATE_MODEL);
-<a class="jxr_linenumber" name="40" href="#40">40</a>      _setupTool.rebalanceStorageCluster(CLUSTER_NAME,
DB2, replica, <span class="jxr_string">"keyX"</span>);
-<a class="jxr_linenumber" name="41" href="#41">41</a>      
-<a class="jxr_linenumber" name="42" href="#42">42</a>      String DB3 = <span
class="jxr_string">"TestDB3"</span>;
-<a class="jxr_linenumber" name="43" href="#43">43</a>  
-<a class="jxr_linenumber" name="44" href="#44">44</a>      _setupTool.addResourceToCluster(CLUSTER_NAME,
DB3, partitions, STATE_MODEL);
-<a class="jxr_linenumber" name="45" href="#45">45</a>      
-<a class="jxr_linenumber" name="46" href="#46">46</a>      IdealState testDB0
= _setupTool.getClusterManagementTool().getResourceIdealState(CLUSTER_NAME, TEST_DB);
-<a class="jxr_linenumber" name="47" href="#47">47</a>      IdealState testDB2
= _setupTool.getClusterManagementTool().getResourceIdealState(CLUSTER_NAME, DB2);
-<a class="jxr_linenumber" name="48" href="#48">48</a>      IdealState testDB3
= _setupTool.getClusterManagementTool().getResourceIdealState(CLUSTER_NAME, DB3);
-<a class="jxr_linenumber" name="49" href="#49">49</a>      
-<a class="jxr_linenumber" name="50" href="#50">50</a>      <strong class="jxr_keyword">for</strong>
(<strong class="jxr_keyword">int</strong> i = 0; i &lt; 5; i++)
-<a class="jxr_linenumber" name="51" href="#51">51</a>      {
-<a class="jxr_linenumber" name="52" href="#52">52</a>        String storageNodeName
= PARTICIPANT_PREFIX + <span class="jxr_string">":"</span> + (27960 + i);
-<a class="jxr_linenumber" name="53" href="#53">53</a>        _setupTool.addInstanceToCluster(CLUSTER_NAME,
storageNodeName);
-<a class="jxr_linenumber" name="54" href="#54">54</a>      }
-<a class="jxr_linenumber" name="55" href="#55">55</a>      String command = <span
class="jxr_string">"-zkSvr localhost:2183 -expandCluster "</span> + CLUSTER_NAME;
-<a class="jxr_linenumber" name="56" href="#56">56</a>      ClusterSetup.processCommandLineArgs(command.split(<span
class="jxr_string">" "</span>));
-<a class="jxr_linenumber" name="57" href="#57">57</a>      
-<a class="jxr_linenumber" name="58" href="#58">58</a>      IdealState testDB0_1
= _setupTool.getClusterManagementTool().getResourceIdealState(CLUSTER_NAME, TEST_DB);
-<a class="jxr_linenumber" name="59" href="#59">59</a>      IdealState testDB2_1
= _setupTool.getClusterManagementTool().getResourceIdealState(CLUSTER_NAME, DB2);
-<a class="jxr_linenumber" name="60" href="#60">60</a>      IdealState testDB3_1
= _setupTool.getClusterManagementTool().getResourceIdealState(CLUSTER_NAME, DB3);
-<a class="jxr_linenumber" name="61" href="#61">61</a>      
-<a class="jxr_linenumber" name="62" href="#62">62</a>      Map&lt;String,
Object&gt; resultOld2 = ClusterSetup.buildInternalIdealState(testDB2);
-<a class="jxr_linenumber" name="63" href="#63">63</a>      Map&lt;String,
Object&gt; result2 = ClusterSetup.buildInternalIdealState(testDB2_1);
-<a class="jxr_linenumber" name="64" href="#64">64</a>      
-<a class="jxr_linenumber" name="65" href="#65">65</a>      TestEspressoStorageClusterIdealState.Verify(result2,
partitions, replica - 1);
-<a class="jxr_linenumber" name="66" href="#66">66</a>  
-<a class="jxr_linenumber" name="67" href="#67">67</a>      Double masterKeepRatio
= 0.0, slaveKeepRatio = 0.0;
-<a class="jxr_linenumber" name="68" href="#68">68</a>      <strong class="jxr_keyword">double</strong>[]
result = TestEspressoStorageClusterIdealState.compareResult(resultOld2, result2);
-<a class="jxr_linenumber" name="69" href="#69">69</a>      masterKeepRatio =
result[0];
-<a class="jxr_linenumber" name="70" href="#70">70</a>      slaveKeepRatio = result[1];
-<a class="jxr_linenumber" name="71" href="#71">71</a>      Assert.assertTrue(masterKeepRatio
&gt; 0.49 &amp;&amp; masterKeepRatio &lt; 0.51);
-<a class="jxr_linenumber" name="72" href="#72">72</a>      
-<a class="jxr_linenumber" name="73" href="#73">73</a>      Assert.assertTrue(testDB3_1.getRecord().getListFields().size()
== 0);
-<a class="jxr_linenumber" name="74" href="#74">74</a>      
-<a class="jxr_linenumber" name="75" href="#75">75</a>      <em class="jxr_comment">//
partitions should stay as same</em>
-<a class="jxr_linenumber" name="76" href="#76">76</a>      Assert.assertTrue(testDB0_1.getRecord().getListFields().keySet().containsAll(testDB0.getRecord().getListFields().keySet()));
-<a class="jxr_linenumber" name="77" href="#77">77</a>      Assert.assertTrue(testDB0_1.getRecord().getListFields().size()
== testDB0.getRecord().getListFields().size());
-<a class="jxr_linenumber" name="78" href="#78">78</a>      Assert.assertTrue(testDB2_1.getRecord().getMapFields().keySet().containsAll(testDB2.getRecord().getMapFields().keySet()));
-<a class="jxr_linenumber" name="79" href="#79">79</a>      Assert.assertTrue(testDB2_1.getRecord().getMapFields().size()
== testDB2.getRecord().getMapFields().size());
-<a class="jxr_linenumber" name="80" href="#80">80</a>      Assert.assertTrue(testDB3_1.getRecord().getMapFields().keySet().containsAll(testDB3.getRecord().getMapFields().keySet()));
-<a class="jxr_linenumber" name="81" href="#81">81</a>      Assert.assertTrue(testDB3_1.getRecord().getMapFields().size()
== testDB3.getRecord().getMapFields().size());
-<a class="jxr_linenumber" name="82" href="#82">82</a>      
-<a class="jxr_linenumber" name="83" href="#83">83</a>      Map&lt;String,
Object&gt; resultOld = ClusterSetup.buildInternalIdealState(testDB0);
-<a class="jxr_linenumber" name="84" href="#84">84</a>      Map&lt;String,
Object&gt; resultNew = ClusterSetup.buildInternalIdealState(testDB0_1);
-<a class="jxr_linenumber" name="85" href="#85">85</a>      
-<a class="jxr_linenumber" name="86" href="#86">86</a>      result = TestEspressoStorageClusterIdealState.compareResult(resultOld,
resultNew);
-<a class="jxr_linenumber" name="87" href="#87">87</a>      masterKeepRatio =
result[0];
-<a class="jxr_linenumber" name="88" href="#88">88</a>      slaveKeepRatio = result[1];
-<a class="jxr_linenumber" name="89" href="#89">89</a>      Assert.assertTrue(masterKeepRatio
&gt; 0.49 &amp;&amp; masterKeepRatio &lt; 0.51);
-<a class="jxr_linenumber" name="90" href="#90">90</a>    }
-<a class="jxr_linenumber" name="91" href="#91">91</a>  }
+<a class="jxr_linenumber" name="31" href="#31">31</a>  
+<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/integration/TestExpandCluster.html">TestExpandCluster</a>
<strong class="jxr_keyword">extends</strong> <a href="../../../../org/apache/helix/integration/ZkStandAloneCMTestBase.html">ZkStandAloneCMTestBase</a>
+<a class="jxr_linenumber" name="33" href="#33">33</a>  {
+<a class="jxr_linenumber" name="34" href="#34">34</a>  @Test
+<a class="jxr_linenumber" name="35" href="#35">35</a>    <strong class="jxr_keyword">public</strong>
<strong class="jxr_keyword">void</strong> testExpandCluster() <strong class="jxr_keyword">throws</strong>
Exception
+<a class="jxr_linenumber" name="36" href="#36">36</a>    {
+<a class="jxr_linenumber" name="37" href="#37">37</a>      String DB2 = <span
class="jxr_string">"TestDB2"</span>;
+<a class="jxr_linenumber" name="38" href="#38">38</a>      <strong class="jxr_keyword">int</strong>
partitions = 100;
+<a class="jxr_linenumber" name="39" href="#39">39</a>      <strong class="jxr_keyword">int</strong>
replica = 3;
+<a class="jxr_linenumber" name="40" href="#40">40</a>      _setupTool.addResourceToCluster(CLUSTER_NAME,
DB2, partitions, STATE_MODEL);
+<a class="jxr_linenumber" name="41" href="#41">41</a>      _setupTool.rebalanceStorageCluster(CLUSTER_NAME,
DB2, replica, <span class="jxr_string">"keyX"</span>);
+<a class="jxr_linenumber" name="42" href="#42">42</a>      
+<a class="jxr_linenumber" name="43" href="#43">43</a>      String DB3 = <span
class="jxr_string">"TestDB3"</span>;
+<a class="jxr_linenumber" name="44" href="#44">44</a>  
+<a class="jxr_linenumber" name="45" href="#45">45</a>      _setupTool.addResourceToCluster(CLUSTER_NAME,
DB3, partitions, STATE_MODEL);
+<a class="jxr_linenumber" name="46" href="#46">46</a>      
+<a class="jxr_linenumber" name="47" href="#47">47</a>      IdealState testDB0
= _setupTool.getClusterManagementTool().getResourceIdealState(CLUSTER_NAME, TEST_DB);
+<a class="jxr_linenumber" name="48" href="#48">48</a>      IdealState testDB2
= _setupTool.getClusterManagementTool().getResourceIdealState(CLUSTER_NAME, DB2);
+<a class="jxr_linenumber" name="49" href="#49">49</a>      IdealState testDB3
= _setupTool.getClusterManagementTool().getResourceIdealState(CLUSTER_NAME, DB3);
+<a class="jxr_linenumber" name="50" href="#50">50</a>      
+<a class="jxr_linenumber" name="51" href="#51">51</a>      <strong class="jxr_keyword">for</strong>
(<strong class="jxr_keyword">int</strong> i = 0; i &lt; 5; i++)
+<a class="jxr_linenumber" name="52" href="#52">52</a>      {
+<a class="jxr_linenumber" name="53" href="#53">53</a>        String storageNodeName
= PARTICIPANT_PREFIX + <span class="jxr_string">":"</span> + (27960 + i);
+<a class="jxr_linenumber" name="54" href="#54">54</a>        _setupTool.addInstanceToCluster(CLUSTER_NAME,
storageNodeName);
+<a class="jxr_linenumber" name="55" href="#55">55</a>      }
+<a class="jxr_linenumber" name="56" href="#56">56</a>      String command = <span
class="jxr_string">"-zkSvr localhost:2183 -expandCluster "</span> + CLUSTER_NAME;
+<a class="jxr_linenumber" name="57" href="#57">57</a>      ClusterSetup.processCommandLineArgs(command.split(<span
class="jxr_string">" "</span>));
+<a class="jxr_linenumber" name="58" href="#58">58</a>      
+<a class="jxr_linenumber" name="59" href="#59">59</a>      IdealState testDB0_1
= _setupTool.getClusterManagementTool().getResourceIdealState(CLUSTER_NAME, TEST_DB);
+<a class="jxr_linenumber" name="60" href="#60">60</a>      IdealState testDB2_1
= _setupTool.getClusterManagementTool().getResourceIdealState(CLUSTER_NAME, DB2);
+<a class="jxr_linenumber" name="61" href="#61">61</a>      IdealState testDB3_1
= _setupTool.getClusterManagementTool().getResourceIdealState(CLUSTER_NAME, DB3);
+<a class="jxr_linenumber" name="62" href="#62">62</a>      
+<a class="jxr_linenumber" name="63" href="#63">63</a>      Map&lt;String,
Object&gt; resultOld2 = RebalanceUtil.buildInternalIdealState(testDB2);
+<a class="jxr_linenumber" name="64" href="#64">64</a>      Map&lt;String,
Object&gt; result2 = RebalanceUtil.buildInternalIdealState(testDB2_1);
+<a class="jxr_linenumber" name="65" href="#65">65</a>      
+<a class="jxr_linenumber" name="66" href="#66">66</a>      TestEspressoStorageClusterIdealState.Verify(result2,
partitions, replica - 1);
+<a class="jxr_linenumber" name="67" href="#67">67</a>  
+<a class="jxr_linenumber" name="68" href="#68">68</a>      Double masterKeepRatio
= 0.0, slaveKeepRatio = 0.0;
+<a class="jxr_linenumber" name="69" href="#69">69</a>      <strong class="jxr_keyword">double</strong>[]
result = TestEspressoStorageClusterIdealState.compareResult(resultOld2, result2);
+<a class="jxr_linenumber" name="70" href="#70">70</a>      masterKeepRatio =
result[0];
+<a class="jxr_linenumber" name="71" href="#71">71</a>      slaveKeepRatio = result[1];
+<a class="jxr_linenumber" name="72" href="#72">72</a>      Assert.assertTrue(masterKeepRatio
&gt; 0.49 &amp;&amp; masterKeepRatio &lt; 0.51);
+<a class="jxr_linenumber" name="73" href="#73">73</a>      
+<a class="jxr_linenumber" name="74" href="#74">74</a>      Assert.assertTrue(testDB3_1.getRecord().getListFields().size()
== 0);
+<a class="jxr_linenumber" name="75" href="#75">75</a>      
+<a class="jxr_linenumber" name="76" href="#76">76</a>      <em class="jxr_comment">//
partitions should stay as same</em>
+<a class="jxr_linenumber" name="77" href="#77">77</a>      Assert.assertTrue(testDB0_1.getRecord().getListFields().keySet().containsAll(testDB0.getRecord().getListFields().keySet()));
+<a class="jxr_linenumber" name="78" href="#78">78</a>      Assert.assertTrue(testDB0_1.getRecord().getListFields().size()
== testDB0.getRecord().getListFields().size());
+<a class="jxr_linenumber" name="79" href="#79">79</a>      Assert.assertTrue(testDB2_1.getRecord().getMapFields().keySet().containsAll(testDB2.getRecord().getMapFields().keySet()));
+<a class="jxr_linenumber" name="80" href="#80">80</a>      Assert.assertTrue(testDB2_1.getRecord().getMapFields().size()
== testDB2.getRecord().getMapFields().size());
+<a class="jxr_linenumber" name="81" href="#81">81</a>      Assert.assertTrue(testDB3_1.getRecord().getMapFields().keySet().containsAll(testDB3.getRecord().getMapFields().keySet()));
+<a class="jxr_linenumber" name="82" href="#82">82</a>      Assert.assertTrue(testDB3_1.getRecord().getMapFields().size()
== testDB3.getRecord().getMapFields().size());
+<a class="jxr_linenumber" name="83" href="#83">83</a>      
+<a class="jxr_linenumber" name="84" href="#84">84</a>      Map&lt;String,
Object&gt; resultOld = RebalanceUtil.buildInternalIdealState(testDB0);
+<a class="jxr_linenumber" name="85" href="#85">85</a>      Map&lt;String,
Object&gt; resultNew = RebalanceUtil.buildInternalIdealState(testDB0_1);
+<a class="jxr_linenumber" name="86" href="#86">86</a>      
+<a class="jxr_linenumber" name="87" href="#87">87</a>      result = TestEspressoStorageClusterIdealState.compareResult(resultOld,
resultNew);
+<a class="jxr_linenumber" name="88" href="#88">88</a>      masterKeepRatio =
result[0];
+<a class="jxr_linenumber" name="89" href="#89">89</a>      slaveKeepRatio = result[1];
+<a class="jxr_linenumber" name="90" href="#90">90</a>      Assert.assertTrue(masterKeepRatio
&gt; 0.49 &amp;&amp; masterKeepRatio &lt; 0.51);
+<a class="jxr_linenumber" name="91" href="#91">91</a>    }
+<a class="jxr_linenumber" name="92" href="#92">92</a>  }
 </pre>
 <hr/><div id="footer">This page was automatically generated by <a href="http://maven.apache.org/">Maven</a></div></body>
 </html>

Modified: incubator/helix/site-content/xref-test/org/apache/helix/integration/TestMessagingService.html
URL: http://svn.apache.org/viewvc/incubator/helix/site-content/xref-test/org/apache/helix/integration/TestMessagingService.html?rev=1428210&r1=1428209&r2=1428210&view=diff
==============================================================================
--- incubator/helix/site-content/xref-test/org/apache/helix/integration/TestMessagingService.html
(original)
+++ incubator/helix/site-content/xref-test/org/apache/helix/integration/TestMessagingService.html
Thu Jan  3 08:21:23 2013
@@ -58,7 +58,7 @@
 <a class="jxr_linenumber" name="48" href="#48">48</a>      <strong class="jxr_keyword">public</strong>
MessageHandler createHandler(Message message,
 <a class="jxr_linenumber" name="49" href="#49">49</a>          NotificationContext
context)
 <a class="jxr_linenumber" name="50" href="#50">50</a>      {
-<a class="jxr_linenumber" name="51" href="#51">51</a>        <strong class="jxr_keyword">return</strong>
<strong class="jxr_keyword">new</strong> <a href="../../../../org/apache/helix/integration/TestMessagingService.html">TestMessagingHandler</a>(message,
context);
+<a class="jxr_linenumber" name="51" href="#51">51</a>        <strong class="jxr_keyword">return</strong>
<strong class="jxr_keyword">new</strong> <a href="../../../../org/apache/helix/integration/TestSchedulerMessage.html">TestMessagingHandler</a>(message,
context);
 <a class="jxr_linenumber" name="52" href="#52">52</a>      }
 <a class="jxr_linenumber" name="53" href="#53">53</a>  
 <a class="jxr_linenumber" name="54" href="#54">54</a>      @Override
@@ -74,9 +74,9 @@
 <a class="jxr_linenumber" name="64" href="#64">64</a>  
 <a class="jxr_linenumber" name="65" href="#65">65</a>      }
 <a class="jxr_linenumber" name="66" href="#66">66</a>  
-<a class="jxr_linenumber" name="67" href="#67">67</a>      <strong class="jxr_keyword">public</strong>
<strong class="jxr_keyword">static</strong> <strong class="jxr_keyword">class</strong>
<a href="../../../../org/apache/helix/integration/TestMessagingService.html">TestMessagingHandler</a>
<strong class="jxr_keyword">extends</strong> MessageHandler
+<a class="jxr_linenumber" name="67" href="#67">67</a>      <strong class="jxr_keyword">public</strong>
<strong class="jxr_keyword">static</strong> <strong class="jxr_keyword">class</strong>
<a href="../../../../org/apache/helix/integration/TestSchedulerMessage.html">TestMessagingHandler</a>
<strong class="jxr_keyword">extends</strong> MessageHandler
 <a class="jxr_linenumber" name="68" href="#68">68</a>      {
-<a class="jxr_linenumber" name="69" href="#69">69</a>        <strong class="jxr_keyword">public</strong>
<a href="../../../../org/apache/helix/integration/TestMessagingService.html">TestMessagingHandler</a>(Message
message, NotificationContext context)
+<a class="jxr_linenumber" name="69" href="#69">69</a>        <strong class="jxr_keyword">public</strong>
<a href="../../../../org/apache/helix/integration/TestSchedulerMessage.html">TestMessagingHandler</a>(Message
message, NotificationContext context)
 <a class="jxr_linenumber" name="70" href="#70">70</a>        {
 <a class="jxr_linenumber" name="71" href="#71">71</a>          <strong class="jxr_keyword">super</strong>(message,
context);
 <a class="jxr_linenumber" name="72" href="#72">72</a>          <em class="jxr_comment">//
TODO Auto-generated constructor stub</em>
@@ -151,10 +151,10 @@
 <a class="jxr_linenumber" name="141" href="#141">141</a> 
 <a class="jxr_linenumber" name="142" href="#142">142</a>   }
 <a class="jxr_linenumber" name="143" href="#143">143</a> 
-<a class="jxr_linenumber" name="144" href="#144">144</a>   <strong class="jxr_keyword">public</strong>
<strong class="jxr_keyword">static</strong> <strong class="jxr_keyword">class</strong>
<a href="../../../../org/apache/helix/integration/TestMessagingService.html">MockAsyncCallback</a>
<strong class="jxr_keyword">extends</strong> AsyncCallback
+<a class="jxr_linenumber" name="144" href="#144">144</a>   <strong class="jxr_keyword">public</strong>
<strong class="jxr_keyword">static</strong> <strong class="jxr_keyword">class</strong>
<a href="../../../../org/apache/helix/integration/TestSchedulerMessage.html">MockAsyncCallback</a>
<strong class="jxr_keyword">extends</strong> AsyncCallback
 <a class="jxr_linenumber" name="145" href="#145">145</a>   {
 <a class="jxr_linenumber" name="146" href="#146">146</a> 
-<a class="jxr_linenumber" name="147" href="#147">147</a>     <strong class="jxr_keyword">public</strong>
<a href="../../../../org/apache/helix/integration/TestMessagingService.html">MockAsyncCallback</a>()
+<a class="jxr_linenumber" name="147" href="#147">147</a>     <strong class="jxr_keyword">public</strong>
<a href="../../../../org/apache/helix/integration/TestSchedulerMessage.html">MockAsyncCallback</a>()
 <a class="jxr_linenumber" name="148" href="#148">148</a>     {
 <a class="jxr_linenumber" name="149" href="#149">149</a>     }
 <a class="jxr_linenumber" name="150" href="#150">150</a> 
@@ -307,7 +307,7 @@
 <a class="jxr_linenumber" name="297" href="#297">297</a>     cr.setRecipientInstanceType(InstanceType.PARTICIPANT);
 <a class="jxr_linenumber" name="298" href="#298">298</a>     cr.setSessionSpecific(false);
 <a class="jxr_linenumber" name="299" href="#299">299</a> 
-<a class="jxr_linenumber" name="300" href="#300">300</a>     AsyncCallback asyncCallback
= <strong class="jxr_keyword">new</strong> <a href="../../../../org/apache/helix/integration/TestMessagingService.html">MockAsyncCallback</a>();
+<a class="jxr_linenumber" name="300" href="#300">300</a>     AsyncCallback asyncCallback
= <strong class="jxr_keyword">new</strong> <a href="../../../../org/apache/helix/integration/TestSchedulerMessage.html">MockAsyncCallback</a>();
 <a class="jxr_linenumber" name="301" href="#301">301</a>     <strong class="jxr_keyword">int</strong>
messagesSent = _startCMResultMap.get(hostSrc)._manager.getMessagingService()
 <a class="jxr_linenumber" name="302" href="#302">302</a>         .sendAndWait(cr,
msg, asyncCallback, 60000);
 <a class="jxr_linenumber" name="303" href="#303">303</a> 
@@ -317,7 +317,7 @@
 <a class="jxr_linenumber" name="307" href="#307">307</a>     AssertJUnit.assertTrue(asyncCallback.getMessageReplied().size()
== 1);
 <a class="jxr_linenumber" name="308" href="#308">308</a> 
 <a class="jxr_linenumber" name="309" href="#309">309</a> 
-<a class="jxr_linenumber" name="310" href="#310">310</a>     AsyncCallback asyncCallback2
= <strong class="jxr_keyword">new</strong> <a href="../../../../org/apache/helix/integration/TestMessagingService.html">MockAsyncCallback</a>();
+<a class="jxr_linenumber" name="310" href="#310">310</a>     AsyncCallback asyncCallback2
= <strong class="jxr_keyword">new</strong> <a href="../../../../org/apache/helix/integration/TestSchedulerMessage.html">MockAsyncCallback</a>();
 <a class="jxr_linenumber" name="311" href="#311">311</a>     messagesSent = _startCMResultMap.get(hostSrc)._manager.getMessagingService()
 <a class="jxr_linenumber" name="312" href="#312">312</a>         .sendAndWait(cr,
msg, asyncCallback2, 500);
 <a class="jxr_linenumber" name="313" href="#313">313</a>     AssertJUnit.assertTrue(asyncCallback2.isTimedOut());
@@ -351,7 +351,7 @@
 <a class="jxr_linenumber" name="341" href="#341">341</a>     cr.setInstanceName(<span
class="jxr_string">"%"</span>);
 <a class="jxr_linenumber" name="342" href="#342">342</a>     cr.setRecipientInstanceType(InstanceType.PARTICIPANT);
 <a class="jxr_linenumber" name="343" href="#343">343</a>     cr.setSessionSpecific(false);
-<a class="jxr_linenumber" name="344" href="#344">344</a>     AsyncCallback callback1
= <strong class="jxr_keyword">new</strong> <a href="../../../../org/apache/helix/integration/TestMessagingService.html">MockAsyncCallback</a>();
+<a class="jxr_linenumber" name="344" href="#344">344</a>     AsyncCallback callback1
= <strong class="jxr_keyword">new</strong> <a href="../../../../org/apache/helix/integration/TestSchedulerMessage.html">MockAsyncCallback</a>();
 <a class="jxr_linenumber" name="345" href="#345">345</a>     <strong class="jxr_keyword">int</strong>
messageSent1 = _startCMResultMap.get(hostSrc)._manager.getMessagingService()
 <a class="jxr_linenumber" name="346" href="#346">346</a>         .sendAndWait(cr,
msg, callback1, 10000);
 <a class="jxr_linenumber" name="347" href="#347">347</a> 
@@ -360,32 +360,32 @@
 <a class="jxr_linenumber" name="350" href="#350">350</a>         .get(<span
class="jxr_string">"ReplyMessage"</span>).equals(<span class="jxr_string">"TestReplyMessage"</span>));
 <a class="jxr_linenumber" name="351" href="#351">351</a>     AssertJUnit.assertTrue(callback1.getMessageReplied().size()
== NODE_NR - 1);
 <a class="jxr_linenumber" name="352" href="#352">352</a> 
-<a class="jxr_linenumber" name="353" href="#353">353</a>     AsyncCallback callback2
= <strong class="jxr_keyword">new</strong> <a href="../../../../org/apache/helix/integration/TestMessagingService.html">MockAsyncCallback</a>();
+<a class="jxr_linenumber" name="353" href="#353">353</a>     AsyncCallback callback2
= <strong class="jxr_keyword">new</strong> <a href="../../../../org/apache/helix/integration/TestSchedulerMessage.html">MockAsyncCallback</a>();
 <a class="jxr_linenumber" name="354" href="#354">354</a>     <strong class="jxr_keyword">int</strong>
messageSent2 = _startCMResultMap.get(hostSrc)._manager.getMessagingService()
 <a class="jxr_linenumber" name="355" href="#355">355</a>         .sendAndWait(cr,
msg, callback2, 500);
 <a class="jxr_linenumber" name="356" href="#356">356</a>     AssertJUnit.assertTrue(callback2.isTimedOut());
 <a class="jxr_linenumber" name="357" href="#357">357</a> 
 <a class="jxr_linenumber" name="358" href="#358">358</a>     cr.setPartition(<span
class="jxr_string">"TestDB_17"</span>);
-<a class="jxr_linenumber" name="359" href="#359">359</a>     AsyncCallback callback3
= <strong class="jxr_keyword">new</strong> <a href="../../../../org/apache/helix/integration/TestMessagingService.html">MockAsyncCallback</a>();
+<a class="jxr_linenumber" name="359" href="#359">359</a>     AsyncCallback callback3
= <strong class="jxr_keyword">new</strong> <a href="../../../../org/apache/helix/integration/TestSchedulerMessage.html">MockAsyncCallback</a>();
 <a class="jxr_linenumber" name="360" href="#360">360</a>     <strong class="jxr_keyword">int</strong>
messageSent3 = _startCMResultMap.get(hostSrc)._manager.getMessagingService()
 <a class="jxr_linenumber" name="361" href="#361">361</a>         .sendAndWait(cr,
msg, callback3, 10000);
 <a class="jxr_linenumber" name="362" href="#362">362</a>     AssertJUnit.assertTrue(callback3.getMessageReplied().size()
== _replica - 1);
 <a class="jxr_linenumber" name="363" href="#363">363</a> 
 <a class="jxr_linenumber" name="364" href="#364">364</a> 
 <a class="jxr_linenumber" name="365" href="#365">365</a>     cr.setPartition(<span
class="jxr_string">"TestDB_15"</span>);
-<a class="jxr_linenumber" name="366" href="#366">366</a>     AsyncCallback callback4
= <strong class="jxr_keyword">new</strong> <a href="../../../../org/apache/helix/integration/TestMessagingService.html">MockAsyncCallback</a>();
+<a class="jxr_linenumber" name="366" href="#366">366</a>     AsyncCallback callback4
= <strong class="jxr_keyword">new</strong> <a href="../../../../org/apache/helix/integration/TestSchedulerMessage.html">MockAsyncCallback</a>();
 <a class="jxr_linenumber" name="367" href="#367">367</a>     <strong class="jxr_keyword">int</strong>
messageSent4 = _startCMResultMap.get(hostSrc)._manager.getMessagingService()
 <a class="jxr_linenumber" name="368" href="#368">368</a>         .sendAndWait(cr,
msg, callback4, 10000);
 <a class="jxr_linenumber" name="369" href="#369">369</a>     AssertJUnit.assertTrue(callback4.getMessageReplied().size()
== _replica);
 <a class="jxr_linenumber" name="370" href="#370">370</a>     
 <a class="jxr_linenumber" name="371" href="#371">371</a>     cr.setPartitionState(<span
class="jxr_string">"SLAVE"</span>);
-<a class="jxr_linenumber" name="372" href="#372">372</a>     AsyncCallback callback5
= <strong class="jxr_keyword">new</strong> <a href="../../../../org/apache/helix/integration/TestMessagingService.html">MockAsyncCallback</a>();
+<a class="jxr_linenumber" name="372" href="#372">372</a>     AsyncCallback callback5
= <strong class="jxr_keyword">new</strong> <a href="../../../../org/apache/helix/integration/TestSchedulerMessage.html">MockAsyncCallback</a>();
 <a class="jxr_linenumber" name="373" href="#373">373</a>     <strong class="jxr_keyword">int</strong>
messageSent5 = _startCMResultMap.get(hostSrc)._manager.getMessagingService()
 <a class="jxr_linenumber" name="374" href="#374">374</a>         .sendAndWait(cr,
msg, callback5, 10000);
 <a class="jxr_linenumber" name="375" href="#375">375</a>     AssertJUnit.assertTrue(callback5.getMessageReplied().size()
== _replica - 1);
 <a class="jxr_linenumber" name="376" href="#376">376</a>     
 <a class="jxr_linenumber" name="377" href="#377">377</a>     cr.setDataSource(DataSource.IDEALSTATES);
-<a class="jxr_linenumber" name="378" href="#378">378</a>     AsyncCallback callback6
= <strong class="jxr_keyword">new</strong> <a href="../../../../org/apache/helix/integration/TestMessagingService.html">MockAsyncCallback</a>();
+<a class="jxr_linenumber" name="378" href="#378">378</a>     AsyncCallback callback6
= <strong class="jxr_keyword">new</strong> <a href="../../../../org/apache/helix/integration/TestSchedulerMessage.html">MockAsyncCallback</a>();
 <a class="jxr_linenumber" name="379" href="#379">379</a>     <strong class="jxr_keyword">int</strong>
messageSent6 = _startCMResultMap.get(hostSrc)._manager.getMessagingService()
 <a class="jxr_linenumber" name="380" href="#380">380</a>         .sendAndWait(cr,
msg, callback6, 10000);
 <a class="jxr_linenumber" name="381" href="#381">381</a>     AssertJUnit.assertTrue(callback6.getMessageReplied().size()
== _replica - 1);
@@ -419,7 +419,7 @@
 <a class="jxr_linenumber" name="409" href="#409">409</a>     cr.setRecipientInstanceType(InstanceType.PARTICIPANT);
 <a class="jxr_linenumber" name="410" href="#410">410</a>     cr.setSessionSpecific(false);
 <a class="jxr_linenumber" name="411" href="#411">411</a>     cr.setSelfExcluded(false);
-<a class="jxr_linenumber" name="412" href="#412">412</a>     AsyncCallback callback1
= <strong class="jxr_keyword">new</strong> <a href="../../../../org/apache/helix/integration/TestMessagingService.html">MockAsyncCallback</a>();
+<a class="jxr_linenumber" name="412" href="#412">412</a>     AsyncCallback callback1
= <strong class="jxr_keyword">new</strong> <a href="../../../../org/apache/helix/integration/TestSchedulerMessage.html">MockAsyncCallback</a>();
 <a class="jxr_linenumber" name="413" href="#413">413</a>     <strong class="jxr_keyword">int</strong>
messageSent1 = _startCMResultMap.get(hostSrc)._manager.getMessagingService()
 <a class="jxr_linenumber" name="414" href="#414">414</a>         .sendAndWait(cr,
msg, callback1, 10000);
 <a class="jxr_linenumber" name="415" href="#415">415</a> 
@@ -456,7 +456,7 @@
 <a class="jxr_linenumber" name="446" href="#446">446</a>     cr.setRecipientInstanceType(InstanceType.CONTROLLER);
 <a class="jxr_linenumber" name="447" href="#447">447</a>     cr.setSessionSpecific(false);
 <a class="jxr_linenumber" name="448" href="#448">448</a> 
-<a class="jxr_linenumber" name="449" href="#449">449</a>     AsyncCallback callback1
= <strong class="jxr_keyword">new</strong> <a href="../../../../org/apache/helix/integration/TestMessagingService.html">MockAsyncCallback</a>();
+<a class="jxr_linenumber" name="449" href="#449">449</a>     AsyncCallback callback1
= <strong class="jxr_keyword">new</strong> <a href="../../../../org/apache/helix/integration/TestSchedulerMessage.html">MockAsyncCallback</a>();
 <a class="jxr_linenumber" name="450" href="#450">450</a>     <strong class="jxr_keyword">int</strong>
messagesSent = _startCMResultMap.get(hostSrc)._manager.getMessagingService()
 <a class="jxr_linenumber" name="451" href="#451">451</a>         .sendAndWait(cr,
msg, callback1, 10000);
 <a class="jxr_linenumber" name="452" href="#452">452</a> 
@@ -468,7 +468,7 @@
 <a class="jxr_linenumber" name="458" href="#458">458</a>     msgId = UUID.randomUUID().toString();
 <a class="jxr_linenumber" name="459" href="#459">459</a>     msg.setMsgId(msgId);
 <a class="jxr_linenumber" name="460" href="#460">460</a>     cr.setPartition(<span
class="jxr_string">"TestDB_17"</span>);
-<a class="jxr_linenumber" name="461" href="#461">461</a>     AsyncCallback callback2
= <strong class="jxr_keyword">new</strong> <a href="../../../../org/apache/helix/integration/TestMessagingService.html">MockAsyncCallback</a>();
+<a class="jxr_linenumber" name="461" href="#461">461</a>     AsyncCallback callback2
= <strong class="jxr_keyword">new</strong> <a href="../../../../org/apache/helix/integration/TestSchedulerMessage.html">MockAsyncCallback</a>();
 <a class="jxr_linenumber" name="462" href="#462">462</a>     messagesSent = _startCMResultMap.get(hostSrc)._manager.getMessagingService()
 <a class="jxr_linenumber" name="463" href="#463">463</a>         .sendAndWait(cr,
msg, callback2, 10000);
 <a class="jxr_linenumber" name="464" href="#464">464</a>     AssertJUnit.assertTrue(callback2.getMessageReplied().get(0).getRecord()
@@ -480,7 +480,7 @@
 <a class="jxr_linenumber" name="470" href="#470">470</a>     msgId = UUID.randomUUID().toString();
 <a class="jxr_linenumber" name="471" href="#471">471</a>     msg.setMsgId(msgId);
 <a class="jxr_linenumber" name="472" href="#472">472</a>     cr.setPartitionState(<span
class="jxr_string">"SLAVE"</span>);
-<a class="jxr_linenumber" name="473" href="#473">473</a>     AsyncCallback callback3
= <strong class="jxr_keyword">new</strong> <a href="../../../../org/apache/helix/integration/TestMessagingService.html">MockAsyncCallback</a>();
+<a class="jxr_linenumber" name="473" href="#473">473</a>     AsyncCallback callback3
= <strong class="jxr_keyword">new</strong> <a href="../../../../org/apache/helix/integration/TestSchedulerMessage.html">MockAsyncCallback</a>();
 <a class="jxr_linenumber" name="474" href="#474">474</a>     messagesSent = _startCMResultMap.get(hostSrc)._manager.getMessagingService()
 <a class="jxr_linenumber" name="475" href="#475">475</a>         .sendAndWait(cr,
msg, callback3, 10000);
 <a class="jxr_linenumber" name="476" href="#476">476</a>     AssertJUnit.assertTrue(callback3.getMessageReplied().get(0).getRecord()

Modified: incubator/helix/site-content/xref-test/org/apache/helix/integration/TestRenamePartition.html
URL: http://svn.apache.org/viewvc/incubator/helix/site-content/xref-test/org/apache/helix/integration/TestRenamePartition.html?rev=1428210&r1=1428209&r2=1428210&view=diff
==============================================================================
--- incubator/helix/site-content/xref-test/org/apache/helix/integration/TestRenamePartition.html
(original)
+++ incubator/helix/site-content/xref-test/org/apache/helix/integration/TestRenamePartition.html
Thu Jan  3 08:21:23 2013
@@ -43,7 +43,7 @@
 <a class="jxr_linenumber" name="33" href="#33">33</a>  <strong class="jxr_keyword">import</strong>
org.apache.helix.mock.participant.MockParticipant;
 <a class="jxr_linenumber" name="34" href="#34">34</a>  <strong class="jxr_keyword">import</strong>
org.apache.helix.model.IdealState;
 <a class="jxr_linenumber" name="35" href="#35">35</a>  <strong class="jxr_keyword">import</strong>
org.apache.helix.tools.ClusterStateVerifier;
-<a class="jxr_linenumber" name="36" href="#36">36</a>  <strong class="jxr_keyword">import</strong>
org.apache.helix.tools.IdealStateCalculatorForStorageNode;
+<a class="jxr_linenumber" name="36" href="#36">36</a>  <strong class="jxr_keyword">import</strong>
org.apache.helix.tools.DefaultIdealStateCalculator;
 <a class="jxr_linenumber" name="37" href="#37">37</a>  <strong class="jxr_keyword">import</strong>
org.testng.Assert;
 <a class="jxr_linenumber" name="38" href="#38">38</a>  <strong class="jxr_keyword">import</strong>
org.testng.annotations.Test;
 <a class="jxr_linenumber" name="39" href="#39">39</a>  
@@ -105,7 +105,7 @@
 <a class="jxr_linenumber" name="95" href="#95">95</a>      <em class="jxr_comment">//
calculate idealState</em>
 <a class="jxr_linenumber" name="96" href="#96">96</a>      List&lt;String&gt;
instanceNames = Arrays.asList(<span class="jxr_string">"localhost_12918"</span>,
<span class="jxr_string">"localhost_12919"</span>, <span class="jxr_string">"localhost_12920"</span>,
 <a class="jxr_linenumber" name="97" href="#97">97</a>          <span class="jxr_string">"localhost_12921"</span>,
<span class="jxr_string">"localhost_12922"</span>);
-<a class="jxr_linenumber" name="98" href="#98">98</a>      ZNRecord destIS =
IdealStateCalculatorForStorageNode.calculateIdealState(instanceNames,
+<a class="jxr_linenumber" name="98" href="#98">98</a>      ZNRecord destIS =
DefaultIdealStateCalculator.calculateIdealState(instanceNames,
 <a class="jxr_linenumber" name="99" href="#99">99</a>          10, 3-1, <span
class="jxr_string">"TestDB0"</span>, <span class="jxr_string">"MASTER"</span>,
<span class="jxr_string">"SLAVE"</span>);
 <a class="jxr_linenumber" name="100" href="#100">100</a>     IdealState idealState
= <strong class="jxr_keyword">new</strong> IdealState(destIS);
 <a class="jxr_linenumber" name="101" href="#101">101</a>     idealState.setIdealStateMode(<span
class="jxr_string">"CUSTOMIZED"</span>);



Mime
View raw message