[ignite] branch master updated: IGNITE-12884 Extended debug output of restoring partition states. Fixes #7657
This is an automated email from the ASF dual-hosted git repository. sk0x50 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 c165e64 IGNITE-12884 Extended debug output of restoring partition states. Fixes #7657 c165e64 is described below commit c165e6472ba5ab00594f0f7b6bbcb5051a5b6ede Author: Evgeny Stanilovskiy AuthorDate: Wed Apr 15 03:35:10 2020 +0300 IGNITE-12884 Extended debug output of restoring partition states. Fixes #7657 Signed-off-by: Slava Koptilin --- .../cache/persistence/GridCacheOffheapManager.java | 22 -- 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheOffheapManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheOffheapManager.java index 9898760..1e293e6 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheOffheapManager.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheOffheapManager.java @@ -509,20 +509,22 @@ public class GridCacheOffheapManager extends IgniteCacheOffheapManagerImpl imple for (int p = 0; p < grp.affinity().partitions(); p++) { Integer recoverState = partitionRecoveryStates.get(new GroupPartitionId(grp.groupId(), p)); +long startTime = U.currentTimeMillis(); + if (ctx.pageStore().exists(grp.groupId(), p)) { ctx.pageStore().ensure(grp.groupId(), p); if (ctx.pageStore().pages(grp.groupId(), p) <= 1) { if (log.isDebugEnabled()) log.debug("Skipping partition on recovery (pages less than 1) " + -"[grp=" + grp.cacheOrGroupName() + ", p=" + p + "]"); +"[grp=" + grp.cacheOrGroupName() + ", p=" + p + ']'); continue; } if (log.isDebugEnabled()) log.debug("Creating partition on recovery (exists in page store) " + -"[grp=" + grp.cacheOrGroupName() + ", p=" + p + "]"); +"[grp=" + grp.cacheOrGroupName() + ", p=" + p + ']'); processed++; @@ -553,7 +555,8 @@ public class GridCacheOffheapManager extends IgniteCacheOffheapManagerImpl imple if (log.isDebugEnabled()) log.debug("Restored partition state (from WAL) " + "[grp=" + grp.cacheOrGroupName() + ", p=" + p + ", state=" + part.state() + -", updCntr=" + part.initialUpdateCounter() + "]"); +", updCntr=" + part.initialUpdateCounter() + +", size=" + part.fullSize() + ']'); } else { int stateId = io.getPartitionState(pageAddr); @@ -563,7 +566,8 @@ public class GridCacheOffheapManager extends IgniteCacheOffheapManagerImpl imple if (log.isDebugEnabled()) log.debug("Restored partition state (from page memory) " + "[grp=" + grp.cacheOrGroupName() + ", p=" + p + ", state=" + part.state() + -", updCntr=" + part.initialUpdateCounter() + ", stateId=" + stateId + "]"); +", updCntr=" + part.initialUpdateCounter() + ", stateId=" + stateId + +", size=" + part.fullSize() + ']'); } } finally { @@ -588,13 +592,19 @@ public class GridCacheOffheapManager extends IgniteCacheOffheapManagerImpl imple if (log.isDebugEnabled()) log.debug("Restored partition state (from WAL) " + "[grp=" + grp.cacheOrGroupName() + ", p=" + p + ", state=" + part.state() + -", updCntr=" + part.initialUpdateCounter() + "]"); +", updCntr=" + part.initialUpdateCounter() + +", size=" + part.fullSize() + ']'); } else { if (log.isDebugEnabled()) log.debug("Skipping partition on recovery (no page store OR wal state) " + -"[grp=" + grp.cacheOrGroupName() + ", p=" + p + "]"); +"[grp=" + grp.cacheOrGroupName() + ", p=" + p + ']'); } + +if (log.isDebugEnabled()) +log.debug("Finished restoring partition state " + +
[ignite-website] branch master updated: Updated location and content of some paragraphs. Remove Hadoop downloads section.
This is an automated email from the ASF dual-hosted git repository. dmagda pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/ignite-website.git The following commit(s) were added to refs/heads/master by this push: new 5fdb70e Updated location and content of some paragraphs. Remove Hadoop downloads section. 5fdb70e is described below commit 5fdb70e38b23f93223ca4aad763c8f9d40b67735 Author: Denis Magda AuthorDate: Tue Apr 14 15:24:43 2020 -0700 Updated location and content of some paragraphs. Remove Hadoop downloads section. --- download.html | 166 ++ 1 file changed, 86 insertions(+), 80 deletions(-) diff --git a/download.html b/download.html index 6f855a3..e53b9ed 100644 --- a/download.html +++ b/download.html @@ -45,8 +45,9 @@ under the License. -https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css; rel="stylesheet" media="screen"> - +https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css; rel="stylesheet" + media="screen"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -957,8 +961,11 @@ under the License. 2015 - 2020 http://www.apache.org/;>The Apache Software Foundation. -Apache, Apache Ignite, the Apache feather and the Apache Ignite logo are either registered trademarks -or trademarks of The Apache Software Foundation. http://apache.org/foundation/policies/privacy.html; target="_blank">Privacy Policy +Apache, Apache Ignite, the Apache feather and the Apache Ignite logo are either registered +trademarks +or trademarks of The Apache Software Foundation. http://apache.org/foundation/policies/privacy.html; target="_blank">Privacy +Policy WebFontConfig = { - google: { families: [ 'Open+Sans:300,400,600,700&display=swap' ] } +google: {families: ['Open+Sans:300,400,600,700&display=swap']} }; -(function() { - var wf = document.createElement('script'); - wf.src = 'https://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js'; - wf.type = 'text/javascript'; - wf.async = 'true'; - var s = document.getElementsByTagName('script')[0]; - s.parentNode.insertBefore(wf, s); +(function () { +var wf = document.createElement('script'); +wf.src = 'https://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js'; +wf.type = 'text/javascript'; +wf.async = 'true'; +var s = document.getElementsByTagName('script')[0]; +s.parentNode.insertBefore(wf, s); })(); - https://code.jquery.com/jquery-3.4.1.slim.min.js" integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n" crossorigin="anonymous">
[ignite-website] 01/01: IGNITE-12775: Update download page according to Apache requirements
This is an automated email from the ASF dual-hosted git repository. mmuzaf pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/ignite-website.git commit 98dd4413dbaca148299ba4f143fe37581bccd085 Merge: b53b501 debf03e Author: Maxim Muzafarov AuthorDate: Wed Apr 15 00:45:59 2020 +0300 IGNITE-12775: Update download page according to Apache requirements .gitignore|2 + download.html | 1048 + 2 files changed, 81 insertions(+), 969 deletions(-)
[ignite-website] branch master updated (b53b501 -> 98dd441)
This is an automated email from the ASF dual-hosted git repository. mmuzaf pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/ignite-website.git. from b53b501 Updated the list of video tutorials. add 33232b8 IGNITE-12775: Update download page according to requirements add fe32ca8 IGNITE-12775: update docker and cloud image links add 8b28a1e IGNITE-12775: fix review comments add debf03e IGNITE-12775: add pgp, sha512 signatures new 98dd441 IGNITE-12775: Update download page according to Apache requirements The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: .gitignore|2 + download.html | 1048 + 2 files changed, 81 insertions(+), 969 deletions(-) create mode 100644 .gitignore
[ignite-website] branch ignite-12775 updated (8b28a1e -> debf03e)
This is an automated email from the ASF dual-hosted git repository. mmuzaf pushed a change to branch ignite-12775 in repository https://gitbox.apache.org/repos/asf/ignite-website.git. from 8b28a1e IGNITE-12775: fix review comments add debf03e IGNITE-12775: add pgp, sha512 signatures No new revisions were added by this update. Summary of changes: download.html | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-)
svn commit: r38955 - in /release/ignite/gce: ./ ignite-google-image.tar.gz.asc ignite-google-image.tar.gz.sha512
Author: nizhikov Date: Tue Apr 14 21:20:37 2020 New Revision: 38955 Log: Added ignite-google-image verification files signed by Maxim Muzafarov Added: release/ignite/gce/ release/ignite/gce/ignite-google-image.tar.gz.asc release/ignite/gce/ignite-google-image.tar.gz.sha512 Added: release/ignite/gce/ignite-google-image.tar.gz.asc == --- release/ignite/gce/ignite-google-image.tar.gz.asc (added) +++ release/ignite/gce/ignite-google-image.tar.gz.asc Tue Apr 14 21:20:37 2020 @@ -0,0 +1,16 @@ +-BEGIN PGP SIGNATURE- + +iQIzBAABCAAdFiEE8orCIWHrdL24Wh0RwAFzYyP9c0wFAl6UgaIACgkQwAFzYyP9 +c0yheQ//bfv/nuFBCkqIKyx/iEEZHYHv1hbvULqBmoqbPz8KfIXxYKtEVeiVzSYV +KvJk+7fHGExAuqAwbVILJPZQXClCVJ33IJdMbdhdzT5J5d3WjQKAS6JRgf62FFhf +pHTGf46LVrhPb/96MOT5PcXaWALJfXeL4eQAXd0b05NmP0y83WNpz4vnAbR0iHBk +t/DqR0y75EyqzMgh5iJMKvOD0MMJj5MaBo52eyZpE93SREgNF2sPZUz967WX7WSe +lkkAoHsGWkTaCtrznAQWml0+iLJLBHvFPQJsAJEeseTSkBLiG+o2PL0NTTg1Z9t0 +iuCHnhFh7hmU3EuDRu4Ck3rrlzmTcA++9bIjKqVhRo+b2VsqlWy1qA0YDXUErvO0 +QcI4tYHfbEYdDl9sGW/xSSzGa7qbK0OgCxYSjMdJjPfMJ2YZkt8vJcmac4+Okgp5 +HozlhpwovBm5QNfQBi1llBpP2LLd1JdwvobMy56FVrDrq2ukDCP+YGifDqgtMJdA +kGVuAm8SneAieBZFPEFMwGP125HXYKdqhdKPVkcWHuKJjFuw8iX3dYNuNCWLXd79 +TL8T96SjStbluhoTz94ecWlxhiPo7eBygOLLHom+/hCWxT5XuxBIDezVOptbwe8q +JlbFpoVjZp4Nd/wU668iqkpbRxwP1bT7gxejRa309fRJ0gf63Kg= +=cD/g +-END PGP SIGNATURE- Added: release/ignite/gce/ignite-google-image.tar.gz.sha512 == --- release/ignite/gce/ignite-google-image.tar.gz.sha512 (added) +++ release/ignite/gce/ignite-google-image.tar.gz.sha512 Tue Apr 14 21:20:37 2020 @@ -0,0 +1 @@ +714b56d866848a0f27370e35e8c314281e9933424a30b019dfc95a2b3cafc1c383ac953f9b7bae6d8f6625d33720daad2e0efe5f3c5ae4eb765ac0fbee25 ignite-google-image.tar.gz
[ignite] branch master updated: IGNITE-12893: Add support for SimplifyBooleanExpression checkstyle rule (#7670)
This is an automated email from the ASF dual-hosted git repository. mmuzaf 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 6c01d3e IGNITE-12893: Add support for SimplifyBooleanExpression checkstyle rule (#7670) 6c01d3e is described below commit 6c01d3e6895fdb4408938d17f19440a4fb94cc08 Author: Maxim Muzafarov AuthorDate: Tue Apr 14 19:25:44 2020 +0300 IGNITE-12893: Add support for SimplifyBooleanExpression checkstyle rule (#7670) --- checkstyle/checkstyle.xml| 3 +++ .../java/org/apache/ignite/gridify/hierarchy/Target.java | 4 ++-- .../org/test/gridify/ExternalNonSpringAopSelfTest.java | 2 +- .../rest/handlers/cache/GridCacheCommandHandler.java | 3 +-- .../redis/key/GridRedisExpireCommandHandler.java | 2 +- .../redis/server/GridRedisFlushCommandHandler.java | 2 +- .../ignite/internal/util/io/GridFilenameUtils.java | 4 ++-- .../ignite/internal/util/test/GridTestPrintStream.java | 2 +- .../ignite/spi/deployment/DeploymentResourceAdapter.java | 4 ++-- .../dht/GridCacheDhtEvictionsDisabledSelfTest.java | 2 +- .../internal/processors/database/BPlusTreeSelfTest.java | 2 +- .../apache/ignite/p2p/GridP2PRecursionTaskSelfTest.java | 2 +- ...ridSessionSetFutureAttributeWaitListenerSelfTest.java | 2 +- .../GridSessionSetJobAttributeWaitListenerSelfTest.java | 2 +- .../ignite/startup/servlet/GridServletLoaderTest.java| 4 ++-- .../org/apache/ignite/util/mbeans/GridMBeanSelfTest.java | 16 .../java/org/apache/ignite/logger/jcl/JclLoggerTest.java | 2 +- .../ignite/logger/log4j/GridLog4jLoggingFileTest.java| 2 +- .../spi/deployment/uri/GridUriDeploymentDiscovery.java | 4 ++-- .../spi/deployment/uri/GridUriDeploymentJarVerifier.java | 10 +- .../spi/deployment/uri/GridUriDeploymentUriParser.java | 2 +- 21 files changed, 39 insertions(+), 37 deletions(-) diff --git a/checkstyle/checkstyle.xml b/checkstyle/checkstyle.xml index dbfcfd0..e832028 100644 --- a/checkstyle/checkstyle.xml +++ b/checkstyle/checkstyle.xml @@ -33,6 +33,9 @@ + + + diff --git a/modules/aop/src/test/java/org/apache/ignite/gridify/hierarchy/Target.java b/modules/aop/src/test/java/org/apache/ignite/gridify/hierarchy/Target.java index 42e7872..2393fc2 100644 --- a/modules/aop/src/test/java/org/apache/ignite/gridify/hierarchy/Target.java +++ b/modules/aop/src/test/java/org/apache/ignite/gridify/hierarchy/Target.java @@ -27,7 +27,7 @@ public class Target extends SuperTarget { String res = super.methodA(); -assert "SuperTarget.methodA()".equals(res) == true : +assert "SuperTarget.methodA()".equals(res) : "Unexpected SuperTarget.methodA() apply result [res=" + res + ']'; return "Target.MethodA()"; @@ -37,7 +37,7 @@ public class Target extends SuperTarget { @Override protected String methodB() { String res = super.methodB(); -assert "SuperTarget.methodC()".equals(res) == true: +assert "SuperTarget.methodC()".equals(res) : "Unexpected SuperTarget.methodB() apply result [res=" + res + ']'; return res; diff --git a/modules/aop/src/test/java/org/test/gridify/ExternalNonSpringAopSelfTest.java b/modules/aop/src/test/java/org/test/gridify/ExternalNonSpringAopSelfTest.java index fee3bb6..65224fe 100644 --- a/modules/aop/src/test/java/org/test/gridify/ExternalNonSpringAopSelfTest.java +++ b/modules/aop/src/test/java/org/test/gridify/ExternalNonSpringAopSelfTest.java @@ -467,7 +467,7 @@ public class ExternalNonSpringAopSelfTest extends GridCommonAbstractTest { stopGrid(); } -if (isException == false) +if (!isException) fail("@Gridify method gridifyDefaultException(0) does not return any exception."); } diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/cache/GridCacheCommandHandler.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/cache/GridCacheCommandHandler.java index ede41d4..088593b 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/cache/GridCacheCommandHandler.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/cache/GridCacheCommandHandler.java @@ -35,7 +35,6 @@ import javax.cache.processor.EntryProcessor; import javax.cache.processor.EntryProcessorException; import javax.cache.processor.EntryProcessorResult; import javax.cache.processor.MutableEntry; - import org.apache.ignite.Ignite; import org.apache.ignite.IgniteCheckedException; import org.apache.ignite.IgniteException; @@ -588,7 +587,7 @@ public class GridCacheCommandHandler extends GridRestCommandHandlerAdapter {
[ignite] branch master updated: IGNITE-12821 Added check-sizes parameter to validate_indexes cmd
This is an automated email from the ASF dual-hosted git repository. sk0x50 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 54e3aa4 IGNITE-12821 Added check-sizes parameter to validate_indexes cmd 54e3aa4 is described below commit 54e3aa421927c3fb07339b1ca769f2f1e21cd4a0 Author: Kirill Tkalenko AuthorDate: Tue Apr 14 16:48:51 2020 +0300 IGNITE-12821 Added check-sizes parameter to validate_indexes cmd Signed-off-by: Slava Koptilin --- .../commandline/cache/CacheValidateIndexes.java| 137 -- .../cache/argument/ValidateIndexesCommandArg.java | 9 +- .../internal/dto/IgniteDataTransferObject.java | 3 + .../processors/query/GridQueryIndexing.java| 5 +- .../processors/query/GridQueryProcessor.java | 12 +- .../query/schema/SchemaIndexCacheVisitorImpl.java | 12 +- .../verify/ValidateIndexesCheckSizeIssue.java | 107 .../verify/ValidateIndexesCheckSizeResult.java | 101 .../verify/VisorValidateIndexesJobResult.java | 78 +-- .../visor/verify/VisorValidateIndexesTaskArg.java | 81 +-- .../main/resources/META-INF/classnames.properties | 2 + .../util/GridCommandHandlerAbstractTest.java | 19 +- ...mandHandlerClusterByClassTest_cache_help.output | 3 +- ...dlerClusterByClassWithSSLTest_cache_help.output | 3 +- .../processors/query/h2/IgniteH2Indexing.java | 4 +- .../visor/verify/ValidateIndexesClosure.java | 524 .../visor/verify/VisorValidateIndexesTask.java | 3 +- ...xingMultithreadedLoadContinuousRestartTest.java | 2 +- .../db/LongDestroyDurableBackgroundTaskTest.java | 2 +- .../processors/database/RebuildIndexTest.java | 2 +- .../RebuildIndexWithHistoricalRebalanceTest.java | 2 +- .../query/h2/GridIndexFullRebuildTest.java | 2 +- ...teCacheWithIndexingAndPersistenceTestSuite.java | 2 + .../GridCommandHandlerIndexingCheckSizeTest.java | 547 + ...idCommandHandlerIndexingClusterByClassTest.java | 128 + .../util/GridCommandHandlerIndexingUtils.java | 297 +-- 26 files changed, 1694 insertions(+), 393 deletions(-) diff --git a/modules/core/src/main/java/org/apache/ignite/internal/commandline/cache/CacheValidateIndexes.java b/modules/core/src/main/java/org/apache/ignite/internal/commandline/cache/CacheValidateIndexes.java index c98f28a..eef77c6 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/commandline/cache/CacheValidateIndexes.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/commandline/cache/CacheValidateIndexes.java @@ -20,6 +20,7 @@ package org.apache.ignite.internal.commandline.cache; import java.util.Collection; import java.util.Collections; import java.util.Map; +import java.util.Map.Entry; import java.util.Set; import java.util.UUID; import java.util.logging.Logger; @@ -34,6 +35,8 @@ import org.apache.ignite.internal.processors.cache.verify.PartitionKey; import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.internal.visor.verify.IndexIntegrityCheckIssue; import org.apache.ignite.internal.visor.verify.IndexValidationIssue; +import org.apache.ignite.internal.visor.verify.ValidateIndexesCheckSizeIssue; +import org.apache.ignite.internal.visor.verify.ValidateIndexesCheckSizeResult; import org.apache.ignite.internal.visor.verify.ValidateIndexesPartitionResult; import org.apache.ignite.internal.visor.verify.VisorValidateIndexesJobResult; import org.apache.ignite.internal.visor.verify.VisorValidateIndexesTaskArg; @@ -41,6 +44,7 @@ import org.apache.ignite.internal.visor.verify.VisorValidateIndexesTaskResult; import static org.apache.ignite.internal.commandline.CommandLogger.DOUBLE_INDENT; import static org.apache.ignite.internal.commandline.CommandLogger.INDENT; +import static org.apache.ignite.internal.commandline.CommandLogger.join; import static org.apache.ignite.internal.commandline.CommandLogger.optional; import static org.apache.ignite.internal.commandline.CommandLogger.or; import static org.apache.ignite.internal.commandline.TaskExecutor.executeTaskByNameOnNode; @@ -53,6 +57,7 @@ import static org.apache.ignite.internal.commandline.cache.argument.IdleVerifyCo import static org.apache.ignite.internal.commandline.cache.argument.ValidateIndexesCommandArg.CHECK_FIRST; import static org.apache.ignite.internal.commandline.cache.argument.ValidateIndexesCommandArg.CHECK_THROUGH; import static org.apache.ignite.internal.commandline.cache.argument.ValidateIndexesCommandArg.CHECK_CRC; +import static org.apache.ignite.internal.commandline.cache.argument.ValidateIndexesCommandArg.CHECK_SIZES; /** * Validate indexes command. @@ -74,9 +79,17 @@ public class CacheValidateIndexes implements Command caches; +private final Set caches; /** Node id. */ -
[ignite] branch ignite-12248 updated: IGNITE-12871: Calcite integration. Broadcast to hash conversion without exchange. This closes #7638
This is an automated email from the ASF dual-hosted git repository. gvvinblade pushed a commit to branch ignite-12248 in repository https://gitbox.apache.org/repos/asf/ignite.git The following commit(s) were added to refs/heads/ignite-12248 by this push: new c7bdc11 IGNITE-12871: Calcite integration. Broadcast to hash conversion without exchange. This closes #7638 c7bdc11 is described below commit c7bdc119c0d2e085708877013a952bd9ccd915ff Author: Igor Seliverstov AuthorDate: Tue Apr 14 15:51:01 2020 +0300 IGNITE-12871: Calcite integration. Broadcast to hash conversion without exchange. This closes #7638 --- .../query/calcite/exec/LogicalRelImplementor.java | 37 + .../query/calcite/exec/PhysicalRelImplementor.java | 31 +++ .../processors/query/calcite/prepare/Cloner.java | 8 ++ .../query/calcite/prepare/FragmentSplitter.java| 83 +-- .../processors/query/calcite/prepare/Splitter.java | 6 ++ .../query/calcite/rel/IgniteRelVisitor.java| 5 ++ .../query/calcite/rel/IgniteTrimExchange.java | 71 .../calcite/serialize/PhysicalRelVisitor.java | 5 ++ .../calcite/serialize/ReceiverPhysicalRel.java | 2 + .../calcite/serialize/RelToPhysicalConverter.java | 18 + .../calcite/serialize/TableModifyPhysicalRel.java | 2 + .../calcite/serialize/TrimExchangePhysicalRel.java | 94 ++ .../query/calcite/trait/DistributionTraitDef.java | 15 +++- .../query/calcite/trait/IgniteDistributions.java | 2 +- 14 files changed, 352 insertions(+), 27 deletions(-) diff --git a/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/LogicalRelImplementor.java b/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/LogicalRelImplementor.java index 68c55fc..c340d2e 100644 --- a/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/LogicalRelImplementor.java +++ b/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/LogicalRelImplementor.java @@ -21,11 +21,14 @@ import java.util.List; import java.util.function.Function; import java.util.function.Predicate; import java.util.function.Supplier; +import java.util.function.ToIntFunction; +import org.apache.calcite.rel.RelDistribution; import org.apache.calcite.rel.RelNode; import org.apache.calcite.rel.type.RelDataType; import org.apache.calcite.schema.ScannableTable; import org.apache.calcite.sql.SqlOperatorTable; import org.apache.calcite.sql.validate.SqlConformance; +import org.apache.calcite.util.ImmutableIntList; import org.apache.ignite.internal.processors.failure.FailureProcessor; import org.apache.ignite.internal.processors.query.calcite.exec.exp.ExpressionFactory; import org.apache.ignite.internal.processors.query.calcite.exec.exp.agg.AccumulatorWrapper; @@ -54,9 +57,11 @@ import org.apache.ignite.internal.processors.query.calcite.rel.IgniteRelVisitor; import org.apache.ignite.internal.processors.query.calcite.rel.IgniteSender; import org.apache.ignite.internal.processors.query.calcite.rel.IgniteTableModify; import org.apache.ignite.internal.processors.query.calcite.rel.IgniteTableScan; +import org.apache.ignite.internal.processors.query.calcite.rel.IgniteTrimExchange; import org.apache.ignite.internal.processors.query.calcite.rel.IgniteValues; import org.apache.ignite.internal.processors.query.calcite.schema.TableDescriptor; import org.apache.ignite.internal.processors.query.calcite.trait.Destination; +import org.apache.ignite.internal.processors.query.calcite.trait.DistributionFunction; import org.apache.ignite.internal.processors.query.calcite.trait.IgniteDistribution; import org.apache.ignite.internal.processors.query.calcite.type.IgniteTypeFactory; import org.apache.ignite.internal.processors.query.calcite.util.Commons; @@ -126,6 +131,20 @@ public class LogicalRelImplementor implements IgniteRelVisitor> { } /** {@inheritDoc} */ +@Override public Node visit(IgniteTrimExchange rel) { +RelTarget target = rel.target(); + +assert target != null && target.mapping() != null && !F.isEmpty(target.mapping().assignments()); + +Predicate predicate = partitionFilter(rel.distribution(), target.mapping().assignments().size()); + +FilterNode node = new FilterNode(ctx, predicate); +node.register(visit(rel.getInput())); + +return node; +} + +/** {@inheritDoc} */ @Override public Node visit(IgniteProject rel) { Function projection = expressionFactory.project(ctx, rel.getProjects(), rel.getInput().getRowType()); ProjectNode node = new ProjectNode(ctx, projection); @@ -243,6 +262,24 @@ public class LogicalRelImplementor implements IgniteRelVisitor> { } /** */ +private Predicate partitionFilter(IgniteDistribution distr, int partitions) { +assert distr.getType() ==