You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@giraph.apache.org by ek...@apache.org on 2012/08/16 03:32:58 UTC
svn commit: r1373684 [30/35] - in /giraph/site: ./ apidocs/
apidocs/org/apache/giraph/ apidocs/org/apache/giraph/benchmark/
apidocs/org/apache/giraph/benchmark/class-use/
apidocs/org/apache/giraph/bsp/ apidocs/org/apache/giraph/bsp/class-use/
apidocs/o...
Modified: giraph/site/xref/org/apache/giraph/comm/SendPartitionMessagesRequest.html
URL: http://svn.apache.org/viewvc/giraph/site/xref/org/apache/giraph/comm/SendPartitionMessagesRequest.html?rev=1373684&r1=1373683&r2=1373684&view=diff
==============================================================================
--- giraph/site/xref/org/apache/giraph/comm/SendPartitionMessagesRequest.html (original)
+++ giraph/site/xref/org/apache/giraph/comm/SendPartitionMessagesRequest.html Thu Aug 16 01:32:41 2012
@@ -30,139 +30,126 @@
<a name="20" href="#20">20</a>
<a name="21" href="#21">21</a> <strong class="jxr_keyword">import</strong> org.apache.giraph.comm.RequestRegistry.Type;
<a name="22" href="#22">22</a> <strong class="jxr_keyword">import</strong> org.apache.giraph.graph.BspUtils;
-<a name="23" href="#23">23</a> <strong class="jxr_keyword">import</strong> org.apache.hadoop.conf.Configuration;
-<a name="24" href="#24">24</a> <strong class="jxr_keyword">import</strong> org.apache.hadoop.io.Writable;
-<a name="25" href="#25">25</a> <strong class="jxr_keyword">import</strong> org.apache.hadoop.io.WritableComparable;
-<a name="26" href="#26">26</a> <strong class="jxr_keyword">import</strong> org.apache.log4j.Logger;
-<a name="27" href="#27">27</a>
-<a name="28" href="#28">28</a> <strong class="jxr_keyword">import</strong> com.google.common.collect.Lists;
-<a name="29" href="#29">29</a> <strong class="jxr_keyword">import</strong> com.google.common.collect.Maps;
-<a name="30" href="#30">30</a>
-<a name="31" href="#31">31</a> <strong class="jxr_keyword">import</strong> java.io.DataInput;
-<a name="32" href="#32">32</a> <strong class="jxr_keyword">import</strong> java.io.DataOutput;
-<a name="33" href="#33">33</a> <strong class="jxr_keyword">import</strong> java.io.IOException;
-<a name="34" href="#34">34</a> <strong class="jxr_keyword">import</strong> java.util.Collection;
-<a name="35" href="#35">35</a> <strong class="jxr_keyword">import</strong> java.util.List;
-<a name="36" href="#36">36</a> <strong class="jxr_keyword">import</strong> java.util.Map;
-<a name="37" href="#37">37</a> <strong class="jxr_keyword">import</strong> java.util.Map.Entry;
-<a name="38" href="#38">38</a>
-<a name="39" href="#39">39</a> <em class="jxr_javadoccomment">/**</em>
-<a name="40" href="#40">40</a> <em class="jxr_javadoccomment"> * Send a collection of vertex messages for a partition.</em>
-<a name="41" href="#41">41</a> <em class="jxr_javadoccomment"> *</em>
-<a name="42" href="#42">42</a> <em class="jxr_javadoccomment"> * @param <I> Vertex id</em>
-<a name="43" href="#43">43</a> <em class="jxr_javadoccomment"> * @param <V> Vertex data</em>
-<a name="44" href="#44">44</a> <em class="jxr_javadoccomment"> * @param <E> Edge data</em>
-<a name="45" href="#45">45</a> <em class="jxr_javadoccomment"> * @param <M> Message data</em>
-<a name="46" href="#46">46</a> <em class="jxr_javadoccomment"> */</em>
-<a name="47" href="#47">47</a> @SuppressWarnings(<span class="jxr_string">"rawtypes"</span>)
-<a name="48" href="#48">48</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">class</strong> SendPartitionMessagesRequest<I <strong class="jxr_keyword">extends</strong> WritableComparable,
-<a name="49" href="#49">49</a> V <strong class="jxr_keyword">extends</strong> Writable, E <strong class="jxr_keyword">extends</strong> Writable,
-<a name="50" href="#50">50</a> M <strong class="jxr_keyword">extends</strong> Writable> implements WritableRequest<I, V, E, M> {
-<a name="51" href="#51">51</a> <em class="jxr_javadoccomment">/**</em><em class="jxr_javadoccomment"> Class logger */</em>
-<a name="52" href="#52">52</a> <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">static</strong> <strong class="jxr_keyword">final</strong> Logger LOG =
-<a name="53" href="#53">53</a> Logger.getLogger(SendPartitionMessagesRequest.<strong class="jxr_keyword">class</strong>);
-<a name="54" href="#54">54</a> <em class="jxr_javadoccomment">/**</em><em class="jxr_javadoccomment"> Partition id */</em>
-<a name="55" href="#55">55</a> <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">int</strong> partitionId;
-<a name="56" href="#56">56</a> <em class="jxr_javadoccomment">/**</em><em class="jxr_javadoccomment"> Messages sent for a partition */</em>
-<a name="57" href="#57">57</a> <strong class="jxr_keyword">private</strong> Map<I, Collection<M>> vertexIdMessages;
-<a name="58" href="#58">58</a> <em class="jxr_javadoccomment">/**</em><em class="jxr_javadoccomment"> Configuration */</em>
-<a name="59" href="#59">59</a> <strong class="jxr_keyword">private</strong> Configuration conf;
-<a name="60" href="#60">60</a>
-<a name="61" href="#61">61</a> <em class="jxr_javadoccomment">/**</em>
-<a name="62" href="#62">62</a> <em class="jxr_javadoccomment"> * Constructor used for reflection only</em>
-<a name="63" href="#63">63</a> <em class="jxr_javadoccomment"> */</em>
-<a name="64" href="#64">64</a> <strong class="jxr_keyword">public</strong> <a href="../../../../org/apache/giraph/comm/SendPartitionMessagesRequest.html">SendPartitionMessagesRequest</a>() { }
-<a name="65" href="#65">65</a>
-<a name="66" href="#66">66</a> <em class="jxr_javadoccomment">/**</em>
-<a name="67" href="#67">67</a> <em class="jxr_javadoccomment"> * Constructor used to send request.</em>
-<a name="68" href="#68">68</a> <em class="jxr_javadoccomment"> *</em>
-<a name="69" href="#69">69</a> <em class="jxr_javadoccomment"> * @param partitionId Partition to send the request to</em>
-<a name="70" href="#70">70</a> <em class="jxr_javadoccomment"> * @param vertexIdMessages Map of messages to send</em>
-<a name="71" href="#71">71</a> <em class="jxr_javadoccomment"> */</em>
-<a name="72" href="#72">72</a> <strong class="jxr_keyword">public</strong> <a href="../../../../org/apache/giraph/comm/SendPartitionMessagesRequest.html">SendPartitionMessagesRequest</a>(<strong class="jxr_keyword">int</strong> partitionId,
-<a name="73" href="#73">73</a> Map<I, Collection<M>> vertexIdMessages) {
-<a name="74" href="#74">74</a> <strong class="jxr_keyword">this</strong>.partitionId = partitionId;
-<a name="75" href="#75">75</a> <strong class="jxr_keyword">this</strong>.vertexIdMessages = vertexIdMessages;
-<a name="76" href="#76">76</a> }
-<a name="77" href="#77">77</a>
-<a name="78" href="#78">78</a> @Override
-<a name="79" href="#79">79</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> readFields(DataInput input) <strong class="jxr_keyword">throws</strong> IOException {
-<a name="80" href="#80">80</a> partitionId = input.readInt();
-<a name="81" href="#81">81</a> <strong class="jxr_keyword">int</strong> vertexIdMessagesSize = input.readInt();
-<a name="82" href="#82">82</a> vertexIdMessages = Maps.newHashMapWithExpectedSize(vertexIdMessagesSize);
-<a name="83" href="#83">83</a> <strong class="jxr_keyword">for</strong> (<strong class="jxr_keyword">int</strong> i = 0; i < vertexIdMessagesSize; ++i) {
-<a name="84" href="#84">84</a> I vertexId = BspUtils.<I>createVertexId(conf);
-<a name="85" href="#85">85</a> vertexId.readFields(input);
-<a name="86" href="#86">86</a> <strong class="jxr_keyword">int</strong> messageCount = input.readInt();
-<a name="87" href="#87">87</a> List<M> messageList = Lists.newArrayListWithCapacity(messageCount);
-<a name="88" href="#88">88</a> <strong class="jxr_keyword">for</strong> (<strong class="jxr_keyword">int</strong> j = 0; j < messageCount; ++j) {
-<a name="89" href="#89">89</a> M message = BspUtils.<M>createMessageValue(conf);
-<a name="90" href="#90">90</a> message.readFields(input);
-<a name="91" href="#91">91</a> messageList.add(message);
-<a name="92" href="#92">92</a> }
-<a name="93" href="#93">93</a> <strong class="jxr_keyword">if</strong> (vertexIdMessages.put(vertexId, messageList) != <strong class="jxr_keyword">null</strong>) {
-<a name="94" href="#94">94</a> <strong class="jxr_keyword">throw</strong> <strong class="jxr_keyword">new</strong> IllegalStateException(
-<a name="95" href="#95">95</a> <span class="jxr_string">"readFields: Already has vertex id "</span> + vertexId);
-<a name="96" href="#96">96</a> }
-<a name="97" href="#97">97</a> }
-<a name="98" href="#98">98</a> }
-<a name="99" href="#99">99</a>
-<a name="100" href="#100">100</a> @Override
-<a name="101" href="#101">101</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> write(DataOutput output) <strong class="jxr_keyword">throws</strong> IOException {
-<a name="102" href="#102">102</a> output.writeInt(partitionId);
-<a name="103" href="#103">103</a> output.writeInt(vertexIdMessages.size());
-<a name="104" href="#104">104</a> <strong class="jxr_keyword">for</strong> (Entry<I, Collection<M>> entry : vertexIdMessages.entrySet()) {
-<a name="105" href="#105">105</a> entry.getKey().write(output);
-<a name="106" href="#106">106</a> output.writeInt(entry.getValue().size());
-<a name="107" href="#107">107</a> <strong class="jxr_keyword">for</strong> (M message : entry.getValue()) {
-<a name="108" href="#108">108</a> message.write(output);
-<a name="109" href="#109">109</a> }
-<a name="110" href="#110">110</a> }
-<a name="111" href="#111">111</a> }
-<a name="112" href="#112">112</a>
-<a name="113" href="#113">113</a> @Override
-<a name="114" href="#114">114</a> <strong class="jxr_keyword">public</strong> <a href="../../../../org/apache/giraph/comm/RequestRegistry.html">Type</a> getType() {
-<a name="115" href="#115">115</a> <strong class="jxr_keyword">return</strong> Type.SEND_PARTITION_MESSAGES_REQUEST;
-<a name="116" href="#116">116</a> }
-<a name="117" href="#117">117</a>
-<a name="118" href="#118">118</a> @Override
-<a name="119" href="#119">119</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> doRequest(ServerData<I, V, E, M> serverData) {
-<a name="120" href="#120">120</a> <strong class="jxr_keyword">try</strong> {
-<a name="121" href="#121">121</a> serverData.getIncomingMessageStore().addPartitionMessages(
-<a name="122" href="#122">122</a> vertexIdMessages, partitionId);
-<a name="123" href="#123">123</a> } <strong class="jxr_keyword">catch</strong> (IOException e) {
-<a name="124" href="#124">124</a> <strong class="jxr_keyword">throw</strong> <strong class="jxr_keyword">new</strong> RuntimeException(<span class="jxr_string">"doRequest: Got IOException "</span>, e);
-<a name="125" href="#125">125</a> }
-<a name="126" href="#126">126</a> }
-<a name="127" href="#127">127</a>
-<a name="128" href="#128">128</a> @Override
-<a name="129" href="#129">129</a> <strong class="jxr_keyword">public</strong> Configuration getConf() {
-<a name="130" href="#130">130</a> <strong class="jxr_keyword">return</strong> conf;
-<a name="131" href="#131">131</a> }
-<a name="132" href="#132">132</a>
-<a name="133" href="#133">133</a> @Override
-<a name="134" href="#134">134</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> setConf(Configuration conf) {
-<a name="135" href="#135">135</a> <strong class="jxr_keyword">this</strong>.conf = conf;
-<a name="136" href="#136">136</a> }
-<a name="137" href="#137">137</a>
-<a name="138" href="#138">138</a> <em class="jxr_javadoccomment">/**</em>
-<a name="139" href="#139">139</a> <em class="jxr_javadoccomment"> * Get id of partition</em>
-<a name="140" href="#140">140</a> <em class="jxr_javadoccomment"> *</em>
-<a name="141" href="#141">141</a> <em class="jxr_javadoccomment"> * @return Partition id</em>
-<a name="142" href="#142">142</a> <em class="jxr_javadoccomment"> */</em>
-<a name="143" href="#143">143</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">int</strong> getPartitionId() {
-<a name="144" href="#144">144</a> <strong class="jxr_keyword">return</strong> partitionId;
-<a name="145" href="#145">145</a> }
-<a name="146" href="#146">146</a>
-<a name="147" href="#147">147</a> <em class="jxr_javadoccomment">/**</em>
-<a name="148" href="#148">148</a> <em class="jxr_javadoccomment"> * Get messages</em>
-<a name="149" href="#149">149</a> <em class="jxr_javadoccomment"> *</em>
-<a name="150" href="#150">150</a> <em class="jxr_javadoccomment"> * @return Messages map</em>
-<a name="151" href="#151">151</a> <em class="jxr_javadoccomment"> */</em>
-<a name="152" href="#152">152</a> <strong class="jxr_keyword">public</strong> Map<I, Collection<M>> getVertexIdMessages() {
-<a name="153" href="#153">153</a> <strong class="jxr_keyword">return</strong> vertexIdMessages;
-<a name="154" href="#154">154</a> }
-<a name="155" href="#155">155</a> }
+<a name="23" href="#23">23</a> <strong class="jxr_keyword">import</strong> org.apache.hadoop.io.Writable;
+<a name="24" href="#24">24</a> <strong class="jxr_keyword">import</strong> org.apache.hadoop.io.WritableComparable;
+<a name="25" href="#25">25</a> <strong class="jxr_keyword">import</strong> org.apache.log4j.Logger;
+<a name="26" href="#26">26</a>
+<a name="27" href="#27">27</a> <strong class="jxr_keyword">import</strong> com.google.common.collect.Lists;
+<a name="28" href="#28">28</a> <strong class="jxr_keyword">import</strong> com.google.common.collect.Maps;
+<a name="29" href="#29">29</a>
+<a name="30" href="#30">30</a> <strong class="jxr_keyword">import</strong> java.io.DataInput;
+<a name="31" href="#31">31</a> <strong class="jxr_keyword">import</strong> java.io.DataOutput;
+<a name="32" href="#32">32</a> <strong class="jxr_keyword">import</strong> java.io.IOException;
+<a name="33" href="#33">33</a> <strong class="jxr_keyword">import</strong> java.util.Collection;
+<a name="34" href="#34">34</a> <strong class="jxr_keyword">import</strong> java.util.List;
+<a name="35" href="#35">35</a> <strong class="jxr_keyword">import</strong> java.util.Map;
+<a name="36" href="#36">36</a> <strong class="jxr_keyword">import</strong> java.util.Map.Entry;
+<a name="37" href="#37">37</a>
+<a name="38" href="#38">38</a> <em class="jxr_javadoccomment">/**</em>
+<a name="39" href="#39">39</a> <em class="jxr_javadoccomment"> * Send a collection of vertex messages for a partition.</em>
+<a name="40" href="#40">40</a> <em class="jxr_javadoccomment"> *</em>
+<a name="41" href="#41">41</a> <em class="jxr_javadoccomment"> * @param <I> Vertex id</em>
+<a name="42" href="#42">42</a> <em class="jxr_javadoccomment"> * @param <V> Vertex data</em>
+<a name="43" href="#43">43</a> <em class="jxr_javadoccomment"> * @param <E> Edge data</em>
+<a name="44" href="#44">44</a> <em class="jxr_javadoccomment"> * @param <M> Message data</em>
+<a name="45" href="#45">45</a> <em class="jxr_javadoccomment"> */</em>
+<a name="46" href="#46">46</a> @SuppressWarnings(<span class="jxr_string">"rawtypes"</span>)
+<a name="47" href="#47">47</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">class</strong> SendPartitionMessagesRequest<I <strong class="jxr_keyword">extends</strong> WritableComparable,
+<a name="48" href="#48">48</a> V <strong class="jxr_keyword">extends</strong> Writable, E <strong class="jxr_keyword">extends</strong> Writable,
+<a name="49" href="#49">49</a> M <strong class="jxr_keyword">extends</strong> Writable> <strong class="jxr_keyword">extends</strong> WritableRequest<I, V, E, M> {
+<a name="50" href="#50">50</a> <em class="jxr_javadoccomment">/**</em><em class="jxr_javadoccomment"> Class logger */</em>
+<a name="51" href="#51">51</a> <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">static</strong> <strong class="jxr_keyword">final</strong> Logger LOG =
+<a name="52" href="#52">52</a> Logger.getLogger(SendPartitionMessagesRequest.<strong class="jxr_keyword">class</strong>);
+<a name="53" href="#53">53</a> <em class="jxr_javadoccomment">/**</em><em class="jxr_javadoccomment"> Partition id */</em>
+<a name="54" href="#54">54</a> <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">int</strong> partitionId;
+<a name="55" href="#55">55</a> <em class="jxr_javadoccomment">/**</em><em class="jxr_javadoccomment"> Messages sent for a partition */</em>
+<a name="56" href="#56">56</a> <strong class="jxr_keyword">private</strong> Map<I, Collection<M>> vertexIdMessages;
+<a name="57" href="#57">57</a>
+<a name="58" href="#58">58</a> <em class="jxr_javadoccomment">/**</em>
+<a name="59" href="#59">59</a> <em class="jxr_javadoccomment"> * Constructor used for reflection only</em>
+<a name="60" href="#60">60</a> <em class="jxr_javadoccomment"> */</em>
+<a name="61" href="#61">61</a> <strong class="jxr_keyword">public</strong> <a href="../../../../org/apache/giraph/comm/SendPartitionMessagesRequest.html">SendPartitionMessagesRequest</a>() { }
+<a name="62" href="#62">62</a>
+<a name="63" href="#63">63</a> <em class="jxr_javadoccomment">/**</em>
+<a name="64" href="#64">64</a> <em class="jxr_javadoccomment"> * Constructor used to send request.</em>
+<a name="65" href="#65">65</a> <em class="jxr_javadoccomment"> *</em>
+<a name="66" href="#66">66</a> <em class="jxr_javadoccomment"> * @param partitionId Partition to send the request to</em>
+<a name="67" href="#67">67</a> <em class="jxr_javadoccomment"> * @param vertexIdMessages Map of messages to send</em>
+<a name="68" href="#68">68</a> <em class="jxr_javadoccomment"> */</em>
+<a name="69" href="#69">69</a> <strong class="jxr_keyword">public</strong> <a href="../../../../org/apache/giraph/comm/SendPartitionMessagesRequest.html">SendPartitionMessagesRequest</a>(<strong class="jxr_keyword">int</strong> partitionId,
+<a name="70" href="#70">70</a> Map<I, Collection<M>> vertexIdMessages) {
+<a name="71" href="#71">71</a> <strong class="jxr_keyword">this</strong>.partitionId = partitionId;
+<a name="72" href="#72">72</a> <strong class="jxr_keyword">this</strong>.vertexIdMessages = vertexIdMessages;
+<a name="73" href="#73">73</a> }
+<a name="74" href="#74">74</a>
+<a name="75" href="#75">75</a> @Override
+<a name="76" href="#76">76</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> readFieldsRequest(DataInput input) <strong class="jxr_keyword">throws</strong> IOException {
+<a name="77" href="#77">77</a> partitionId = input.readInt();
+<a name="78" href="#78">78</a> <strong class="jxr_keyword">int</strong> vertexIdMessagesSize = input.readInt();
+<a name="79" href="#79">79</a> vertexIdMessages = Maps.newHashMapWithExpectedSize(vertexIdMessagesSize);
+<a name="80" href="#80">80</a> <strong class="jxr_keyword">for</strong> (<strong class="jxr_keyword">int</strong> i = 0; i < vertexIdMessagesSize; ++i) {
+<a name="81" href="#81">81</a> I vertexId = BspUtils.<I>createVertexId(getConf());
+<a name="82" href="#82">82</a> vertexId.readFields(input);
+<a name="83" href="#83">83</a> <strong class="jxr_keyword">int</strong> messageCount = input.readInt();
+<a name="84" href="#84">84</a> List<M> messageList = Lists.newArrayListWithCapacity(messageCount);
+<a name="85" href="#85">85</a> <strong class="jxr_keyword">for</strong> (<strong class="jxr_keyword">int</strong> j = 0; j < messageCount; ++j) {
+<a name="86" href="#86">86</a> M message = BspUtils.<M>createMessageValue(getConf());
+<a name="87" href="#87">87</a> message.readFields(input);
+<a name="88" href="#88">88</a> messageList.add(message);
+<a name="89" href="#89">89</a> }
+<a name="90" href="#90">90</a> <strong class="jxr_keyword">if</strong> (vertexIdMessages.put(vertexId, messageList) != <strong class="jxr_keyword">null</strong>) {
+<a name="91" href="#91">91</a> <strong class="jxr_keyword">throw</strong> <strong class="jxr_keyword">new</strong> IllegalStateException(
+<a name="92" href="#92">92</a> <span class="jxr_string">"readFields: Already has vertex id "</span> + vertexId);
+<a name="93" href="#93">93</a> }
+<a name="94" href="#94">94</a> }
+<a name="95" href="#95">95</a> }
+<a name="96" href="#96">96</a>
+<a name="97" href="#97">97</a> @Override
+<a name="98" href="#98">98</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> writeRequest(DataOutput output) <strong class="jxr_keyword">throws</strong> IOException {
+<a name="99" href="#99">99</a> output.writeInt(partitionId);
+<a name="100" href="#100">100</a> output.writeInt(vertexIdMessages.size());
+<a name="101" href="#101">101</a> <strong class="jxr_keyword">for</strong> (Entry<I, Collection<M>> entry : vertexIdMessages.entrySet()) {
+<a name="102" href="#102">102</a> entry.getKey().write(output);
+<a name="103" href="#103">103</a> output.writeInt(entry.getValue().size());
+<a name="104" href="#104">104</a> <strong class="jxr_keyword">for</strong> (M message : entry.getValue()) {
+<a name="105" href="#105">105</a> message.write(output);
+<a name="106" href="#106">106</a> }
+<a name="107" href="#107">107</a> }
+<a name="108" href="#108">108</a> }
+<a name="109" href="#109">109</a>
+<a name="110" href="#110">110</a> @Override
+<a name="111" href="#111">111</a> <strong class="jxr_keyword">public</strong> <a href="../../../../org/apache/giraph/comm/RequestRegistry.html">Type</a> getType() {
+<a name="112" href="#112">112</a> <strong class="jxr_keyword">return</strong> Type.SEND_PARTITION_MESSAGES_REQUEST;
+<a name="113" href="#113">113</a> }
+<a name="114" href="#114">114</a>
+<a name="115" href="#115">115</a> @Override
+<a name="116" href="#116">116</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> doRequest(ServerData<I, V, E, M> serverData) {
+<a name="117" href="#117">117</a> <strong class="jxr_keyword">try</strong> {
+<a name="118" href="#118">118</a> serverData.getIncomingMessageStore().addPartitionMessages(
+<a name="119" href="#119">119</a> vertexIdMessages, partitionId);
+<a name="120" href="#120">120</a> } <strong class="jxr_keyword">catch</strong> (IOException e) {
+<a name="121" href="#121">121</a> <strong class="jxr_keyword">throw</strong> <strong class="jxr_keyword">new</strong> RuntimeException(<span class="jxr_string">"doRequest: Got IOException "</span>, e);
+<a name="122" href="#122">122</a> }
+<a name="123" href="#123">123</a> }
+<a name="124" href="#124">124</a>
+<a name="125" href="#125">125</a> <em class="jxr_javadoccomment">/**</em>
+<a name="126" href="#126">126</a> <em class="jxr_javadoccomment"> * Get id of partition</em>
+<a name="127" href="#127">127</a> <em class="jxr_javadoccomment"> *</em>
+<a name="128" href="#128">128</a> <em class="jxr_javadoccomment"> * @return Partition id</em>
+<a name="129" href="#129">129</a> <em class="jxr_javadoccomment"> */</em>
+<a name="130" href="#130">130</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">int</strong> getPartitionId() {
+<a name="131" href="#131">131</a> <strong class="jxr_keyword">return</strong> partitionId;
+<a name="132" href="#132">132</a> }
+<a name="133" href="#133">133</a>
+<a name="134" href="#134">134</a> <em class="jxr_javadoccomment">/**</em>
+<a name="135" href="#135">135</a> <em class="jxr_javadoccomment"> * Get messages</em>
+<a name="136" href="#136">136</a> <em class="jxr_javadoccomment"> *</em>
+<a name="137" href="#137">137</a> <em class="jxr_javadoccomment"> * @return Messages map</em>
+<a name="138" href="#138">138</a> <em class="jxr_javadoccomment"> */</em>
+<a name="139" href="#139">139</a> <strong class="jxr_keyword">public</strong> Map<I, Collection<M>> getVertexIdMessages() {
+<a name="140" href="#140">140</a> <strong class="jxr_keyword">return</strong> vertexIdMessages;
+<a name="141" href="#141">141</a> }
+<a name="142" href="#142">142</a> }
</pre>
<hr/><div id="footer">This page was automatically generated by <a href="http://maven.apache.org/">Maven</a></div></body>
</html>
Modified: giraph/site/xref/org/apache/giraph/comm/SendPartitionMutationsRequest.html
URL: http://svn.apache.org/viewvc/giraph/site/xref/org/apache/giraph/comm/SendPartitionMutationsRequest.html?rev=1373684&r1=1373683&r2=1373684&view=diff
==============================================================================
--- giraph/site/xref/org/apache/giraph/comm/SendPartitionMutationsRequest.html (original)
+++ giraph/site/xref/org/apache/giraph/comm/SendPartitionMutationsRequest.html Thu Aug 16 01:32:41 2012
@@ -38,118 +38,106 @@
<a name="28" href="#28">28</a> <strong class="jxr_keyword">import</strong> org.apache.giraph.comm.RequestRegistry.Type;
<a name="29" href="#29">29</a> <strong class="jxr_keyword">import</strong> org.apache.giraph.graph.BspUtils;
<a name="30" href="#30">30</a> <strong class="jxr_keyword">import</strong> org.apache.giraph.graph.VertexMutations;
-<a name="31" href="#31">31</a> <strong class="jxr_keyword">import</strong> org.apache.hadoop.conf.Configuration;
-<a name="32" href="#32">32</a> <strong class="jxr_keyword">import</strong> org.apache.hadoop.io.Writable;
-<a name="33" href="#33">33</a> <strong class="jxr_keyword">import</strong> org.apache.hadoop.io.WritableComparable;
-<a name="34" href="#34">34</a> <strong class="jxr_keyword">import</strong> org.apache.log4j.Logger;
-<a name="35" href="#35">35</a>
-<a name="36" href="#36">36</a> <strong class="jxr_keyword">import</strong> com.google.common.collect.Maps;
-<a name="37" href="#37">37</a>
-<a name="38" href="#38">38</a> <em class="jxr_javadoccomment">/**</em>
-<a name="39" href="#39">39</a> <em class="jxr_javadoccomment"> * Send a collection of vertex mutations for a partition.</em>
-<a name="40" href="#40">40</a> <em class="jxr_javadoccomment"> *</em>
-<a name="41" href="#41">41</a> <em class="jxr_javadoccomment"> * @param <I> Vertex id</em>
-<a name="42" href="#42">42</a> <em class="jxr_javadoccomment"> * @param <V> Vertex data</em>
-<a name="43" href="#43">43</a> <em class="jxr_javadoccomment"> * @param <E> Edge data</em>
-<a name="44" href="#44">44</a> <em class="jxr_javadoccomment"> * @param <M> Message data</em>
-<a name="45" href="#45">45</a> <em class="jxr_javadoccomment"> */</em>
-<a name="46" href="#46">46</a> @SuppressWarnings(<span class="jxr_string">"rawtypes"</span>)
-<a name="47" href="#47">47</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">class</strong> SendPartitionMutationsRequest<I <strong class="jxr_keyword">extends</strong> WritableComparable,
-<a name="48" href="#48">48</a> V <strong class="jxr_keyword">extends</strong> Writable, E <strong class="jxr_keyword">extends</strong> Writable,
-<a name="49" href="#49">49</a> M <strong class="jxr_keyword">extends</strong> Writable> implements WritableRequest<I, V, E, M> {
-<a name="50" href="#50">50</a> <em class="jxr_javadoccomment">/**</em><em class="jxr_javadoccomment"> Class logger */</em>
-<a name="51" href="#51">51</a> <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">static</strong> <strong class="jxr_keyword">final</strong> Logger LOG =
-<a name="52" href="#52">52</a> Logger.getLogger(SendPartitionMutationsRequest.<strong class="jxr_keyword">class</strong>);
-<a name="53" href="#53">53</a> <em class="jxr_javadoccomment">/**</em><em class="jxr_javadoccomment"> Partition id */</em>
-<a name="54" href="#54">54</a> <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">int</strong> partitionId;
-<a name="55" href="#55">55</a> <em class="jxr_javadoccomment">/**</em><em class="jxr_javadoccomment"> Mutations sent for a partition */</em>
-<a name="56" href="#56">56</a> <strong class="jxr_keyword">private</strong> Map<I, VertexMutations<I, V, E, M>> vertexIdMutations;
-<a name="57" href="#57">57</a> <em class="jxr_javadoccomment">/**</em><em class="jxr_javadoccomment"> Configuration */</em>
-<a name="58" href="#58">58</a> <strong class="jxr_keyword">private</strong> Configuration conf;
-<a name="59" href="#59">59</a>
-<a name="60" href="#60">60</a> <em class="jxr_javadoccomment">/**</em>
-<a name="61" href="#61">61</a> <em class="jxr_javadoccomment"> * Constructor used for reflection only</em>
-<a name="62" href="#62">62</a> <em class="jxr_javadoccomment"> */</em>
-<a name="63" href="#63">63</a> <strong class="jxr_keyword">public</strong> <a href="../../../../org/apache/giraph/comm/SendPartitionMutationsRequest.html">SendPartitionMutationsRequest</a>() { }
-<a name="64" href="#64">64</a>
-<a name="65" href="#65">65</a> <em class="jxr_javadoccomment">/**</em>
-<a name="66" href="#66">66</a> <em class="jxr_javadoccomment"> * Constructor used to send request.</em>
-<a name="67" href="#67">67</a> <em class="jxr_javadoccomment"> *</em>
-<a name="68" href="#68">68</a> <em class="jxr_javadoccomment"> * @param partitionId Partition to send the request to</em>
-<a name="69" href="#69">69</a> <em class="jxr_javadoccomment"> * @param vertexIdMutations Map of mutations to send</em>
-<a name="70" href="#70">70</a> <em class="jxr_javadoccomment"> */</em>
-<a name="71" href="#71">71</a> <strong class="jxr_keyword">public</strong> <a href="../../../../org/apache/giraph/comm/SendPartitionMutationsRequest.html">SendPartitionMutationsRequest</a>(<strong class="jxr_keyword">int</strong> partitionId,
-<a name="72" href="#72">72</a> Map<I, VertexMutations<I, V, E, M>> vertexIdMutations) {
-<a name="73" href="#73">73</a> <strong class="jxr_keyword">this</strong>.partitionId = partitionId;
-<a name="74" href="#74">74</a> <strong class="jxr_keyword">this</strong>.vertexIdMutations = vertexIdMutations;
-<a name="75" href="#75">75</a> }
-<a name="76" href="#76">76</a>
-<a name="77" href="#77">77</a> @Override
-<a name="78" href="#78">78</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> readFields(DataInput input) <strong class="jxr_keyword">throws</strong> IOException {
-<a name="79" href="#79">79</a> partitionId = input.readInt();
-<a name="80" href="#80">80</a> <strong class="jxr_keyword">int</strong> vertexIdMutationsSize = input.readInt();
-<a name="81" href="#81">81</a> vertexIdMutations = Maps.newHashMapWithExpectedSize(vertexIdMutationsSize);
-<a name="82" href="#82">82</a> <strong class="jxr_keyword">for</strong> (<strong class="jxr_keyword">int</strong> i = 0; i < vertexIdMutationsSize; ++i) {
-<a name="83" href="#83">83</a> I vertexId = BspUtils.<I>createVertexId(conf);
-<a name="84" href="#84">84</a> vertexId.readFields(input);
-<a name="85" href="#85">85</a> VertexMutations<I, V, E, M> vertexMutations =
-<a name="86" href="#86">86</a> <strong class="jxr_keyword">new</strong> VertexMutations<I, V, E, M>();
-<a name="87" href="#87">87</a> vertexMutations.setConf(conf);
-<a name="88" href="#88">88</a> vertexMutations.readFields(input);
-<a name="89" href="#89">89</a> <strong class="jxr_keyword">if</strong> (vertexIdMutations.put(vertexId, vertexMutations) != <strong class="jxr_keyword">null</strong>) {
-<a name="90" href="#90">90</a> <strong class="jxr_keyword">throw</strong> <strong class="jxr_keyword">new</strong> IllegalStateException(
-<a name="91" href="#91">91</a> <span class="jxr_string">"readFields: Already has vertex id "</span> + vertexId);
-<a name="92" href="#92">92</a> }
-<a name="93" href="#93">93</a> }
-<a name="94" href="#94">94</a> }
-<a name="95" href="#95">95</a>
-<a name="96" href="#96">96</a> @Override
-<a name="97" href="#97">97</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> write(DataOutput output) <strong class="jxr_keyword">throws</strong> IOException {
-<a name="98" href="#98">98</a> output.writeInt(partitionId);
-<a name="99" href="#99">99</a> output.writeInt(vertexIdMutations.size());
-<a name="100" href="#100">100</a> <strong class="jxr_keyword">for</strong> (Entry<I, VertexMutations<I, V, E, M>> entry :
-<a name="101" href="#101">101</a> vertexIdMutations.entrySet()) {
-<a name="102" href="#102">102</a> entry.getKey().write(output);
-<a name="103" href="#103">103</a> entry.getValue().write(output);
-<a name="104" href="#104">104</a> }
-<a name="105" href="#105">105</a> }
-<a name="106" href="#106">106</a>
-<a name="107" href="#107">107</a> @Override
-<a name="108" href="#108">108</a> <strong class="jxr_keyword">public</strong> <a href="../../../../org/apache/giraph/comm/RequestRegistry.html">Type</a> getType() {
-<a name="109" href="#109">109</a> <strong class="jxr_keyword">return</strong> Type.SEND_PARTITION_MUTATIONS_REQUEST;
-<a name="110" href="#110">110</a> }
-<a name="111" href="#111">111</a>
-<a name="112" href="#112">112</a> @Override
-<a name="113" href="#113">113</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> doRequest(ServerData<I, V, E, M> serverData) {
-<a name="114" href="#114">114</a> ConcurrentHashMap<I, VertexMutations<I, V, E, M>> vertexMutations =
-<a name="115" href="#115">115</a> serverData.getVertexMutations();
-<a name="116" href="#116">116</a> <strong class="jxr_keyword">for</strong> (Entry<I, VertexMutations<I, V, E, M>> entry :
-<a name="117" href="#117">117</a> vertexIdMutations.entrySet()) {
-<a name="118" href="#118">118</a> VertexMutations<I, V, E, M> mutations =
-<a name="119" href="#119">119</a> vertexMutations.get(entry.getKey());
-<a name="120" href="#120">120</a> <strong class="jxr_keyword">if</strong> (mutations == <strong class="jxr_keyword">null</strong>) {
-<a name="121" href="#121">121</a> mutations = vertexMutations.putIfAbsent(
-<a name="122" href="#122">122</a> entry.getKey(), entry.getValue());
-<a name="123" href="#123">123</a> <strong class="jxr_keyword">if</strong> (mutations == <strong class="jxr_keyword">null</strong>) {
-<a name="124" href="#124">124</a> <strong class="jxr_keyword">continue</strong>;
-<a name="125" href="#125">125</a> }
-<a name="126" href="#126">126</a> }
-<a name="127" href="#127">127</a> <strong class="jxr_keyword">synchronized</strong> (mutations) {
-<a name="128" href="#128">128</a> mutations.addVertexMutations(entry.getValue());
-<a name="129" href="#129">129</a> }
-<a name="130" href="#130">130</a> }
-<a name="131" href="#131">131</a> }
-<a name="132" href="#132">132</a>
-<a name="133" href="#133">133</a> @Override
-<a name="134" href="#134">134</a> <strong class="jxr_keyword">public</strong> Configuration getConf() {
-<a name="135" href="#135">135</a> <strong class="jxr_keyword">return</strong> conf;
-<a name="136" href="#136">136</a> }
-<a name="137" href="#137">137</a>
-<a name="138" href="#138">138</a> @Override
-<a name="139" href="#139">139</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> setConf(Configuration conf) {
-<a name="140" href="#140">140</a> <strong class="jxr_keyword">this</strong>.conf = conf;
-<a name="141" href="#141">141</a> }
-<a name="142" href="#142">142</a> }
+<a name="31" href="#31">31</a> <strong class="jxr_keyword">import</strong> org.apache.hadoop.io.Writable;
+<a name="32" href="#32">32</a> <strong class="jxr_keyword">import</strong> org.apache.hadoop.io.WritableComparable;
+<a name="33" href="#33">33</a> <strong class="jxr_keyword">import</strong> org.apache.log4j.Logger;
+<a name="34" href="#34">34</a>
+<a name="35" href="#35">35</a> <strong class="jxr_keyword">import</strong> com.google.common.collect.Maps;
+<a name="36" href="#36">36</a>
+<a name="37" href="#37">37</a> <em class="jxr_javadoccomment">/**</em>
+<a name="38" href="#38">38</a> <em class="jxr_javadoccomment"> * Send a collection of vertex mutations for a partition.</em>
+<a name="39" href="#39">39</a> <em class="jxr_javadoccomment"> *</em>
+<a name="40" href="#40">40</a> <em class="jxr_javadoccomment"> * @param <I> Vertex id</em>
+<a name="41" href="#41">41</a> <em class="jxr_javadoccomment"> * @param <V> Vertex data</em>
+<a name="42" href="#42">42</a> <em class="jxr_javadoccomment"> * @param <E> Edge data</em>
+<a name="43" href="#43">43</a> <em class="jxr_javadoccomment"> * @param <M> Message data</em>
+<a name="44" href="#44">44</a> <em class="jxr_javadoccomment"> */</em>
+<a name="45" href="#45">45</a> @SuppressWarnings(<span class="jxr_string">"rawtypes"</span>)
+<a name="46" href="#46">46</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">class</strong> SendPartitionMutationsRequest<I <strong class="jxr_keyword">extends</strong> WritableComparable,
+<a name="47" href="#47">47</a> V <strong class="jxr_keyword">extends</strong> Writable, E <strong class="jxr_keyword">extends</strong> Writable,
+<a name="48" href="#48">48</a> M <strong class="jxr_keyword">extends</strong> Writable> <strong class="jxr_keyword">extends</strong> WritableRequest<I, V, E, M> {
+<a name="49" href="#49">49</a> <em class="jxr_javadoccomment">/**</em><em class="jxr_javadoccomment"> Class logger */</em>
+<a name="50" href="#50">50</a> <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">static</strong> <strong class="jxr_keyword">final</strong> Logger LOG =
+<a name="51" href="#51">51</a> Logger.getLogger(SendPartitionMutationsRequest.<strong class="jxr_keyword">class</strong>);
+<a name="52" href="#52">52</a> <em class="jxr_javadoccomment">/**</em><em class="jxr_javadoccomment"> Partition id */</em>
+<a name="53" href="#53">53</a> <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">int</strong> partitionId;
+<a name="54" href="#54">54</a> <em class="jxr_javadoccomment">/**</em><em class="jxr_javadoccomment"> Mutations sent for a partition */</em>
+<a name="55" href="#55">55</a> <strong class="jxr_keyword">private</strong> Map<I, VertexMutations<I, V, E, M>> vertexIdMutations;
+<a name="56" href="#56">56</a>
+<a name="57" href="#57">57</a> <em class="jxr_javadoccomment">/**</em>
+<a name="58" href="#58">58</a> <em class="jxr_javadoccomment"> * Constructor used for reflection only</em>
+<a name="59" href="#59">59</a> <em class="jxr_javadoccomment"> */</em>
+<a name="60" href="#60">60</a> <strong class="jxr_keyword">public</strong> <a href="../../../../org/apache/giraph/comm/SendPartitionMutationsRequest.html">SendPartitionMutationsRequest</a>() { }
+<a name="61" href="#61">61</a>
+<a name="62" href="#62">62</a> <em class="jxr_javadoccomment">/**</em>
+<a name="63" href="#63">63</a> <em class="jxr_javadoccomment"> * Constructor used to send request.</em>
+<a name="64" href="#64">64</a> <em class="jxr_javadoccomment"> *</em>
+<a name="65" href="#65">65</a> <em class="jxr_javadoccomment"> * @param partitionId Partition to send the request to</em>
+<a name="66" href="#66">66</a> <em class="jxr_javadoccomment"> * @param vertexIdMutations Map of mutations to send</em>
+<a name="67" href="#67">67</a> <em class="jxr_javadoccomment"> */</em>
+<a name="68" href="#68">68</a> <strong class="jxr_keyword">public</strong> <a href="../../../../org/apache/giraph/comm/SendPartitionMutationsRequest.html">SendPartitionMutationsRequest</a>(
+<a name="69" href="#69">69</a> <strong class="jxr_keyword">int</strong> partitionId,
+<a name="70" href="#70">70</a> Map<I, VertexMutations<I, V, E, M>> vertexIdMutations) {
+<a name="71" href="#71">71</a> <strong class="jxr_keyword">this</strong>.partitionId = partitionId;
+<a name="72" href="#72">72</a> <strong class="jxr_keyword">this</strong>.vertexIdMutations = vertexIdMutations;
+<a name="73" href="#73">73</a> }
+<a name="74" href="#74">74</a>
+<a name="75" href="#75">75</a> @Override
+<a name="76" href="#76">76</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> readFieldsRequest(DataInput input) <strong class="jxr_keyword">throws</strong> IOException {
+<a name="77" href="#77">77</a> partitionId = input.readInt();
+<a name="78" href="#78">78</a> <strong class="jxr_keyword">int</strong> vertexIdMutationsSize = input.readInt();
+<a name="79" href="#79">79</a> vertexIdMutations = Maps.newHashMapWithExpectedSize(vertexIdMutationsSize);
+<a name="80" href="#80">80</a> <strong class="jxr_keyword">for</strong> (<strong class="jxr_keyword">int</strong> i = 0; i < vertexIdMutationsSize; ++i) {
+<a name="81" href="#81">81</a> I vertexId = BspUtils.<I>createVertexId(getConf());
+<a name="82" href="#82">82</a> vertexId.readFields(input);
+<a name="83" href="#83">83</a> VertexMutations<I, V, E, M> vertexMutations =
+<a name="84" href="#84">84</a> <strong class="jxr_keyword">new</strong> VertexMutations<I, V, E, M>();
+<a name="85" href="#85">85</a> vertexMutations.setConf(getConf());
+<a name="86" href="#86">86</a> vertexMutations.readFields(input);
+<a name="87" href="#87">87</a> <strong class="jxr_keyword">if</strong> (vertexIdMutations.put(vertexId, vertexMutations) != <strong class="jxr_keyword">null</strong>) {
+<a name="88" href="#88">88</a> <strong class="jxr_keyword">throw</strong> <strong class="jxr_keyword">new</strong> IllegalStateException(
+<a name="89" href="#89">89</a> <span class="jxr_string">"readFields: Already has vertex id "</span> + vertexId);
+<a name="90" href="#90">90</a> }
+<a name="91" href="#91">91</a> }
+<a name="92" href="#92">92</a> }
+<a name="93" href="#93">93</a>
+<a name="94" href="#94">94</a> @Override
+<a name="95" href="#95">95</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> writeRequest(DataOutput output) <strong class="jxr_keyword">throws</strong> IOException {
+<a name="96" href="#96">96</a> output.writeInt(partitionId);
+<a name="97" href="#97">97</a> output.writeInt(vertexIdMutations.size());
+<a name="98" href="#98">98</a> <strong class="jxr_keyword">for</strong> (Entry<I, VertexMutations<I, V, E, M>> entry :
+<a name="99" href="#99">99</a> vertexIdMutations.entrySet()) {
+<a name="100" href="#100">100</a> entry.getKey().write(output);
+<a name="101" href="#101">101</a> entry.getValue().write(output);
+<a name="102" href="#102">102</a> }
+<a name="103" href="#103">103</a> }
+<a name="104" href="#104">104</a>
+<a name="105" href="#105">105</a> @Override
+<a name="106" href="#106">106</a> <strong class="jxr_keyword">public</strong> <a href="../../../../org/apache/giraph/comm/RequestRegistry.html">Type</a> getType() {
+<a name="107" href="#107">107</a> <strong class="jxr_keyword">return</strong> Type.SEND_PARTITION_MUTATIONS_REQUEST;
+<a name="108" href="#108">108</a> }
+<a name="109" href="#109">109</a>
+<a name="110" href="#110">110</a> @Override
+<a name="111" href="#111">111</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> doRequest(ServerData<I, V, E, M> serverData) {
+<a name="112" href="#112">112</a> ConcurrentHashMap<I, VertexMutations<I, V, E, M>> vertexMutations =
+<a name="113" href="#113">113</a> serverData.getVertexMutations();
+<a name="114" href="#114">114</a> <strong class="jxr_keyword">for</strong> (Entry<I, VertexMutations<I, V, E, M>> entry :
+<a name="115" href="#115">115</a> vertexIdMutations.entrySet()) {
+<a name="116" href="#116">116</a> VertexMutations<I, V, E, M> mutations =
+<a name="117" href="#117">117</a> vertexMutations.get(entry.getKey());
+<a name="118" href="#118">118</a> <strong class="jxr_keyword">if</strong> (mutations == <strong class="jxr_keyword">null</strong>) {
+<a name="119" href="#119">119</a> mutations = vertexMutations.putIfAbsent(
+<a name="120" href="#120">120</a> entry.getKey(), entry.getValue());
+<a name="121" href="#121">121</a> <strong class="jxr_keyword">if</strong> (mutations == <strong class="jxr_keyword">null</strong>) {
+<a name="122" href="#122">122</a> <strong class="jxr_keyword">continue</strong>;
+<a name="123" href="#123">123</a> }
+<a name="124" href="#124">124</a> }
+<a name="125" href="#125">125</a> <strong class="jxr_keyword">synchronized</strong> (mutations) {
+<a name="126" href="#126">126</a> mutations.addVertexMutations(entry.getValue());
+<a name="127" href="#127">127</a> }
+<a name="128" href="#128">128</a> }
+<a name="129" href="#129">129</a> }
+<a name="130" href="#130">130</a> }
</pre>
<hr/><div id="footer">This page was automatically generated by <a href="http://maven.apache.org/">Maven</a></div></body>
</html>
Modified: giraph/site/xref/org/apache/giraph/comm/SendVertexRequest.html
URL: http://svn.apache.org/viewvc/giraph/site/xref/org/apache/giraph/comm/SendVertexRequest.html?rev=1373684&r1=1373683&r2=1373684&view=diff
==============================================================================
--- giraph/site/xref/org/apache/giraph/comm/SendVertexRequest.html (original)
+++ giraph/site/xref/org/apache/giraph/comm/SendVertexRequest.html Thu Aug 16 01:32:41 2012
@@ -37,112 +37,99 @@
<a name="27" href="#27">27</a> <strong class="jxr_keyword">import</strong> org.apache.giraph.comm.RequestRegistry.Type;
<a name="28" href="#28">28</a> <strong class="jxr_keyword">import</strong> org.apache.giraph.graph.Vertex;
<a name="29" href="#29">29</a> <strong class="jxr_keyword">import</strong> org.apache.giraph.graph.BspUtils;
-<a name="30" href="#30">30</a> <strong class="jxr_keyword">import</strong> org.apache.hadoop.conf.Configuration;
-<a name="31" href="#31">31</a> <strong class="jxr_keyword">import</strong> org.apache.hadoop.io.Writable;
-<a name="32" href="#32">32</a> <strong class="jxr_keyword">import</strong> org.apache.hadoop.io.WritableComparable;
-<a name="33" href="#33">33</a> <strong class="jxr_keyword">import</strong> org.apache.log4j.Logger;
-<a name="34" href="#34">34</a>
-<a name="35" href="#35">35</a> <strong class="jxr_keyword">import</strong> com.google.common.collect.Lists;
-<a name="36" href="#36">36</a>
-<a name="37" href="#37">37</a> <em class="jxr_javadoccomment">/**</em>
-<a name="38" href="#38">38</a> <em class="jxr_javadoccomment"> * Send a collection of vertices for a partition.</em>
-<a name="39" href="#39">39</a> <em class="jxr_javadoccomment"> *</em>
-<a name="40" href="#40">40</a> <em class="jxr_javadoccomment"> * @param <I> Vertex id</em>
-<a name="41" href="#41">41</a> <em class="jxr_javadoccomment"> * @param <V> Vertex data</em>
-<a name="42" href="#42">42</a> <em class="jxr_javadoccomment"> * @param <E> Edge data</em>
-<a name="43" href="#43">43</a> <em class="jxr_javadoccomment"> * @param <M> Message data</em>
-<a name="44" href="#44">44</a> <em class="jxr_javadoccomment"> */</em>
-<a name="45" href="#45">45</a> @SuppressWarnings(<span class="jxr_string">"rawtypes"</span>)
-<a name="46" href="#46">46</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">class</strong> SendVertexRequest<I <strong class="jxr_keyword">extends</strong> WritableComparable,
-<a name="47" href="#47">47</a> V <strong class="jxr_keyword">extends</strong> Writable, E <strong class="jxr_keyword">extends</strong> Writable,
-<a name="48" href="#48">48</a> M <strong class="jxr_keyword">extends</strong> Writable> implements WritableRequest<I, V, E, M> {
-<a name="49" href="#49">49</a> <em class="jxr_javadoccomment">/**</em><em class="jxr_javadoccomment"> Class logger */</em>
-<a name="50" href="#50">50</a> <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">static</strong> <strong class="jxr_keyword">final</strong> Logger LOG =
-<a name="51" href="#51">51</a> Logger.getLogger(SendVertexRequest.<strong class="jxr_keyword">class</strong>);
-<a name="52" href="#52">52</a> <em class="jxr_javadoccomment">/**</em><em class="jxr_javadoccomment"> Partition id */</em>
-<a name="53" href="#53">53</a> <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">int</strong> partitionId;
-<a name="54" href="#54">54</a> <em class="jxr_javadoccomment">/**</em><em class="jxr_javadoccomment"> List of vertices to be stored on this partition */</em>
-<a name="55" href="#55">55</a> <strong class="jxr_keyword">private</strong> Collection<Vertex<I, V, E, M>> vertices;
-<a name="56" href="#56">56</a> <em class="jxr_javadoccomment">/**</em><em class="jxr_javadoccomment"> Configuration */</em>
-<a name="57" href="#57">57</a> <strong class="jxr_keyword">private</strong> Configuration conf;
-<a name="58" href="#58">58</a>
-<a name="59" href="#59">59</a> <em class="jxr_javadoccomment">/**</em>
-<a name="60" href="#60">60</a> <em class="jxr_javadoccomment"> * Constructor used for reflection only</em>
-<a name="61" href="#61">61</a> <em class="jxr_javadoccomment"> */</em>
-<a name="62" href="#62">62</a> <strong class="jxr_keyword">public</strong> <a href="../../../../org/apache/giraph/comm/SendVertexRequest.html">SendVertexRequest</a>() { }
-<a name="63" href="#63">63</a>
-<a name="64" href="#64">64</a> <em class="jxr_javadoccomment">/**</em>
-<a name="65" href="#65">65</a> <em class="jxr_javadoccomment"> * Constructor for sending a request.</em>
-<a name="66" href="#66">66</a> <em class="jxr_javadoccomment"> *</em>
-<a name="67" href="#67">67</a> <em class="jxr_javadoccomment"> * @param partitionId Partition to send the request to</em>
-<a name="68" href="#68">68</a> <em class="jxr_javadoccomment"> * @param vertices Vertices to send</em>
-<a name="69" href="#69">69</a> <em class="jxr_javadoccomment"> */</em>
-<a name="70" href="#70">70</a> <strong class="jxr_keyword">public</strong> <a href="../../../../org/apache/giraph/comm/SendVertexRequest.html">SendVertexRequest</a>(
-<a name="71" href="#71">71</a> <strong class="jxr_keyword">int</strong> partitionId, Collection<Vertex<I, V, E, M>> vertices) {
-<a name="72" href="#72">72</a> <strong class="jxr_keyword">this</strong>.partitionId = partitionId;
-<a name="73" href="#73">73</a> <strong class="jxr_keyword">this</strong>.vertices = vertices;
-<a name="74" href="#74">74</a> }
-<a name="75" href="#75">75</a>
-<a name="76" href="#76">76</a> @Override
-<a name="77" href="#77">77</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> readFields(DataInput input) <strong class="jxr_keyword">throws</strong> IOException {
-<a name="78" href="#78">78</a> partitionId = input.readInt();
-<a name="79" href="#79">79</a> <strong class="jxr_keyword">int</strong> verticesCount = input.readInt();
-<a name="80" href="#80">80</a> vertices = Lists.newArrayListWithCapacity(verticesCount);
-<a name="81" href="#81">81</a> <strong class="jxr_keyword">for</strong> (<strong class="jxr_keyword">int</strong> i = 0; i < verticesCount; ++i) {
-<a name="82" href="#82">82</a> Vertex<I, V, E, M> vertex = BspUtils.createVertex(conf);
-<a name="83" href="#83">83</a> vertex.readFields(input);
-<a name="84" href="#84">84</a> vertices.add(vertex);
-<a name="85" href="#85">85</a> }
-<a name="86" href="#86">86</a> }
-<a name="87" href="#87">87</a>
-<a name="88" href="#88">88</a> @Override
-<a name="89" href="#89">89</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> write(DataOutput output) <strong class="jxr_keyword">throws</strong> IOException {
-<a name="90" href="#90">90</a> output.writeInt(partitionId);
-<a name="91" href="#91">91</a> output.writeInt(vertices.size());
-<a name="92" href="#92">92</a> <strong class="jxr_keyword">for</strong> (Vertex<I, V, E, M> vertex : vertices) {
-<a name="93" href="#93">93</a> vertex.write(output);
-<a name="94" href="#94">94</a> }
-<a name="95" href="#95">95</a> }
-<a name="96" href="#96">96</a>
-<a name="97" href="#97">97</a> @Override
-<a name="98" href="#98">98</a> <strong class="jxr_keyword">public</strong> <a href="../../../../org/apache/giraph/comm/RequestRegistry.html">Type</a> getType() {
-<a name="99" href="#99">99</a> <strong class="jxr_keyword">return</strong> Type.SEND_VERTEX_REQUEST;
-<a name="100" href="#100">100</a> }
-<a name="101" href="#101">101</a>
-<a name="102" href="#102">102</a> @Override
-<a name="103" href="#103">103</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> doRequest(ServerData<I, V, E, M> serverData) {
-<a name="104" href="#104">104</a> ConcurrentHashMap<Integer, Collection<Vertex<I, V, E, M>>>
-<a name="105" href="#105">105</a> partitionVertexMap = serverData.getPartitionVertexMap();
-<a name="106" href="#106">106</a> <strong class="jxr_keyword">if</strong> (vertices.isEmpty()) {
-<a name="107" href="#107">107</a> LOG.warn(<span class="jxr_string">"doRequest: Got an empty request!"</span>);
-<a name="108" href="#108">108</a> <strong class="jxr_keyword">return</strong>;
-<a name="109" href="#109">109</a> }
-<a name="110" href="#110">110</a> Collection<Vertex<I, V, E, M>> vertexMap =
-<a name="111" href="#111">111</a> partitionVertexMap.get(partitionId);
-<a name="112" href="#112">112</a> <strong class="jxr_keyword">if</strong> (vertexMap == <strong class="jxr_keyword">null</strong>) {
-<a name="113" href="#113">113</a> <strong class="jxr_keyword">final</strong> Collection<Vertex<I, V, E, M>> tmpVertices =
-<a name="114" href="#114">114</a> Lists.newArrayListWithCapacity(vertices.size());
-<a name="115" href="#115">115</a> vertexMap = partitionVertexMap.putIfAbsent(partitionId, tmpVertices);
-<a name="116" href="#116">116</a> <strong class="jxr_keyword">if</strong> (vertexMap == <strong class="jxr_keyword">null</strong>) {
-<a name="117" href="#117">117</a> vertexMap = tmpVertices;
-<a name="118" href="#118">118</a> }
+<a name="30" href="#30">30</a> <strong class="jxr_keyword">import</strong> org.apache.hadoop.io.Writable;
+<a name="31" href="#31">31</a> <strong class="jxr_keyword">import</strong> org.apache.hadoop.io.WritableComparable;
+<a name="32" href="#32">32</a> <strong class="jxr_keyword">import</strong> org.apache.log4j.Logger;
+<a name="33" href="#33">33</a>
+<a name="34" href="#34">34</a> <strong class="jxr_keyword">import</strong> com.google.common.collect.Lists;
+<a name="35" href="#35">35</a>
+<a name="36" href="#36">36</a> <em class="jxr_javadoccomment">/**</em>
+<a name="37" href="#37">37</a> <em class="jxr_javadoccomment"> * Send a collection of vertices for a partition.</em>
+<a name="38" href="#38">38</a> <em class="jxr_javadoccomment"> *</em>
+<a name="39" href="#39">39</a> <em class="jxr_javadoccomment"> * @param <I> Vertex id</em>
+<a name="40" href="#40">40</a> <em class="jxr_javadoccomment"> * @param <V> Vertex data</em>
+<a name="41" href="#41">41</a> <em class="jxr_javadoccomment"> * @param <E> Edge data</em>
+<a name="42" href="#42">42</a> <em class="jxr_javadoccomment"> * @param <M> Message data</em>
+<a name="43" href="#43">43</a> <em class="jxr_javadoccomment"> */</em>
+<a name="44" href="#44">44</a> @SuppressWarnings(<span class="jxr_string">"rawtypes"</span>)
+<a name="45" href="#45">45</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">class</strong> SendVertexRequest<I <strong class="jxr_keyword">extends</strong> WritableComparable,
+<a name="46" href="#46">46</a> V <strong class="jxr_keyword">extends</strong> Writable, E <strong class="jxr_keyword">extends</strong> Writable,
+<a name="47" href="#47">47</a> M <strong class="jxr_keyword">extends</strong> Writable> <strong class="jxr_keyword">extends</strong> WritableRequest<I, V, E, M> {
+<a name="48" href="#48">48</a> <em class="jxr_javadoccomment">/**</em><em class="jxr_javadoccomment"> Class logger */</em>
+<a name="49" href="#49">49</a> <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">static</strong> <strong class="jxr_keyword">final</strong> Logger LOG =
+<a name="50" href="#50">50</a> Logger.getLogger(SendVertexRequest.<strong class="jxr_keyword">class</strong>);
+<a name="51" href="#51">51</a> <em class="jxr_javadoccomment">/**</em><em class="jxr_javadoccomment"> Partition id */</em>
+<a name="52" href="#52">52</a> <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">int</strong> partitionId;
+<a name="53" href="#53">53</a> <em class="jxr_javadoccomment">/**</em><em class="jxr_javadoccomment"> List of vertices to be stored on this partition */</em>
+<a name="54" href="#54">54</a> <strong class="jxr_keyword">private</strong> Collection<Vertex<I, V, E, M>> vertices;
+<a name="55" href="#55">55</a>
+<a name="56" href="#56">56</a> <em class="jxr_javadoccomment">/**</em>
+<a name="57" href="#57">57</a> <em class="jxr_javadoccomment"> * Constructor used for reflection only</em>
+<a name="58" href="#58">58</a> <em class="jxr_javadoccomment"> */</em>
+<a name="59" href="#59">59</a> <strong class="jxr_keyword">public</strong> <a href="../../../../org/apache/giraph/comm/SendVertexRequest.html">SendVertexRequest</a>() { }
+<a name="60" href="#60">60</a>
+<a name="61" href="#61">61</a> <em class="jxr_javadoccomment">/**</em>
+<a name="62" href="#62">62</a> <em class="jxr_javadoccomment"> * Constructor for sending a request.</em>
+<a name="63" href="#63">63</a> <em class="jxr_javadoccomment"> *</em>
+<a name="64" href="#64">64</a> <em class="jxr_javadoccomment"> * @param partitionId Partition to send the request to</em>
+<a name="65" href="#65">65</a> <em class="jxr_javadoccomment"> * @param vertices Vertices to send</em>
+<a name="66" href="#66">66</a> <em class="jxr_javadoccomment"> */</em>
+<a name="67" href="#67">67</a> <strong class="jxr_keyword">public</strong> <a href="../../../../org/apache/giraph/comm/SendVertexRequest.html">SendVertexRequest</a>(<strong class="jxr_keyword">int</strong> partitionId,
+<a name="68" href="#68">68</a> Collection<Vertex<I, V, E, M>> vertices) {
+<a name="69" href="#69">69</a> <strong class="jxr_keyword">this</strong>.partitionId = partitionId;
+<a name="70" href="#70">70</a> <strong class="jxr_keyword">this</strong>.vertices = vertices;
+<a name="71" href="#71">71</a> }
+<a name="72" href="#72">72</a>
+<a name="73" href="#73">73</a> @Override
+<a name="74" href="#74">74</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> readFieldsRequest(DataInput input) <strong class="jxr_keyword">throws</strong> IOException {
+<a name="75" href="#75">75</a> partitionId = input.readInt();
+<a name="76" href="#76">76</a> <strong class="jxr_keyword">int</strong> verticesCount = input.readInt();
+<a name="77" href="#77">77</a> vertices = Lists.newArrayListWithCapacity(verticesCount);
+<a name="78" href="#78">78</a> <strong class="jxr_keyword">for</strong> (<strong class="jxr_keyword">int</strong> i = 0; i < verticesCount; ++i) {
+<a name="79" href="#79">79</a> Vertex<I, V, E, M> vertex = BspUtils.createVertex(getConf());
+<a name="80" href="#80">80</a> vertex.readFields(input);
+<a name="81" href="#81">81</a> vertices.add(vertex);
+<a name="82" href="#82">82</a> }
+<a name="83" href="#83">83</a> }
+<a name="84" href="#84">84</a>
+<a name="85" href="#85">85</a> @Override
+<a name="86" href="#86">86</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> writeRequest(DataOutput output) <strong class="jxr_keyword">throws</strong> IOException {
+<a name="87" href="#87">87</a> output.writeInt(partitionId);
+<a name="88" href="#88">88</a> output.writeInt(vertices.size());
+<a name="89" href="#89">89</a> <strong class="jxr_keyword">for</strong> (Vertex<I, V, E, M> vertex : vertices) {
+<a name="90" href="#90">90</a> vertex.write(output);
+<a name="91" href="#91">91</a> }
+<a name="92" href="#92">92</a> }
+<a name="93" href="#93">93</a>
+<a name="94" href="#94">94</a> @Override
+<a name="95" href="#95">95</a> <strong class="jxr_keyword">public</strong> <a href="../../../../org/apache/giraph/comm/RequestRegistry.html">Type</a> getType() {
+<a name="96" href="#96">96</a> <strong class="jxr_keyword">return</strong> Type.SEND_VERTEX_REQUEST;
+<a name="97" href="#97">97</a> }
+<a name="98" href="#98">98</a>
+<a name="99" href="#99">99</a> @Override
+<a name="100" href="#100">100</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> doRequest(ServerData<I, V, E, M> serverData) {
+<a name="101" href="#101">101</a> ConcurrentHashMap<Integer, Collection<Vertex<I, V, E, M>>>
+<a name="102" href="#102">102</a> partitionVertexMap = serverData.getPartitionVertexMap();
+<a name="103" href="#103">103</a> <strong class="jxr_keyword">if</strong> (vertices.isEmpty()) {
+<a name="104" href="#104">104</a> LOG.warn(<span class="jxr_string">"doRequest: Got an empty request!"</span>);
+<a name="105" href="#105">105</a> <strong class="jxr_keyword">return</strong>;
+<a name="106" href="#106">106</a> }
+<a name="107" href="#107">107</a> Collection<Vertex<I, V, E, M>> vertexMap =
+<a name="108" href="#108">108</a> partitionVertexMap.get(partitionId);
+<a name="109" href="#109">109</a> <strong class="jxr_keyword">if</strong> (vertexMap == <strong class="jxr_keyword">null</strong>) {
+<a name="110" href="#110">110</a> <strong class="jxr_keyword">final</strong> Collection<Vertex<I, V, E, M>> tmpVertices =
+<a name="111" href="#111">111</a> Lists.newArrayListWithCapacity(vertices.size());
+<a name="112" href="#112">112</a> vertexMap = partitionVertexMap.putIfAbsent(partitionId, tmpVertices);
+<a name="113" href="#113">113</a> <strong class="jxr_keyword">if</strong> (vertexMap == <strong class="jxr_keyword">null</strong>) {
+<a name="114" href="#114">114</a> vertexMap = tmpVertices;
+<a name="115" href="#115">115</a> }
+<a name="116" href="#116">116</a> }
+<a name="117" href="#117">117</a> <strong class="jxr_keyword">synchronized</strong> (vertexMap) {
+<a name="118" href="#118">118</a> vertexMap.addAll(vertices);
<a name="119" href="#119">119</a> }
-<a name="120" href="#120">120</a> <strong class="jxr_keyword">synchronized</strong> (vertexMap) {
-<a name="121" href="#121">121</a> vertexMap.addAll(vertices);
-<a name="122" href="#122">122</a> }
-<a name="123" href="#123">123</a> }
-<a name="124" href="#124">124</a>
-<a name="125" href="#125">125</a> @Override
-<a name="126" href="#126">126</a> <strong class="jxr_keyword">public</strong> Configuration getConf() {
-<a name="127" href="#127">127</a> <strong class="jxr_keyword">return</strong> conf;
-<a name="128" href="#128">128</a> }
-<a name="129" href="#129">129</a>
-<a name="130" href="#130">130</a> @Override
-<a name="131" href="#131">131</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> setConf(Configuration conf) {
-<a name="132" href="#132">132</a> <strong class="jxr_keyword">this</strong>.conf = conf;
-<a name="133" href="#133">133</a> }
-<a name="134" href="#134">134</a> }
-<a name="135" href="#135">135</a>
+<a name="120" href="#120">120</a> }
+<a name="121" href="#121">121</a> }
+<a name="122" href="#122">122</a>
</pre>
<hr/><div id="footer">This page was automatically generated by <a href="http://maven.apache.org/">Maven</a></div></body>
</html>
Modified: giraph/site/xref/org/apache/giraph/comm/WritableRequest.html
URL: http://svn.apache.org/viewvc/giraph/site/xref/org/apache/giraph/comm/WritableRequest.html?rev=1373684&r1=1373683&r2=1373684&view=diff
==============================================================================
--- giraph/site/xref/org/apache/giraph/comm/WritableRequest.html (original)
+++ giraph/site/xref/org/apache/giraph/comm/WritableRequest.html Thu Aug 16 01:32:41 2012
@@ -28,36 +28,90 @@
<a name="18" href="#18">18</a>
<a name="19" href="#19">19</a> <strong class="jxr_keyword">package</strong> org.apache.giraph.comm;
<a name="20" href="#20">20</a>
-<a name="21" href="#21">21</a> <strong class="jxr_keyword">import</strong> org.apache.giraph.comm.RequestRegistry.Type;
-<a name="22" href="#22">22</a> <strong class="jxr_keyword">import</strong> org.apache.hadoop.conf.Configurable;
-<a name="23" href="#23">23</a> <strong class="jxr_keyword">import</strong> org.apache.hadoop.io.Writable;
-<a name="24" href="#24">24</a> <strong class="jxr_keyword">import</strong> org.apache.hadoop.io.WritableComparable;
-<a name="25" href="#25">25</a>
-<a name="26" href="#26">26</a> <em class="jxr_javadoccomment">/**</em>
-<a name="27" href="#27">27</a> <em class="jxr_javadoccomment"> * Interface for requests to implement</em>
-<a name="28" href="#28">28</a> <em class="jxr_javadoccomment"> *</em>
-<a name="29" href="#29">29</a> <em class="jxr_javadoccomment"> * @param <I> Vertex id</em>
-<a name="30" href="#30">30</a> <em class="jxr_javadoccomment"> * @param <V> Vertex data</em>
-<a name="31" href="#31">31</a> <em class="jxr_javadoccomment"> * @param <E> Edge data</em>
-<a name="32" href="#32">32</a> <em class="jxr_javadoccomment"> * @param <M> Message data</em>
-<a name="33" href="#33">33</a> <em class="jxr_javadoccomment"> */</em>
-<a name="34" href="#34">34</a> @SuppressWarnings(<span class="jxr_string">"rawtypes"</span>)
-<a name="35" href="#35">35</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">interface</strong> WritableRequest<I <strong class="jxr_keyword">extends</strong> WritableComparable,
-<a name="36" href="#36">36</a> V <strong class="jxr_keyword">extends</strong> Writable, E <strong class="jxr_keyword">extends</strong> Writable,
-<a name="37" href="#37">37</a> M <strong class="jxr_keyword">extends</strong> Writable> <strong class="jxr_keyword">extends</strong> Writable, Configurable {
-<a name="38" href="#38">38</a> <em class="jxr_javadoccomment">/**</em>
-<a name="39" href="#39">39</a> <em class="jxr_javadoccomment"> * Get the type of the request</em>
-<a name="40" href="#40">40</a> <em class="jxr_javadoccomment"> *</em>
-<a name="41" href="#41">41</a> <em class="jxr_javadoccomment"> * @return Request type</em>
-<a name="42" href="#42">42</a> <em class="jxr_javadoccomment"> */</em>
-<a name="43" href="#43">43</a> <a href="../../../../org/apache/giraph/comm/RequestRegistry.html">Type</a> getType();
-<a name="44" href="#44">44</a> <em class="jxr_javadoccomment">/**</em>
-<a name="45" href="#45">45</a> <em class="jxr_javadoccomment"> * Execute the request</em>
-<a name="46" href="#46">46</a> <em class="jxr_javadoccomment"> *</em>
-<a name="47" href="#47">47</a> <em class="jxr_javadoccomment"> * @param serverData Accessible data that can be mutated per the request</em>
-<a name="48" href="#48">48</a> <em class="jxr_javadoccomment"> */</em>
-<a name="49" href="#49">49</a> <strong class="jxr_keyword">void</strong> doRequest(ServerData<I, V, E, M> serverData);
-<a name="50" href="#50">50</a> }
+<a name="21" href="#21">21</a> <strong class="jxr_keyword">import</strong> java.io.DataInput;
+<a name="22" href="#22">22</a> <strong class="jxr_keyword">import</strong> java.io.DataOutput;
+<a name="23" href="#23">23</a> <strong class="jxr_keyword">import</strong> java.io.IOException;
+<a name="24" href="#24">24</a> <strong class="jxr_keyword">import</strong> org.apache.giraph.comm.RequestRegistry.Type;
+<a name="25" href="#25">25</a> <strong class="jxr_keyword">import</strong> org.apache.hadoop.conf.Configurable;
+<a name="26" href="#26">26</a> <strong class="jxr_keyword">import</strong> org.apache.hadoop.conf.Configuration;
+<a name="27" href="#27">27</a> <strong class="jxr_keyword">import</strong> org.apache.hadoop.io.Writable;
+<a name="28" href="#28">28</a> <strong class="jxr_keyword">import</strong> org.apache.hadoop.io.WritableComparable;
+<a name="29" href="#29">29</a>
+<a name="30" href="#30">30</a> <em class="jxr_javadoccomment">/**</em>
+<a name="31" href="#31">31</a> <em class="jxr_javadoccomment"> * Interface for requests to implement</em>
+<a name="32" href="#32">32</a> <em class="jxr_javadoccomment"> *</em>
+<a name="33" href="#33">33</a> <em class="jxr_javadoccomment"> * @param <I> Vertex id</em>
+<a name="34" href="#34">34</a> <em class="jxr_javadoccomment"> * @param <V> Vertex data</em>
+<a name="35" href="#35">35</a> <em class="jxr_javadoccomment"> * @param <E> Edge data</em>
+<a name="36" href="#36">36</a> <em class="jxr_javadoccomment"> * @param <M> Message data</em>
+<a name="37" href="#37">37</a> <em class="jxr_javadoccomment"> */</em>
+<a name="38" href="#38">38</a> @SuppressWarnings(<span class="jxr_string">"rawtypes"</span>)
+<a name="39" href="#39">39</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">abstract</strong> <strong class="jxr_keyword">class</strong> WritableRequest<I <strong class="jxr_keyword">extends</strong> WritableComparable,
+<a name="40" href="#40">40</a> V <strong class="jxr_keyword">extends</strong> Writable, E <strong class="jxr_keyword">extends</strong> Writable,
+<a name="41" href="#41">41</a> M <strong class="jxr_keyword">extends</strong> Writable> implements Writable, Configurable {
+<a name="42" href="#42">42</a> <em class="jxr_javadoccomment">/**</em><em class="jxr_javadoccomment"> Configuration */</em>
+<a name="43" href="#43">43</a> <strong class="jxr_keyword">private</strong> Configuration conf;
+<a name="44" href="#44">44</a> <em class="jxr_javadoccomment">/**</em><em class="jxr_javadoccomment"> Request id */</em>
+<a name="45" href="#45">45</a> <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">long</strong> requestId = -1;
+<a name="46" href="#46">46</a>
+<a name="47" href="#47">47</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">long</strong> getRequestId() {
+<a name="48" href="#48">48</a> <strong class="jxr_keyword">return</strong> requestId;
+<a name="49" href="#49">49</a> }
+<a name="50" href="#50">50</a>
+<a name="51" href="#51">51</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> setRequestId(<strong class="jxr_keyword">long</strong> requestId) {
+<a name="52" href="#52">52</a> <strong class="jxr_keyword">this</strong>.requestId = requestId;
+<a name="53" href="#53">53</a> }
+<a name="54" href="#54">54</a>
+<a name="55" href="#55">55</a> <em class="jxr_javadoccomment">/**</em>
+<a name="56" href="#56">56</a> <em class="jxr_javadoccomment"> * Get the type of the request</em>
+<a name="57" href="#57">57</a> <em class="jxr_javadoccomment"> *</em>
+<a name="58" href="#58">58</a> <em class="jxr_javadoccomment"> * @return Request type</em>
+<a name="59" href="#59">59</a> <em class="jxr_javadoccomment"> */</em>
+<a name="60" href="#60">60</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">abstract</strong> <a href="../../../../org/apache/giraph/comm/RequestRegistry.html">Type</a> getType();
+<a name="61" href="#61">61</a>
+<a name="62" href="#62">62</a> <em class="jxr_javadoccomment">/**</em>
+<a name="63" href="#63">63</a> <em class="jxr_javadoccomment"> * Serialize the request</em>
+<a name="64" href="#64">64</a> <em class="jxr_javadoccomment"> *</em>
+<a name="65" href="#65">65</a> <em class="jxr_javadoccomment"> * @param input Input to read fields from</em>
+<a name="66" href="#66">66</a> <em class="jxr_javadoccomment"> */</em>
+<a name="67" href="#67">67</a> <strong class="jxr_keyword">abstract</strong> <strong class="jxr_keyword">void</strong> readFieldsRequest(DataInput input) <strong class="jxr_keyword">throws</strong> IOException;
+<a name="68" href="#68">68</a>
+<a name="69" href="#69">69</a> <em class="jxr_javadoccomment">/**</em>
+<a name="70" href="#70">70</a> <em class="jxr_javadoccomment"> * Deserialize the request</em>
+<a name="71" href="#71">71</a> <em class="jxr_javadoccomment"> *</em>
+<a name="72" href="#72">72</a> <em class="jxr_javadoccomment"> * @param output Output to write the request to</em>
+<a name="73" href="#73">73</a> <em class="jxr_javadoccomment"> */</em>
+<a name="74" href="#74">74</a> <strong class="jxr_keyword">abstract</strong> <strong class="jxr_keyword">void</strong> writeRequest(DataOutput output) <strong class="jxr_keyword">throws</strong> IOException;
+<a name="75" href="#75">75</a>
+<a name="76" href="#76">76</a> <em class="jxr_javadoccomment">/**</em>
+<a name="77" href="#77">77</a> <em class="jxr_javadoccomment"> * Execute the request</em>
+<a name="78" href="#78">78</a> <em class="jxr_javadoccomment"> *</em>
+<a name="79" href="#79">79</a> <em class="jxr_javadoccomment"> * @param serverData Accessible data that can be mutated per the request</em>
+<a name="80" href="#80">80</a> <em class="jxr_javadoccomment"> */</em>
+<a name="81" href="#81">81</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">abstract</strong> <strong class="jxr_keyword">void</strong> doRequest(ServerData<I, V, E, M> serverData);
+<a name="82" href="#82">82</a>
+<a name="83" href="#83">83</a> @Override
+<a name="84" href="#84">84</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">final</strong> Configuration getConf() {
+<a name="85" href="#85">85</a> <strong class="jxr_keyword">return</strong> conf;
+<a name="86" href="#86">86</a> }
+<a name="87" href="#87">87</a>
+<a name="88" href="#88">88</a> @Override
+<a name="89" href="#89">89</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">void</strong> setConf(Configuration conf) {
+<a name="90" href="#90">90</a> <strong class="jxr_keyword">this</strong>.conf = conf;
+<a name="91" href="#91">91</a> }
+<a name="92" href="#92">92</a>
+<a name="93" href="#93">93</a> @Override
+<a name="94" href="#94">94</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">void</strong> readFields(DataInput input) <strong class="jxr_keyword">throws</strong> IOException {
+<a name="95" href="#95">95</a> requestId = input.readLong();
+<a name="96" href="#96">96</a> readFieldsRequest(input);
+<a name="97" href="#97">97</a> }
+<a name="98" href="#98">98</a>
+<a name="99" href="#99">99</a> @Override
+<a name="100" href="#100">100</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">void</strong> write(DataOutput output) <strong class="jxr_keyword">throws</strong> IOException {
+<a name="101" href="#101">101</a> output.writeLong(requestId);
+<a name="102" href="#102">102</a> writeRequest(output);
+<a name="103" href="#103">103</a> }
+<a name="104" href="#104">104</a> }
</pre>
<hr/><div id="footer">This page was automatically generated by <a href="http://maven.apache.org/">Maven</a></div></body>
</html>
Modified: giraph/site/xref/org/apache/giraph/comm/package-frame.html
URL: http://svn.apache.org/viewvc/giraph/site/xref/org/apache/giraph/comm/package-frame.html?rev=1373684&r1=1373683&r2=1373684&view=diff
==============================================================================
--- giraph/site/xref/org/apache/giraph/comm/package-frame.html (original)
+++ giraph/site/xref/org/apache/giraph/comm/package-frame.html Thu Aug 16 01:32:41 2012
@@ -25,6 +25,9 @@
<a href="ByteCounter.html" target="classFrame">ByteCounter</a>
</li>
<li>
+ <a href="NettyClient.html" target="classFrame">ChannelFutureAddress</a>
+ </li>
+ <li>
<a href="ChannelRotater.html" target="classFrame">ChannelRotater</a>
</li>
<li>
@@ -67,6 +70,9 @@
<a href="RequestEncoder.html" target="classFrame">RequestEncoder</a>
</li>
<li>
+ <a href="RequestInfo.html" target="classFrame">RequestInfo</a>
+ </li>
+ <li>
<a href="RequestRegistry.html" target="classFrame">RequestRegistry</a>
</li>
<li>
Modified: giraph/site/xref/org/apache/giraph/comm/package-summary.html
URL: http://svn.apache.org/viewvc/giraph/site/xref/org/apache/giraph/comm/package-summary.html?rev=1373684&r1=1373683&r2=1373684&view=diff
==============================================================================
--- giraph/site/xref/org/apache/giraph/comm/package-summary.html (original)
+++ giraph/site/xref/org/apache/giraph/comm/package-summary.html Thu Aug 16 01:32:41 2012
@@ -52,6 +52,11 @@
</tr>
<tr>
<td>
+ <a href="NettyClient.html" target="classFrame">ChannelFutureAddress</a>
+ </td>
+ </tr>
+ <tr>
+ <td>
<a href="ChannelRotater.html" target="classFrame">ChannelRotater</a>
</td>
</tr>
@@ -122,6 +127,11 @@
</tr>
<tr>
<td>
+ <a href="RequestInfo.html" target="classFrame">RequestInfo</a>
+ </td>
+ </tr>
+ <tr>
+ <td>
<a href="RequestRegistry.html" target="classFrame">RequestRegistry</a>
</td>
</tr>