<!DOCTYPE html>
<html>
  <head>
  </head>
  <body>
    <dl style="line-height: 1.5; margin-left: 2em">
      <dt style="clear: both; float: left; font-weight: bold; width: 8em">Author</dt>
      <dd style="margin-left: 8.5em">Kouhei Sutou &lt;kou****@clear*****&gt;</dd>
      <dt style="clear: both; float: left; font-weight: bold; width: 8em">Date</dt>
      <dd style="margin-left: 8.5em">2015-01-05 19:07:29 +0900 (Mon, 05 Jan 2015)</dd>
      <dt style="clear: both; float: left; font-weight: bold; width: 8em">New Revision</dt>
      <dd style="margin-left: 8.5em"><a href="https://github.com/droonga/droonga-engine/commit/ce1a8d055da918d3a00dccc1ec31f3ae26861140">ce1a8d055da918d3a00dccc1ec31f3ae26861140</a></dd>
      <dt style="clear: both; float: left; font-weight: bold; width: 8em">Message</dt>
      <dd style="margin-left: 8.5em"><pre style="border: 1px solid #aaa; font-family: Consolas, Menlo, &quot;Liberation Mono&quot;, Courier, monospace; line-height: 1.2; padding: 0.5em; width: auto">sample cluster: support droonga-engine restart</pre></dd>
      <dt style="clear: both; float: left; font-weight: bold; width: 8em">Modified files</dt>
      <dd style="margin-left: 8.5em">
        <ul>
          <li><a href="https://github.com/droonga/droonga-engine/commit/ce1a8d055da918d3a00dccc1ec31f3ae26861140#diff-0">sample/cluster/Rakefile</a></li>
        </ul>
      </dd>
    </dl>

    <div class="diff-section" style="clear: both">
      <table style="border-collapse: collapse; border: 1px solid #aaa">
        <thead>
          <tr class="diff-header" style="border: 1px solid #aaa">
            <td colspan="3">
<pre style="border: 0; font-family: Consolas, Menlo, &quot;Liberation Mono&quot;, Courier, monospace; line-height: 1.2; margin: 0; padding: 0.5em; white-space: normal; width: auto"><span class="diff-header" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre">  Modified: sample/cluster/Rakefile (+13 -1)</span>
<span class="diff-header-mark" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre">===================================================================</span>
</pre>
            </td>
          </tr>
        </thead>
        <tbody>
          <tr>
            <th class="diff-line-number" style="border: 1px solid #aaa">
<pre style="border: 0; font-family: Consolas, Menlo, &quot;Liberation Mono&quot;, Courier, monospace; line-height: 1.2; margin: 0; padding: 0.5em; white-space: normal; width: auto"><span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/droonga/droonga-engine/commit/ce1a8d055da918d3a00dccc1ec31f3ae26861140#L0L61">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/droonga/droonga-engine/commit/ce1a8d055da918d3a00dccc1ec31f3ae26861140#L0L62">62</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/droonga/droonga-engine/commit/ce1a8d055da918d3a00dccc1ec31f3ae26861140#L0L63">63</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/droonga/droonga-engine/commit/ce1a8d055da918d3a00dccc1ec31f3ae26861140#L0L64">64</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre">&nbsp;</span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre">&nbsp;</span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre">&nbsp;</span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre">&nbsp;</span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/droonga/droonga-engine/commit/ce1a8d055da918d3a00dccc1ec31f3ae26861140#L0L65">65</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/droonga/droonga-engine/commit/ce1a8d055da918d3a00dccc1ec31f3ae26861140#L0L66">66</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/droonga/droonga-engine/commit/ce1a8d055da918d3a00dccc1ec31f3ae26861140#L0L67">67</a></span>
<span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/droonga/droonga-engine/commit/ce1a8d055da918d3a00dccc1ec31f3ae26861140#L0L80">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/droonga/droonga-engine/commit/ce1a8d055da918d3a00dccc1ec31f3ae26861140#L0L81">81</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/droonga/droonga-engine/commit/ce1a8d055da918d3a00dccc1ec31f3ae26861140#L0L82">82</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/droonga/droonga-engine/commit/ce1a8d055da918d3a00dccc1ec31f3ae26861140#L0L83">83</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre">&nbsp;</span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre">&nbsp;</span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre">&nbsp;</span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre">&nbsp;</span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre">&nbsp;</span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre">&nbsp;</span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre">&nbsp;</span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre">&nbsp;</span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/droonga/droonga-engine/commit/ce1a8d055da918d3a00dccc1ec31f3ae26861140#L0L84">84</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/droonga/droonga-engine/commit/ce1a8d055da918d3a00dccc1ec31f3ae26861140#L0L85">85</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/droonga/droonga-engine/commit/ce1a8d055da918d3a00dccc1ec31f3ae26861140#L0L86">86</a></span>
<span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/droonga/droonga-engine/commit/ce1a8d055da918d3a00dccc1ec31f3ae26861140#L0L97">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/droonga/droonga-engine/commit/ce1a8d055da918d3a00dccc1ec31f3ae26861140#L0L98">98</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/droonga/droonga-engine/commit/ce1a8d055da918d3a00dccc1ec31f3ae26861140#L0L99">99</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/droonga/droonga-engine/commit/ce1a8d055da918d3a00dccc1ec31f3ae26861140#L0L100">100</a></span>
<span class="diff-line-number-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/droonga/droonga-engine/commit/ce1a8d055da918d3a00dccc1ec31f3ae26861140#L0L101">101</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre">&nbsp;</span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/droonga/droonga-engine/commit/ce1a8d055da918d3a00dccc1ec31f3ae26861140#L0L102">102</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/droonga/droonga-engine/commit/ce1a8d055da918d3a00dccc1ec31f3ae26861140#L0L103">103</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/droonga/droonga-engine/commit/ce1a8d055da918d3a00dccc1ec31f3ae26861140#L0L104">104</a></span>
</pre>
            </th>
            <th class="diff-line-number" style="border: 1px solid #aaa">
<pre style="border: 0; font-family: Consolas, Menlo, &quot;Liberation Mono&quot;, Courier, monospace; line-height: 1.2; margin: 0; padding: 0.5em; white-space: normal; width: auto"><span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/droonga/droonga-engine/commit/ce1a8d055da918d3a00dccc1ec31f3ae26861140#L0R61">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/droonga/droonga-engine/commit/ce1a8d055da918d3a00dccc1ec31f3ae26861140#L0R62">62</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/droonga/droonga-engine/commit/ce1a8d055da918d3a00dccc1ec31f3ae26861140#L0R63">63</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/droonga/droonga-engine/commit/ce1a8d055da918d3a00dccc1ec31f3ae26861140#L0R64">64</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/droonga/droonga-engine/commit/ce1a8d055da918d3a00dccc1ec31f3ae26861140#L0R65">65</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/droonga/droonga-engine/commit/ce1a8d055da918d3a00dccc1ec31f3ae26861140#L0R66">66</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/droonga/droonga-engine/commit/ce1a8d055da918d3a00dccc1ec31f3ae26861140#L0R67">67</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/droonga/droonga-engine/commit/ce1a8d055da918d3a00dccc1ec31f3ae26861140#L0R68">68</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/droonga/droonga-engine/commit/ce1a8d055da918d3a00dccc1ec31f3ae26861140#L0R69">69</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/droonga/droonga-engine/commit/ce1a8d055da918d3a00dccc1ec31f3ae26861140#L0R70">70</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/droonga/droonga-engine/commit/ce1a8d055da918d3a00dccc1ec31f3ae26861140#L0R71">71</a></span>
<span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/droonga/droonga-engine/commit/ce1a8d055da918d3a00dccc1ec31f3ae26861140#L0R84">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/droonga/droonga-engine/commit/ce1a8d055da918d3a00dccc1ec31f3ae26861140#L0R85">85</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/droonga/droonga-engine/commit/ce1a8d055da918d3a00dccc1ec31f3ae26861140#L0R86">86</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/droonga/droonga-engine/commit/ce1a8d055da918d3a00dccc1ec31f3ae26861140#L0R87">87</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/droonga/droonga-engine/commit/ce1a8d055da918d3a00dccc1ec31f3ae26861140#L0R88">88</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/droonga/droonga-engine/commit/ce1a8d055da918d3a00dccc1ec31f3ae26861140#L0R89">89</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/droonga/droonga-engine/commit/ce1a8d055da918d3a00dccc1ec31f3ae26861140#L0R90">90</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/droonga/droonga-engine/commit/ce1a8d055da918d3a00dccc1ec31f3ae26861140#L0R91">91</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/droonga/droonga-engine/commit/ce1a8d055da918d3a00dccc1ec31f3ae26861140#L0R92">92</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/droonga/droonga-engine/commit/ce1a8d055da918d3a00dccc1ec31f3ae26861140#L0R93">93</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/droonga/droonga-engine/commit/ce1a8d055da918d3a00dccc1ec31f3ae26861140#L0R94">94</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/droonga/droonga-engine/commit/ce1a8d055da918d3a00dccc1ec31f3ae26861140#L0R95">95</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/droonga/droonga-engine/commit/ce1a8d055da918d3a00dccc1ec31f3ae26861140#L0R96">96</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/droonga/droonga-engine/commit/ce1a8d055da918d3a00dccc1ec31f3ae26861140#L0R97">97</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/droonga/droonga-engine/commit/ce1a8d055da918d3a00dccc1ec31f3ae26861140#L0R98">98</a></span>
<span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/droonga/droonga-engine/commit/ce1a8d055da918d3a00dccc1ec31f3ae26861140#L0R109">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/droonga/droonga-engine/commit/ce1a8d055da918d3a00dccc1ec31f3ae26861140#L0R110">110</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/droonga/droonga-engine/commit/ce1a8d055da918d3a00dccc1ec31f3ae26861140#L0R111">111</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/droonga/droonga-engine/commit/ce1a8d055da918d3a00dccc1ec31f3ae26861140#L0R112">112</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre">&nbsp;</span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/droonga/droonga-engine/commit/ce1a8d055da918d3a00dccc1ec31f3ae26861140#L0R113">113</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/droonga/droonga-engine/commit/ce1a8d055da918d3a00dccc1ec31f3ae26861140#L0R114">114</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/droonga/droonga-engine/commit/ce1a8d055da918d3a00dccc1ec31f3ae26861140#L0R115">115</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/droonga/droonga-engine/commit/ce1a8d055da918d3a00dccc1ec31f3ae26861140#L0R116">116</a></span>
</pre>
            </th>
            <td class="diff-content" style="border: 1px solid #aaa">
<pre style="border: 0; font-family: Consolas, Menlo, &quot;Liberation Mono&quot;, Courier, monospace; line-height: 1.2; margin: 0; padding: 0.5em; white-space: normal; width: auto"><span class="diff-hunk-header" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre">@@ -62,6 +62,10 @@ <span class="diff-context" style="background-color: #ffffaa; color: #000000">class DroongaEngine</span></span>
<span class="diff-not-changed" style="display: block; white-space: pre">     Process.kill(:TERM, @pid)</span>
<span class="diff-not-changed" style="display: block; white-space: pre">     Process.waitpid(@pid)</span>
<span class="diff-not-changed" style="display: block; white-space: pre">     @pid = nil</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+    if pid_path.exist?</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+      pid = Integer(pid_path.read)</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+      Process.kill(:TERM, pid)</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+    end</span>
<span class="diff-not-changed" style="display: block; white-space: pre">   end</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> </span>
<span class="diff-not-changed" style="display: block; white-space: pre">   def host</span>
<span class="diff-hunk-header" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre">@@ -81,6 +85,14 @@ <span class="diff-context" style="background-color: #ffffaa; color: #000000">class DroongaEngine</span></span>
<span class="diff-not-changed" style="display: block; white-space: pre">     working_dir_path + &quot;droonga-engine.pid&quot;</span>
<span class="diff-not-changed" style="display: block; white-space: pre">   end</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> </span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+  def pid_path_base_name</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+    &quot;droonga-engine.pid&quot;</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+  end</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+  def pid_path</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+    working_dir_path + pid_path_base_name</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+  end</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+</span>
<span class="diff-not-changed" style="display: block; white-space: pre">   def generate_catalog(node_ids)</span>
<span class="diff-not-changed" style="display: block; white-space: pre">     hosts = node_ids.collect do |node_id|</span>
<span class="diff-not-changed" style="display: block; white-space: pre">       self.class.host(node_id)</span>
<span class="diff-hunk-header" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre">@@ -98,7 +110,7 @@ <span class="diff-context" style="background-color: #ffffaa; color: #000000">class DroongaEngine</span></span>
<span class="diff-not-changed" style="display: block; white-space: pre">       &quot;port&quot;      =&gt; self.class.port,</span>
<span class="diff-not-changed" style="display: block; white-space: pre">       # &quot;log_file&quot;  =&gt; &quot;droonga-engine.log&quot;,</span>
<span class="diff-not-changed" style="display: block; white-space: pre">       &quot;log_level&quot; =&gt; &quot;info&quot;,</span>
<span class="diff-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre">-      &quot;pid_file&quot;  =&gt; &quot;droonga-engine.pid&quot;,</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+      &quot;pid_file&quot;  =&gt; pid_path_base_name,</span>
<span class="diff-not-changed" style="display: block; white-space: pre">     }</span>
<span class="diff-not-changed" style="display: block; white-space: pre">     config_path.open(&quot;w&quot;) do |file|</span>
<span class="diff-not-changed" style="display: block; white-space: pre">       file.puts(config.to_yaml)</span>
</pre>
            </td>
          </tr>
        </tbody>
      </table>
    </div>
  </body>
</html>