[ignite] branch master updated: IGNITE-11691 Fix IgniteWalSerializerVersionTest - Fixes #6416.
This is an automated email from the ASF dual-hosted git repository. agoncharuk 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 82e6c27 IGNITE-11691 Fix IgniteWalSerializerVersionTest - Fixes #6416. 82e6c27 is described below commit 82e6c2763e37f3aed751406dff2905b5ac6cdab3 Author: Alexey Goncharuk AuthorDate: Fri Apr 5 19:35:21 2019 +0300 IGNITE-11691 Fix IgniteWalSerializerVersionTest - Fixes #6416. Signed-off-by: Alexey Goncharuk --- .../persistence/db/wal/IgniteWalSerializerVersionTest.java | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalSerializerVersionTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalSerializerVersionTest.java index d1a253e..bba9a8c 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalSerializerVersionTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalSerializerVersionTest.java @@ -33,7 +33,6 @@ import org.apache.ignite.internal.pagemem.wal.record.DataRecord; import org.apache.ignite.internal.pagemem.wal.record.TimeStampRecord; import org.apache.ignite.internal.pagemem.wal.record.TxRecord; import org.apache.ignite.internal.pagemem.wal.record.WALRecord; -import org.apache.ignite.internal.pagemem.wal.record.delta.PartitionMetaStateRecord; import org.apache.ignite.internal.processors.cache.persistence.wal.serializer.RecordSerializer; import org.apache.ignite.internal.processors.cache.persistence.wal.serializer.RecordV1Serializer; import org.apache.ignite.internal.processors.cache.persistence.wal.serializer.RecordV2Serializer; @@ -238,7 +237,7 @@ public class IgniteWalSerializerVersionTest extends GridCommonAbstractTest { IgniteEx ig0 = (IgniteEx)startGrid(); -ig0.active(true); +ig0.cluster().active(true); IgniteWriteAheadLogManager wal = ig0.context().cache().context().wal(); @@ -263,7 +262,7 @@ public class IgniteWalSerializerVersionTest extends GridCommonAbstractTest { Iterator itToCheck = checker.getTimeStamps().iterator(); -try (PartitionMetaStateRecordExcludeIterator it = new PartitionMetaStateRecordExcludeIterator(wal.replay(p))) { +try (TimestampRecordIterator it = new TimestampRecordIterator(wal.replay(p))) { while (it.hasNext()) { IgniteBiTuple tup0 = it.next(); @@ -306,14 +305,17 @@ public class IgniteWalSerializerVersionTest extends GridCommonAbstractTest { /** * */ -private static class PartitionMetaStateRecordExcludeIterator extends GridFilteredClosableIterator> { -private PartitionMetaStateRecordExcludeIterator(GridCloseableIterator> it) { +private static class TimestampRecordIterator extends GridFilteredClosableIterator> { +/** + * @param it Iterator. + */ +private TimestampRecordIterator(GridCloseableIterator> it) { super(it); } /** {@inheritDoc} */ @Override protected boolean accept(IgniteBiTuple tup) { -return !(tup.get2() instanceof PartitionMetaStateRecord); +return tup.get2() instanceof TimeStampRecord; } } }
[ignite-teamcity-bot] branch master updated: IGNITE-11688 : Default tracked branch name is now overridable in server config (aliased servers supported) (#116)
This is an automated email from the ASF dual-hosted git repository. dpavlov pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/ignite-teamcity-bot.git The following commit(s) were added to refs/heads/master by this push: new 0b3bbee IGNITE-11688 : Default tracked branch name is now overridable in server config (aliased servers supported) (#116) 0b3bbee is described below commit 0b3bbeea76ca0b08c8f3ceedf8530c4a5e0b5186 Author: Dmitriy Pavlov AuthorDate: Fri Apr 5 19:13:47 2019 +0300 IGNITE-11688 : Default tracked branch name is now overridable in server config (aliased servers supported) (#116) --- .../ci/github/pure/GitHubConnectionImpl.java | 7 ++- .../tcbot/chain/TrackedBranchChainsProcessor.java | 6 +-- .../ignite/ci/tcbot/conf/ITcServerConfig.java | 6 +++ .../ignite/ci/tcbot/conf/TcServerConfig.java | 13 + .../ignite/ci/tcbot/issue/IssueDetector.java | 4 +- .../tcbot/visa/TcBotTriggerAndSignOffService.java | 62 ++ .../ignite/ci/web/rest/parms/FullQueryParams.java | 1 - 7 files changed, 70 insertions(+), 29 deletions(-) diff --git a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/github/pure/GitHubConnectionImpl.java b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/github/pure/GitHubConnectionImpl.java index a7ff550..ddfce1c 100644 --- a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/github/pure/GitHubConnectionImpl.java +++ b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/github/pure/GitHubConnectionImpl.java @@ -141,7 +141,10 @@ class GitHubConnectionImpl implements IGitHubConnection { /** {@inheritDoc} */ @Override public String gitApiUrl() { -return gitApiUrl; +if (gitApiUrl == null) +return null; + +return gitApiUrl.endsWith("/") ? gitApiUrl : gitApiUrl + "/"; } /** {@inheritDoc} */ @@ -150,7 +153,7 @@ class GitHubConnectionImpl implements IGitHubConnection { @Nullable AtomicReference outLinkNext) { Preconditions.checkState(!isNullOrEmpty(gitApiUrl), "Git API URL is not configured for this server."); -String url = fullUrl != null ? fullUrl : gitApiUrl + "pulls?sort=updated&direction=desc"; +String url = fullUrl != null ? fullUrl : gitApiUrl() + "pulls?sort=updated&direction=desc"; HashMap rspHeaders = new HashMap<>(); if (outLinkNext != null) { diff --git a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/tcbot/chain/TrackedBranchChainsProcessor.java b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/tcbot/chain/TrackedBranchChainsProcessor.java index 5648057..a261730 100644 --- a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/tcbot/chain/TrackedBranchChainsProcessor.java +++ b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/tcbot/chain/TrackedBranchChainsProcessor.java @@ -27,6 +27,7 @@ import org.apache.ignite.ci.analysis.mode.ProcessLogsMode; import org.apache.ignite.ci.conf.BranchTracked; import org.apache.ignite.ci.di.AutoProfiling; import org.apache.ignite.ci.tcbot.conf.ITcBotConfig; +import org.apache.ignite.ci.tcbot.conf.TcServerConfig; import org.apache.ignite.ci.teamcity.ignited.ITeamcityIgnited; import org.apache.ignite.ci.teamcity.ignited.ITeamcityIgnitedProvider; import org.apache.ignite.ci.teamcity.ignited.SyncMode; @@ -35,7 +36,6 @@ import org.apache.ignite.ci.user.ICredentialsProv; import org.apache.ignite.ci.web.model.current.ChainAtServerCurrentStatus; import org.apache.ignite.ci.web.model.current.TestFailuresSummary; import org.apache.ignite.ci.web.model.long_running.FullLRTestsSummary; -import org.apache.ignite.ci.web.rest.parms.FullQueryParams; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -68,7 +68,7 @@ public class TrackedBranchChainsProcessor { final TestFailuresSummary res = new TestFailuresSummary(); final AtomicInteger runningUpdates = new AtomicInteger(); -final String branchNn = isNullOrEmpty(branch) ? FullQueryParams.DEFAULT_TRACKED_BRANCH_NAME : branch; +final String branchNn = isNullOrEmpty(branch) ? TcServerConfig.DEFAULT_TRACKED_BRANCH_NAME : branch; res.setTrackedBranch(branchNn); final BranchTracked tracked = tcBotConfig.getTrackedBranches().getBranchMandatory(branchNn); @@ -143,7 +143,7 @@ public class TrackedBranchChainsProcessor { ICredentialsProv creds) { FullLRTestsSummary summary = new FullLRTestsSummary(); -final String branchNn = isNullOrEmpty(branch) ? FullQueryParams.DEFAULT_TRACKED_BRANCH_NAME : branch; +final String branchNn = isNullOrEmpty(branch) ? TcServerConfig.DEFAULT_TRACKED_BRANCH_NAME : branch; final BranchTracked tracked = tcBotConfig.getTrackedBranches().getBranchMandatory(branchNn); tracked.chains.stream() diff --git a/ignite-tc-helper-web/src/main/java/org/apache/ig
[ignite] branch master updated: IGNITE-11614 Fix transaction hang when sessionEnd throws an exception - Fixes #6401.
This is an automated email from the ASF dual-hosted git repository. agoncharuk 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 6363aef IGNITE-11614 Fix transaction hang when sessionEnd throws an exception - Fixes #6401. 6363aef is described below commit 6363aef944cb77280c3513c77b940698ad30c5c1 Author: Alexey Goncharuk AuthorDate: Fri Apr 5 18:32:51 2019 +0300 IGNITE-11614 Fix transaction hang when sessionEnd throws an exception - Fixes #6401. Signed-off-by: Alexey Goncharuk --- .../cache/distributed/near/GridNearTxLocal.java| 3 +- .../cache/CacheStoreTxPutAllMultiNodeTest.java | 224 + .../ignite/testsuites/IgniteCacheTestSuite8.java | 2 + 3 files changed, 228 insertions(+), 1 deletion(-) diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxLocal.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxLocal.java index b55b60c..b3b43b9 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxLocal.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxLocal.java @@ -4423,7 +4423,8 @@ public class GridNearTxLocal extends GridDhtTxLocalAdapter implements GridTimeou if (trackTimeout) rmv = removeTimeoutHandler(); -if (state != COMMITTING && state != ROLLING_BACK && (!trackTimeout || rmv)) +if (state != COMMITTING && state != ROLLING_BACK && +(!trackTimeout || rmv || (prepFut != null && prepFut.isDone( rollbackNearTxLocalAsync(clearThreadMap, false).get(); synchronized (this) { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheStoreTxPutAllMultiNodeTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheStoreTxPutAllMultiNodeTest.java new file mode 100644 index 000..d2e7121 --- /dev/null +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheStoreTxPutAllMultiNodeTest.java @@ -0,0 +1,224 @@ +/* + * 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.cache; + +import java.io.Serializable; +import java.util.Arrays; +import java.util.Map; +import java.util.TreeMap; +import java.util.concurrent.ConcurrentHashMap; +import javax.cache.Cache; +import javax.cache.configuration.Factory; +import javax.cache.integration.CacheLoaderException; +import javax.cache.integration.CacheWriterException; +import org.apache.ignite.Ignite; +import org.apache.ignite.IgniteCache; +import org.apache.ignite.cache.CacheAtomicityMode; +import org.apache.ignite.cache.CacheWriteSynchronizationMode; +import org.apache.ignite.cache.store.CacheStore; +import org.apache.ignite.cache.store.CacheStoreAdapter; +import org.apache.ignite.cache.store.CacheStoreSession; +import org.apache.ignite.configuration.CacheConfiguration; +import org.apache.ignite.configuration.IgniteConfiguration; +import org.apache.ignite.internal.IgniteEx; +import org.apache.ignite.internal.processors.cache.transactions.IgniteInternalTx; +import org.apache.ignite.internal.processors.cache.transactions.IgniteTxManager; +import org.apache.ignite.internal.util.typedef.internal.U; +import org.apache.ignite.resources.CacheStoreSessionResource; +import org.apache.ignite.testframework.MvccFeatureChecker; +import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.apache.ignite.transactions.Transaction; +import org.apache.ignite.transactions.TransactionConcurrency; +import org.apache.ignite.transactions.TransactionIsolation; +import org.jetbrains.annotations.Nullable; +import org.junit.Test; + +/** + * + */ +public class CacheStoreTxPutAllMultiNodeTest extends GridCommonAbstractTest { +/** */ +private static final String CACHE_NAME = "cache"; + +/** */ +private Ignite client; + +/** */ +private IgniteCache cache;
[ignite] branch master updated: IGNITE-11588: Fixed C++ Query example, if run in cluster.
This is an automated email from the ASF dual-hosted git repository. isapego 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 b3c59b1 IGNITE-11588: Fixed C++ Query example, if run in cluster. b3c59b1 is described below commit b3c59b113cdd62f71755f0f67fd6145f774ce076 Author: Pavel Kuznetsov AuthorDate: Fri Apr 5 18:21:22 2019 +0300 IGNITE-11588: Fixed C++ Query example, if run in cluster. --- .../cpp/examples/include/ignite/examples/person.h | 53 + .../query-example/config/query-example.xml | 12 +++- .../examples/query-example/src/query_example.cpp | 68 +- .../project/vs/thin-client-put-get-example.vcxproj | 3 - .../vs/thin-client-put-get-example.vcxproj.filters | 8 --- 5 files changed, 103 insertions(+), 41 deletions(-) diff --git a/modules/platforms/cpp/examples/include/ignite/examples/person.h b/modules/platforms/cpp/examples/include/ignite/examples/person.h index 9a87ef2..0631b96 100644 --- a/modules/platforms/cpp/examples/include/ignite/examples/person.h +++ b/modules/platforms/cpp/examples/include/ignite/examples/person.h @@ -65,6 +65,35 @@ namespace ignite std::string resume; double salary; }; + +// Person key with affinity Organization info. If we want to to collocate Persons with the same value of orgId +// we need to put struct as a cache key that contains fields: 1) id of the record (person id or serial id number) +// 2) collocation column info (orgId). This is required because of constraint : affinity key must be part of the +// key. +struct PersonKey { +PersonKey(int64_t _id, int64_t _orgId) : id(_id), orgIdAff(_id) +{ +// No-op. +} + +PersonKey() : id(0), orgIdAff(0) +{ +// No-op. +} + +std::string ToString() const +{ +std::ostringstream oss; + +oss << "PersonKey [id=" << id +<< ", orgIdAff=" << orgIdAff +<< "]"; +return oss.str(); +} + +int64_t id; +int64_t orgIdAff; +}; } } @@ -101,6 +130,30 @@ namespace ignite } IGNITE_BINARY_TYPE_END + +IGNITE_BINARY_TYPE_START(ignite::examples::PersonKey) + +typedef ignite::examples::PersonKey PersonKey; + +IGNITE_BINARY_GET_TYPE_ID_AS_HASH(PersonKey) +IGNITE_BINARY_GET_TYPE_NAME_AS_IS(PersonKey) +IGNITE_BINARY_GET_FIELD_ID_AS_HASH +IGNITE_BINARY_IS_NULL_FALSE(PersonKey) +IGNITE_BINARY_GET_NULL_DEFAULT_CTOR(PersonKey) + +static void Write(BinaryWriter& writer, const ignite::examples::PersonKey& obj) +{ +writer.WriteInt64("id", obj.id); +writer.WriteInt64("orgIdAff", obj.orgIdAff); +} + +static void Read(BinaryReader& reader, ignite::examples::PersonKey& dst) +{ +dst.id = reader.ReadInt64("id"); +dst.orgIdAff = reader.ReadInt64("orgIdAff"); +} + +IGNITE_BINARY_TYPE_END } }; diff --git a/modules/platforms/cpp/examples/query-example/config/query-example.xml b/modules/platforms/cpp/examples/query-example/config/query-example.xml index a7b63c2..758da99 100644 --- a/modules/platforms/cpp/examples/query-example/config/query-example.xml +++ b/modules/platforms/cpp/examples/query-example/config/query-example.xml @@ -29,6 +29,16 @@ + + + + + + + + + + @@ -41,7 +51,7 @@ - + diff --git a/modules/platforms/cpp/examples/query-example/src/query_example.cpp b/modules/platforms/cpp/examples/query-example/src/query_example.cpp index bc4417a..bf8095f 100644 --- a/modules/platforms/cpp/examples/query-example/src/query_example.cpp +++ b/modules/platforms/cpp/examples/query-example/src/query_example.cpp @@ -48,9 +48,9 @@ const char* PERSON_TYPE = "Person"; */ void DoSqlQueryWithDistributedJoin() { -typedef std::vector< CacheEntry > ResVector; +typedef std::vector< CacheEntry > ResVector; -Cache cache = Ignition::Get().GetCache(PERSON_CACHE); +Cache cache = Ignition::Get().GetCache(PERSON_CACHE); // SQL clause query which joins on 2 types to select people for a specific organization. std::string joinSql( @@ -73,7 +73,7 @@ void DoSqlQueryWithDistributedJoin() std::cout << "F
[ignite] branch master updated: IGNITE-11386 Fixed test.
This is an automated email from the ASF dual-hosted git repository. akuznetsov 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 c2a5d45 IGNITE-11386 Fixed test. c2a5d45 is described below commit c2a5d4581abc60287456b2d43f8b0a995e15288c Author: Vasiliy Sisko AuthorDate: Fri Apr 5 22:23:46 2019 +0700 IGNITE-11386 Fixed test. --- .../console/configuration/WebConsoleConfigurationSelfTest.java | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/modules/web-console/src/test/java/org/apache/ignite/console/configuration/WebConsoleConfigurationSelfTest.java b/modules/web-console/src/test/java/org/apache/ignite/console/configuration/WebConsoleConfigurationSelfTest.java index 3365778..2aa45e3 100644 --- a/modules/web-console/src/test/java/org/apache/ignite/console/configuration/WebConsoleConfigurationSelfTest.java +++ b/modules/web-console/src/test/java/org/apache/ignite/console/configuration/WebConsoleConfigurationSelfTest.java @@ -207,6 +207,9 @@ public class WebConsoleConfigurationSelfTest { igniteCfgProps.add("sqlSchemas"); igniteCfgProps.add("igniteInstanceName"); igniteCfgProps.add("communicationFailureResolver"); +igniteCfgProps.add("failureHandler"); +igniteCfgProps.add("rebalanceThreadPoolSize"); +igniteCfgProps.add("localEventListeners"); Set igniteCfgPropsDep = new HashSet<>(); igniteCfgPropsDep.add("gridName"); @@ -222,6 +225,7 @@ public class WebConsoleConfigurationSelfTest { igniteCfgPropsExcl.add("clientMode"); igniteCfgPropsExcl.add("indexingSpi"); igniteCfgPropsExcl.add("nodeId"); +igniteCfgPropsExcl.add("platformConfiguration"); igniteCfgPropsExcl.add("segmentCheckFrequency"); igniteCfgPropsExcl.add("allSegmentationResolversPassRequired"); igniteCfgPropsExcl.add("segmentationPolicy"); @@ -380,7 +384,6 @@ public class WebConsoleConfigurationSelfTest { commProps.add("connectionsPerNode"); commProps.add("usePairedConnections"); commProps.add("filterReachableAddresses"); -commProps.add("soLinger"); metadata.put(TcpCommunicationSpi.class, new MetadataInfo(commProps, EMPTY_FIELDS, SPI_EXCLUDED_FIELDS)); @@ -412,6 +415,7 @@ public class WebConsoleConfigurationSelfTest { discoverySpiProps.add("clientReconnectDisabled"); discoverySpiProps.add("connectionRecoveryTimeout"); discoverySpiProps.add("reconnectDelay"); +discoverySpiProps.add("soLinger"); Set discoverySpiExclProps = new HashSet<>(); discoverySpiExclProps.addAll(SPI_EXCLUDED_FIELDS); @@ -695,6 +699,9 @@ public class WebConsoleConfigurationSelfTest { transactionCfgProps.add("pessimisticTxLogLinger"); transactionCfgProps.add("pessimisticTxLogSize"); transactionCfgProps.add("txManagerFactory"); +transactionCfgProps.add("deadlockTimeout"); +transactionCfgProps.add("useJtaSynchronization"); +transactionCfgProps.add("txTimeoutOnPartitionMapExchange"); Set transactionCfgPropsDep = new HashSet<>(); transactionCfgPropsDep.add("txSerializableEnabled");
[ignite] branch master updated: IGNITE-11386 Web console: Actualized cluster configuration.
This is an automated email from the ASF dual-hosted git repository. akuznetsov 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 b1729a2 IGNITE-11386 Web console: Actualized cluster configuration. b1729a2 is described below commit b1729a271f94b51a57d1c464cb70268a8fc2f8b2 Author: Vasiliy Sisko AuthorDate: Fri Apr 5 22:12:04 2019 +0700 IGNITE-11386 Web console: Actualized cluster configuration. --- modules/web-console/backend/app/schemas.js | 4 +++ .../components/cluster-edit-form/controller.ts | 13 .../cluster-edit-form/templates/events.pug | 38 ++ .../app/configuration/generator/generator/Beans.js | 5 ++- .../generator/generator/ConfigurationGenerator.js | 7 .../generator/generator/JavaTransformer.service.js | 27 +-- .../generator/SpringTransformer.service.js | 19 --- .../generator/defaults/Cluster.service.js | 9 + .../app/configuration/services/Clusters.ts | 11 +++ 9 files changed, 125 insertions(+), 8 deletions(-) diff --git a/modules/web-console/backend/app/schemas.js b/modules/web-console/backend/app/schemas.js index 65d4b93..a2fad1c 100644 --- a/modules/web-console/backend/app/schemas.js +++ b/modules/web-console/backend/app/schemas.js @@ -1237,6 +1237,10 @@ module.exports.factory = function(mongoose) { className: String } }, +localEventListeners: [{ +className: String, +eventTypes: [String] +}], mvccVacuumThreadCount: Number, mvccVacuumFrequency: Number, authenticationEnabled: Boolean, diff --git a/modules/web-console/frontend/app/configuration/components/page-configure-advanced/components/cluster-edit-form/controller.ts b/modules/web-console/frontend/app/configuration/components/page-configure-advanced/components/cluster-edit-form/controller.ts index 3a2c8bf..1de84ab 100644 --- a/modules/web-console/frontend/app/configuration/components/page-configure-advanced/components/cluster-edit-form/controller.ts +++ b/modules/web-console/frontend/app/configuration/components/page-configure-advanced/components/cluster-edit-form/controller.ts @@ -82,12 +82,25 @@ export default class ClusterEditFormController { this.eventStorage.push({value: null, label: 'Disabled'}); this.eventGroups = _.filter(this.IgniteEventGroups, ({value}) => value !== 'EVTS_SWAPSPACE'); + +_.forEach(this.eventGroups, (grp) => grp.events = _.filter(grp.events, (evt) => evt.indexOf('SWAP') < 0)); } else { this.eventGroups = this.IgniteEventGroups; this.marshallerVariant.splice(0, 0, {value: 'OptimizedMarshaller', label: 'OptimizedMarshaller'}); } + +this.eventTypes = []; + +_.forEach(this.eventGroups, (grp) => { +_.forEach(grp.events, (e) => { +const newVal = {value: e, label: e}; + +if (!_.find(this.eventTypes, newVal)) +this.eventTypes.push(newVal); +}); +}); }; rebuildDropdowns(); diff --git a/modules/web-console/frontend/app/configuration/components/page-configure-advanced/components/cluster-edit-form/templates/events.pug b/modules/web-console/frontend/app/configuration/components/page-configure-advanced/components/cluster-edit-form/templates/events.pug index e422462..12219fe 100644 --- a/modules/web-console/frontend/app/configuration/components/page-configure-advanced/components/cluster-edit-form/templates/events.pug +++ b/modules/web-console/frontend/app/configuration/components/page-configure-advanced/components/cluster-edit-form/templates/events.pug @@ -109,5 +109,43 @@ panel-collapsible(ng-form=form on-open=`ui.loadPanel('${form}')`) tip: 'Array of event types, which will be recorded by GridEventStorageManager#record(Event)\ Note, that either the include event types or the exclude event types can be established' }) +.pc-form-grid-col-60 +.ignite-form-field ++form-field__label({label: 'Local event listeners:', name: '"LocalEventListeners"'}) ++form-field__tooltip({title: `Local event listeners`}) + +-var items = model + '.localEventListeners' + list-editable.pc-list-editable-with-form-grid(ng-model=items name='LocalEventListeners') +list-editable-item-edit.pc-form-grid-row +- form = '$parent.form' +.pc-form-grid-col-40 ++form-field__java-class({ +label: '
[ignite] branch ignite-11525 deleted (was 7206ae6)
This is an automated email from the ASF dual-hosted git repository. ptupitsyn pushed a change to branch ignite-11525 in repository https://gitbox.apache.org/repos/asf/ignite.git. was 7206ae6 Fix LINQPad examples This change permanently discards the following revisions: discard 7206ae6 Fix LINQPad examples discard 0c0fd91 Fix .NET Core examples discard 7a57feb Fix .NET Core examples discard ace06d8 Fix .NET Core examples discard 5a9de48 Fix .NET Core examples discard 8e6e899 Fix .NET Core examples discard a3905e7 Fix .NET Core examples discard ba9ceef Fixing examples - sql discard 3b5e0dc Fixing examples - sql discard 4b231a1 Fixing examples - sql discard add1151 Fixing examples - binary discard 818aff8 Fixing examples - binary discard fe22875 Fixing examples - SQL discard 7487e61 Fixing examples - SQL discard fd6c35f Fixing examples - thin client discard 6ff3ff5 Fixing examples discard 61ef906 Fixing examples discard 1dc84bd Fixing examples discard ab3b08d Fixing examples discard fce0fc9 Merge remote-tracking branch 'origin/master' into ignite-11525 discard d3e7b15 Suppress compiler warnings - done discard 01a59bc Suppress compiler warnings discard 3187800 Suppress compiler warnings discard 354e8fe Mark APIs as Obsolete
[ignite] branch ignite-11525 updated: Fix LINQPad examples
This is an automated email from the ASF dual-hosted git repository. ptupitsyn pushed a commit to branch ignite-11525 in repository https://gitbox.apache.org/repos/asf/ignite.git The following commit(s) were added to refs/heads/ignite-11525 by this push: new 7206ae6 Fix LINQPad examples 7206ae6 is described below commit 7206ae6f30b93fc8b1788994e47293cf128205ff Author: Pavel Tupitsyn AuthorDate: Fri Apr 5 17:41:07 2019 +0300 Fix LINQPad examples --- .../dotnet/Apache.Ignite.Core/NuGet/LINQPad/BinaryModeExample.linq | 5 - .../dotnet/Apache.Ignite.Core/NuGet/LINQPad/QueryExample.linq | 7 ++- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/NuGet/LINQPad/BinaryModeExample.linq b/modules/platforms/dotnet/Apache.Ignite.Core/NuGet/LINQPad/BinaryModeExample.linq index f72c2e1..0fe0d20 100644 --- a/modules/platforms/dotnet/Apache.Ignite.Core/NuGet/LINQPad/BinaryModeExample.linq +++ b/modules/platforms/dotnet/Apache.Ignite.Core/NuGet/LINQPad/BinaryModeExample.linq @@ -83,11 +83,6 @@ using (var ignite = Ignition.Start()) cache[1] = person.ToBuilder().SetField("Name", name + " Jr.").Build(); cache[1].ToString().Dump("Modified person with id 1:"); - // Run SQL query. - cache.Query(new SqlQuery("Person", "age < 40")) - .Select(x => x.Value.ToString()) - .Dump("Persons with age less than 40:"); - // Run SQL fields query. cache.Query(new SqlFieldsQuery("select name from Person order by name")) .Dump("All person names:"); diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/NuGet/LINQPad/QueryExample.linq b/modules/platforms/dotnet/Apache.Ignite.Core/NuGet/LINQPad/QueryExample.linq index ae48596..76bfaa0 100644 --- a/modules/platforms/dotnet/Apache.Ignite.Core/NuGet/LINQPad/QueryExample.linq +++ b/modules/platforms/dotnet/Apache.Ignite.Core/NuGet/LINQPad/QueryExample.linq @@ -57,16 +57,13 @@ void Main() persons[5] = new Person { OrgId = 3, Name = "Christopher Adams" }; // SQL query -orgs.Query(new SqlQuery(typeof(Organization), "size < ?", 10)).Dump("Organizations with size less than 100K"); +orgs.Query(new SqlFieldsQuery("select * from Organization where size < ?", 10)).Dump("Organizations with size less than 100K"); // SQL query with join const string orgName = "Apache"; - persons.Query(new SqlQuery(typeof(Person), "from Person, \"orgs-sql\".Organization where Person.OrgId = \"orgs-sql\".Organization._key and \"orgs-sql\".Organization.Name = ?", orgName)) + persons.Query(new SqlFieldsQuery("select Person.name from Person, \"orgs-sql\".Organization where Person.OrgId = \"orgs-sql\".Organization._key and \"orgs-sql\".Organization.Name = ?", orgName)) .Dump("Persons working for " + orgName); - // Fields query - orgs.Query(new SqlFieldsQuery("select name, size from Organization")).Dump("Fields query"); - // Full text query persons.Query(new TextQuery(typeof(Person), "Chris*")).Dump("Persons starting with 'Chris'"); }
[ignite] 02/02: Fix .NET Core examples
This is an automated email from the ASF dual-hosted git repository. ptupitsyn pushed a commit to branch ignite-11525 in repository https://gitbox.apache.org/repos/asf/ignite.git commit 0c0fd91238fd9a142ec583637e782ed617f7c521 Author: Pavel Tupitsyn AuthorDate: Fri Apr 5 17:30:06 2019 +0300 Fix .NET Core examples --- .../platforms/dotnet/examples/dotnetcore/SqlExample.cs | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/modules/platforms/dotnet/examples/dotnetcore/SqlExample.cs b/modules/platforms/dotnet/examples/dotnetcore/SqlExample.cs index 44e0983..0e1454b 100644 --- a/modules/platforms/dotnet/examples/dotnetcore/SqlExample.cs +++ b/modules/platforms/dotnet/examples/dotnetcore/SqlExample.cs @@ -103,8 +103,8 @@ namespace Apache.Ignite.Examples Console.WriteLine(); Console.WriteLine($">>> Employees with salary > {minSalary}:"); -foreach (var entry in qry) -Console.WriteLine(">>>" + entry[0]); +foreach (var row in qry) +Console.WriteLine(">>>" + row[0]); } /// @@ -122,8 +122,8 @@ namespace Apache.Ignite.Examples Console.WriteLine(); Console.WriteLine($">>> Employees working for {orgName}:"); -foreach (var entry in qry) -Console.WriteLine(">>> " + entry[0]); +foreach (var row in qry) +Console.WriteLine(">>> " + row[0]); } /// @@ -134,8 +134,8 @@ namespace Apache.Ignite.Examples { const string orgName = "Apache"; -var qry = cache.Query(new SqlQuery("Employee", -"from Employee, \"dotnet_cache_query_organization\".Organization " + +var qry = cache.Query(new SqlFieldsQuery( +"select Employee.name from Employee, \"dotnet_cache_query_organization\".Organization " + "where Employee.organizationId = Organization._key and Organization.name = ?", orgName) { EnableDistributedJoins = true @@ -144,8 +144,8 @@ namespace Apache.Ignite.Examples Console.WriteLine(); Console.WriteLine(">>> Employees working for " + orgName + " (distributed joins):"); -foreach (var entry in qry) -Console.WriteLine(">>> " + entry.Value); +foreach (var row in qry) +Console.WriteLine(">>> " + row[0]); } ///
[ignite] branch ignite-11525 updated (ace06d8 -> 0c0fd91)
This is an automated email from the ASF dual-hosted git repository. ptupitsyn pushed a change to branch ignite-11525 in repository https://gitbox.apache.org/repos/asf/ignite.git. from ace06d8 Fix .NET Core examples new 7a57feb Fix .NET Core examples new 0c0fd91 Fix .NET Core examples The 2 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: .../dotnet/examples/dotnetcore/SqlExample.cs | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-)
[ignite] 01/02: Fix .NET Core examples
This is an automated email from the ASF dual-hosted git repository. ptupitsyn pushed a commit to branch ignite-11525 in repository https://gitbox.apache.org/repos/asf/ignite.git commit 7a57feb4ff0e5e33c8f602a22f80a00dc5a0e76a Author: Pavel Tupitsyn AuthorDate: Fri Apr 5 17:25:52 2019 +0300 Fix .NET Core examples --- modules/platforms/dotnet/examples/dotnetcore/SqlExample.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/platforms/dotnet/examples/dotnetcore/SqlExample.cs b/modules/platforms/dotnet/examples/dotnetcore/SqlExample.cs index b344243..44e0983 100644 --- a/modules/platforms/dotnet/examples/dotnetcore/SqlExample.cs +++ b/modules/platforms/dotnet/examples/dotnetcore/SqlExample.cs @@ -115,15 +115,15 @@ namespace Apache.Ignite.Examples { const string orgName = "Apache"; -var qry = cache.Query(new SqlQuery("Employee", -"from Employee, \"dotnet_cache_query_organization\".Organization " + +var qry = cache.Query(new SqlFieldsQuery( +"select Employee.name from Employee, \"dotnet_cache_query_organization\".Organization " + "where Employee.organizationId = Organization._key and Organization.name = ?", orgName)); Console.WriteLine(); Console.WriteLine($">>> Employees working for {orgName}:"); foreach (var entry in qry) -Console.WriteLine(">>> " + entry.Value); +Console.WriteLine(">>> " + entry[0]); } ///
[ignite] branch ignite-11525 updated: Fix .NET Core examples
This is an automated email from the ASF dual-hosted git repository. ptupitsyn pushed a commit to branch ignite-11525 in repository https://gitbox.apache.org/repos/asf/ignite.git The following commit(s) were added to refs/heads/ignite-11525 by this push: new ace06d8 Fix .NET Core examples ace06d8 is described below commit ace06d8c9b5b5931ca226d51bfcbd4bfb7026712 Author: Pavel Tupitsyn AuthorDate: Fri Apr 5 17:24:01 2019 +0300 Fix .NET Core examples --- modules/platforms/dotnet/examples/dotnetcore/SqlExample.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/platforms/dotnet/examples/dotnetcore/SqlExample.cs b/modules/platforms/dotnet/examples/dotnetcore/SqlExample.cs index 0dc50ef..b344243 100644 --- a/modules/platforms/dotnet/examples/dotnetcore/SqlExample.cs +++ b/modules/platforms/dotnet/examples/dotnetcore/SqlExample.cs @@ -101,7 +101,7 @@ namespace Apache.Ignite.Examples var qry = cache.Query(new SqlFieldsQuery("select name from Employee where salary > ?", minSalary)); Console.WriteLine(); -Console.WriteLine($">>> Employees with salary > {minSalary} (SQL):"); +Console.WriteLine($">>> Employees with salary > {minSalary}:"); foreach (var entry in qry) Console.WriteLine(">>>" + entry[0]);
[ignite] branch ignite-11525 updated: Fix .NET Core examples
This is an automated email from the ASF dual-hosted git repository. ptupitsyn pushed a commit to branch ignite-11525 in repository https://gitbox.apache.org/repos/asf/ignite.git The following commit(s) were added to refs/heads/ignite-11525 by this push: new 5a9de48 Fix .NET Core examples 5a9de48 is described below commit 5a9de4887effc4303644a0d68f3003f717c88135 Author: Pavel Tupitsyn AuthorDate: Fri Apr 5 17:21:36 2019 +0300 Fix .NET Core examples --- .../dotnet/examples/dotnetcore/SqlExample.cs | 40 +++--- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/modules/platforms/dotnet/examples/dotnetcore/SqlExample.cs b/modules/platforms/dotnet/examples/dotnetcore/SqlExample.cs index 190951b..0dc50ef 100644 --- a/modules/platforms/dotnet/examples/dotnetcore/SqlExample.cs +++ b/modules/platforms/dotnet/examples/dotnetcore/SqlExample.cs @@ -65,31 +65,46 @@ namespace Apache.Ignite.Examples // Run SQL query example. SqlQueryExample(employeeCache); +// Run SQL filter query example. +SqlFilterQueryExample(employeeCache); + // Run SQL query with join example. SqlJoinQueryExample(employeeCacheColocated); // Run SQL query with distributed join example. SqlDistributedJoinQueryExample(employeeCache); +} + +/// +/// Queries names and salaries for all employees. +/// +/// Cache. +private static void SqlQueryExample(ICache cache) +{ +var qry = cache.Query(new SqlFieldsQuery("select name, salary from Employee")); -// Run SQL fields query example. -SqlFieldsQueryExample(employeeCache); +Console.WriteLine(); +Console.WriteLine(">>> Employee names and their salaries:"); + +foreach (var row in qry) +Console.WriteLine($">>> [Name={row[0]}, salary={row[1]}{']'}"); } /// /// Queries employees that have specified salary. /// /// Cache. -private static void SqlQueryExample(ICache cache) +private static void SqlFilterQueryExample(ICache cache) { const int minSalary = 1; -var qry = cache.Query(new SqlQuery(typeof(Employee), "salary > ?", minSalary)); +var qry = cache.Query(new SqlFieldsQuery("select name from Employee where salary > ?", minSalary)); Console.WriteLine(); Console.WriteLine($">>> Employees with salary > {minSalary} (SQL):"); foreach (var entry in qry) -Console.WriteLine(">>>" + entry.Value); +Console.WriteLine(">>>" + entry[0]); } /// @@ -134,21 +149,6 @@ namespace Apache.Ignite.Examples } /// -/// Queries names and salaries for all employees. -/// -/// Cache. -private static void SqlFieldsQueryExample(ICache cache) -{ -var qry = cache.Query(new SqlFieldsQuery("select name, salary from Employee")); - -Console.WriteLine(); -Console.WriteLine(">>> Employee names and their salaries:"); - -foreach (IList row in qry) -Console.WriteLine($">>> [Name={row[0]}, salary={row[1]}{']'}"); -} - -/// /// Populate cache with data for this example. /// /// Cache.
[ignite] branch ignite-11525 updated: Fix .NET Core examples
This is an automated email from the ASF dual-hosted git repository. ptupitsyn pushed a commit to branch ignite-11525 in repository https://gitbox.apache.org/repos/asf/ignite.git The following commit(s) were added to refs/heads/ignite-11525 by this push: new 8e6e899 Fix .NET Core examples 8e6e899 is described below commit 8e6e89903e9f6b73288cea2696aafe8c58c2b99f Author: Pavel Tupitsyn AuthorDate: Fri Apr 5 17:18:25 2019 +0300 Fix .NET Core examples --- modules/platforms/dotnet/examples/dotnetcore/LinqExample.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/platforms/dotnet/examples/dotnetcore/LinqExample.cs b/modules/platforms/dotnet/examples/dotnetcore/LinqExample.cs index 1132eb8..4fc070b 100644 --- a/modules/platforms/dotnet/examples/dotnetcore/LinqExample.cs +++ b/modules/platforms/dotnet/examples/dotnetcore/LinqExample.cs @@ -49,10 +49,10 @@ namespace Apache.Ignite.Examples Console.WriteLine(">>> Cache LINQ example started."); var employeeCache = ignite.GetOrCreateCache( -new CacheConfiguration(EmployeeCacheName, typeof(Employee))); +new CacheConfiguration(EmployeeCacheName, new QueryEntity(typeof(Employee; var employeeCacheColocated = ignite.GetOrCreateCache( -new CacheConfiguration(EmployeeCacheNameColocated, typeof(Employee))); +new CacheConfiguration(EmployeeCacheNameColocated, new QueryEntity(typeof(Employee; var organizationCache = ignite.GetOrCreateCache( new CacheConfiguration(OrganizationCacheName, new QueryEntity(typeof(int), typeof(Organization;
[ignite] branch ignite-11525 updated: Fix .NET Core examples
This is an automated email from the ASF dual-hosted git repository. ptupitsyn pushed a commit to branch ignite-11525 in repository https://gitbox.apache.org/repos/asf/ignite.git The following commit(s) were added to refs/heads/ignite-11525 by this push: new a3905e7 Fix .NET Core examples a3905e7 is described below commit a3905e7b11adce2baac186f3099f7cba6e9479fb Author: Pavel Tupitsyn AuthorDate: Fri Apr 5 17:18:05 2019 +0300 Fix .NET Core examples --- modules/platforms/dotnet/examples/dotnetcore/SqlExample.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/platforms/dotnet/examples/dotnetcore/SqlExample.cs b/modules/platforms/dotnet/examples/dotnetcore/SqlExample.cs index 1fe6a74..190951b 100644 --- a/modules/platforms/dotnet/examples/dotnetcore/SqlExample.cs +++ b/modules/platforms/dotnet/examples/dotnetcore/SqlExample.cs @@ -49,10 +49,10 @@ namespace Apache.Ignite.Examples Console.WriteLine(">>> Cache query example started."); var employeeCache = ignite.GetOrCreateCache( -new CacheConfiguration(EmployeeCacheName, typeof(Employee))); +new CacheConfiguration(EmployeeCacheName, new QueryEntity(typeof(Employee; var employeeCacheColocated = ignite.GetOrCreateCache( -new CacheConfiguration(EmployeeCacheNameColocated, typeof(Employee))); +new CacheConfiguration(EmployeeCacheNameColocated, new QueryEntity(typeof(Employee; var organizationCache = ignite.GetOrCreateCache( new CacheConfiguration(OrganizationCacheName, new QueryEntity(typeof(int), typeof(Organization;
[ignite] branch master updated: IGNITE-11385 Web console: Actualized cluster configuration.
This is an automated email from the ASF dual-hosted git repository. akuznetsov 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 5642ce6 IGNITE-11385 Web console: Actualized cluster configuration. 5642ce6 is described below commit 5642ce6363b18f8468881c52b221d7f3db4a0536 Author: Vasiliy Sisko AuthorDate: Fri Apr 5 21:15:13 2019 +0700 IGNITE-11385 Web console: Actualized cluster configuration. --- modules/web-console/backend/app/schemas.js | 12 + .../components/cluster-edit-form/controller.ts | 32 --- .../cluster-edit-form/templates/failover.pug | 62 ++ .../app/configuration/generator/generator/Beans.js | 4 ++ .../generator/generator/ConfigurationGenerator.js | 59 .../generator/generator/JavaTransformer.service.js | 7 ++- .../generator/defaults/Cluster.service.js | 3 ++ 7 files changed, 172 insertions(+), 7 deletions(-) diff --git a/modules/web-console/backend/app/schemas.js b/modules/web-console/backend/app/schemas.js index dafdc60..65d4b93 100644 --- a/modules/web-console/backend/app/schemas.js +++ b/modules/web-console/backend/app/schemas.js @@ -1225,6 +1225,18 @@ module.exports.factory = function(mongoose) { className: String } }, +failureHandler: { +kind: {type: String, enum: ['RestartProcess', 'StopNodeOnHalt', 'StopNode', 'Noop', 'Custom']}, +ignoredFailureTypes: [{type: String, enum: ['SEGMENTATION', 'SYSTEM_WORKER_TERMINATION', +'SYSTEM_WORKER_BLOCKED', 'CRITICAL_ERROR', 'SYSTEM_CRITICAL_OPERATION_TIMEOUT']}], +StopNodeOnHalt: { +tryStop: Boolean, +timeout: Number +}, +Custom: { +className: String +} +}, mvccVacuumThreadCount: Number, mvccVacuumFrequency: Number, authenticationEnabled: Boolean, diff --git a/modules/web-console/frontend/app/configuration/components/page-configure-advanced/components/cluster-edit-form/controller.ts b/modules/web-console/frontend/app/configuration/components/page-configure-advanced/components/cluster-edit-form/controller.ts index f1afd3c..3a2c8bf 100644 --- a/modules/web-console/frontend/app/configuration/components/page-configure-advanced/components/cluster-edit-form/controller.ts +++ b/modules/web-console/frontend/app/configuration/components/page-configure-advanced/components/cluster-edit-form/controller.ts @@ -47,10 +47,6 @@ export default class ClusterEditFormController { private IgniteFormUtils: ReturnType ) {} -$onDestroy() { -this.subscription.unsubscribe(); -} - $onInit() { this.available = this.IgniteVersion.available.bind(this.IgniteVersion); @@ -65,6 +61,23 @@ export default class ClusterEditFormController { {value: null, label: 'Default'} ]; +this.failureHandlerVariant = [ +{value: 'RestartProcess', label: 'Restart process'}, +{value: 'StopNodeOnHalt', label: 'Try stop with timeout'}, +{value: 'StopNode', label: 'Stop on critical error'}, +{value: 'Noop', label: 'Disabled'}, +{value: 'Custom', label: 'Custom'}, +{value: null, label: 'Default'} +]; + +this.ignoredFailureTypes = [ +{value: 'SEGMENTATION', label: 'SEGMENTATION'}, +{value: 'SYSTEM_WORKER_TERMINATION', label: 'SYSTEM_WORKER_TERMINATION'}, +{value: 'SYSTEM_WORKER_BLOCKED', label: 'SYSTEM_WORKER_BLOCKED'}, +{value: 'CRITICAL_ERROR', label: 'CRITICAL_ERROR'}, +{value: 'SYSTEM_CRITICAL_OPERATION_TIMEOUT', label: 'SYSTEM_CRITICAL_OPERATION_TIMEOUT'} +]; + if (this.available('2.0.0')) { this.eventStorage.push({value: null, label: 'Disabled'}); @@ -111,6 +124,10 @@ export default class ClusterEditFormController { ]; } +$onDestroy() { +this.subscription.unsubscribe(); +} + $onChanges(changes) { if ('cluster' in changes && this.shouldOverwriteValue(this.cluster, this.clonedCluster)) { this.clonedCluster = cloneDeep(changes.cluster.currentValue); @@ -146,12 +163,15 @@ export default class ClusterEditFormController { save(download) { if (this.$scope.ui.inputForm.$invalid) return this.IgniteFormUtils.triggerValidation(this.$scope.ui.inputForm, this.$scope); + this.onSave({$event: {cluster: cloneDeep(this.clonedCluster), download}}); } reset = () => this.clonedCluster = cloneDeep(this.cluster); + confirmAndReset() { -return this.IgniteConfirm.confirm('Are you sure you want to undo all changes for curren
[ignite] branch ignite-11525 updated: Fixing examples - sql
This is an automated email from the ASF dual-hosted git repository. ptupitsyn pushed a commit to branch ignite-11525 in repository https://gitbox.apache.org/repos/asf/ignite.git The following commit(s) were added to refs/heads/ignite-11525 by this push: new ba9ceef Fixing examples - sql ba9ceef is described below commit ba9ceefaa2dd46ab47cae84c13610260f86a85c7 Author: Pavel Tupitsyn AuthorDate: Fri Apr 5 17:09:00 2019 +0300 Fixing examples - sql --- .../dotnet/examples/Apache.Ignite.Examples/Sql/SqlExample.cs| 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Sql/SqlExample.cs b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Sql/SqlExample.cs index 680c469..20de310 100644 --- a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Sql/SqlExample.cs +++ b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Sql/SqlExample.cs @@ -115,7 +115,7 @@ namespace Apache.Ignite.Examples.Sql const string orgName = "Apache"; var qry = cache.Query(new SqlFieldsQuery( -"select name from from Employee, \"dotnet_cache_query_organization\".Organization " + +"select Employee.name from Employee, \"dotnet_cache_query_organization\".Organization " + "where Employee.organizationId = Organization._key and Organization.name = ?", orgName)); Console.WriteLine(); @@ -134,7 +134,7 @@ namespace Apache.Ignite.Examples.Sql const string orgName = "Apache"; var qry = cache.Query(new SqlFieldsQuery( -"select name from from Employee, \"dotnet_cache_query_organization\".Organization " + +"select Employee.name from Employee, \"dotnet_cache_query_organization\".Organization " + "where Employee.organizationId = Organization._key and Organization.name = ?", orgName) { EnableDistributedJoins = true, @@ -142,7 +142,7 @@ namespace Apache.Ignite.Examples.Sql }); Console.WriteLine(); -Console.WriteLine(">>> Employees working for " + orgName + ":"); +Console.WriteLine(">>> Employees working for " + orgName + " (distributed joins enabled):"); foreach (var entry in qry) Console.WriteLine(">>> " + entry[0]);
[ignite] branch master updated: IGNITE-11387 Web console: Actualized cluster configuration.
This is an automated email from the ASF dual-hosted git repository. akuznetsov 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 cf6ce6c IGNITE-11387 Web console: Actualized cluster configuration. cf6ce6c is described below commit cf6ce6cfd97619e74b3e89cab3fb157d43db8c07 Author: Vasiliy Sisko AuthorDate: Fri Apr 5 21:04:08 2019 +0700 IGNITE-11387 Web console: Actualized cluster configuration. --- modules/web-console/backend/app/schemas.js | 11 +++ .../components/cluster-edit-form/template.tpl.pug | 4 ++ .../cluster-edit-form/templates/encryption.pug | 81 ++ .../cluster-edit-form/templates/mvcc.pug | 4 +- .../generator/generator/AbstractTransformer.js | 5 ++ .../generator/generator/ConfigurationGenerator.js | 41 +++ .../generator/defaults/Cluster.service.js | 6 ++ .../WebConsoleConfigurationSelfTest.java | 8 +++ 8 files changed, 158 insertions(+), 2 deletions(-) diff --git a/modules/web-console/backend/app/schemas.js b/modules/web-console/backend/app/schemas.js index 3e62a3d..dafdc60 100644 --- a/modules/web-console/backend/app/schemas.js +++ b/modules/web-console/backend/app/schemas.js @@ -1214,6 +1214,17 @@ module.exports.factory = function(mongoose) { subIntervals: Number, walAutoArchiveAfterInactivity: Number }, +encryptionSpi: { +kind: {type: String, enum: ['Noop', 'Keystore', 'Custom']}, +Keystore: { +keySize: Number, +masterKeyName: String, +keyStorePath: String +}, +Custom: { +className: String +} +}, mvccVacuumThreadCount: Number, mvccVacuumFrequency: Number, authenticationEnabled: Boolean, diff --git a/modules/web-console/frontend/app/configuration/components/page-configure-advanced/components/cluster-edit-form/template.tpl.pug b/modules/web-console/frontend/app/configuration/components/page-configure-advanced/components/cluster-edit-form/template.tpl.pug index e30cfdb..008fd97 100644 --- a/modules/web-console/frontend/app/configuration/components/page-configure-advanced/components/cluster-edit-form/template.tpl.pug +++ b/modules/web-console/frontend/app/configuration/components/page-configure-advanced/components/cluster-edit-form/template.tpl.pug @@ -37,6 +37,10 @@ form(id='cluster' name='ui.inputForm' novalidate) include ./templates/data-storage include ./templates/discovery + +//- Since ignite 2.7 +include ./templates/encryption + include ./templates/events include ./templates/failover include ./templates/hadoop diff --git a/modules/web-console/frontend/app/configuration/components/page-configure-advanced/components/cluster-edit-form/templates/encryption.pug b/modules/web-console/frontend/app/configuration/components/page-configure-advanced/components/cluster-edit-form/templates/encryption.pug new file mode 100644 index 000..102453c --- /dev/null +++ b/modules/web-console/frontend/app/configuration/components/page-configure-advanced/components/cluster-edit-form/templates/encryption.pug @@ -0,0 +1,81 @@ +//- +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. + +include /app/helpers/jade/mixins +include /app/configuration/mixins + +-var form = 'encryption' +-var model = '$ctrl.clonedCluster.encryptionSpi' + +panel-collapsible(ng-show='$ctrl.available("2.7.0")' ng-form=form on-open=`ui.loadPanel('${form}')`) +panel-title Encryption +panel-description Encryption features for an Ignite +panel-content.pca-form-row(ng-if=`ui.isPanelLoaded('${form}')`) +.pca-form-column-6.pc-form-grid-row +.pc-form-grid-col-60 ++form-field__dropdown({ +label: 'Encryption SPI:', +model: `${model}.kind`, +name: '"encryptionSpi"', +placeholder: 'Disabled', +options: '[\ +{value: null, label: "Disabled"}
[ignite] 01/02: Fixing examples - sql
This is an automated email from the ASF dual-hosted git repository. ptupitsyn pushed a commit to branch ignite-11525 in repository https://gitbox.apache.org/repos/asf/ignite.git commit 4b231a183d7393c7f9cd84e3dd90b62eaa9b8756 Author: Pavel Tupitsyn AuthorDate: Fri Apr 5 17:00:08 2019 +0300 Fixing examples - sql --- .../dotnet/examples/Apache.Ignite.Examples/Sql/SqlExample.cs| 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Sql/SqlExample.cs b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Sql/SqlExample.cs index f163c54..2c08335 100644 --- a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Sql/SqlExample.cs +++ b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Sql/SqlExample.cs @@ -114,15 +114,15 @@ namespace Apache.Ignite.Examples.Sql { const string orgName = "Apache"; -var qry = cache.Query(new SqlQuery("Employee", -"from Employee, \"dotnet_cache_query_organization\".Organization " + +var qry = cache.Query(new SqlFieldsQuery( +"select name from from Employee, \"dotnet_cache_query_organization\".Organization " + "where Employee.organizationId = Organization._key and Organization.name = ?", orgName)); Console.WriteLine(); Console.WriteLine(">>> Employees working for " + orgName + ":"); foreach (var entry in qry) -Console.WriteLine(">>> " + entry.Value); +Console.WriteLine(">>> " + entry[0]); } ///
[ignite] branch ignite-11525 updated (add1151 -> 3b5e0dc)
This is an automated email from the ASF dual-hosted git repository. ptupitsyn pushed a change to branch ignite-11525 in repository https://gitbox.apache.org/repos/asf/ignite.git. from add1151 Fixing examples - binary new 4b231a1 Fixing examples - sql new 3b5e0dc Fixing examples - sql The 2 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: .../dotnet/examples/Apache.Ignite.Examples/Sql/SqlExample.cs | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-)
[ignite] 02/02: Fixing examples - sql
This is an automated email from the ASF dual-hosted git repository. ptupitsyn pushed a commit to branch ignite-11525 in repository https://gitbox.apache.org/repos/asf/ignite.git commit 3b5e0dc6ac56ccb7d2259fc18d79f8687f9053c3 Author: Pavel Tupitsyn AuthorDate: Fri Apr 5 17:01:18 2019 +0300 Fixing examples - sql --- .../dotnet/examples/Apache.Ignite.Examples/Sql/SqlExample.cs| 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Sql/SqlExample.cs b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Sql/SqlExample.cs index 2c08335..680c469 100644 --- a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Sql/SqlExample.cs +++ b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Sql/SqlExample.cs @@ -133,8 +133,8 @@ namespace Apache.Ignite.Examples.Sql { const string orgName = "Apache"; -var qry = cache.Query(new SqlQuery("Employee", -"from Employee, \"dotnet_cache_query_organization\".Organization " + +var qry = cache.Query(new SqlFieldsQuery( +"select name from from Employee, \"dotnet_cache_query_organization\".Organization " + "where Employee.organizationId = Organization._key and Organization.name = ?", orgName) { EnableDistributedJoins = true, @@ -145,7 +145,7 @@ namespace Apache.Ignite.Examples.Sql Console.WriteLine(">>> Employees working for " + orgName + ":"); foreach (var entry in qry) -Console.WriteLine(">>> " + entry.Value); +Console.WriteLine(">>> " + entry[0]); } ///
[ignite] branch ignite-11525 updated: Fixing examples - binary
This is an automated email from the ASF dual-hosted git repository. ptupitsyn pushed a commit to branch ignite-11525 in repository https://gitbox.apache.org/repos/asf/ignite.git The following commit(s) were added to refs/heads/ignite-11525 by this push: new add1151 Fixing examples - binary add1151 is described below commit add11518ecdc6d6a84054d0eaca5e387e7f4db77 Author: Pavel Tupitsyn AuthorDate: Fri Apr 5 16:56:05 2019 +0300 Fixing examples - binary --- .../Datagrid/BinaryModeExample.cs | 22 ++ 1 file changed, 2 insertions(+), 20 deletions(-) diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/BinaryModeExample.cs b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/BinaryModeExample.cs index a619984..7a9a5b1 100644 --- a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/BinaryModeExample.cs +++ b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/BinaryModeExample.cs @@ -23,6 +23,7 @@ namespace Apache.Ignite.Examples.Datagrid using Apache.Ignite.Core.Cache; using Apache.Ignite.Core.Cache.Configuration; using Apache.Ignite.Core.Cache.Query; +using Apache.Ignite.ExamplesDll.Binary; /// /// This example works with cache entirely in binary mode: no classes or configurations are needed. @@ -75,11 +76,10 @@ namespace Apache.Ignite.Examples.Datagrid { KeyType = typeof(int), ValueTypeName = PersonType, -ValueFieldName = "valueObj", Fields = new[] { new QueryField(NameField, typeof(string)), -new QueryField(CompanyIdField, typeof(int)) +new QueryField(CompanyIdField, typeof(int)), }, Indexes = new[] { @@ -115,9 +115,6 @@ namespace Apache.Ignite.Examples.Datagrid // Run SQL query example. SqlQueryExample(cache); -// Run SQL filter query example. -SqlFilterQueryExample(cache); - // Run SQL query with join example. SqlJoinQueryExample(cache); @@ -169,21 +166,6 @@ namespace Apache.Ignite.Examples.Datagrid } /// -/// Queries persons that have a specific name using SQL. -/// -/// Cache. -private static void SqlFilterQueryExample(ICache cache) -{ -var qry = cache.Query(new SqlFieldsQuery("select valueObj from Person where name like 'James%'")); - -Console.WriteLine(); -Console.WriteLine(">>> Persons named James:"); - -foreach (var entry in qry) -Console.WriteLine(">>>" + entry[0]); -} - -/// /// Queries persons that work for company with provided name. /// /// Cache.
[ignite] branch ignite-11525 updated: Fixing examples - binary
This is an automated email from the ASF dual-hosted git repository. ptupitsyn pushed a commit to branch ignite-11525 in repository https://gitbox.apache.org/repos/asf/ignite.git The following commit(s) were added to refs/heads/ignite-11525 by this push: new 818aff8 Fixing examples - binary 818aff8 is described below commit 818aff8cb3ef69e122e42da2268110fa49246aeb Author: Pavel Tupitsyn AuthorDate: Fri Apr 5 16:29:00 2019 +0300 Fixing examples - binary --- .../Datagrid/BinaryModeExample.cs| 20 ++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/BinaryModeExample.cs b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/BinaryModeExample.cs index f0ae92d..a619984 100644 --- a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/BinaryModeExample.cs +++ b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/BinaryModeExample.cs @@ -75,6 +75,7 @@ namespace Apache.Ignite.Examples.Datagrid { KeyType = typeof(int), ValueTypeName = PersonType, +ValueFieldName = "valueObj", Fields = new[] { new QueryField(NameField, typeof(string)), @@ -114,8 +115,8 @@ namespace Apache.Ignite.Examples.Datagrid // Run SQL query example. SqlQueryExample(cache); -// Run SQL query example. -SqlQueryExample(cache); +// Run SQL filter query example. +SqlFilterQueryExample(cache); // Run SQL query with join example. SqlJoinQueryExample(cache); @@ -168,6 +169,21 @@ namespace Apache.Ignite.Examples.Datagrid } /// +/// Queries persons that have a specific name using SQL. +/// +/// Cache. +private static void SqlFilterQueryExample(ICache cache) +{ +var qry = cache.Query(new SqlFieldsQuery("select valueObj from Person where name like 'James%'")); + +Console.WriteLine(); +Console.WriteLine(">>> Persons named James:"); + +foreach (var entry in qry) +Console.WriteLine(">>>" + entry[0]); +} + +/// /// Queries persons that work for company with provided name. /// /// Cache.
[ignite] branch master updated: IGNITE-11361 Web console: Actualized cluster configuration.
This is an automated email from the ASF dual-hosted git repository. akuznetsov 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 83c3703 IGNITE-11361 Web console: Actualized cluster configuration. 83c3703 is described below commit 83c3703e00847eb2f52c05fe575c591af9bdbf0e Author: Vasiliy Sisko AuthorDate: Fri Apr 5 20:31:15 2019 +0700 IGNITE-11361 Web console: Actualized cluster configuration. --- modules/web-console/backend/app/schemas.js | 14 +- .../cluster-edit-form/templates/communication.pug | 17 +++ .../cluster-edit-form/templates/data-storage.pug | 13 +- .../cluster-edit-form/templates/misc.pug | 167 ++--- .../generator/generator/AbstractTransformer.js | 4 +- .../generator/generator/ConfigurationGenerator.js | 51 ++- .../generator/defaults/Cluster.service.js | 7 +- .../app/configuration/services/Clusters.ts | 10 +- .../WebConsoleConfigurationSelfTest.java | 21 +++ 9 files changed, 270 insertions(+), 34 deletions(-) diff --git a/modules/web-console/backend/app/schemas.js b/modules/web-console/backend/app/schemas.js index 50b97f3..3e62a3d 100644 --- a/modules/web-console/backend/app/schemas.js +++ b/modules/web-console/backend/app/schemas.js @@ -1085,6 +1085,7 @@ module.exports.factory = function(mongoose) { clientFailureDetectionTimeout: Number, systemWorkerBlockedTimeout: Number, workDirectory: String, +igniteHome: String, lateAffinityAssignment: Boolean, utilityCacheKeepAliveTime: Number, asyncCallbackPoolSize: Number, @@ -1214,7 +1215,18 @@ module.exports.factory = function(mongoose) { walAutoArchiveAfterInactivity: Number }, mvccVacuumThreadCount: Number, -mvccVacuumFrequency: Number +mvccVacuumFrequency: Number, +authenticationEnabled: Boolean, +sqlQueryHistorySize: Number, +lifecycleBeans: [String], +addressResolver: String, +mBeanServer: String, +networkCompressionLevel: Number, +includeProperties: [String], +cacheStoreSessionListenerFactories: [String], +autoActivationEnabled: {type: Boolean, default: true}, +sqlSchemas: [String], +communicationFailureResolver: String }); Cluster.index({name: 1, space: 1}, {unique: true}); diff --git a/modules/web-console/frontend/app/configuration/components/page-configure-advanced/components/cluster-edit-form/templates/communication.pug b/modules/web-console/frontend/app/configuration/components/page-configure-advanced/components/cluster-edit-form/templates/communication.pug index 0f7ce23..41ef206 100644 --- a/modules/web-console/frontend/app/configuration/components/page-configure-advanced/components/cluster-edit-form/templates/communication.pug +++ b/modules/web-console/frontend/app/configuration/components/page-configure-advanced/components/cluster-edit-form/templates/communication.pug @@ -56,6 +56,16 @@ panel-collapsible(ng-form=form on-open=`ui.loadPanel('${form}')`) min: '1', tip: 'Message send retries count' }) +.pc-form-grid-col-30(ng-if='$ctrl.available("2.8.0")') ++form-field__number({ +label: 'Compression level:', +model: `${model}.networkCompressionLevel`, +name: '"networkCompressionLevel"', +placeholder: '1', +min: '0', +max: '9', +tip: 'Compression level of internal network messages' +}) .pc-form-grid-col-30(ng-if='$ctrl.available(["1.0.0", "2.3.0"])') +form-field__number({ label: 'Discovery startup delay:', @@ -65,6 +75,13 @@ panel-collapsible(ng-form=form on-open=`ui.loadPanel('${form}')`) min: '1', tip: 'This value is used to expire messages from waiting list whenever node discovery discrepancies happen' }) +.pc-form-grid-col-60(ng-if='$ctrl.available("2.5.0")') ++form-field__java-class({ +label: 'Failure resolver:', +model: `${model}.communicationFailureResolver`, +name: '"communicationFailureResolver"', +tip: 'Communication failure resovler' +}) .pc-form-grid-col-60 +form-field__java-class({ label: 'Communication listener:', diff --git a/modules/web-console/frontend/app/configuration/components/page-configure-advanced/components/cluster-edit-form/templates/data-storage.pug b/modules/web-console/frontend/app/configuration/components/page-configure-advanced/components/cluster-edit-fo
[ignite] branch ignite-11525 updated (fd6c35f -> fe22875)
This is an automated email from the ASF dual-hosted git repository. ptupitsyn pushed a change to branch ignite-11525 in repository https://gitbox.apache.org/repos/asf/ignite.git. from fd6c35f Fixing examples - thin client new 7487e61 Fixing examples - SQL new fe22875 Fixing examples - SQL The 2 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: .../Apache.Ignite.Examples/Sql/SqlExample.cs | 24 +++--- 1 file changed, 3 insertions(+), 21 deletions(-)
[ignite] 02/02: Fixing examples - SQL
This is an automated email from the ASF dual-hosted git repository. ptupitsyn pushed a commit to branch ignite-11525 in repository https://gitbox.apache.org/repos/asf/ignite.git commit fe2287595d7d0a2c3f27cdd6bab94f9fc290268e Author: Pavel Tupitsyn AuthorDate: Fri Apr 5 16:21:43 2019 +0300 Fixing examples - SQL --- .../dotnet/examples/Apache.Ignite.Examples/Sql/SqlExample.cs| 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Sql/SqlExample.cs b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Sql/SqlExample.cs index 25d8fa1..f163c54 100644 --- a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Sql/SqlExample.cs +++ b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Sql/SqlExample.cs @@ -97,13 +97,13 @@ namespace Apache.Ignite.Examples.Sql { const int zip = 94109; -var qry = cache.Query(new SqlFieldsQuery("select name from Employee where zip = ?", zip)); +var qry = cache.Query(new SqlFieldsQuery("select name, salary from Employee where zip = ?", zip)); Console.WriteLine(); Console.WriteLine(">>> Employees with zipcode {0} (SQL):", zip); -foreach (var entry in qry) -Console.WriteLine(">>>" + entry[0]); +foreach (var row in qry) +Console.WriteLine(">>> [Name=" + row[0] + ", salary=" + row[1] + ']'); } ///
[ignite] 01/02: Fixing examples - SQL
This is an automated email from the ASF dual-hosted git repository. ptupitsyn pushed a commit to branch ignite-11525 in repository https://gitbox.apache.org/repos/asf/ignite.git commit 7487e611b1e7e2ff087fcb3a837cbae21ab9a27d Author: Pavel Tupitsyn AuthorDate: Fri Apr 5 16:19:30 2019 +0300 Fixing examples - SQL --- .../Apache.Ignite.Examples/Sql/SqlExample.cs | 22 ++ 1 file changed, 2 insertions(+), 20 deletions(-) diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Sql/SqlExample.cs b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Sql/SqlExample.cs index 9fb7921..25d8fa1 100644 --- a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Sql/SqlExample.cs +++ b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Sql/SqlExample.cs @@ -81,9 +81,6 @@ namespace Apache.Ignite.Examples.Sql // Run SQL query with distributed join example. SqlDistributedJoinQueryExample(employeeCache); -// Run SQL fields query example. -SqlFieldsQueryExample(employeeCache); - Console.WriteLine(); } @@ -100,13 +97,13 @@ namespace Apache.Ignite.Examples.Sql { const int zip = 94109; -var qry = cache.Query(new SqlQuery(typeof(Employee), "zip = ?", zip)); +var qry = cache.Query(new SqlFieldsQuery("select name from Employee where zip = ?", zip)); Console.WriteLine(); Console.WriteLine(">>> Employees with zipcode {0} (SQL):", zip); foreach (var entry in qry) -Console.WriteLine(">>>" + entry.Value); +Console.WriteLine(">>>" + entry[0]); } /// @@ -152,21 +149,6 @@ namespace Apache.Ignite.Examples.Sql } /// -/// Queries names and salaries for all employees. -/// -/// Cache. -private static void SqlFieldsQueryExample(ICache cache) -{ -var qry = cache.Query(new SqlFieldsQuery("select name, salary from Employee")); - -Console.WriteLine(); -Console.WriteLine(">>> Employee names and their salaries:"); - -foreach (var row in qry) -Console.WriteLine(">>> [Name=" + row[0] + ", salary=" + row[1] + ']'); -} - -/// /// Populate cache with data for this example. /// /// Cache.
[ignite-teamcity-bot] branch ignite-11688 updated: IGNITE-11688: Default tracked branch name is now overridable in server config (aliased servers supported)
This is an automated email from the ASF dual-hosted git repository. dpavlov pushed a commit to branch ignite-11688 in repository https://gitbox.apache.org/repos/asf/ignite-teamcity-bot.git The following commit(s) were added to refs/heads/ignite-11688 by this push: new 22a2e0f IGNITE-11688: Default tracked branch name is now overridable in server config (aliased servers supported) 22a2e0f is described below commit 22a2e0f2d61cc78ffc2ec781688288e91f74a12d Author: Dmitriy Pavlov AuthorDate: Fri Apr 5 16:13:21 2019 +0300 IGNITE-11688: Default tracked branch name is now overridable in server config (aliased servers supported) --- .../ignite/ci/tcbot/conf/ITcServerConfig.java | 1 + .../tcbot/visa/TcBotTriggerAndSignOffService.java | 58 ++ 2 files changed, 38 insertions(+), 21 deletions(-) diff --git a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/tcbot/conf/ITcServerConfig.java b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/tcbot/conf/ITcServerConfig.java index 7c5185f..5a415b4 100644 --- a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/tcbot/conf/ITcServerConfig.java +++ b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/tcbot/conf/ITcServerConfig.java @@ -40,4 +40,5 @@ public interface ITcServerConfig { * @return */ @NotNull public String defaultTrackedBranch(); + } diff --git a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/tcbot/visa/TcBotTriggerAndSignOffService.java b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/tcbot/visa/TcBotTriggerAndSignOffService.java index 658efed..89c0241 100644 --- a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/tcbot/visa/TcBotTriggerAndSignOffService.java +++ b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/tcbot/visa/TcBotTriggerAndSignOffService.java @@ -82,7 +82,6 @@ import static org.apache.ignite.ci.observer.BuildsInfo.CANCELLED_STATUS; import static org.apache.ignite.ci.observer.BuildsInfo.FINISHED_STATUS; import static org.apache.ignite.ci.observer.BuildsInfo.RUNNING_STATUS; import static org.apache.ignite.ci.util.XmlUtil.xmlEscapeText; -import static org.apache.ignite.ci.tcbot.conf.TcServerConfig.DEFAULT_TRACKED_BRANCH_NAME; /** * TC Bot Visa Facade. Provides method for TC Bot Visa obtaining. Contains features for adding comment to the ticket @@ -364,14 +363,14 @@ public class TcBotTriggerAndSignOffService { } /** - * @param srvId Server id. + * @param srvIdOrAlias Server id. * @param credsProv Credentials */ -public List getContributionsToCheck(String srvId, +public List getContributionsToCheck(String srvIdOrAlias, ICredentialsProv credsProv) { -IJiraIgnited jiraIntegration = jiraIgnProv.server(srvId); +IJiraIgnited jiraIntegration = jiraIgnProv.server(srvIdOrAlias); -IGitHubConnIgnited gitHubConnIgnited = gitHubConnIgnitedProvider.server(srvId); +IGitHubConnIgnited gitHubConnIgnited = gitHubConnIgnitedProvider.server(srvIdOrAlias); List requests = gitHubConnIgnited.getPullRequests(); if (requests == null) return null; @@ -409,7 +408,7 @@ public class TcBotTriggerAndSignOffService { return check; }).collect(Collectors.toList()); -ITeamcityIgnited tcIgn = tcIgnitedProv.server(srvId, credsProv); +ITeamcityIgnited tcIgn = tcIgnitedProv.server(srvIdOrAlias, credsProv); paTickets.forEach(ticket -> { String branch = ticketMatcher.resolveTcBranchForPrLess(ticket, @@ -419,7 +418,7 @@ public class TcBotTriggerAndSignOffService { if (Strings.isNullOrEmpty(branch)) return; // nothing to do if branch was not resolved -String defBtForMaster = findDefaultBranchBuildType(tcIgn.serverId()); +String defBtForMaster = findDefaultBuildType(srvIdOrAlias); if (tcIgn.getAllBuildsCompacted(defBtForMaster, branch).isEmpty()) return; //Skipping contributions without builds @@ -534,7 +533,27 @@ public class TcBotTriggerAndSignOffService { IGitHubConnIgnited ghConn = gitHubConnIgnitedProvider.server(srvId); -String defBtForMaster = findDefaultBranchBuildType(teamcity.serverId()); +List compositeBuildTypeIds = findApplicableBuildTypes(srvId, teamcity); + +for (String btId : compositeBuildTypeIds) { +List compBuilds = findBuildsForPr(btId, prId, ghConn, teamcity); + +statuses.add(compBuilds.isEmpty() +? new ContributionCheckStatus(btId, branchForTcDefault(prId, ghConn)) +: contributionStatus(srvId, btId, compBuilds, teamcity, ghConn, prId)); +} + +return statuses; +} + +/** + * + * @param srvIdOrAlias TC server ID or reference to it. + * @param teamcity Teamcity. + * @return list of build types which may be taken for + */ +public
[ignite-teamcity-bot] branch ignite-11688 created (now 94959c5)
This is an automated email from the ASF dual-hosted git repository. dpavlov pushed a change to branch ignite-11688 in repository https://gitbox.apache.org/repos/asf/ignite-teamcity-bot.git. at 94959c5 IGNITE-11688: Default tracked branch name is now overridable in server config This branch includes the following new commits: new 94959c5 IGNITE-11688: Default tracked branch name is now overridable in server config 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.
[ignite-teamcity-bot] 01/01: IGNITE-11688: Default tracked branch name is now overridable in server config
This is an automated email from the ASF dual-hosted git repository. dpavlov pushed a commit to branch ignite-11688 in repository https://gitbox.apache.org/repos/asf/ignite-teamcity-bot.git commit 94959c541978499338a20ed2184ec5705d4c69eb Author: Dmitriy Pavlov AuthorDate: Fri Apr 5 15:26:29 2019 +0300 IGNITE-11688: Default tracked branch name is now overridable in server config --- .../apache/ignite/ci/github/pure/GitHubConnectionImpl.java | 7 +-- .../ignite/ci/tcbot/chain/TrackedBranchChainsProcessor.java | 6 +++--- .../org/apache/ignite/ci/tcbot/conf/ITcServerConfig.java| 5 + .../org/apache/ignite/ci/tcbot/conf/TcServerConfig.java | 13 + .../org/apache/ignite/ci/tcbot/issue/IssueDetector.java | 4 ++-- .../ignite/ci/tcbot/visa/TcBotTriggerAndSignOffService.java | 8 ++-- .../apache/ignite/ci/web/rest/parms/FullQueryParams.java| 1 - 7 files changed, 34 insertions(+), 10 deletions(-) diff --git a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/github/pure/GitHubConnectionImpl.java b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/github/pure/GitHubConnectionImpl.java index a7ff550..ddfce1c 100644 --- a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/github/pure/GitHubConnectionImpl.java +++ b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/github/pure/GitHubConnectionImpl.java @@ -141,7 +141,10 @@ class GitHubConnectionImpl implements IGitHubConnection { /** {@inheritDoc} */ @Override public String gitApiUrl() { -return gitApiUrl; +if (gitApiUrl == null) +return null; + +return gitApiUrl.endsWith("/") ? gitApiUrl : gitApiUrl + "/"; } /** {@inheritDoc} */ @@ -150,7 +153,7 @@ class GitHubConnectionImpl implements IGitHubConnection { @Nullable AtomicReference outLinkNext) { Preconditions.checkState(!isNullOrEmpty(gitApiUrl), "Git API URL is not configured for this server."); -String url = fullUrl != null ? fullUrl : gitApiUrl + "pulls?sort=updated&direction=desc"; +String url = fullUrl != null ? fullUrl : gitApiUrl() + "pulls?sort=updated&direction=desc"; HashMap rspHeaders = new HashMap<>(); if (outLinkNext != null) { diff --git a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/tcbot/chain/TrackedBranchChainsProcessor.java b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/tcbot/chain/TrackedBranchChainsProcessor.java index 5648057..a261730 100644 --- a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/tcbot/chain/TrackedBranchChainsProcessor.java +++ b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/tcbot/chain/TrackedBranchChainsProcessor.java @@ -27,6 +27,7 @@ import org.apache.ignite.ci.analysis.mode.ProcessLogsMode; import org.apache.ignite.ci.conf.BranchTracked; import org.apache.ignite.ci.di.AutoProfiling; import org.apache.ignite.ci.tcbot.conf.ITcBotConfig; +import org.apache.ignite.ci.tcbot.conf.TcServerConfig; import org.apache.ignite.ci.teamcity.ignited.ITeamcityIgnited; import org.apache.ignite.ci.teamcity.ignited.ITeamcityIgnitedProvider; import org.apache.ignite.ci.teamcity.ignited.SyncMode; @@ -35,7 +36,6 @@ import org.apache.ignite.ci.user.ICredentialsProv; import org.apache.ignite.ci.web.model.current.ChainAtServerCurrentStatus; import org.apache.ignite.ci.web.model.current.TestFailuresSummary; import org.apache.ignite.ci.web.model.long_running.FullLRTestsSummary; -import org.apache.ignite.ci.web.rest.parms.FullQueryParams; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -68,7 +68,7 @@ public class TrackedBranchChainsProcessor { final TestFailuresSummary res = new TestFailuresSummary(); final AtomicInteger runningUpdates = new AtomicInteger(); -final String branchNn = isNullOrEmpty(branch) ? FullQueryParams.DEFAULT_TRACKED_BRANCH_NAME : branch; +final String branchNn = isNullOrEmpty(branch) ? TcServerConfig.DEFAULT_TRACKED_BRANCH_NAME : branch; res.setTrackedBranch(branchNn); final BranchTracked tracked = tcBotConfig.getTrackedBranches().getBranchMandatory(branchNn); @@ -143,7 +143,7 @@ public class TrackedBranchChainsProcessor { ICredentialsProv creds) { FullLRTestsSummary summary = new FullLRTestsSummary(); -final String branchNn = isNullOrEmpty(branch) ? FullQueryParams.DEFAULT_TRACKED_BRANCH_NAME : branch; +final String branchNn = isNullOrEmpty(branch) ? TcServerConfig.DEFAULT_TRACKED_BRANCH_NAME : branch; final BranchTracked tracked = tcBotConfig.getTrackedBranches().getBranchMandatory(branchNn); tracked.chains.stream() diff --git a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/tcbot/conf/ITcServerConfig.java b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/tcbot/conf/ITcServerConfig.java index 8f65ee8..7c5185f 100644 --- a/ignite-tc-helper-web/src/
[ignite] branch ignite-11525 updated: Fixing examples - thin client
This is an automated email from the ASF dual-hosted git repository. ptupitsyn pushed a commit to branch ignite-11525 in repository https://gitbox.apache.org/repos/asf/ignite.git The following commit(s) were added to refs/heads/ignite-11525 by this push: new fd6c35f Fixing examples - thin client fd6c35f is described below commit fd6c35f5d9d3fb1878e228689758e1f6974f72f6 Author: Pavel Tupitsyn AuthorDate: Fri Apr 5 15:14:44 2019 +0300 Fixing examples - thin client --- .../ThinClient/ThinClientSqlExample.cs | 37 +- 1 file changed, 8 insertions(+), 29 deletions(-) diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/ThinClient/ThinClientSqlExample.cs b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/ThinClient/ThinClientSqlExample.cs index c46c850..70b5176 100644 --- a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/ThinClient/ThinClientSqlExample.cs +++ b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/ThinClient/ThinClientSqlExample.cs @@ -72,12 +72,9 @@ namespace Apache.Ignite.Examples.ThinClient // Populate cache with sample data entries. PopulateCache(cache); -// Run SQL example. -SqlQueryExample(cache); +// Run examples. +SqlExample(cache); LinqExample(cache); - -// Run SQL fields query example. -SqlFieldsQueryExample(cache); LinqFieldsExample(cache); } @@ -87,20 +84,18 @@ namespace Apache.Ignite.Examples.ThinClient } /// -/// Queries employees that have provided ZIP code in address. +/// Queries names and salaries for all employees. /// /// Cache. -private static void SqlQueryExample(ICacheClient cache) +private static void SqlExample(ICacheClient cache) { -const int zip = 94109; - -var qry = cache.Query(new SqlQuery(typeof(Employee), "zip = ?", zip)); +var qry = cache.Query(new SqlFieldsQuery("select name, salary from Employee")); Console.WriteLine(); -Console.WriteLine(">>> Employees with zipcode {0} (SQL):", zip); +Console.WriteLine(">>> Employee names and their salaries (SQL):"); -foreach (var entry in qry) -Console.WriteLine(">>>" + entry.Value); +foreach (var row in qry) +Console.WriteLine(">>> [Name=" + row[0] + ", salary=" + row[1] + ']'); } /// @@ -125,22 +120,6 @@ namespace Apache.Ignite.Examples.ThinClient Console.WriteLine(">>> " + qry.ToCacheQueryable().GetFieldsQuery().Sql); } - -/// -/// Queries names and salaries for all employees. -/// -/// Cache. -private static void SqlFieldsQueryExample(ICacheClient cache) -{ -var qry = cache.Query(new SqlFieldsQuery("select name, salary from Employee")); - -Console.WriteLine(); -Console.WriteLine(">>> Employee names and their salaries (SQL):"); - -foreach (var row in qry) -Console.WriteLine(">>> [Name=" + row[0] + ", salary=" + row[1] + ']'); -} - /// /// Queries names and salaries for all employees. ///
[ignite] branch ignite-11525 updated: Fixing examples
This is an automated email from the ASF dual-hosted git repository. ptupitsyn pushed a commit to branch ignite-11525 in repository https://gitbox.apache.org/repos/asf/ignite.git The following commit(s) were added to refs/heads/ignite-11525 by this push: new 6ff3ff5 Fixing examples 6ff3ff5 is described below commit 6ff3ff5db54ab1e4e67a476de921208940f3fa85 Author: Pavel Tupitsyn AuthorDate: Fri Apr 5 14:56:21 2019 +0300 Fixing examples --- .../examples/Apache.Ignite.Examples/Datagrid/BinaryModeExample.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/BinaryModeExample.cs b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/BinaryModeExample.cs index f4a5cfa..f0ae92d 100644 --- a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/BinaryModeExample.cs +++ b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/BinaryModeExample.cs @@ -176,7 +176,7 @@ namespace Apache.Ignite.Examples.Datagrid const string orgName = "Apache"; var qry = cache.Query(new SqlFieldsQuery( -"select pers.* from Person as pers, Company as comp where pers.CompanyId = comp.Id and comp.Name = ?", +"select pers.Name from Person as pers, Company as comp where pers.CompanyId = comp.Id and comp.Name = ?", orgName) { EnableDistributedJoins = true, @@ -187,7 +187,7 @@ namespace Apache.Ignite.Examples.Datagrid Console.WriteLine(">>> Persons working for " + orgName + ":"); foreach (var entry in qry) -Console.WriteLine(">>> " + entry); // TODO: What do we print? +Console.WriteLine(">>> " + entry[0]); } ///
[ignite] branch master updated: IGNITE-11354 Web console: Actualized cluster configuration.
This is an automated email from the ASF dual-hosted git repository. akuznetsov 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 f3e481f IGNITE-11354 Web console: Actualized cluster configuration. f3e481f is described below commit f3e481f9dcc6d533fa83d08aef84d6211051792f Author: Vasiliy Sisko AuthorDate: Fri Apr 5 18:45:15 2019 +0700 IGNITE-11354 Web console: Actualized cluster configuration. --- modules/web-console/backend/app/schemas.js | 16 -- .../cluster-edit-form/templates/atomic.pug | 36 -- .../cluster-edit-form/templates/communication.pug | 32 .../cluster-edit-form/templates/data-storage.pug | 58 +++--- .../cluster-edit-form/templates/discovery.pug | 27 ++ .../generator/generator/ConfigurationGenerator.js | 50 +++ .../generator/defaults/Cluster.service.js | 14 -- .../WebConsoleConfigurationSelfTest.java | 28 +++ 8 files changed, 200 insertions(+), 61 deletions(-) diff --git a/modules/web-console/backend/app/schemas.js b/modules/web-console/backend/app/schemas.js index 29493a5..50b97f3 100644 --- a/modules/web-console/backend/app/schemas.js +++ b/modules/web-console/backend/app/schemas.js @@ -494,6 +494,9 @@ module.exports.factory = function(mongoose) { authenticator: String, forceServerMode: Boolean, clientReconnectDisabled: Boolean, +connectionRecoveryTimeout: Number, +reconnectDelay: Number, +soLinger: Number, kind: { type: String, enum: ['Vm', 'Multicast', 'S3', 'Cloud', 'GoogleStorage', 'Jdbc', 'SharedFs', 'ZooKeeper', 'Kubernetes'] @@ -655,7 +658,8 @@ module.exports.factory = function(mongoose) { Custom: { className: String } -} +}, +groupName: String }, binaryConfiguration: { idMapper: String, @@ -730,7 +734,11 @@ module.exports.factory = function(mongoose) { unacknowledgedMessagesBufferSize: Number, socketWriteTimeout: Number, selectorsCount: Number, -addressResolver: String +addressResolver: String, +selectorSpins: Number, +connectionsPerNode: Number, +usePairedConnections: Boolean, +filterReachableAddresses: Boolean }, connector: { enabled: Boolean, @@ -1146,7 +1154,9 @@ module.exports.factory = function(mongoose) { walAutoArchiveAfterInactivity: Number, writeThrottlingEnabled: Boolean, walCompactionEnabled: Boolean, -checkpointReadLockTimeout: Number +checkpointReadLockTimeout: Number, +maxWalArchiveSize: Number, +walCompactionLevel: Number }, memoryConfiguration: { systemCacheInitialSize: Number, diff --git a/modules/web-console/frontend/app/configuration/components/page-configure-advanced/components/cluster-edit-form/templates/atomic.pug b/modules/web-console/frontend/app/configuration/components/page-configure-advanced/components/cluster-edit-form/templates/atomic.pug index d227c27..b27ada9 100644 --- a/modules/web-console/frontend/app/configuration/components/page-configure-advanced/components/cluster-edit-form/templates/atomic.pug +++ b/modules/web-console/frontend/app/configuration/components/page-configure-advanced/components/cluster-edit-form/templates/atomic.pug @@ -38,16 +38,16 @@ panel-collapsible(ng-form=form on-open=`ui.loadPanel('${form}')`) name: '"cacheMode"', placeholder: 'PARTITIONED', options: '[\ -{value: "LOCAL", label: "LOCAL"},\ -{value: "REPLICATED", label: "REPLICATED"},\ -{value: "PARTITIONED", label: "PARTITIONED"}\ -]', +{value: "LOCAL", label: "LOCAL"},\ +{value: "REPLICATED", label: "REPLICATED"},\ +{value: "PARTITIONED", label: "PARTITIONED"}\ +]', tip: 'Cache modes:\ -\ -Partitioned - in this mode the overall key set will be divided into partitions and all partitions will be split equally between participating nodes\ -Replicated - in this mode all the keys are distributed to all participating nodes\ -Local - in this mode caches residing on different grid nodes will not know ab
[ignite] 01/02: Fixing examples
This is an automated email from the ASF dual-hosted git repository. ptupitsyn pushed a commit to branch ignite-11525 in repository https://gitbox.apache.org/repos/asf/ignite.git commit 1dc84bdfe6a77bd419a02ed5698f3dd17ea3a721 Author: Pavel Tupitsyn AuthorDate: Fri Apr 5 14:26:51 2019 +0300 Fixing examples --- .../examples/Apache.Ignite.Examples/Datagrid/BinaryModeExample.cs| 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/BinaryModeExample.cs b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/BinaryModeExample.cs index 40b0fa0..ed02e44 100644 --- a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/BinaryModeExample.cs +++ b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/BinaryModeExample.cs @@ -176,8 +176,7 @@ namespace Apache.Ignite.Examples.Datagrid const string orgName = "Apache"; var qry = cache.Query(new SqlFieldsQuery( -PersonType, -"select Person.* from Person, Company where Person.CompanyId = Company.Id and Company.Name = ?", +"select pers.* from Person as pers, Company as comp where pers.CompanyId = comp.Id and comp.Name = ?", orgName) { EnableDistributedJoins = true, @@ -188,7 +187,7 @@ namespace Apache.Ignite.Examples.Datagrid Console.WriteLine(">>> Persons working for " + orgName + ":"); foreach (var entry in qry) -Console.WriteLine(">>> " + entry.Value); +Console.WriteLine(">>> " + entry); } ///
[ignite] branch ignite-11525 updated (ab3b08d -> 61ef906)
This is an automated email from the ASF dual-hosted git repository. ptupitsyn pushed a change to branch ignite-11525 in repository https://gitbox.apache.org/repos/asf/ignite.git. from ab3b08d Fixing examples new 1dc84bd Fixing examples new 61ef906 Fixing examples The 2 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: .../examples/Apache.Ignite.Examples/Datagrid/BinaryModeExample.cs| 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
[ignite] 02/02: Fixing examples
This is an automated email from the ASF dual-hosted git repository. ptupitsyn pushed a commit to branch ignite-11525 in repository https://gitbox.apache.org/repos/asf/ignite.git commit 61ef90646be3f23dbce9eead649a0ee8a13f5f11 Author: Pavel Tupitsyn AuthorDate: Fri Apr 5 14:28:31 2019 +0300 Fixing examples --- .../examples/Apache.Ignite.Examples/Datagrid/BinaryModeExample.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/BinaryModeExample.cs b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/BinaryModeExample.cs index ed02e44..f4a5cfa 100644 --- a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/BinaryModeExample.cs +++ b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/BinaryModeExample.cs @@ -187,7 +187,7 @@ namespace Apache.Ignite.Examples.Datagrid Console.WriteLine(">>> Persons working for " + orgName + ":"); foreach (var entry in qry) -Console.WriteLine(">>> " + entry); +Console.WriteLine(">>> " + entry); // TODO: What do we print? } ///
[ignite] branch ignite-11525 updated: Fixing examples
This is an automated email from the ASF dual-hosted git repository. ptupitsyn pushed a commit to branch ignite-11525 in repository https://gitbox.apache.org/repos/asf/ignite.git The following commit(s) were added to refs/heads/ignite-11525 by this push: new ab3b08d Fixing examples ab3b08d is described below commit ab3b08df7bdfd0d8585c3321acc172af8a9b1a63 Author: Pavel Tupitsyn AuthorDate: Fri Apr 5 14:23:21 2019 +0300 Fixing examples --- .../Datagrid/BinaryModeExample.cs | 38 +++--- 1 file changed, 12 insertions(+), 26 deletions(-) diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/BinaryModeExample.cs b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/BinaryModeExample.cs index 0d96f4c..40b0fa0 100644 --- a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/BinaryModeExample.cs +++ b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/BinaryModeExample.cs @@ -114,12 +114,12 @@ namespace Apache.Ignite.Examples.Datagrid // Run SQL query example. SqlQueryExample(cache); +// Run SQL query example. +SqlQueryExample(cache); + // Run SQL query with join example. SqlJoinQueryExample(cache); -// Run SQL fields query example. -SqlFieldsQueryExample(cache); - // Run full text query example. FullTextQueryExample(cache); @@ -153,18 +153,18 @@ namespace Apache.Ignite.Examples.Datagrid } /// -/// Queries persons that have a specific name using SQL. +/// Queries names for all persons. /// /// Cache. private static void SqlQueryExample(ICache cache) { -var qry = cache.Query(new SqlQuery(PersonType, "name like 'James%'")); +var qry = cache.Query(new SqlFieldsQuery("select name from Person order by name")); Console.WriteLine(); -Console.WriteLine(">>> Persons named James:"); +Console.WriteLine(">>> All person names:"); -foreach (var entry in qry) -Console.WriteLine(">>>" + entry.Value); +foreach (var row in qry) +Console.WriteLine(">>> " + row[0]); } /// @@ -175,9 +175,10 @@ namespace Apache.Ignite.Examples.Datagrid { const string orgName = "Apache"; -var qry = cache.Query(new SqlQuery(PersonType, -"from Person, Company " + -"where Person.CompanyId = Company.Id and Company.Name = ?", orgName) +var qry = cache.Query(new SqlFieldsQuery( +PersonType, +"select Person.* from Person, Company where Person.CompanyId = Company.Id and Company.Name = ?", +orgName) { EnableDistributedJoins = true, Timeout = new TimeSpan(0, 1, 0) @@ -191,21 +192,6 @@ namespace Apache.Ignite.Examples.Datagrid } /// -/// Queries names for all persons. -/// -/// Cache. -private static void SqlFieldsQueryExample(ICache cache) -{ -var qry = cache.Query(new SqlFieldsQuery("select name from Person order by name")); - -Console.WriteLine(); -Console.WriteLine(">>> All person names:"); - -foreach (var row in qry) -Console.WriteLine(">>> " + row[0]); -} - -/// /// Queries persons that have a specific name using full-text query API. /// /// Cache.
[ignite] branch ignite-11525 updated (d3e7b15 -> fce0fc9)
This is an automated email from the ASF dual-hosted git repository. ptupitsyn pushed a change to branch ignite-11525 in repository https://gitbox.apache.org/repos/asf/ignite.git. from d3e7b15 Suppress compiler warnings - done add 963a40b IGNITE-11143: SQL: Improved printout of long-running queries. This closes #6353. add 70b9e0e IGNITE-7664: SQL: Throw better error messages for unsupported SQL keywords and features. This closes #6138. add a309335 IGNITE-11660 Choose correct closure in DmlStatementsProcessorTest, more tests - Fixes #6379. add a1151a7 IGNITE-11599 Thin client to find valid node for connection from the configuration list - Fixes #6368. add 0ce456d IGNITE-11411 Remove tearDown, setUp from JUnit3TestLegacySupport (#6227) add 94cd19b IGNITE-11599 Fix test licence header. add 27ea976 IGNITE-10104: MVCC: Fixed SFU for REPLICATED caches. This closes #6141. add 4daa681 IGNITE-11629 Make sure Cassandra driver dependencies present in redistributable - Fixes #6375. add db38352 IGNITE-11654: [ML] Memory leak in KNNClassificationModel (#6392) add 003c41e IGNITE-11647: [ML] ML Vectors should work with all Serializable objects besides double add 3aa9167 IGNITE-11416 Added DistributedMetaStorage improvements - Fixes #6190. add 6e36f5c IGNITE-11569 Enable baseline auto-adjust by default only for empty cluster - Fixes #6305. add 770e2ba IGNITE-11574 Fix exchange on NodeLeft event hangs when cluster is in transition state - Fixes #6310. add e1ab893 IGNITE-11334: SQL: Deprecated SqlQuery in Java. This closes #6151. add 18af47d IGNITE-11681 Fix for three failed tests. (#6402) add 579036d IGNITE-10145: [ML] Implement ROC AUC metric (#6394) add 448f989 IGNITE-11672 Fix expected message in JdbcThinConnectionSelfTest.testInvalidEndpoint - Fixes #6396. add e228241 IGNITE-11673: SQL: It looks like security check is missed in h2 indexing. This closes #6390. add c32c7ac IGNITE-11632 Correctly handle crc errors in no archiver mode - Fixes #6345. add 0e6bcd3 IGNITE-9799 Web Console: Removed unused code. add 44b0522 IGNITE-9801 Web Console: Export button restyled. add 0d93a0b IGNITE-8368 Web Console: Refactored queries notebooks list. add 0af4fdf IGNITE-11182 Web console: Actualized cluster configuration. add 9180be9 IGNITE-11604: SQL: Fixed problem with DROP COLUMN which was not able remove a column properly in some cases. This closes #6399. add 89ba43f IGNITE-11604: SQL: Fixed problem with DROP COLUMN which was not able remove a column properly in some cases. This closes #6399. add 9c721f7 IGNITE-11283 Web console: Actualized cluster configuration. new fce0fc9 Merge remote-tracking branch 'origin/master' into ignite-11525 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: .../datagrid/CacheClientBinaryQueryExample.java| 133 ++-- .../examples/datagrid/CacheQueryExample.java | 3 +- .../starschema/CacheStarSchemaExample.java | 25 +- .../ignite/examples/sql/SqlQueriesExample.java | 29 +- modules/cassandra/store/pom.xml| 12 + .../jdbc/thin/JdbcThinConnectionSelfTest.java | 2 +- .../main/java/org/apache/ignite/IgniteCache.java | 2 - .../main/java/org/apache/ignite/IgniteCluster.java | 6 + .../eviction/lru/LruEvictionPolicyFactory.java | 1 - .../java/org/apache/ignite/cache/query/Query.java | 2 - .../apache/ignite/cache/query/SqlFieldsQuery.java | 3 +- .../org/apache/ignite/cache/query/SqlQuery.java| 3 + .../java/org/apache/ignite/client/ClientCache.java | 3 +- .../org/apache/ignite/internal/GridComponent.java | 9 +- .../org/apache/ignite/internal/IgniteFeatures.java | 6 +- .../org/apache/ignite/internal/IgniteKernal.java | 231 +- .../internal/StripedExecutorMXBeanAdapter.java | 2 +- .../internal/TransactionMetricsMxBeanImpl.java | 2 +- .../ignite/internal/TransactionsMXBeanImpl.java| 2 +- .../internal/client/thin/ReliableChannel.java | 25 +- .../cluster/DistributedBaselineConfiguration.java | 101 ++- .../internal/cluster/IgniteClusterAsyncImpl.java | 6 + .../ignite/internal/cluster/IgniteClusterImpl.java | 38 +- .../internal/jdbc/thin/JdbcThinStatement.java | 4 +- .../internal/managers/IgniteMBeansManager.java | 284 .../cache/GridCachePartitionExchangeManager.java | 4 +- .../cache/distributed/dht/CompoundLockFuture.java | 112 --- .../dht/GridDhtTxAbstractEnlistFuture.java | 8 +- .../dht/GridDhtTxQueryEnlistFuture.java| 2 +- .../preloader/GridDhtPartitionsExchangeFuture.java | 13 +- .../near/GridNearTxAbstractEnlistFuture.java | 5 +- .../
[ignite] branch master updated: IGNITE-11284 Web console: Actualized cluster configuration.
This is an automated email from the ASF dual-hosted git repository. akuznetsov 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 b6a07f6 IGNITE-11284 Web console: Actualized cluster configuration. b6a07f6 is described below commit b6a07f65bba402e5bfa165957f526cee95098f44 Author: Vasiliy Sisko AuthorDate: Fri Apr 5 18:13:08 2019 +0700 IGNITE-11284 Web console: Actualized cluster configuration. --- modules/web-console/backend/app/schemas.js | 14 +++- .../components/model-edit-form/templates/query.pug | 72 - .../generator/generator/ConfigurationGenerator.js | 74 -- .../generator/generator/JavaTransformer.service.js | 4 +- .../generator/SpringTransformer.service.js | 6 +- .../generator/generator/defaults/Cache.service.js | 12 .../frontend/app/configuration/services/Models.ts | 41 .../WebConsoleConfigurationSelfTest.java | 6 ++ 8 files changed, 216 insertions(+), 13 deletions(-) diff --git a/modules/web-console/backend/app/schemas.js b/modules/web-console/backend/app/schemas.js index 4741776..29493a5 100644 --- a/modules/web-console/backend/app/schemas.js +++ b/modules/web-console/backend/app/schemas.js @@ -122,12 +122,21 @@ module.exports.factory = function(mongoose) { javaFieldType: String }], queryKeyFields: [String], -fields: [{name: String, className: String}], +fields: [{ +name: String, +className: String, +notNull: Boolean, +defaultValue: String, +precision: Number, +scale: Number +}], aliases: [{field: String, alias: String}], indexes: [{ name: String, indexType: {type: String, enum: ['SORTED', 'FULLTEXT', 'GEOSPATIAL']}, -fields: [{name: String, direction: Boolean}] +fields: [{name: String, direction: Boolean}], +inlineSizeType: Number, +inlineSize: Number }], generatePojo: Boolean }); @@ -182,6 +191,7 @@ module.exports.factory = function(mongoose) { backups: Number, memoryMode: {type: String, enum: ['ONHEAP_TIERED', 'OFFHEAP_TIERED', 'OFFHEAP_VALUES']}, +offHeapMode: Number, offHeapMaxMemory: Number, startSize: Number, swapEnabled: Boolean, diff --git a/modules/web-console/frontend/app/configuration/components/page-configure-advanced/components/model-edit-form/templates/query.pug b/modules/web-console/frontend/app/configuration/components/page-configure-advanced/components/model-edit-form/templates/query.pug index 2dbb565..9f14980 100644 --- a/modules/web-console/frontend/app/configuration/components/page-configure-advanced/components/model-edit-form/templates/query.pug +++ b/modules/web-console/frontend/app/configuration/components/page-configure-advanced/components/model-edit-form/templates/query.pug @@ -77,12 +77,12 @@ panel-collapsible(ng-form=form opened=`!!${model}.queryMetadata`) ng-change=`$ctrl.onQueryFieldsChange(${model})` ) list-editable-item-view -| {{ $item.name}} / {{ $item.className}} +| {{$ctrl.Models.fieldProperties.fieldPresentation($item, $ctrl.available)}} list-editable-item-edit - form = '$parent.form' .pc-form-grid-row -.pc-form-grid-col-30(divider='/') +.pc-form-grid-col-30 +form-field__text({ label: 'Field name:', model: '$item.name', @@ -98,7 +98,7 @@ panel-collapsible(ng-form=form opened=`!!${model}.queryMetadata`) .pc-form-grid-col-30 +form-field__java-class--typeahead({ label: 'Field full class name:', -model: `$item.className`, +model: '$item.className', name: '"className"', options: '$ctrl.queryFieldTypes', required: 'true', @@ -107,6 +107,41 @@ panel-collapsible(ng-form=form opened=`!!${model}.queryMetadata`) ng-model-options='{allowInvalid: true}' extra-valid-java-identifiers='$ctrl.queryFieldTypes' ) +
[ignite] 01/01: Merge remote-tracking branch 'origin/master' into ignite-11525
This is an automated email from the ASF dual-hosted git repository. ptupitsyn pushed a commit to branch ignite-11525 in repository https://gitbox.apache.org/repos/asf/ignite.git commit fce0fc9c7b1bb87b5a72d7264b5b82f14f89f7f7 Merge: d3e7b15 9c721f7 Author: Pavel Tupitsyn AuthorDate: Fri Apr 5 14:13:14 2019 +0300 Merge remote-tracking branch 'origin/master' into ignite-11525 .../datagrid/CacheClientBinaryQueryExample.java| 133 ++-- .../examples/datagrid/CacheQueryExample.java | 3 +- .../starschema/CacheStarSchemaExample.java | 25 +- .../ignite/examples/sql/SqlQueriesExample.java | 29 +- modules/cassandra/store/pom.xml| 12 + .../jdbc/thin/JdbcThinConnectionSelfTest.java | 2 +- .../main/java/org/apache/ignite/IgniteCache.java | 2 - .../main/java/org/apache/ignite/IgniteCluster.java | 6 + .../eviction/lru/LruEvictionPolicyFactory.java | 1 - .../java/org/apache/ignite/cache/query/Query.java | 2 - .../apache/ignite/cache/query/SqlFieldsQuery.java | 3 +- .../org/apache/ignite/cache/query/SqlQuery.java| 3 + .../java/org/apache/ignite/client/ClientCache.java | 3 +- .../org/apache/ignite/internal/GridComponent.java | 9 +- .../org/apache/ignite/internal/IgniteFeatures.java | 6 +- .../org/apache/ignite/internal/IgniteKernal.java | 231 +- .../internal/StripedExecutorMXBeanAdapter.java | 2 +- .../internal/TransactionMetricsMxBeanImpl.java | 2 +- .../ignite/internal/TransactionsMXBeanImpl.java| 2 +- .../internal/client/thin/ReliableChannel.java | 25 +- .../cluster/DistributedBaselineConfiguration.java | 101 ++- .../internal/cluster/IgniteClusterAsyncImpl.java | 6 + .../ignite/internal/cluster/IgniteClusterImpl.java | 38 +- .../internal/jdbc/thin/JdbcThinStatement.java | 4 +- .../internal/managers/IgniteMBeansManager.java | 284 .../cache/GridCachePartitionExchangeManager.java | 4 +- .../cache/distributed/dht/CompoundLockFuture.java | 112 --- .../dht/GridDhtTxAbstractEnlistFuture.java | 8 +- .../dht/GridDhtTxQueryEnlistFuture.java| 2 +- .../preloader/GridDhtPartitionsExchangeFuture.java | 13 +- .../near/GridNearTxAbstractEnlistFuture.java | 5 +- .../near/GridNearTxSelectForUpdateFuture.java | 462 .../distributed/near/TxTopologyVersionFuture.java | 176 - .../GridCacheDatabaseSharedManager.java| 84 ++- .../persistence/wal/FileWriteAheadLogManager.java | 70 +- ...Impl.java => BaselineAutoAdjustMXBeanImpl.java} | 23 +- .../processors/cluster/BaselineTopology.java | 7 + .../processors/cluster/ClusterProcessor.java | 18 - .../cluster/GridClusterStateProcessor.java | 112 ++- ...tatistic.java => BaselineAutoAdjustStatus.java} | 24 +- .../baseline/autoadjust/ChangeTopologyWatcher.java | 10 +- .../distributed/DistributePropertyListener.java} | 26 +- .../distributed/DistributedBooleanProperty.java| 9 +- .../distributed/DistributedComparableProperty.java | 4 +- .../DistributedConfigurationProcessor.java | 14 +- .../distributed/DistributedLongProperty.java | 9 +- .../distributed/DistributedProperty.java | 31 +- .../distributed/DistributedPropertyDispatcher.java | 6 +- .../ReadableDistributedMetaStorage.java| 47 +- .../persistence/DistributedMetaStorageBridge.java | 8 +- .../DistributedMetaStorageClusterNodeData.java | 26 +- .../DistributedMetaStorageHistoryCache.java| 228 ++ .../DistributedMetaStorageHistoryItem.java | 64 +- .../persistence/DistributedMetaStorageImpl.java| 753 +--- .../DistributedMetaStorageJoiningNodeData.java | 16 +- ...ava => DistributedMetaStorageKeyValuePair.java} | 20 +- .../DistributedMetaStorageUpdateAckMessage.java| 5 - .../persistence/DistributedMetaStorageUtil.java| 24 +- .../persistence/DistributedMetaStorageVersion.java | 3 +- .../EmptyDistributedMetaStorageBridge.java | 10 +- ...InMemoryCachedDistributedMetaStorageBridge.java | 27 +- .../NotAvailableDistributedMetaStorageBridge.java | 8 +- .../ReadOnlyDistributedMetaStorageBridge.java | 107 +-- .../WritableDistributedMetaStorageBridge.java | 35 +- .../processors/query/GridQueryIndexing.java| 9 + .../processors/query/GridQueryProcessor.java | 14 +- .../internal/processors/query/QuerySchema.java | 8 +- .../internal/processors/query/QueryUtils.java | 29 + .../org/apache/ignite/internal/sql/SqlKeyword.java | 12 + .../org/apache/ignite/internal/sql/SqlParser.java | 67 ++ .../apache/ignite/internal/sql/SqlParserUtils.java | 2 +- .../internal/sql/SqlStrictParseException.java | 27 +- .../ignite/internal/util/HostAndPortRange.java | 3 + .../internal/visor/baseline/VisorBaselineTask.java | 11 +- .../visor/baseline/VisorBaselineViewTask.java | 8 +-
[ignite] branch master updated: IGNITE-11283 Web console: Actualized cluster configuration.
This is an automated email from the ASF dual-hosted git repository. akuznetsov 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 9c721f7 IGNITE-11283 Web console: Actualized cluster configuration. 9c721f7 is described below commit 9c721f7f053f80558444fb38fe638c50018dabe3 Author: Vasiliy Sisko AuthorDate: Fri Apr 5 17:17:34 2019 +0700 IGNITE-11283 Web console: Actualized cluster configuration. --- modules/web-console/backend/app/schemas.js | 8 +++- .../cluster-edit-form/templates/persistence.pug| 31 .../cluster-edit-form/templates/transactions.pug | 25 ++ .../generator/generator/AbstractTransformer.js | 4 +- .../generator/generator/ConfigurationGenerator.js | 17 +-- .../generator/generator/defaults/Cache.service.js | 1 - .../generator/defaults/Cluster.service.js | 12 - .../WebConsoleConfigurationSelfTest.java | 55 -- .../ignite/console/configuration/WrongFields.java | 2 +- 9 files changed, 129 insertions(+), 26 deletions(-) diff --git a/modules/web-console/backend/app/schemas.js b/modules/web-console/backend/app/schemas.js index ce48932..4741776 100644 --- a/modules/web-console/backend/app/schemas.js +++ b/modules/web-console/backend/app/schemas.js @@ -769,7 +769,10 @@ module.exports.factory = function(mongoose) { pessimisticTxLogLinger: Number, pessimisticTxLogSize: Number, txSerializableEnabled: Boolean, -txManagerFactory: String +txManagerFactory: String, +useJtaSynchronization: Boolean, +txTimeoutOnPartitionMapExchange: Number, // 2.5 +deadlockTimeout: Number // 2.8 }, sslEnabled: Boolean, sslContextFactory: { @@ -1187,7 +1190,8 @@ module.exports.factory = function(mongoose) { lockWaitTime: Number, rateTimeInterval: Number, tlbSize: Number, -subIntervals: Number +subIntervals: Number, +walAutoArchiveAfterInactivity: Number }, mvccVacuumThreadCount: Number, mvccVacuumFrequency: Number diff --git a/modules/web-console/frontend/app/configuration/components/page-configure-advanced/components/cluster-edit-form/templates/persistence.pug b/modules/web-console/frontend/app/configuration/components/page-configure-advanced/components/cluster-edit-form/templates/persistence.pug index a8ddd97..e0f5955 100644 --- a/modules/web-console/frontend/app/configuration/components/page-configure-advanced/components/cluster-edit-form/templates/persistence.pug +++ b/modules/web-console/frontend/app/configuration/components/page-configure-advanced/components/cluster-edit-form/templates/persistence.pug @@ -95,6 +95,27 @@ panel-collapsible( tip: 'A number of threads to use for the checkpointing purposes' }) .pc-form-grid-col-60 ++form-field__dropdown({ +label: 'WAL mode:', +model: `${model}.walMode`, +name: '"PersistenceWalMode"', +disabled: `!(${enabled})`, +placeholder: 'DEFAULT', +options: '[\ +{value: "DEFAULT", label: "DEFAULT"},\ +{value: "LOG_ONLY", label: "LOG_ONLY"},\ +{value: "BACKGROUND", label: "BACKGROUND"},\ +{value: "NONE", label: "NONE"}\ +]', +tip: 'Type define behavior wal fsync.\ +\ +DEFAULT - full-sync disk writes\ +LOG_ONLY - flushes application buffers\ +BACKGROUND - does not force application's buffer flush\ +NONE - WAL is disabled\ +' +}) +.pc-form-grid-col-60 +form-field__text({ label: 'WAL store path:', model: `${model}.walStorePath`, @@ -212,5 +233,15 @@ panel-collapsible( min: '1', tip: 'Number of sub - intervals the whole rate time interval will be split into to calculate rate - based metrics' }) +.pc-form-grid-col-60 ++form-field__number({ +label: 'WAL auto archive after inactivity:', +model: `${model}.walAutoArchiveAfterInactivity`, +name: '"PersistenceWalAutoArchiveAfterInactivity"', +disabled: `!(${enabled})`, +placeholder: '-1', +min: '-1', +tip: 'Time in millis to run auto archiving segment after last record logging' +}) .
[ignite] branch master updated: IGNITE-11604: SQL: Fixed problem with DROP COLUMN which was not able remove a column properly in some cases. This closes #6399.
This is an automated email from the ASF dual-hosted git repository. vozerov 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 89ba43f IGNITE-11604: SQL: Fixed problem with DROP COLUMN which was not able remove a column properly in some cases. This closes #6399. 89ba43f is described below commit 89ba43f527ab89e561fc95c003568fedbd117c9b Author: tledkov AuthorDate: Fri Apr 5 13:07:28 2019 +0300 IGNITE-11604: SQL: Fixed problem with DROP COLUMN which was not able remove a column properly in some cases. This closes #6399. --- .../processors/query/GridQueryProcessor.java | 14 +-- .../internal/processors/query/QuerySchema.java | 8 -- .../internal/processors/query/QueryUtils.java | 29 ++ 3 files changed, 36 insertions(+), 15 deletions(-) diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java index d91c2aa..0c21646 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java @@ -1252,23 +1252,11 @@ public class GridQueryProcessor extends GridProcessorAdapter { op0.tableName()); } else { -Map aliases = e.getAliases(); - for (String colName : op0.columns()) { if (err != null) break; -String fldName = colName; - -if (!F.isEmpty(aliases)) { -for (Map.Entry a : aliases.entrySet()) { -if (colName.equals(a.getValue())) { -fldName = a.getKey(); - -break; -} -} -} +String fldName = QueryUtils.fieldNameByAlias(e, colName); if (!e.getFields().containsKey(fldName)) { if (op0.ifExists()) { diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/QuerySchema.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/QuerySchema.java index 569a02e..082d52f 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/QuerySchema.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/QuerySchema.java @@ -298,8 +298,12 @@ public class QuerySchema implements Serializable { QueryEntity entity = ((List)entities).get(targetIdx); -for (String field : op0.columns()) -entity.getFields().remove(field); +for (String field : op0.columns()) { +boolean rmv = QueryUtils.removeField(entity, field); + +assert rmv || op0.ifExists() : "Invalid operation state [removed=" + rmv ++ ", ifExists=" + op0.ifExists() + ']'; +} } } } diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/QueryUtils.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/QueryUtils.java index da9279d..de0f743 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/QueryUtils.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/QueryUtils.java @@ -1547,6 +1547,35 @@ public class QueryUtils { } /** + * Get field name by alias. + * + * @param entity Query entity. + * @param alias Filed's alias. + * @return Field name. + */ +public static String fieldNameByAlias(QueryEntity entity, String alias) { +if (!F.isEmpty(entity.getAliases())) { +for (Map.Entry aliasEntry : entity.getAliases().entrySet()) { +if (F.eq(aliasEntry.getValue(), alias)) +return aliasEntry.getKey(); +} +} + +return alias; +} + +/** + * Remove field by alias. + * + * @param entity Query entity. + * @param alias Filed's alias. + * @return {@code true} if the field is removed. Otherwise returns {@code false}. + */ +public static boolean removeField(QueryEntity entity, String alias) { +return entity.getFields().remove(fieldNameByAlias(entity, alias)) != null; +} + +/** * Private constructor. */ private QueryUtils() {
[ignite] branch master updated: IGNITE-11604: SQL: Fixed problem with DROP COLUMN which was not able remove a column properly in some cases. This closes #6399.
This is an automated email from the ASF dual-hosted git repository. vozerov 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 9180be9 IGNITE-11604: SQL: Fixed problem with DROP COLUMN which was not able remove a column properly in some cases. This closes #6399. 9180be9 is described below commit 9180be97d098d25898f8ef55cfd6be0f2cedf5cf Author: tledkov AuthorDate: Fri Apr 5 12:23:59 2019 +0300 IGNITE-11604: SQL: Fixed problem with DROP COLUMN which was not able remove a column properly in some cases. This closes #6399. --- .../ignite/internal/processors/cache/index/StaticCacheDdlTest.java | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/StaticCacheDdlTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/StaticCacheDdlTest.java index 08d5f52..ad5dc9e 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/StaticCacheDdlTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/StaticCacheDdlTest.java @@ -123,7 +123,6 @@ public class StaticCacheDdlTest extends GridCommonAbstractTest { /** * @throws Exception if failed. */ -@Ignore("https://issues.apache.org/jira/browse/IGNITE-11604";) @Test public void testDropColumn() throws Exception { String fieldName = "field_to_drop";