You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by GitBox <gi...@apache.org> on 2020/03/25 12:44:46 UTC

[GitHub] [ignite] alex-plekhanov opened a new pull request #7572: IGNITE-12835 Thin client: compute support (PoC)

alex-plekhanov opened a new pull request #7572: IGNITE-12835 Thin client: compute support (PoC)
URL: https://github.com/apache/ignite/pull/7572
 
 
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [ignite] ptupitsyn commented on a change in pull request #7572: IGNITE-12835 Thin client: compute support

Posted by GitBox <gi...@apache.org>.
ptupitsyn commented on a change in pull request #7572: IGNITE-12835 Thin client: compute support
URL: https://github.com/apache/ignite/pull/7572#discussion_r400814385
 
 

 ##########
 File path: modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationSerializerTest.cs
 ##########
 @@ -124,7 +124,7 @@ public void TestPredefinedXml()
             Assert.IsFalse(cacheCfg.WriteBehindCoalescing);
             Assert.AreEqual(PartitionLossPolicy.ReadWriteAll, cacheCfg.PartitionLossPolicy);
             Assert.AreEqual("fooGroup", cacheCfg.GroupName);
-            
+
 
 Review comment:
   Please revert whitespace-only changes

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [ignite] x-kreator commented on a change in pull request #7572: IGNITE-12835 Thin client: compute support

Posted by GitBox <gi...@apache.org>.
x-kreator commented on a change in pull request #7572: IGNITE-12835 Thin client: compute support
URL: https://github.com/apache/ignite/pull/7572#discussion_r403976775
 
 

 ##########
 File path: modules/core/src/main/java/org/apache/ignite/internal/processors/platform/client/compute/ClientComputeTask.java
 ##########
 @@ -0,0 +1,166 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.processors.platform.client.compute;
+
+import java.util.Set;
+import java.util.UUID;
+import java.util.concurrent.atomic.AtomicBoolean;
+import org.apache.ignite.IgniteCheckedException;
+import org.apache.ignite.IgniteLogger;
+import org.apache.ignite.cluster.ClusterNode;
+import org.apache.ignite.internal.ComputeTaskInternalFuture;
+import org.apache.ignite.internal.processors.platform.client.ClientCloseableResource;
+import org.apache.ignite.internal.processors.platform.client.ClientConnectionContext;
+import org.apache.ignite.internal.processors.platform.client.ClientNotification;
+import org.apache.ignite.internal.processors.platform.client.ClientObjectNotification;
+import org.apache.ignite.internal.processors.platform.client.ClientStatus;
+import org.apache.ignite.internal.processors.platform.client.IgniteClientException;
+import org.apache.ignite.internal.processors.task.GridTaskProcessor;
+import org.apache.ignite.internal.util.typedef.F;
+import org.apache.ignite.lang.IgnitePredicate;
+
+import static org.apache.ignite.internal.processors.platform.client.ClientMessageParser.OP_COMPUTE_TASK_FINISHED;
+import static org.apache.ignite.internal.processors.task.GridTaskThreadContextKey.TC_NO_FAILOVER;
+import static org.apache.ignite.internal.processors.task.GridTaskThreadContextKey.TC_NO_RESULT_CACHE;
+import static org.apache.ignite.internal.processors.task.GridTaskThreadContextKey.TC_SUBGRID_PREDICATE;
+import static org.apache.ignite.internal.processors.task.GridTaskThreadContextKey.TC_SUBJ_ID;
+import static org.apache.ignite.internal.processors.task.GridTaskThreadContextKey.TC_TIMEOUT;
+
+/**
+ * Client compute task.
+  */
+class ClientComputeTask implements ClientCloseableResource {
+    /** No failover flag mask. */
+    private static final byte NO_FAILOVER_FLAG_MASK = 0x01;
+
+    /** No result cache flag mask. */
+    private static final byte NO_RESULT_CACHE_FLAG_MASK = 0x02;
+
+    /** Context. */
+    private final ClientConnectionContext ctx;
+
+    /** Logger. */
+    private final IgniteLogger log;
+
+    /** Task id. */
+    private volatile long taskId;
+
+    /** Task future. */
+    private volatile ComputeTaskInternalFuture<Object> taskFut;
+
+    /** Task closed flag. */
+    private final AtomicBoolean closed = new AtomicBoolean();
+
+    /**
+     * Ctor.
+     *
+     * @param ctx Connection context.
+     */
+    ClientComputeTask(ClientConnectionContext ctx) {
+        assert ctx != null;
+
+        this.ctx = ctx;
+
+        log = ctx.kernalContext().log(getClass());
+    }
+
+    /**
+     * @param taskId Task ID.
+     * @param taskName Task name.
+     * @param arg Task arguments.
+     * @param nodeIds Nodes to run task jobs.
+     * @param flags Flags for task.
+     * @param timeout Task timeout.
+     */
+    void execute(long taskId, String taskName, Object arg, Set<UUID> nodeIds, byte flags, long timeout) {
+        assert taskName != null;
+
+        this.taskId = taskId;
+
+        GridTaskProcessor task = ctx.kernalContext().task();
+
+        IgnitePredicate<ClusterNode> nodePredicate = F.isEmpty(nodeIds) ? F.alwaysTrue() : F.nodeForNodeIds(nodeIds);
+        UUID subjId = ctx.securityContext() == null ? null : ctx.securityContext().subject().id();
+
+        task.setThreadContextIfNotNull(TC_SUBGRID_PREDICATE, nodePredicate);
 
 Review comment:
   nodePredicate looks like never can be null, so calling setThreadContext is preferable than setThreadContextIfNotNull

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [ignite] ptupitsyn commented on a change in pull request #7572: IGNITE-12835 Thin client: compute support

Posted by GitBox <gi...@apache.org>.
ptupitsyn commented on a change in pull request #7572: IGNITE-12835 Thin client: compute support
URL: https://github.com/apache/ignite/pull/7572#discussion_r400790049
 
 

 ##########
 File path: modules/core/src/main/java/org/apache/ignite/internal/processors/platform/client/ClientStatus.java
 ##########
 @@ -37,6 +37,12 @@ private ClientStatus (){
     /** Invalid op code. */
     public static final int INVALID_OP_CODE = 2;
 
+    /** Functionality is disabled. */
+    public static final int FUNCTIONALITY_DISABLED = 100;
+
+    /** Resource limit exceed. */
+    public static final int RESOURCE_LIMIT_EXCEED = 101;
 
 Review comment:
   Let's not generalize too much, make this only about compute, and name it like the one above: `TOO_MANY_COMPUTE_TASKS`

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [ignite] x-kreator commented on a change in pull request #7572: IGNITE-12835 Thin client: compute support

Posted by GitBox <gi...@apache.org>.
x-kreator commented on a change in pull request #7572: IGNITE-12835 Thin client: compute support
URL: https://github.com/apache/ignite/pull/7572#discussion_r403966234
 
 

 ##########
 File path: modules/core/src/main/java/org/apache/ignite/internal/client/thin/ClientClusterGroupImpl.java
 ##########
 @@ -0,0 +1,65 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.client.thin;
+
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.UUID;
+import org.apache.ignite.client.ClientClusterGroup;
+import org.apache.ignite.internal.util.typedef.internal.U;
+
+/**
+ * Implementation of {@link ClientClusterGroup}.
+ */
+@SuppressWarnings("AssignmentOrReturnOfFieldWithMutableType")
+class ClientClusterGroupImpl implements ClientClusterGroup {
+    /** Node id's. */
+    private final Collection<UUID> nodeIds;
+
+    /**
+     * @param ids Ids.
+     */
+    ClientClusterGroupImpl(Collection<UUID> ids) {
+        nodeIds = ids;
+    }
+
+    /** {@inheritDoc} */
+    @Override public ClientClusterGroup forNodeIds(Collection<UUID> ids) {
+        return new ClientClusterGroupImpl(new HashSet<>(ids));
+    }
+
+    /** {@inheritDoc} */
+    @Override public ClientClusterGroup forNodeId(UUID id, UUID ... ids) {
+        Collection<UUID> nodeIds = U.newHashSet(1 + (ids == null ? 0 : ids.length));
+
+        nodeIds.add(id);
+
+        if (ids != null)
+            nodeIds.addAll(Arrays.asList(ids));
+
+        return new ClientClusterGroupImpl(nodeIds);
+    }
+
+    /**
+     * Gets node id's.
+     */
+    public Collection<UUID> nodeIds() {
+        return nodeIds == null ? null : new HashSet<>(nodeIds);
 
 Review comment:
   the result looks as if it could be unmodifiable

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [ignite] x-kreator commented on a change in pull request #7572: IGNITE-12835 Thin client: compute support

Posted by GitBox <gi...@apache.org>.
x-kreator commented on a change in pull request #7572: IGNITE-12835 Thin client: compute support
URL: https://github.com/apache/ignite/pull/7572#discussion_r403911059
 
 

 ##########
 File path: modules/core/src/main/java/org/apache/ignite/internal/client/thin/ClientOperation.java
 ##########
 @@ -56,14 +60,26 @@
     /** Put binary type. */PUT_BINARY_TYPE(3003),
     /** Get binary type name. */GET_BINARY_TYPE_NAME(3000),
     /** Start new transaction. */TX_START(4000),
-    /** End the transaction (commit or rollback). */TX_END(4001);
+    /** End the transaction (commit or rollback). */TX_END(4001),
+    /** Execute compute task. */COMPUTE_TASK_EXECUTE(6000),
+    /** Finished compute task notification. */COMPUTE_TASK_FINISHED(6001, true);
 
     /** Code. */
     private final int code;
 
+    /** Is notification. */
+    private final boolean notification;
+
     /** Constructor. */
     ClientOperation(int code) {
         this.code = code;
 
 Review comment:
   this(code, false) will look better

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [ignite] ptupitsyn commented on a change in pull request #7572: IGNITE-12835 Thin client: compute support

Posted by GitBox <gi...@apache.org>.
ptupitsyn commented on a change in pull request #7572: IGNITE-12835 Thin client: compute support
URL: https://github.com/apache/ignite/pull/7572#discussion_r400783325
 
 

 ##########
 File path: modules/core/src/main/java/org/apache/ignite/internal/processors/platform/client/ClientConnectionContext.java
 ##########
 @@ -164,6 +182,9 @@ public ClientListenerProtocolVersion currentVersion() {
         String user = null;
         String pwd = null;
 
+        if (ver.compareTo(VER_2_0_0) >= 0)
+            supportedFeatures = BitSet.valueOf(reader.readByteArray());
 
 Review comment:
   I think we should introduce feature flags both ways right now: `ClientFeatureFlags` (sent from client to server) and `ServerFeatureFlags` (sent from server to client). For now we rely a lot on the protocol version to understand which feature can be used on the client side, and this is quite hard. Feature flags will make it straightforward.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [ignite] ptupitsyn commented on a change in pull request #7572: IGNITE-12835 Thin client: compute support

Posted by GitBox <gi...@apache.org>.
ptupitsyn commented on a change in pull request #7572: IGNITE-12835 Thin client: compute support
URL: https://github.com/apache/ignite/pull/7572#discussion_r400783325
 
 

 ##########
 File path: modules/core/src/main/java/org/apache/ignite/internal/processors/platform/client/ClientConnectionContext.java
 ##########
 @@ -164,6 +182,9 @@ public ClientListenerProtocolVersion currentVersion() {
         String user = null;
         String pwd = null;
 
+        if (ver.compareTo(VER_2_0_0) >= 0)
+            supportedFeatures = BitSet.valueOf(reader.readByteArray());
 
 Review comment:
   I think we should introduce feature flags both ways right now: `ClientFeatureFlags` (sent from client to server) and `ServerFeatureFlags` (sent from server to client). For now we rely a lot on the protocol version to understand which feature can be used on the client side, and this is quite hard. Feature flags will make it straightforward.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [ignite] ptupitsyn commented on a change in pull request #7572: IGNITE-12835 Thin client: compute support

Posted by GitBox <gi...@apache.org>.
ptupitsyn commented on a change in pull request #7572: IGNITE-12835 Thin client: compute support
URL: https://github.com/apache/ignite/pull/7572#discussion_r400768471
 
 

 ##########
 File path: modules/core/src/main/java/org/apache/ignite/internal/client/thin/ClientClusterGroupImpl.java
 ##########
 @@ -0,0 +1,65 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.client.thin;
+
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.UUID;
+import org.apache.ignite.client.ClientClusterGroup;
+import org.apache.ignite.internal.util.typedef.internal.U;
+
+/**
+ * Implementation of {@link ClientClusterGroup}.
+ */
+@SuppressWarnings("AssignmentOrReturnOfFieldWithMutableType")
+class ClientClusterGroupImpl implements ClientClusterGroup {
+    /** Node id's. */
+    private volatile Collection<UUID> nodeIds;
 
 Review comment:
   I think this should be `final` instead of `volatile`

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [ignite] alex-plekhanov commented on a change in pull request #7572: IGNITE-12835 Thin client: compute support

Posted by GitBox <gi...@apache.org>.
alex-plekhanov commented on a change in pull request #7572: IGNITE-12835 Thin client: compute support
URL: https://github.com/apache/ignite/pull/7572#discussion_r400878385
 
 

 ##########
 File path: modules/core/src/main/java/org/apache/ignite/internal/processors/platform/client/compute/ClientComputeTask.java
 ##########
 @@ -0,0 +1,166 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.processors.platform.client.compute;
+
+import java.util.Set;
+import java.util.UUID;
+import java.util.concurrent.atomic.AtomicBoolean;
+import org.apache.ignite.IgniteCheckedException;
+import org.apache.ignite.IgniteLogger;
+import org.apache.ignite.cluster.ClusterNode;
+import org.apache.ignite.internal.ComputeTaskInternalFuture;
+import org.apache.ignite.internal.processors.platform.client.ClientCloseableResource;
+import org.apache.ignite.internal.processors.platform.client.ClientConnectionContext;
+import org.apache.ignite.internal.processors.platform.client.ClientNotification;
+import org.apache.ignite.internal.processors.platform.client.ClientObjectNotification;
+import org.apache.ignite.internal.processors.platform.client.ClientStatus;
+import org.apache.ignite.internal.processors.platform.client.IgniteClientException;
+import org.apache.ignite.internal.processors.task.GridTaskProcessor;
+import org.apache.ignite.internal.util.typedef.F;
+import org.apache.ignite.lang.IgnitePredicate;
+
+import static org.apache.ignite.internal.processors.platform.client.ClientMessageParser.OP_COMPUTE_TASK_FINISHED;
+import static org.apache.ignite.internal.processors.task.GridTaskThreadContextKey.TC_NO_FAILOVER;
+import static org.apache.ignite.internal.processors.task.GridTaskThreadContextKey.TC_NO_RESULT_CACHE;
+import static org.apache.ignite.internal.processors.task.GridTaskThreadContextKey.TC_SUBGRID_PREDICATE;
+import static org.apache.ignite.internal.processors.task.GridTaskThreadContextKey.TC_SUBJ_ID;
+import static org.apache.ignite.internal.processors.task.GridTaskThreadContextKey.TC_TIMEOUT;
+
+/**
+ * Client compute task.
+  */
+class ClientComputeTask implements ClientCloseableResource {
+    /** No failover flag mask. */
+    private static final byte NO_FAILOVER_FLAG_MASK = 0x01;
+
+    /** No result cache flag mask. */
+    private static final byte NO_RESULT_CACHE_FLAG_MASK = 0x02;
+
+    /** Context. */
+    private final ClientConnectionContext ctx;
+
+    /** Logger. */
+    private final IgniteLogger log;
+
+    /** Task id. */
+    private volatile long taskId;
+
+    /** Task future. */
+    private volatile ComputeTaskInternalFuture<Object> taskFut;
+
+    /** Task closed flag. */
+    private final AtomicBoolean closed = new AtomicBoolean();
+
+    /**
+     * Ctor.
+     *
+     * @param ctx Connection context.
+     */
+    ClientComputeTask(ClientConnectionContext ctx) {
+        assert ctx != null;
+
+        this.ctx = ctx;
+
+        log = ctx.kernalContext().log(getClass());
+    }
+
+    /**
+     * @param taskId Task ID.
+     * @param taskName Task name.
+     * @param arg Task arguments.
+     * @param nodeIds Nodes to run task jobs.
+     * @param flags Flags for task.
+     * @param timeout Task timeout.
+     */
+    void execute(long taskId, String taskName, Object arg, Set<UUID> nodeIds, byte flags, long timeout) {
+        assert taskName != null;
+
+        this.taskId = taskId;
+
+        GridTaskProcessor task = ctx.kernalContext().task();
 
 Review comment:
   We need to pass at least subjId using internal API.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [ignite] ptupitsyn commented on a change in pull request #7572: IGNITE-12835 Thin client: compute support

Posted by GitBox <gi...@apache.org>.
ptupitsyn commented on a change in pull request #7572: IGNITE-12835 Thin client: compute support
URL: https://github.com/apache/ignite/pull/7572#discussion_r400813422
 
 

 ##########
 File path: modules/core/src/main/java/org/apache/ignite/internal/processors/platform/client/compute/ClientComputeTask.java
 ##########
 @@ -0,0 +1,166 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.processors.platform.client.compute;
+
+import java.util.Set;
+import java.util.UUID;
+import java.util.concurrent.atomic.AtomicBoolean;
+import org.apache.ignite.IgniteCheckedException;
+import org.apache.ignite.IgniteLogger;
+import org.apache.ignite.cluster.ClusterNode;
+import org.apache.ignite.internal.ComputeTaskInternalFuture;
+import org.apache.ignite.internal.processors.platform.client.ClientCloseableResource;
+import org.apache.ignite.internal.processors.platform.client.ClientConnectionContext;
+import org.apache.ignite.internal.processors.platform.client.ClientNotification;
+import org.apache.ignite.internal.processors.platform.client.ClientObjectNotification;
+import org.apache.ignite.internal.processors.platform.client.ClientStatus;
+import org.apache.ignite.internal.processors.platform.client.IgniteClientException;
+import org.apache.ignite.internal.processors.task.GridTaskProcessor;
+import org.apache.ignite.internal.util.typedef.F;
+import org.apache.ignite.lang.IgnitePredicate;
+
+import static org.apache.ignite.internal.processors.platform.client.ClientMessageParser.OP_COMPUTE_TASK_FINISHED;
+import static org.apache.ignite.internal.processors.task.GridTaskThreadContextKey.TC_NO_FAILOVER;
+import static org.apache.ignite.internal.processors.task.GridTaskThreadContextKey.TC_NO_RESULT_CACHE;
+import static org.apache.ignite.internal.processors.task.GridTaskThreadContextKey.TC_SUBGRID_PREDICATE;
+import static org.apache.ignite.internal.processors.task.GridTaskThreadContextKey.TC_SUBJ_ID;
+import static org.apache.ignite.internal.processors.task.GridTaskThreadContextKey.TC_TIMEOUT;
+
+/**
+ * Client compute task.
+  */
+class ClientComputeTask implements ClientCloseableResource {
+    /** No failover flag mask. */
+    private static final byte NO_FAILOVER_FLAG_MASK = 0x01;
+
+    /** No result cache flag mask. */
+    private static final byte NO_RESULT_CACHE_FLAG_MASK = 0x02;
+
+    /** Context. */
+    private final ClientConnectionContext ctx;
+
+    /** Logger. */
+    private final IgniteLogger log;
+
+    /** Task id. */
+    private volatile long taskId;
+
+    /** Task future. */
+    private volatile ComputeTaskInternalFuture<Object> taskFut;
+
+    /** Task closed flag. */
+    private final AtomicBoolean closed = new AtomicBoolean();
+
+    /**
+     * Ctor.
+     *
+     * @param ctx Connection context.
+     */
+    ClientComputeTask(ClientConnectionContext ctx) {
+        assert ctx != null;
+
+        this.ctx = ctx;
+
+        log = ctx.kernalContext().log(getClass());
+    }
+
+    /**
+     * @param taskId Task ID.
+     * @param taskName Task name.
+     * @param arg Task arguments.
+     * @param nodeIds Nodes to run task jobs.
+     * @param flags Flags for task.
+     * @param timeout Task timeout.
+     */
+    void execute(long taskId, String taskName, Object arg, Set<UUID> nodeIds, byte flags, long timeout) {
+        assert taskName != null;
+
+        this.taskId = taskId;
+
+        GridTaskProcessor task = ctx.kernalContext().task();
 
 Review comment:
   Can you please explain the reason to use internal API instead of public `IgniteCompute`?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [ignite] ptupitsyn commented on a change in pull request #7572: IGNITE-12835 Thin client: compute support

Posted by GitBox <gi...@apache.org>.
ptupitsyn commented on a change in pull request #7572: IGNITE-12835 Thin client: compute support
URL: https://github.com/apache/ignite/pull/7572#discussion_r400814670
 
 

 ##########
 File path: modules/platforms/dotnet/Apache.Ignite.Core/Configuration/ThinClientConfiguration.cs
 ##########
 @@ -29,18 +29,31 @@ public class ThinClientConfiguration
         /// </summary>
         public const int DefaultMaxActiveTxPerConnection = 100;
 
+        /// <summary>
+        /// Default limit of active compute tasks per connection.
+        /// </summary>
+        public const int DefaultMaxActiveComputeTasksPerConnection = 0;
+
         /// <summary>
         /// Initializes a new instance of the <see cref="ThinClientConfiguration"/> class.
         /// </summary>
         public ThinClientConfiguration()
         {
             MaxActiveTxPerConnection = DefaultMaxActiveTxPerConnection;
+            MaxActiveComputeTasksPerConnection = DefaultMaxActiveComputeTasksPerConnection;
         }
 
         /// <summary>
         /// Gets or sets active transactions count per connection limit.
         /// </summary>
         [DefaultValue(DefaultMaxActiveTxPerConnection)]
         public int MaxActiveTxPerConnection { get; set; }
+
+        /// <summary>
+        /// Gets or sets active compute tasks per connection limit.
+        /// Value <c>0</c> means that compute grid functionality is disabled for thin clients.
+        /// </summary>
+        [DefaultValue(DefaultMaxActiveComputeTasksPerConnection)]
+        public int MaxActiveComputeTasksPerConnection { get; set; }
 
 Review comment:
   Thank you for updating .NET configuration and tests :+1: 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [ignite] ptupitsyn commented on a change in pull request #7572: IGNITE-12835 Thin client: compute support

Posted by GitBox <gi...@apache.org>.
ptupitsyn commented on a change in pull request #7572: IGNITE-12835 Thin client: compute support
URL: https://github.com/apache/ignite/pull/7572#discussion_r400787452
 
 

 ##########
 File path: modules/core/src/main/java/org/apache/ignite/internal/processors/platform/client/ClientMessageParser.java
 ##########
 @@ -450,7 +461,13 @@ public ClientListenerRequest decode(BinaryRawReaderEx reader) {
 
         BinaryRawWriterEx writer = marsh.writer(outStream);
 
-        ((ClientResponse)resp).encode(ctx, writer);
+        assert resp instanceof ClientResponse || resp instanceof ClientNotification : "Unexpected response type: " +
 
 Review comment:
   Let's introduce an interface to avoid all of those `instanceof` checks.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [ignite] x-kreator commented on a change in pull request #7572: IGNITE-12835 Thin client: compute support

Posted by GitBox <gi...@apache.org>.
x-kreator commented on a change in pull request #7572: IGNITE-12835 Thin client: compute support
URL: https://github.com/apache/ignite/pull/7572#discussion_r403932665
 
 

 ##########
 File path: modules/core/src/main/java/org/apache/ignite/internal/client/thin/ClientClusterGroupImpl.java
 ##########
 @@ -0,0 +1,65 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.client.thin;
+
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.UUID;
+import org.apache.ignite.client.ClientClusterGroup;
+import org.apache.ignite.internal.util.typedef.internal.U;
+
+/**
+ * Implementation of {@link ClientClusterGroup}.
+ */
+@SuppressWarnings("AssignmentOrReturnOfFieldWithMutableType")
+class ClientClusterGroupImpl implements ClientClusterGroup {
+    /** Node id's. */
+    private final Collection<UUID> nodeIds;
+
+    /**
+     * @param ids Ids.
+     */
+    ClientClusterGroupImpl(Collection<UUID> ids) {
+        nodeIds = ids;
+    }
+
+    /** {@inheritDoc} */
+    @Override public ClientClusterGroup forNodeIds(Collection<UUID> ids) {
+        return new ClientClusterGroupImpl(new HashSet<>(ids));
+    }
+
+    /** {@inheritDoc} */
+    @Override public ClientClusterGroup forNodeId(UUID id, UUID ... ids) {
+        Collection<UUID> nodeIds = U.newHashSet(1 + (ids == null ? 0 : ids.length));
+
+        nodeIds.add(id);
+
+        if (ids != null)
 
 Review comment:
   add condition ids.length > 0

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [ignite] ptupitsyn commented on a change in pull request #7572: IGNITE-12835 Thin client: compute support

Posted by GitBox <gi...@apache.org>.
ptupitsyn commented on a change in pull request #7572: IGNITE-12835 Thin client: compute support
URL: https://github.com/apache/ignite/pull/7572#discussion_r400773428
 
 

 ##########
 File path: modules/core/src/main/java/org/apache/ignite/internal/client/thin/ClientComputeImpl.java
 ##########
 @@ -0,0 +1,379 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.client.thin;
+
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.UUID;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.locks.ReadWriteLock;
+import java.util.concurrent.locks.ReentrantReadWriteLock;
+import java.util.function.Consumer;
+import java.util.function.Function;
+import org.apache.ignite.client.ClientClusterGroup;
+import org.apache.ignite.client.ClientCompute;
+import org.apache.ignite.client.ClientException;
+import org.apache.ignite.client.ClientFeatureNotSupportedByServerException;
+import org.apache.ignite.client.ClientFuture;
+import org.apache.ignite.internal.IgniteInternalFuture;
+import org.apache.ignite.internal.binary.BinaryRawWriterEx;
+import org.apache.ignite.internal.binary.BinaryWriterExImpl;
+import org.apache.ignite.internal.binary.streams.BinaryHeapInputStream;
+import org.apache.ignite.internal.processors.platform.client.ClientFeature;
+import org.apache.ignite.internal.util.future.GridFutureAdapter;
+import org.apache.ignite.internal.util.typedef.F;
+import org.apache.ignite.internal.util.typedef.T2;
+import org.apache.ignite.lang.IgniteUuid;
+import org.jetbrains.annotations.Nullable;
+
+import static org.apache.ignite.internal.client.thin.ClientOperation.COMPUTE_TASK_EXECUTE;
+import static org.apache.ignite.internal.client.thin.ClientOperation.RESOURCE_CLOSE;
+
+/**
+ * Implementation of {@link ClientCompute}.
+ */
+class ClientComputeImpl implements ClientCompute, NotificationListener {
+    /** No failover flag mask. */
+    private static final byte NO_FAILOVER_FLAG_MASK = 0x01;
+
+    /** No result cache flag mask. */
+    private static final byte NO_RESULT_CACHE_FLAG_MASK = 0x02;
+
+    /** Channel. */
+    private final ReliableChannel ch;
+
+    /** Binary marshaller. */
+    private final ClientBinaryMarshaller marsh;
+
+    /** Utils for serialization/deserialization. */
+    private final ClientUtils utils;
+
+    /** ClientCluster instance. */
+    private final ClientClusterImpl cluster;
+
+    /** Active tasks. */
+    private final Map<ClientChannel, Map<Long, ClientComputeTask<Object>>> activeTasks = new ConcurrentHashMap<>();
+
+    /** Guard lock for active tasks. */
+    private final ReadWriteLock guard = new ReentrantReadWriteLock();
+
+    /** Constructor. */
+    ClientComputeImpl(ReliableChannel ch, ClientBinaryMarshaller marsh, ClientClusterImpl cluster) {
+        this.ch = ch;
+        this.marsh = marsh;
+        this.cluster = cluster;
+
+        utils = new ClientUtils(marsh);
+
+        ch.addNotificationListener(this);
+
+        ch.addChannelCloseListener(clientCh -> {
+            guard.writeLock().lock();
+
+            try {
+                Map<Long, ClientComputeTask<Object>> chTasks = activeTasks.remove(clientCh);
+
+                if (!F.isEmpty(chTasks)) {
+                    for (ClientComputeTask<?> task : chTasks.values())
+                        task.fut.onDone(new ClientException("Channel to server is closed"));
+                }
+            }
+            finally {
+                guard.writeLock().unlock();
+            }
+        });
+    }
+
+    /** {@inheritDoc} */
+    @Override public ClientClusterGroup clusterGroup() {
+        return cluster;
+    }
+
+    /** {@inheritDoc} */
+    @Override public <T, R> R execute(String taskName, @Nullable T arg) throws ClientException, InterruptedException {
+        return (R)executeAsync(taskName, arg).get();
+    }
+
+    /** {@inheritDoc} */
+    @Override public <T, R> ClientFuture<R> executeAsync(String taskName, @Nullable T arg) throws ClientException {
+        return executeAsync0(taskName, arg, cluster, (byte)0, 0L);
+    }
+
+    /** {@inheritDoc} */
+    @Override public ClientCompute withTimeout(long timeout) {
+        return timeout == 0L ? this : new ClientComputeModificator(this, cluster, (byte)0, timeout);
+    }
+
+    /** {@inheritDoc} */
+    @Override public ClientCompute withNoFailover() {
+        return new ClientComputeModificator(this, cluster, NO_FAILOVER_FLAG_MASK, 0L);
+    }
+
+    /** {@inheritDoc} */
+    @Override public ClientCompute withNoResultCache() {
+        return new ClientComputeModificator(this, cluster, NO_RESULT_CACHE_FLAG_MASK, 0L);
+    }
+
+    /**
+     * Gets compute facade over the specified cluster group.
+     *
+     * @param grp Cluster group.
+     */
+    public ClientCompute withClusterGroup(ClientClusterGroupImpl grp) {
+        return new ClientComputeModificator(this, grp, (byte)0, 0L);
+    }
+
+    /**
+     * @param taskName Task name.
+     * @param arg Argument.
+     */
+    private <T, R> ClientFuture<R> executeAsync0(
+        String taskName,
+        @Nullable T arg,
+        ClientClusterGroupImpl clusterGrp,
+        byte flags,
+        long timeout
+    ) throws ClientException {
+        Collection<UUID> nodeIds = clusterGrp == cluster ? null : clusterGrp.nodeIds();
+
+        if (nodeIds != null && nodeIds.isEmpty())
+            throw new ClientException("Cluster group is empty.");
+
+        while (true) {
+            Consumer<PayloadOutputChannel> payloadWriter = ch -> {
 
 Review comment:
   Please extract a method, this lambda is way too big

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [ignite] ptupitsyn commented on a change in pull request #7572: IGNITE-12835 Thin client: compute support

Posted by GitBox <gi...@apache.org>.
ptupitsyn commented on a change in pull request #7572: IGNITE-12835 Thin client: compute support
URL: https://github.com/apache/ignite/pull/7572#discussion_r400811977
 
 

 ##########
 File path: modules/platforms/dotnet/Apache.Ignite.Core.Tests/Client/ClientProtocolCompatibilityTest.cs
 ##########
 @@ -101,20 +101,34 @@ public void TestClientNewerThanServerReconnectsOnServerVersion()
         {
             // Use a non-existent version that is not supported by the server
             var version = new ClientProtocolVersion(short.MaxValue, short.MaxValue, short.MaxValue);
-            
-            using (var client = GetClient(version))
+
 
 Review comment:
   Please remove this entire test method. It is problematic because of "fake version". I wanted to remove it for a while, now it is time since it causes issues.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [ignite] ptupitsyn commented on a change in pull request #7572: IGNITE-12835 Thin client: compute support

Posted by GitBox <gi...@apache.org>.
ptupitsyn commented on a change in pull request #7572: IGNITE-12835 Thin client: compute support
URL: https://github.com/apache/ignite/pull/7572#discussion_r400785642
 
 

 ##########
 File path: modules/core/src/main/java/org/apache/ignite/internal/processors/platform/client/ClientFeature.java
 ##########
 @@ -0,0 +1,68 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.processors.platform.client;
+
+import java.util.BitSet;
+
+/**
+ * Defines supported by thin client features.
+ */
+public enum ClientFeature {
+    /** Compute tasks (execute by task name). */
+    EXECUTE_TASK_BY_NAME(0);
+
+    /**
+     * Unique feature identifier.
+     */
+    private final int featureId;
+
+    /**
+     * @param featureId Feature id.
+     */
+    ClientFeature(int featureId) {
+        this.featureId = featureId;
+    }
+
+    /**
+     * @return Feature ID.
+     */
+    public int getFeatureId() {
+        return featureId;
+    }
+
+    /**
+     * Marshall array of features.
+     *
+     * @param features Features.
+     * @return Byte array representing {@code features} array.
+     */
+    public static byte[] marshallFeatures(ClientFeature ... features) {
 
 Review comment:
   `marshall` -> `marshal`

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [ignite] ptupitsyn commented on a change in pull request #7572: IGNITE-12835 Thin client: compute support

Posted by GitBox <gi...@apache.org>.
ptupitsyn commented on a change in pull request #7572: IGNITE-12835 Thin client: compute support
URL: https://github.com/apache/ignite/pull/7572#discussion_r400770612
 
 

 ##########
 File path: modules/core/src/main/java/org/apache/ignite/internal/client/thin/ClientComputeImpl.java
 ##########
 @@ -0,0 +1,379 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.client.thin;
+
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.UUID;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.locks.ReadWriteLock;
+import java.util.concurrent.locks.ReentrantReadWriteLock;
+import java.util.function.Consumer;
+import java.util.function.Function;
+import org.apache.ignite.client.ClientClusterGroup;
+import org.apache.ignite.client.ClientCompute;
+import org.apache.ignite.client.ClientException;
+import org.apache.ignite.client.ClientFeatureNotSupportedByServerException;
+import org.apache.ignite.client.ClientFuture;
+import org.apache.ignite.internal.IgniteInternalFuture;
+import org.apache.ignite.internal.binary.BinaryRawWriterEx;
+import org.apache.ignite.internal.binary.BinaryWriterExImpl;
+import org.apache.ignite.internal.binary.streams.BinaryHeapInputStream;
+import org.apache.ignite.internal.processors.platform.client.ClientFeature;
+import org.apache.ignite.internal.util.future.GridFutureAdapter;
+import org.apache.ignite.internal.util.typedef.F;
+import org.apache.ignite.internal.util.typedef.T2;
+import org.apache.ignite.lang.IgniteUuid;
+import org.jetbrains.annotations.Nullable;
+
+import static org.apache.ignite.internal.client.thin.ClientOperation.COMPUTE_TASK_EXECUTE;
+import static org.apache.ignite.internal.client.thin.ClientOperation.RESOURCE_CLOSE;
+
+/**
+ * Implementation of {@link ClientCompute}.
+ */
+class ClientComputeImpl implements ClientCompute, NotificationListener {
+    /** No failover flag mask. */
+    private static final byte NO_FAILOVER_FLAG_MASK = 0x01;
+
+    /** No result cache flag mask. */
+    private static final byte NO_RESULT_CACHE_FLAG_MASK = 0x02;
+
+    /** Channel. */
+    private final ReliableChannel ch;
+
+    /** Binary marshaller. */
+    private final ClientBinaryMarshaller marsh;
+
+    /** Utils for serialization/deserialization. */
+    private final ClientUtils utils;
+
+    /** ClientCluster instance. */
+    private final ClientClusterImpl cluster;
+
+    /** Active tasks. */
+    private final Map<ClientChannel, Map<Long, ClientComputeTask<Object>>> activeTasks = new ConcurrentHashMap<>();
+
+    /** Guard lock for active tasks. */
+    private final ReadWriteLock guard = new ReentrantReadWriteLock();
+
+    /** Constructor. */
+    ClientComputeImpl(ReliableChannel ch, ClientBinaryMarshaller marsh, ClientClusterImpl cluster) {
+        this.ch = ch;
+        this.marsh = marsh;
+        this.cluster = cluster;
+
+        utils = new ClientUtils(marsh);
+
+        ch.addNotificationListener(this);
+
+        ch.addChannelCloseListener(clientCh -> {
+            guard.writeLock().lock();
+
+            try {
+                Map<Long, ClientComputeTask<Object>> chTasks = activeTasks.remove(clientCh);
+
+                if (!F.isEmpty(chTasks)) {
+                    for (ClientComputeTask<?> task : chTasks.values())
+                        task.fut.onDone(new ClientException("Channel to server is closed"));
+                }
+            }
+            finally {
+                guard.writeLock().unlock();
+            }
+        });
+    }
+
+    /** {@inheritDoc} */
+    @Override public ClientClusterGroup clusterGroup() {
+        return cluster;
+    }
+
+    /** {@inheritDoc} */
+    @Override public <T, R> R execute(String taskName, @Nullable T arg) throws ClientException, InterruptedException {
+        return (R)executeAsync(taskName, arg).get();
+    }
+
+    /** {@inheritDoc} */
+    @Override public <T, R> ClientFuture<R> executeAsync(String taskName, @Nullable T arg) throws ClientException {
+        return executeAsync0(taskName, arg, cluster, (byte)0, 0L);
+    }
+
+    /** {@inheritDoc} */
+    @Override public ClientCompute withTimeout(long timeout) {
+        return timeout == 0L ? this : new ClientComputeModificator(this, cluster, (byte)0, timeout);
+    }
+
+    /** {@inheritDoc} */
+    @Override public ClientCompute withNoFailover() {
+        return new ClientComputeModificator(this, cluster, NO_FAILOVER_FLAG_MASK, 0L);
+    }
+
+    /** {@inheritDoc} */
+    @Override public ClientCompute withNoResultCache() {
+        return new ClientComputeModificator(this, cluster, NO_RESULT_CACHE_FLAG_MASK, 0L);
+    }
+
+    /**
+     * Gets compute facade over the specified cluster group.
+     *
+     * @param grp Cluster group.
+     */
+    public ClientCompute withClusterGroup(ClientClusterGroupImpl grp) {
+        return new ClientComputeModificator(this, grp, (byte)0, 0L);
+    }
+
+    /**
+     * @param taskName Task name.
+     * @param arg Argument.
+     */
+    private <T, R> ClientFuture<R> executeAsync0(
+        String taskName,
 
 Review comment:
   `taskName` is never validated against null or empty string

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services