<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Mar 18, 2014 at 9:58 AM, Radim Vansa <span dir="ltr">&lt;<a href="mailto:rvansa@redhat.com" target="_blank">rvansa@redhat.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">What does exactly the configName refer to? Some cache name as it appears<br>
in configuration, and then the intermediate cache will copy that<br>
configuration and create new custom cache? That means, that configured<br>
cache will never be instantiated?<br></blockquote><div><br></div><div>Yes. Only usingSharedIntermediateCache(<div class="h5">String cache) uses the same cache name and config name.<br></div> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">


<br>
Why don&#39;t you use Configuration directly instead, if you want to specify<br>
configuration?<br></blockquote><div><br></div><div>Two reasons:<br></div><div>1. The Configuration classes are not serializable.<br></div><div>2. Some users might prefer to define the configuration via XML.<br><br></div>

<div>Dan<br><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
Radim<br>
<div class=""><div class="h5"><br>
On 03/17/2014 03:58 PM, Vladimir Blagojevic wrote:<br>
&gt; Guys,<br>
&gt;<br>
&gt; We need some input on how to design API regarding use of intermediate<br>
&gt; caches [1]. As you might know one of the requirements for improving our<br>
&gt; M/R is allowing applications to use custom defined intermediate<br>
&gt; key/value cache used to store keys/values of map/combine phase before<br>
&gt; being reduced in reduced phase.<br>
&gt;<br>
&gt;<br>
&gt; Currently we have a constructor where one can specify whether to use<br>
&gt; shared or per-task intermediate cache. And now we wanted to add an<br>
&gt; additional method:<br>
&gt;<br>
&gt; usingIntermediateCache(String cacheName, String cacheConfigurationName);<br>
&gt;<br>
&gt; that will enable use of custom intermediate cache.<br>
&gt;<br>
&gt; Now, Dan, and rightly so, thought this was a bit confusing. Are we<br>
&gt; referring to intermediate shared or per-task intermediate cache when<br>
&gt; using the above mentioned method.<br>
&gt;<br>
&gt; His proposal is touse a per-task intermediate cache with our default<br>
&gt; specified intermediate cache configuration. Remove the constructor<br>
&gt; parameter in MapReduceTask regarding shared or non shared cache and add<br>
&gt; configuration methods for both caches:<br>
&gt;<br>
&gt;<br>
&gt;       usingIntermediateCache(String configName) - use a per-task<br>
&gt; intermediate cache with the given configuration<br>
&gt;       usingSharedIntermediateCache(String cache) - use a shared cache<br>
&gt; with our default configuration<br>
&gt;       usingSharedIntermediateCache(String cache, String configName) - use<br>
&gt; a shared cache with the given configuration<br>
&gt;<br>
&gt;<br>
&gt; Note that we need a name for shared cache because we want to enable<br>
&gt; application to easily remove/inspect that cache after all m/r tasks<br>
&gt; sharing that intermediate cache have been executed.<br>
&gt;<br>
&gt; What are your thoughts here?<br>
&gt;<br>
&gt; Vladimir<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; [1] <a href="https://issues.jboss.org/browse/ISPN-4021" target="_blank">https://issues.jboss.org/browse/ISPN-4021</a><br>
&gt; _______________________________________________<br>
&gt; infinispan-dev mailing list<br>
&gt; <a href="mailto:infinispan-dev@lists.jboss.org">infinispan-dev@lists.jboss.org</a><br>
&gt; <a href="https://lists.jboss.org/mailman/listinfo/infinispan-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/infinispan-dev</a><br>
<br>
<br>
</div></div><span class=""><font color="#888888">--<br>
Radim Vansa &lt;<a href="mailto:rvansa@redhat.com">rvansa@redhat.com</a>&gt;<br>
JBoss DataGrid QA<br>
</font></span><div class=""><div class="h5"><br>
_______________________________________________<br>
infinispan-dev mailing list<br>
<a href="mailto:infinispan-dev@lists.jboss.org">infinispan-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/infinispan-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/infinispan-dev</a><br>
</div></div></blockquote></div><br></div></div>