ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "shawn.du" <shawn...@neulion.com.cn>
Subject Re: CacheInterceptor issue
Date Fri, 24 Mar 2017 10:02:50 GMT
<html>
<head>
    <meta http-equiv='Content-Type' content='text/html; charset=UTF-8'>
</head>
<body>
<style>
    font{
        line-height: 1.5;
    }
</style>
<div style = 'font-family:"微软雅黑"; font-size: 16px; color:#000000; line-height:1.5;'>
    <div>Hi Andrey,</div><div><br></div><div>Thanks for
your reply. My interceptor will save some data into local files then move the file to another
mounted directory(NFS or S3). &nbsp;There are other programs do the merge operations.
I use node Id to make the file unique. so I think it is fine. &nbsp;Just as your mentioned,
there are IO operations, I already make it async-write.</div><div>now all seems
good.</div><div>&nbsp;</div><div>
<div id="ntes-pcmail-signature" style="font-family:'微软雅黑'">
    <style type="text/css">
        a#ntes-pcmail-signature-default:hover {
            text-decoration: underline;
            color: #3593db;
            cursor: pointer;
        }
    </style>

                <div style="font-size:14px; padding: 0;  margin:0;">
                    <div style="font-family:&quot;微软雅黑&quot;; font-size:
13px; color:#000000">
    <style>
        font{
            line-height: 1.5;
        }
    </style>
<div id="ntes-pcmail-signature-default" style="font-size:14px; color:#000; text-decoration:
none;">Thanks</div><div id="ntes-pcmail-signature-default" style="font-size:14px;
color:#000; text-decoration: none;">Shawn</div>
</div>
                </div>

</div><br>
</div><div class="J-reply" style="background-color:#f2f2f2;color:black;padding-top:6px;padding-bottom:6px;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;margin-top:45px;margin-bottom:20px;font-family:'微软雅黑';">
    <div style="font-size:14px;line-height:1.5;word-break:break-all;margin-left:10px;margin-right:10px">On
<span class="mail-date">03/24/2017 16:31</span>,<a class="mail-to" style="text-decoration:none;color:#2a97ff;"
href="mailto:amashenkov@gridgain.com">Andrey Mashenkov&lt;amashenkov@gridgain.com&gt;</a>
wrote: </div>
</div>
<blockquote id="ntes-pcmail-quote" style="margin: 0; padding: 0; font-size: 13px; font-family:
'微软雅黑';">
<div dir="ltr">Hi Shawn,<div><br></div><div>What stream do you
mean?&nbsp;</div><div>Ignite CacheInterceptorcan be serialized and executed
on different node, possibly you send it with a stream created on client side. If it so, it
is a bad idea.</div><div>CacehInterceptor supports resource injecting. See<i>&nbsp;org.apache.ignite.resources&nbsp;</i>package.
So, you can make async call of some code from it, which will do all IO work.<br></div><div><br></div><div>Also
it has a note in javadoc:&nbsp;</div><div>* Implementations should not execute
any complex logic,<br>* including locking, networking or cache operations,<br>*
as it may lead to deadlock, since this method is called<br>* from sensitive synchronization
blocks.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On
Fri, Mar 24, 2017 at 4:16 AM, shawn.du <span dir="ltr">&lt;<a href="mailto:shawn.du@neulion.com.cn"
target="_blank">shawn.du@neulion.com.cn</a>&gt;</span> wrote:<br><blockquote
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

     

<div>

<div style="font-family:&quot;\005fae\008f6f\0096c5\009ed1&quot;;font-size:16px;color:#000000;line-height:1.5">
    <div>Hi Andrey,<br>
<br>Thanks for your reply. one more question:</div><div><br></div><div>Does
the interceptor need to be thread-safe?&nbsp; My interceptor throws unexpected Io Exceptions
like trying to write closed stream.</div><div><br></div><div>
<div id="m_-8160349163143131702ntes-pcmail-signature" style="font-family:'\005fae\008f6f\0096c5\009ed1'">
     

                <div style="font-size:14px;padding:0;margin:0">
                    <div style="font-family:&quot;\005fae\008f6f\0096c5\009ed1&quot;;font-size:13px;color:#000000">
     
<div id="m_-8160349163143131702ntes-pcmail-signature-default" style="font-size:14px;color:#000;text-decoration:none">Thanks</div><div
id="m_-8160349163143131702ntes-pcmail-signature-default" style="font-size:14px;color:#000;text-decoration:none">Shawn</div>
</div>
                </div>

</div><br>
</div><div class="m_-8160349163143131702J-reply" style="background-color:#f2f2f2;color:black;padding-top:6px;padding-bottom:6px;border-radius:3px;margin-top:45px;margin-bottom:20px;font-family:'\005fae\008f6f\0096c5\009ed1'">
    <div style="font-size:14px;line-height:1.5;word-break:break-all;margin-left:10px;margin-right:10px">On
<span class="m_-8160349163143131702mail-date">03/23/2017 15:18</span>,<a
class="m_-8160349163143131702mail-to" style="text-decoration:none;color:#2a97ff" href="mailto:andrey.mashenkov@gmail.com"
target="_blank">Andrey Mashenkov&lt;andrey.mashenkov@<wbr>gmail.com&gt;</a>
wrote: </div>
</div>
<blockquote id="m_-8160349163143131702ntes-pcmail-quote" style="margin:0;padding:0;font-size:13px;font-family:'\005fae\008f6f\0096c5\009ed1'">
<div dir="ltr">Hi Shawn,<div><br></div><div>CacheInterceptor
should be called once on one node.</div></div><div class="gmail_extra"><br><div
class="gmail_quote">On Wed, Mar 22, 2017 at 5:11 AM, shawn.du <span dir="ltr">&lt;<a
href="mailto:shawn.du@neulion.com.cn" target="_blank">shawn.du@neulion.com.cn</a>&gt;</span>
wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px
#ccc solid;padding-left:1ex">

      

<div>

<div style="font-family:&quot;\005fae\008f6f\0096c5\009ed1&quot;;font-size:16px;color:#000000;line-height:1.5">
    <div>
Hi,</div><div><br></div><div>If I have multiple-nodes cluster,
and I set up a cache interceptor on a cache.&nbsp;</div><div>the cache mode
is partitioned or duplicated. in partition mode,&nbsp;<span style="line-height:1.5">the
cache maybe have a backup or not. &nbsp;</span></div><div><span style="line-height:1.5">My
question is: when a cache entry is removed, &nbsp;the interceptor will be called once
on one node or multiple times on multiple node?</span><span style="line-height:1.5">&nbsp;</span></div><div><span
style="line-height:1.5"><br></span></div><div>
<div id="m_-8160349163143131702m_2969737454458814776ntes-pcmail-signature" style="font-family:'\005fae\008f6f\0096c5\009ed1'">
      

                <div style="font-size:14px;padding:0;margin:0">
                    <div style="font-family:&quot;\005fae\008f6f\0096c5\009ed1&quot;;font-size:13px;color:#000000">
      
<div id="m_-8160349163143131702m_2969737454458814776ntes-pcmail-signature-default" style="font-size:14px;color:#000;text-decoration:none">Thanks</div><span
class="m_-8160349163143131702HOEnZb"><font color="#888888"><div id="m_-8160349163143131702m_2969737454458814776ntes-pcmail-signature-default"
style="font-size:14px;color:#000;text-decoration:none">Shawn</div>
</font></span></div>
                </div>

</div><br>
</div>
</div>
</div>

</blockquote></div><br><br clear="all"><span class="HOEnZb"><font
color="#888888"><div><br></div>-- <br><div class="m_-8160349163143131702gmail_signature"
data-smartmail="gmail_signature"><div dir="ltr"><div>Best regards,<br>Andrey
V. Mashenkov<br></div></div></div>
</font></span></div>
</blockquote>
</div>
</div>

</blockquote></div><br></div>
</blockquote>
</div>
</body>
</html>

Mime
View raw message