You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@accumulo.apache.org by Enas Alkawasmi <ea...@uncc.edu> on 2019/12/18 01:33:31 UTC

Iterator's seek function

I have a question: Is the' 'seek' method inside a custom iterator executed at
the server or on the client?Suppose I defined a private method that is
called from the seek method then the second method will be called by the
server or the client?. If the customized method did some write operation to
a table, will this involve network communication between client and server?



--
Sent from: http://apache-accumulo.1065345.n5.nabble.com/Developers-f3.html

Re: Iterator's seek function

Posted by Christopher <ct...@apache.org>.
The kind of communication that will take place depends on your code.
My point was that you can write an iterator that does anything you
want. If you're using the Accumulo client API within the iterator to
perform some client operation, that will result in the same kind of
communication as any other Accumulo client would.

On Thu, Dec 19, 2019 at 12:13 AM Enas Alkawasmi <ea...@uncc.edu> wrote:
>
> You said: "If, for example, you write an
> iterator which creates a client object to write data back to Accumulo,
> it will certainly create network communication."
> What kind of communication will take place? between whom can you explain
> more? If the Tserver is going to execute the code and write to the accumulo
> table what kind of communications that involve?
>
>
>
> --
> Sent from: http://apache-accumulo.1065345.n5.nabble.com/Developers-f3.html

Re: Iterator's seek function

Posted by Enas Alkawasmi <ea...@uncc.edu>.
You said: "If, for example, you write an
iterator which creates a client object to write data back to Accumulo,
it will certainly create network communication."
What kind of communication will take place? between whom can you explain
more? If the Tserver is going to execute the code and write to the accumulo
table what kind of communications that involve?



--
Sent from: http://apache-accumulo.1065345.n5.nabble.com/Developers-f3.html

Re: Iterator's seek function

Posted by Christopher <ct...@apache.org>.
Everything executed inside an iterator is done within a tserver. Their
entire object lifespan exists inside the tserver.

However, you can write an iterator that can do anything you want,
including reaching outside the tserver. If, for example, you write an
iterator which creates a client object to write data back to Accumulo,
it will certainly create network communication.

This is generally not recommended, and may cause serious performance
or correctness issues. I know that a long time ago, it was possible to
starve server threads this way and cause deadlocks. Some changes were
made to avoid that... but it's still a risky, not well tested, and
generally not-recommended thing to do, and probably not the best way
to solve whatever problem you're trying to solve.

On Tue, Dec 17, 2019 at 8:16 PM Enas Alkawasmi <ea...@uncc.edu> wrote:
>
> I have a question: Is the' 'seek' method inside a custom iterator executed at
> the server or on the client?Suppose I defined a private method that is
> called from the seek method then the second method will be called by the
> server or the client?. If the customized method did some write operation to
> a table, will this involve network communication between client and server?
>
>
>
> --
> Sent from: http://apache-accumulo.1065345.n5.nabble.com/Developers-f3.html