[ignite-extensions] annotated tag ignite-gce-ext-1.0.0 updated (e531a61 -> b67d9d4)
This is an automated email from the ASF dual-hosted git repository. mmuzaf pushed a change to annotated tag ignite-gce-ext-1.0.0 in repository https://gitbox.apache.org/repos/asf/ignite-extensions.git *** WARNING: tag ignite-gce-ext-1.0.0 was modified! *** from e531a61 (commit) to b67d9d4 (tag) tagging e531a6144c18477d1545b84581398ecc2cbe8451 (commit) by Maxim Muzafarov on Thu May 12 20:39:44 2022 +0300 - Log - ignite-gce-ext-1.0.0 --- No new revisions were added by this update. Summary of changes:
[ignite-extensions] annotated tag ignite-azure-ext-1.0.0 updated (0ee3a84 -> 97ea1e3)
This is an automated email from the ASF dual-hosted git repository. mmuzaf pushed a change to annotated tag ignite-azure-ext-1.0.0 in repository https://gitbox.apache.org/repos/asf/ignite-extensions.git *** WARNING: tag ignite-azure-ext-1.0.0 was modified! *** from 0ee3a84 (commit) to 97ea1e3 (tag) tagging 0ee3a841428a68ab666f569e1b1121f7c61f7d27 (commit) by Maxim Muzafarov on Thu May 12 20:39:01 2022 +0300 - Log - ignite-azure-ext-1.0.0 --- No new revisions were added by this update. Summary of changes:
[ignite-extensions] annotated tag ignite-aws-ext-1.0.0 updated (c4ceb1e -> 605ed45)
This is an automated email from the ASF dual-hosted git repository. mmuzaf pushed a change to annotated tag ignite-aws-ext-1.0.0 in repository https://gitbox.apache.org/repos/asf/ignite-extensions.git *** WARNING: tag ignite-aws-ext-1.0.0 was modified! *** from c4ceb1e (commit) to 605ed45 (tag) tagging c4ceb1e6b1586c03e1186bf4472ab35507e3e454 (commit) by Maxim Muzafarov on Thu May 12 20:36:37 2022 +0300 - Log - ignite-aws-ext-1.0.0 --- No new revisions were added by this update. Summary of changes:
svn commit: r54471 - /dev/ignite/ignite-extensions/ignite-gce-ext-1.0.0-rc1/ /release/ignite/ignite-extensions/ignite-gce-ext/ /release/ignite/ignite-extensions/ignite-gce-ext/1.0.0/
Author: mmuzaf Date: Thu May 12 17:10:54 2022 New Revision: 54471 Log: Release GCE 1.0.0: Binaries & Sources Added: release/ignite/ignite-extensions/ignite-gce-ext/ release/ignite/ignite-extensions/ignite-gce-ext/1.0.0/ - copied from r54470, dev/ignite/ignite-extensions/ignite-gce-ext-1.0.0-rc1/ Removed: dev/ignite/ignite-extensions/ignite-gce-ext-1.0.0-rc1/
svn commit: r54470 - /dev/ignite/ignite-extensions/ignite-azure-ext-1.0.0-rc1/ /release/ignite/ignite-extensions/ignite-azure-ext/ /release/ignite/ignite-extensions/ignite-azure-ext/1.0.0/
Author: mmuzaf Date: Thu May 12 17:10:09 2022 New Revision: 54470 Log: Release Azure 1.0.0: Binaries & Sources Added: release/ignite/ignite-extensions/ignite-azure-ext/ release/ignite/ignite-extensions/ignite-azure-ext/1.0.0/ - copied from r54469, dev/ignite/ignite-extensions/ignite-azure-ext-1.0.0-rc1/ Removed: dev/ignite/ignite-extensions/ignite-azure-ext-1.0.0-rc1/
svn commit: r54469 - /dev/ignite/ignite-extensions/ignite-aws-ext-1.0.0-rc1/ /release/ignite/ignite-extensions/ignite-aws-ext/ /release/ignite/ignite-extensions/ignite-aws-ext/1.0.0/
Author: mmuzaf Date: Thu May 12 17:08:41 2022 New Revision: 54469 Log: Release AWS 1.0.0: Binaries & Sources Added: release/ignite/ignite-extensions/ignite-aws-ext/ release/ignite/ignite-extensions/ignite-aws-ext/1.0.0/ - copied from r54468, dev/ignite/ignite-extensions/ignite-aws-ext-1.0.0-rc1/ Removed: dev/ignite/ignite-extensions/ignite-aws-ext-1.0.0-rc1/
[ignite-3] branch main updated: IGNITE-16921 Support schema changes concerning inheritance hierarchy (#802)
This is an automated email from the ASF dual-hosted git repository. sdanilov pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/ignite-3.git The following commit(s) were added to refs/heads/main by this push: new 154447cf6 IGNITE-16921 Support schema changes concerning inheritance hierarchy (#802) 154447cf6 is described below commit 154447cf6c202b22b11ed98c0191e2f069ebd7c4 Author: Roman Puchkovskiy AuthorDate: Thu May 12 18:03:57 2022 +0400 IGNITE-16921 Support schema changes concerning inheritance hierarchy (#802) --- .../network/serialization/BrokenFieldAccessor.java | 11 +- .../serialization/BrokenSerializationMethods.java | 57 + .../network/serialization/ClassDescriptor.java | 92 +++- .../serialization/ClassDescriptorMerger.java | 57 + ...ClassNameMapBackedClassIndexedDescriptors.java} | 10 +- .../network/serialization/FieldAccessor.java | 2 +- .../network/serialization/FieldDescriptor.java | 41 +++- .../network/serialization/MergedLayer.java | 99 + .../PerSessionSerializationService.java| 141 .../serialization/SerializationException.java | 4 +- .../marshal/DefaultUserObjectMarshaller.java | 13 +- .../marshal/SchemaMismatchEventSource.java | 11 + .../marshal/SchemaMismatchHandlers.java| 36 +-- .../marshal/StructuredObjectMarshaller.java| 54 +++-- .../serialization/ClassDescriptorMergerTest.java | 181 +++ ...sNameMapBackedClassIndexedDescriptorsTest.java} | 8 +- ...ltUserObjectMarshallerWithSchemaChangeTest.java | 242 - 17 files changed, 932 insertions(+), 127 deletions(-) diff --git a/modules/network/src/main/java/org/apache/ignite/internal/network/serialization/BrokenFieldAccessor.java b/modules/network/src/main/java/org/apache/ignite/internal/network/serialization/BrokenFieldAccessor.java index 1cf9c6575..41e766d35 100644 --- a/modules/network/src/main/java/org/apache/ignite/internal/network/serialization/BrokenFieldAccessor.java +++ b/modules/network/src/main/java/org/apache/ignite/internal/network/serialization/BrokenFieldAccessor.java @@ -22,11 +22,11 @@ package org.apache.ignite.internal.network.serialization; */ class BrokenFieldAccessor implements FieldAccessor { private final String fieldName; -private final Class declaringClass; +private final String declaringClassName; -BrokenFieldAccessor(String fieldName, Class declaringClass) { +BrokenFieldAccessor(String fieldName, String declaringClassName) { this.fieldName = fieldName; -this.declaringClass = declaringClass; +this.declaringClassName = declaringClassName; } /** {@inheritDoc} */ @@ -137,9 +137,8 @@ class BrokenFieldAccessor implements FieldAccessor { throw brokenException(); } -private RuntimeException brokenException() { -return new IllegalStateException("Field " + declaringClass.getName() + "#" + fieldName +private IllegalStateException brokenException() { +return new IllegalStateException("Field " + declaringClassName + "#" + fieldName + " is missing locally, no accesses to it should be performed, this is a bug"); } - } diff --git a/modules/network/src/main/java/org/apache/ignite/internal/network/serialization/BrokenSerializationMethods.java b/modules/network/src/main/java/org/apache/ignite/internal/network/serialization/BrokenSerializationMethods.java new file mode 100644 index 0..c1b64adce --- /dev/null +++ b/modules/network/src/main/java/org/apache/ignite/internal/network/serialization/BrokenSerializationMethods.java @@ -0,0 +1,57 @@ +/* + * 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.network.serialization; + +import java.io.ObjectInputStream; +import java.io.ObjectOutputStream; + +/** + * {@link SpecialSerializationMethods} implementation that always throws. + */ +class BrokenSerializationMethods implements SpecialSerializationMethods { +private final String missingClassName; + +BrokenSerializationMethods(String missingClassName) { +this.missingClassName = mi
[ignite] branch master updated: IGNITE-16857 Java thin: Add AtomicLong (#10019)
This is an automated email from the ASF dual-hosted git repository. ptupitsyn pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/ignite.git The following commit(s) were added to refs/heads/master by this push: new 1d1046c66bb IGNITE-16857 Java thin: Add AtomicLong (#10019) 1d1046c66bb is described below commit 1d1046c66bb2588a9c11c8067ed163d1a1938185 Author: Pavel Tupitsyn AuthorDate: Thu May 12 15:42:44 2022 +0300 IGNITE-16857 Java thin: Add AtomicLong (#10019) * Add `IgniteClient.atomicLong()` and `ClientAtomicLong` APIs. * Provides the same functionality as "thick" API, with the only exception of `AtomicConfiguration.affinityFunction`. --- .../ignite/client/ClientAtomicConfiguration.java | 145 + .../org/apache/ignite/client/ClientAtomicLong.java | 150 + .../apache/ignite/client/ClientOperationType.java | 40 +++- .../org/apache/ignite/client/IgniteClient.java | 23 ++ .../internal/client/thin/ClientAtomicLongImpl.java | 134 .../internal/client/thin/ClientOperation.java | 44 +++- .../internal/client/thin/TcpIgniteClient.java | 41 .../platform/client/ClientMessageParser.java | 50 + .../ClientAtomicLongCreateRequest.java | 83 +++ .../ClientAtomicLongExistsRequest.java | 45 .../ClientAtomicLongRemoveRequest.java | 48 + .../datastructures/ClientAtomicLongRequest.java| 76 +++ .../ClientAtomicLongValueAddAndGetRequest.java | 53 + .../ClientAtomicLongValueCompareAndSetRequest.java | 57 + .../ClientAtomicLongValueGetAndSetRequest.java | 53 + .../ClientAtomicLongValueGetRequest.java | 48 + .../internal/client/thin/AtomicLongTest.java | 238 + .../org/apache/ignite/client/ClientTestSuite.java | 2 + .../org/apache/ignite/IgniteClientSpringBean.java | 12 ++ 19 files changed, 1340 insertions(+), 2 deletions(-) diff --git a/modules/core/src/main/java/org/apache/ignite/client/ClientAtomicConfiguration.java b/modules/core/src/main/java/org/apache/ignite/client/ClientAtomicConfiguration.java new file mode 100644 index 000..248265fdd72 --- /dev/null +++ b/modules/core/src/main/java/org/apache/ignite/client/ClientAtomicConfiguration.java @@ -0,0 +1,145 @@ +/* + * 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.client; + +import org.apache.ignite.IgniteAtomicSequence; +import org.apache.ignite.cache.CacheMode; +import org.apache.ignite.internal.util.typedef.internal.S; +import static org.apache.ignite.cache.CacheMode.PARTITIONED; + +/** + * Configuration for atomic data structures. + */ +public class ClientAtomicConfiguration { +/** Default number of backups. */ +public static final int DFLT_BACKUPS = 1; + +/** Cache mode. */ +public static final CacheMode DFLT_CACHE_MODE = PARTITIONED; + +/** Default atomic sequence reservation size. */ +public static final int DFLT_ATOMIC_SEQUENCE_RESERVE_SIZE = 1000; + +/** Atomic sequence reservation size. */ +private int seqReserveSize = DFLT_ATOMIC_SEQUENCE_RESERVE_SIZE; + +/** Cache mode. */ +private CacheMode cacheMode = DFLT_CACHE_MODE; + +/** Number of backups. */ +private int backups = DFLT_BACKUPS; + +/** Group name. */ +private String grpName; + +/** + * Gets the number of backup nodes. + * + * @return Number of backup nodes. + */ +public int getBackups() { +return backups; +} + +/** + * Sets the number of backup nodes. + * + * @param backups Number of backup nodes. + * @return {@code this} for chaining. + */ +public ClientAtomicConfiguration setBackups(int backups) { +this.backups = backups; + +return this; +} + +/** + * Gets the cache mode. + * + * @return Cache mode. + */ +public CacheMode getCacheMode() { +return cacheMode; +} + +/** + * Sets the cache mode. + * + * @param cacheMode Cache mode. + * @return {@code this} for chaining. + */ +public ClientAtomicConfiguration setCacheMode(CacheMode cacheMode) { +
[ignite] branch master updated: IGNITE-16806 Fix SQL query property type validation failure in case of implicit convertible types - Fixes #9988.
This is an automated email from the ASF dual-hosted git repository. alexpl pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/ignite.git The following commit(s) were added to refs/heads/master by this push: new 8998f078f55 IGNITE-16806 Fix SQL query property type validation failure in case of implicit convertible types - Fixes #9988. 8998f078f55 is described below commit 8998f078f55fede320d62a5cd6df38f3f6285d1b Author: Mikhail Petrov AuthorDate: Thu May 12 15:21:01 2022 +0300 IGNITE-16806 Fix SQL query property type validation failure in case of implicit convertible types - Fixes #9988. Signed-off-by: Aleksey Plekhanov --- .../apache/ignite/internal/binary/BinaryUtils.java | 7 + .../processors/query/GridQueryIndexing.java| 13 ++ .../processors/query/QueryTypeDescriptorImpl.java | 86 - .../processors/query/DummyQueryIndexing.java | 5 + .../internal/processors/query/h2/H2Utils.java | 41 - .../processors/query/h2/IgniteH2Indexing.java | 17 ++ .../IgniteQueryConvertibleTypesValidationTest.java | 205 + .../h2/H2ColumnTypeConversionCheckSelfTest.java| 57 ++ .../IgniteBinaryCacheQueryTestSuite3.java | 5 + 9 files changed, 389 insertions(+), 47 deletions(-) diff --git a/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryUtils.java b/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryUtils.java index f3203a627e1..60a00441737 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryUtils.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryUtils.java @@ -2726,6 +2726,13 @@ public class BinaryUtils { return Object[].class == cls || BinaryArray.class == cls || BinaryEnumArray.class == cls; } +/** @return Type name of the specified object. If {@link BinaryObject} was specified its type will be returned. */ +public static String typeName(Object obj) { +return obj instanceof BinaryObject +? ((BinaryObject)obj).type().typeName() +: obj == null ? null : obj.getClass().getSimpleName(); +} + /** * Enum type. */ diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryIndexing.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryIndexing.java index 3629f254eb4..64f09934139 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryIndexing.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryIndexing.java @@ -462,4 +462,17 @@ public interface GridQueryIndexing { default Map secondaryIndexesInlineSize() { return Collections.emptyMap(); } + +/** + * Checks if object of the specified class can be stored in the specified table column by the query engine. + * + * @param schemaName Schema name. + * @param tblName Table name. + * @param colName Name of the column. + * @param cls Class to perform check on. + * @return Whether object of the specified class can be successfully stored and accessed from the SQL column by the + * query engine. + * @throws IgniteSQLException if table or column with specified name was not found. + */ +boolean isConvertibleToColumnType(String schemaName, String tblName, String colName, Class cls); } diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/QueryTypeDescriptorImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/QueryTypeDescriptorImpl.java index abe0fa475e2..bca1593bac2 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/QueryTypeDescriptorImpl.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/QueryTypeDescriptorImpl.java @@ -44,6 +44,7 @@ import org.apache.ignite.internal.util.typedef.internal.S; import org.apache.ignite.internal.util.typedef.internal.U; import org.jetbrains.annotations.Nullable; +import static org.apache.ignite.internal.binary.BinaryUtils.typeName; import static org.apache.ignite.internal.processors.cache.query.IgniteQueryErrorCode.KEY_SCALE_OUT_OF_RANGE; import static org.apache.ignite.internal.processors.cache.query.IgniteQueryErrorCode.NULL_KEY; import static org.apache.ignite.internal.processors.cache.query.IgniteQueryErrorCode.NULL_VALUE; @@ -636,27 +637,9 @@ public class QueryTypeDescriptorImpl implements GridQueryTypeDescriptor { isKey ? NULL_KEY : NULL_VALUE); } -if (validateTypes && propVal != null) { -if (!(propVal instanceof BinaryObject) || propVal instanceof BinaryArray) { -if (!U.box(prop.type()).isAssignableFrom(U.box(propVal.getClass( { -// Some reference type arrays end up bein
[ignite] branch master updated: IGNITE-16916 Graceful cancel of job workers instead of brutal interrupt - Fixes #10015.
This is an automated email from the ASF dual-hosted git repository. sergeychugunov pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/ignite.git The following commit(s) were added to refs/heads/master by this push: new 9cbaf6c371d IGNITE-16916 Graceful cancel of job workers instead of brutal interrupt - Fixes #10015. 9cbaf6c371d is described below commit 9cbaf6c371dd489b2243d1737b0bd325333af79d Author: Kirill Tkalenko AuthorDate: Thu May 12 14:26:22 2022 +0300 IGNITE-16916 Graceful cancel of job workers instead of brutal interrupt - Fixes #10015. Signed-off-by: Sergey Chugunov --- modules/control-utility/pom.xml| 14 + .../ignite/util/KillCommandsCommandShTest.java | 3 + .../managers/discovery/GridDiscoveryManager.java | 4 +- .../cache/GridCacheSharedTtlCleanupManager.java| 12 +- .../cache/binary/BinaryMetadataFileStore.java | 2 +- .../cache/persistence/checkpoint/Checkpointer.java | 8 +- .../persistence/wal/FileWriteAheadLogManager.java | 22 +- .../wal/filehandle/FileHandleManagerImpl.java | 6 +- .../DistributedConfigurationProcessor.java | 5 +- .../internal/processors/job/GridJobProcessor.java | 36 +- .../internal/processors/job/GridJobWorker.java | 80 +++- .../job/JobWorkerInterruptionTimeoutObject.java| 87 + .../persistence/DmsDataWriterWorker.java | 4 +- .../processors/timeout/GridTimeoutObject.java | 6 +- .../processors/timeout/GridTimeoutProcessor.java | 2 +- .../ignite/internal/util/StripedExecutor.java | 2 +- .../ignite/internal/util/nio/GridNioServer.java| 2 +- .../ignite/internal/util/worker/GridWorker.java| 54 ++- .../internal/GridCancelOnGridStopSelfTest.java | 5 +- .../internal/GridCancelUnusedJobSelfTest.java | 30 +- .../internal/GridCancelledJobsMetricsSelfTest.java | 32 +- .../GridFailoverCustomTopologySelfTest.java| 27 +- .../GridMultithreadedJobStealingSelfTest.java | 3 + .../internal/GridStopWithCancelSelfTest.java | 3 + .../GridTaskFutureImplStopGridSelfTest.java| 19 +- .../internal/metric/SystemViewComputeJobTest.java | 3 + .../processors/compute/ComputeJobStatusTest.java | 6 + .../compute/InterruptComputeJobTest.java | 416 + ...ridSessionCancelSiblingsFromFutureSelfTest.java | 60 +-- .../GridSessionCancelSiblingsFromJobSelfTest.java | 62 +-- .../GridSessionCancelSiblingsFromTaskSelfTest.java | 64 ++-- .../apache/ignite/testframework/GridTestUtils.java | 45 ++- .../testframework/junits/GridAbstractTest.java | 2 +- .../junits/common/GridCommonAbstractTest.java | 18 + .../junits/spi/GridSpiAbstractTest.java| 4 +- .../testsuites/IgniteComputeGridTestSuite.java | 4 +- .../apache/ignite/util/KillCommandsMXBeanTest.java | 3 + .../apache/ignite/util/KillCommandsSQLTest.java| 3 + 38 files changed, 949 insertions(+), 209 deletions(-) diff --git a/modules/control-utility/pom.xml b/modules/control-utility/pom.xml index 06163ce532a..033e2e7b178 100644 --- a/modules/control-utility/pom.xml +++ b/modules/control-utility/pom.xml @@ -130,6 +130,20 @@ + + +org.mockito +mockito-core +${mockito.version} +test + + + +org.hamcrest +hamcrest-library +1.3 +test + diff --git a/modules/control-utility/src/test/java/org/apache/ignite/util/KillCommandsCommandShTest.java b/modules/control-utility/src/test/java/org/apache/ignite/util/KillCommandsCommandShTest.java index 7c844ad9e49..017c2d2cf13 100644 --- a/modules/control-utility/src/test/java/org/apache/ignite/util/KillCommandsCommandShTest.java +++ b/modules/control-utility/src/test/java/org/apache/ignite/util/KillCommandsCommandShTest.java @@ -81,6 +81,9 @@ public class KillCommandsCommandShTest extends GridCommandHandlerClusterByClassA cache.put(i, i); awaitPartitionMapExchange(); + +// We change to reduce the waiting time for interrupting compute job. +computeJobWorkerInterruptTimeout(srvs.get(0)).propagate(100L); } /** {@inheritDoc} */ diff --git a/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java b/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java index 72f57af2628..f87beacf739 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java @@ -2898,7 +2898,7 @@ public class GridDiscoveryManager extends GridManagerAdapter { if (!isInterruptedException) U.error(log, "Exception in d
[ignite-3] branch main updated: IGNITE-16940 Make the project build on Java 18 (#803)
This is an automated email from the ASF dual-hosted git repository. sdanilov pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/ignite-3.git The following commit(s) were added to refs/heads/main by this push: new 62c80ec9f IGNITE-16940 Make the project build on Java 18 (#803) 62c80ec9f is described below commit 62c80ec9f609fc8956d9c5585560b9271d4166bd Author: Roman Puchkovskiy AuthorDate: Thu May 12 11:44:20 2022 +0400 IGNITE-16940 Make the project build on Java 18 (#803) --- examples/pom.xml| 1 + .../src/main/java/org/apache/ignite/cli/builtins/node/NodeManager.java | 1 + .../marshal/DefaultUserObjectMarshallerWithSchemaChangeTest.java| 2 +- .../DefaultUserObjectMarshallerWithSerializableOverrideStreamsTest.java | 2 +- parent/pom.xml | 1 + 5 files changed, 5 insertions(+), 2 deletions(-) diff --git a/examples/pom.xml b/examples/pom.xml index a0d5e4c0e..26b2f92a1 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -41,6 +41,7 @@ --add-opens java.base/java.lang.reflect=ALL-UNNAMED --add-opens java.base/java.io=ALL-UNNAMED --add-opens java.base/java.nio=ALL-UNNAMED +--add-opens java.base/java.math=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/jdk.internal.misc=ALL-UNNAMED -Dio.netty.tryReflectionSetAccessible=true diff --git a/modules/cli/src/main/java/org/apache/ignite/cli/builtins/node/NodeManager.java b/modules/cli/src/main/java/org/apache/ignite/cli/builtins/node/NodeManager.java index ff7347ef1..6e2887af7 100644 --- a/modules/cli/src/main/java/org/apache/ignite/cli/builtins/node/NodeManager.java +++ b/modules/cli/src/main/java/org/apache/ignite/cli/builtins/node/NodeManager.java @@ -119,6 +119,7 @@ public class NodeManager { addAddOpens(cmdArgs, "java.base/java.lang.reflect=ALL-UNNAMED"); addAddOpens(cmdArgs, "java.base/java.io=ALL-UNNAMED"); addAddOpens(cmdArgs, "java.base/java.nio=ALL-UNNAMED"); +addAddOpens(cmdArgs, "java.base/java.math=ALL-UNNAMED"); addAddOpens(cmdArgs, "java.base/java.util=ALL-UNNAMED"); addAddOpens(cmdArgs, "java.base/jdk.internal.misc=ALL-UNNAMED"); diff --git a/modules/network/src/test/java/org/apache/ignite/internal/network/serialization/marshal/DefaultUserObjectMarshallerWithSchemaChangeTest.java b/modules/network/src/test/java/org/apache/ignite/internal/network/serialization/marshal/DefaultUserObjectMarshallerWithSchemaChangeTest.java index e61dfaef7..5cdb58e91 100644 --- a/modules/network/src/test/java/org/apache/ignite/internal/network/serialization/marshal/DefaultUserObjectMarshallerWithSchemaChangeTest.java +++ b/modules/network/src/test/java/org/apache/ignite/internal/network/serialization/marshal/DefaultUserObjectMarshallerWithSchemaChangeTest.java @@ -609,7 +609,7 @@ public class DefaultUserObjectMarshallerWithSchemaChangeTest { * @return a value extracted from GetField * @throws IOException if something goes wrong */ -Object read(GetField getField) throws IOException; +Object read(GetField getField) throws IOException, ClassNotFoundException; } private static class ExtraFieldForGetField { diff --git a/modules/network/src/test/java/org/apache/ignite/internal/network/serialization/marshal/DefaultUserObjectMarshallerWithSerializableOverrideStreamsTest.java b/modules/network/src/test/java/org/apache/ignite/internal/network/serialization/marshal/DefaultUserObjectMarshallerWithSerializableOverrideStreamsTest.java index e300c47bd..5385254b3 100644 --- a/modules/network/src/test/java/org/apache/ignite/internal/network/serialization/marshal/DefaultUserObjectMarshallerWithSerializableOverrideStreamsTest.java +++ b/modules/network/src/test/java/org/apache/ignite/internal/network/serialization/marshal/DefaultUserObjectMarshallerWithSerializableOverrideStreamsTest.java @@ -763,7 +763,7 @@ class DefaultUserObjectMarshallerWithSerializableOverrideStreamsTest { } private interface FieldFiller { -void fillWith(ObjectInputStream.GetField getField, WithReadFields target) throws IOException; +void fillWith(ObjectInputStream.GetField getField, WithReadFields target) throws IOException, ClassNotFoundException; } private static class WithReadFields implements Serializable { diff --git a/parent/pom.xml b/parent/pom.xml index 83a932780..2b4e1157d 100644 --- a/parent/pom.xml +++ b/parent/pom.xml @@ -123,6 +123,7 @@ --add-opens java.base/java.lang.reflect=ALL-UNNAMED --add-opens java.base/java.io=ALL-UNNAMED --add-opens java.base/java.nio=ALL-UNNAMED +--add-opens java.base/java.math=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED
[ignite-3] branch main updated: IGNITE-16738 Add trait definitions to the EMPTY_CONTEXT and to the singleton empty CLUSTER (#805)
This is an automated email from the ASF dual-hosted git repository. tledkov pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/ignite-3.git The following commit(s) were added to refs/heads/main by this push: new e461879e8 IGNITE-16738 Add trait definitions to the EMPTY_CONTEXT and to the singleton empty CLUSTER (#805) e461879e8 is described below commit e461879e8bdc7c72d9a30c0729fc64f07733e341 Author: Taras Ledkov AuthorDate: Thu May 12 10:42:37 2022 +0300 IGNITE-16738 Add trait definitions to the EMPTY_CONTEXT and to the singleton empty CLUSTER (#805) --- .../ignite/internal/sql/engine/ItMixedQueriesTest.java | 1 - .../internal/sql/engine/util/BaseQueryContext.java | 18 ++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/modules/runner/src/integrationTest/java/org/apache/ignite/internal/sql/engine/ItMixedQueriesTest.java b/modules/runner/src/integrationTest/java/org/apache/ignite/internal/sql/engine/ItMixedQueriesTest.java index b337ee660..2794cd033 100644 --- a/modules/runner/src/integrationTest/java/org/apache/ignite/internal/sql/engine/ItMixedQueriesTest.java +++ b/modules/runner/src/integrationTest/java/org/apache/ignite/internal/sql/engine/ItMixedQueriesTest.java @@ -158,7 +158,6 @@ public class ItMixedQueriesTest extends AbstractBasicIntegrationTest { } @Test -@Disabled("https://issues.apache.org/jira/browse/IGNITE-16738";) public void testDistinctQueryWithInConditionWithSubquery() { var rows = sql("SELECT distinct(name) FROM emp1 o WHERE name IN (" + " SELECT name" diff --git a/modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/util/BaseQueryContext.java b/modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/util/BaseQueryContext.java index c738d9247..38b408562 100644 --- a/modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/util/BaseQueryContext.java +++ b/modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/util/BaseQueryContext.java @@ -31,10 +31,13 @@ import org.apache.calcite.config.CalciteConnectionConfigImpl; import org.apache.calcite.config.CalciteConnectionProperty; import org.apache.calcite.jdbc.CalciteSchema; import org.apache.calcite.plan.Contexts; +import org.apache.calcite.plan.ConventionTraitDef; import org.apache.calcite.plan.RelOptCluster; import org.apache.calcite.plan.RelOptSchema; +import org.apache.calcite.plan.RelTraitDef; import org.apache.calcite.plan.volcano.VolcanoPlanner; import org.apache.calcite.prepare.CalciteCatalogReader; +import org.apache.calcite.rel.RelCollationTraitDef; import org.apache.calcite.rel.RelNode; import org.apache.calcite.rel.metadata.Metadata; import org.apache.calcite.rel.metadata.MetadataDef; @@ -48,6 +51,9 @@ import org.apache.calcite.tools.FrameworkConfig; import org.apache.calcite.tools.Frameworks; import org.apache.ignite.internal.sql.engine.QueryCancel; import org.apache.ignite.internal.sql.engine.metadata.cost.IgniteCostFactory; +import org.apache.ignite.internal.sql.engine.trait.CorrelationTraitDef; +import org.apache.ignite.internal.sql.engine.trait.DistributionTraitDef; +import org.apache.ignite.internal.sql.engine.trait.RewindabilityTraitDef; import org.apache.ignite.internal.sql.engine.type.IgniteTypeFactory; import org.apache.ignite.internal.util.ArrayUtils; import org.apache.ignite.lang.IgniteLogger; @@ -94,6 +100,11 @@ public final class BaseQueryContext extends AbstractQueryContext { } }; +// Dummy planner must contain all trait definitions to create singleton cluster with all default traits. +for (RelTraitDef def : EMPTY_CONTEXT.config().getTraitDefs()) { +DUMMY_PLANNER.addRelTraitDef(def); +} + RelDataTypeSystem typeSys = CALCITE_CONNECTION_CONFIG.typeSystem(RelDataTypeSystem.class, FRAMEWORK_CONFIG.getTypeSystem()); TYPE_FACTORY = new IgniteTypeFactory(typeSys); @@ -249,6 +260,13 @@ public final class BaseQueryContext extends AbstractQueryContext { private static final FrameworkConfig EMPTY_CONFIG = Frameworks.newConfigBuilder(FRAMEWORK_CONFIG) .defaultSchema(createRootSchema(false)) +.traitDefs(new RelTraitDef[] { +ConventionTraitDef.INSTANCE, +RelCollationTraitDef.INSTANCE, +DistributionTraitDef.INSTANCE, +RewindabilityTraitDef.INSTANCE, +CorrelationTraitDef.INSTANCE, +}) .build(); private FrameworkConfig frameworkCfg = EMPTY_CONFIG;