Hello,

You can use events:

https://ignite.apache.org/releases/latest/javadoc/org/apache/ignite/events/CacheRebalancingEvent.html

But in this case, you should wait until the rebalancing of all caches is completed.

Also you can use the web console tool:

https://apacheignite-tools.readme.io/v2.8.0/docs

And the last option is to use the following property:

https://www.gridgain.com/sdk/ee/latest/javadoc/org/apache/ignite/IgniteSystemProperties.html#IGNITE_WAIT_FOR_BACKUPS_ON_SHUTDOWN

With the current setting, your node, which was properly stopped, will not be stopped until there are backups in the cluster.

BR,
Andrew

11/1/2020 5:19 PM, narges saleh пишет:
Hi Denis -- How would I detect that rebalancing started, or finished? Do I need to listen to the rebalancing events and abort the task in case a rebalancing has started? thanks.

On Fri, Oct 30, 2020 at 4:28 PM Denis Magda <[email protected] <mailto:[email protected]>> wrote:

    Hi Narges,

    Then just send a task to a required node. If the cluster topology
    changes while the task was running you can re-submit it to ensure
    the result is accurate.

    -
    Denis


    On Fri, Oct 30, 2020 at 2:16 PM narges saleh <[email protected]
    <mailto:[email protected]>> wrote:

        Hi Denis,

        My problem with using affinity call/run is that I have to have
        the key in order to run it. I just want to run a function on
        the data on the current node, without knowing the key. Is
        there anyway to do this and also guard against partition
        rebalancing?

        thanks

        On Tue, Oct 27, 2020 at 10:31 AM narges saleh
        <[email protected] <mailto:[email protected]>> wrote:

            Thanks Ilya, Denis for the feedback.

            On Mon, Oct 26, 2020 at 1:44 PM Denis Magda
            <[email protected] <mailto:[email protected]>> wrote:

                Narges,

                Also, keep in mind that if a local query is executed
                over a partitioned table and it happens that
                partitions rebalancing starts, the local query might
                return a wrong result (if partitions the query was
                executed over were rebalanced to another node during
                the query execution time). To address this:

                 1. Execute the local query inside of an
                    affinityCall/Run function
                    
(https://ignite.apache.org/docs/latest/distributed-computing/collocated-computations#colocating-by-key
                    
<https://ignite.apache.org/docs/latest/distributed-computing/collocated-computations#colocating-by-key>).
                    Those functions don't let partitions be evicted
                    until the function execution completes.
                 2. Don't use the local queries, let the Ignite SQL
                    engine to run standard queries, and to take care
                    of possible optimizations.


                -
                Denis


                On Mon, Oct 26, 2020 at 8:50 AM Ilya Kasnacheev
                <[email protected]
                <mailto:[email protected]>> wrote:

                    Hello!

                    You are using an Ignite Thick Client driver. As
                    its name implies, it will start a local client
                    node and then connect to it, without the option of
                    doing local queries.

                    You need to use Ignite Thin JDBC driver:
                    jdbc:ignite:thin://<server ip>
                    Then you can do local queries.

                    Regards,
-- Ilya Kasnacheev


                    сб, 24 окт. 2020 г. в 16:04, narges saleh
                    <[email protected] <mailto:[email protected]>>:

                        Hello Ilya
                        Yes, it happens all the time. It seems ignite
                        forces the "client" establishing the jdbc
                        connection into a client mode, even if I set
                        client=false.  The sample code and config are
                        attached. The question is how do I force JDBC
                        connections from a server node.
                        thanks.

                        On Fri, Oct 23, 2020 at 10:31 AM Ilya
                        Kasnacheev <[email protected]
                        <mailto:[email protected]>> wrote:

                            Hello!

                            Does this happen every time? If so, do you
                            have a reproducer for the issue?

                            Regards,
-- Ilya Kasnacheev


                            пт, 23 окт. 2020 г. в 13:06, narges saleh
                            <[email protected]
                            <mailto:[email protected]>>:

                                Denis -- Just checked. I do specify my
                                services to be deployed on server
                                nodes only. Why would ignite think
                                that I am running my code on a client
                                node?

                                On Fri, Oct 23, 2020 at 3:50 AM narges
                                saleh <[email protected]
                                <mailto:[email protected]>> wrote:

                                    Hi Denis
                                    What would make an ignite node a
                                    client node? The code is invoked
                                    via an ignite service deployed on
                                    each node and I am not setting the
                                    client mode anywhere. The code
                                    sets the jdbc connection to local
                                    and tries to execute a sql code on
                                    the node in some interval. By the
                                    way, I didn't know one could
                                    deploy a service on client nodes.
                                    Do I need to explicitly mark a
                                    node as a server node when
                                    deploying a service?
                                    thanks

                                    On Thu, Oct 22, 2020 at 9:42 PM
                                    Denis Magda <[email protected]
                                    <mailto:[email protected]>> wrote:

                                        The error message says you're
                                        attempting to run the query on
                                        a client node. If that's the
                                        case (if the service is
                                        deployed on the client node),
                                        then the local flag has no
                                        effect because client nodes
                                        don't keep your data locally
                                        but rather consume it from
                                        servers.

                                        -
                                        Denis


                                        On Thu, Oct 22, 2020 at 6:26
                                        PM narges saleh
                                        <[email protected]
                                        <mailto:[email protected]>>
                                        wrote:

                                            Hi All,
                                            I am trying to execute a
                                            sql query via a JDBC
                                            connection on the service
                                            node (the query is run via
                                            a service), but I am
                                            getting /Execution of
                                            local SqlFieldsQuery on
                                            client node disallowed./
                                            /The JDBC connection has
                                            the option local=true as I
                                            want to run the query on
                                            the data on the local node
                                            only./
                                            /Any idea why I am getting
                                            this error?/
                                            /
                                            /
                                            /thanks./

Reply via email to