valepakh commented on code in PR #4953: URL: https://github.com/apache/ignite-3/pull/4953#discussion_r1895594545
########## modules/compute/src/integrationTest/java/org/apache/ignite/internal/compute/ItComputeBaseTest.java: ########## @@ -534,9 +514,7 @@ void executesColocatedWithMappedKeyAsync() { @Test void submitMapReduce() { - Ignite entryNode = node(0); - - IgniteCompute igniteCompute = entryNode.compute(); + IgniteCompute igniteCompute = compute(); List<DeploymentUnit> units = units(); @Nullable List<DeploymentUnit> arg = units(); TaskExecution<Integer> taskExecution = igniteCompute.submitMapReduce( Review Comment: ```suggestion TaskExecution<Integer> taskExecution = compute().submitMapReduce( ``` ########## modules/binary-tuple/src/main/java/org/apache/ignite/internal/binarytuple/inlineschema/TupleWithSchemaMarshalling.java: ########## @@ -100,15 +100,25 @@ public final class TupleWithSchemaMarshalling { /** * Unmarshal tuple (LITTLE_ENDIAN). * - * @param raw byte[] bytes that are marshaled by {@link #marshal(Tuple)}. + * @param raw bytes that are marshaled by {@link #marshal(Tuple)}. */ public static Tuple unmarshal(byte[] raw) { - if (raw.length < 8) { - throw new UnmarshallingException("byte[] length can not be less than 8"); + return unmarshal(ByteBuffer.wrap(raw)); + } + + /** + * Unmarshal tuple (LITTLE_ENDIAN). + * + * @param raw byte[] bytes that are marshaled by {@link #marshal(Tuple)}. Review Comment: I'd change the name of the parameter too and probably rephrase the description ```suggestion * @param raw bytes that are marshaled by {@link #marshal(Tuple)}. ``` ########## modules/compute/src/integrationTest/java/org/apache/ignite/internal/compute/ItComputeTestClient.java: ########## @@ -0,0 +1,88 @@ +/* + * 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.compute; + +import org.apache.ignite.client.IgniteClient; +import org.apache.ignite.compute.IgniteCompute; +import org.apache.ignite.internal.app.IgniteImpl; +import org.apache.ignite.internal.wrapper.Wrappers; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Disabled; + +/** + * Integration tests for Compute functionality using thin client API. + */ +@SuppressWarnings("NewClassNamingConvention") +public class ItComputeTestClient extends ItComputeTestEmbedded { + private IgniteClient client; + + @BeforeEach + void startClient() { + int port = Wrappers.unwrap(node(0), IgniteImpl.class).clientAddress().port(); Review Comment: ```suggestion int port = unwrapIgniteImpl(node(0)).clientAddress().port(); ``` ########## modules/compute/src/integrationTest/java/org/apache/ignite/internal/compute/ItComputeTestClient.java: ########## @@ -0,0 +1,88 @@ +/* + * 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.compute; + Review Comment: ```suggestion import static org.apache.ignite.internal.TestWrappers.unwrapIgniteImpl; ``` ########## modules/client-common/src/test/java/org/apache/ignite/internal/client/proto/ClientComputeJobPackerUnpackerTest.java: ########## @@ -235,6 +253,19 @@ void packInvalidPojoEmpty() { ); } + @MethodSource("tupleCollections") + @ParameterizedTest + void packUnpackTupleCollection(Collection<?> arg) { Review Comment: This looks like the same test as packUnpackNoMarshalling, the only difference is a resultClass which is irrelevant for this case? ########## modules/compute/src/integrationTest/java/org/apache/ignite/internal/compute/ItComputeTestClient.java: ########## @@ -0,0 +1,88 @@ +/* + * 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.compute; + +import org.apache.ignite.client.IgniteClient; +import org.apache.ignite.compute.IgniteCompute; +import org.apache.ignite.internal.app.IgniteImpl; +import org.apache.ignite.internal.wrapper.Wrappers; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Disabled; + +/** + * Integration tests for Compute functionality using thin client API. + */ +@SuppressWarnings("NewClassNamingConvention") +public class ItComputeTestClient extends ItComputeTestEmbedded { Review Comment: We also have org.apache.ignite.internal.runner.app.client.ItThinClientComputeTest, I think we should check whether some of tests could be removed from that test if there are duplicates here. ########## modules/compute/src/integrationTest/java/org/apache/ignite/internal/compute/ItComputeBaseTest.java: ########## @@ -534,9 +514,7 @@ void executesColocatedWithMappedKeyAsync() { @Test void submitMapReduce() { - Ignite entryNode = node(0); - - IgniteCompute igniteCompute = entryNode.compute(); + IgniteCompute igniteCompute = compute(); Review Comment: ```suggestion ``` ########## modules/compute/src/integrationTest/java/org/apache/ignite/internal/compute/ItComputeTestClient.java: ########## @@ -0,0 +1,88 @@ +/* + * 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.compute; + +import org.apache.ignite.client.IgniteClient; +import org.apache.ignite.compute.IgniteCompute; +import org.apache.ignite.internal.app.IgniteImpl; +import org.apache.ignite.internal.wrapper.Wrappers; Review Comment: ```suggestion ``` -- 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. To unsubscribe, e-mail: notifications-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org