ignite git commit: IGNITE-8370 Restore deleted file.
Repository: ignite Updated Branches: refs/heads/master d154eec03 -> 1df5a268d IGNITE-8370 Restore deleted file. Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/1df5a268 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/1df5a268 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/1df5a268 Branch: refs/heads/master Commit: 1df5a268dee98c589dc0a964868e74aebf49a111 Parents: d154eec Author: Alexey KuznetsovAuthored: Fri May 11 11:02:07 2018 +0700 Committer: Alexey Kuznetsov Committed: Fri May 11 11:02:07 2018 +0700 -- .../e2e/testcafe/page-models/pageSignin.js | 32 1 file changed, 32 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/1df5a268/modules/web-console/e2e/testcafe/page-models/pageSignin.js -- diff --git a/modules/web-console/e2e/testcafe/page-models/pageSignin.js b/modules/web-console/e2e/testcafe/page-models/pageSignin.js new file mode 100644 index 000..57031b6 --- /dev/null +++ b/modules/web-console/e2e/testcafe/page-models/pageSignin.js @@ -0,0 +1,32 @@ +/* + * 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. + */ + +import {Selector, t} from 'testcafe'; +import {CustomFormField} from '../components/FormField'; + +export const pageSignin = { +email: new CustomFormField({model: '$ctrl.data.email'}), +password: new CustomFormField({model: '$ctrl.data.password'}), +signinButton: Selector('button').withText('Sign In'), +selector: Selector('page-signin'), +async login(email, password) { +return await t +.typeText(this.email.control, email) +.typeText(this.password.control, password) +.click(this.signinButton); +} +};
svn commit: r1831364 - /ignite/site/trunk/features/machinelearning.html
Author: dmagda Date: Thu May 10 17:54:58 2018 New Revision: 1831364 URL: http://svn.apache.org/viewvc?rev=1831364=rev Log: updated ML page Modified: ignite/site/trunk/features/machinelearning.html Modified: ignite/site/trunk/features/machinelearning.html URL: http://svn.apache.org/viewvc/ignite/site/trunk/features/machinelearning.html?rev=1831364=1831363=1831364=diff == --- ignite/site/trunk/features/machinelearning.html (original) +++ ignite/site/trunk/features/machinelearning.html Thu May 10 17:54:58 2018 @@ -82,15 +82,15 @@ under the License. Problem #2: Lack of Horizontal Scalability -The second factor is related to scalability. A number of ML and DL algorithms that have to -process data sets which no longer fit within a single server unit is constantly growing. This urges -the data scientist to come up with sophisicated solutions or turn to distributed +The second factor is related to scalability. ML and DL algorithms that have to +process data sets which no longer fit within a single server unit are constantly growing. +This urges the data scientist to come up with sophisticated solutions oâr turn to distributed computing platforms such as Apache Spark and TensorFlow. However, those platforms mostly solve -only a part of the puzzle which is the models training, making its a burden of the developers -to decide how do deploy the models in production later. +only a part of the puzzle which is the models training, making it a burden of the developers to +decide how do deploy the models in production later. -Zero ETL and Massive Scalability With Ignite +Zero ETL and Massive Scalability Ignite Machine Learning relies on Ignite's memory-centric storage that brings massive scalability @@ -104,6 +104,14 @@ under the License. long processing wait times, Ignite Machine learning enables continuous learning that can improve decisions based on the latest data as it arrives in real-time. + +Fault Tolerance and Continuous Learning + +Apache Ignite Machine Learning is tolerant to node failures. This means that in the case of node +failures during the learning process, all recovery procedures will be transparent to the user, +learning processes won't be interrupted, and we will get results in the time similar to the case when +all nodes work fine. + https://apacheignite.readme.io/docs/machine-learning; target="_blank">Read more
[4/5] ignite git commit: Merge branch 'master' into ignite-5789-1
http://git-wip-us.apache.org/repos/asf/ignite/blob/3daf8128/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java -- diff --cc modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java index fb5c107,39f4ed1..3e0b1de --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java @@@ -40,8 -41,9 +41,10 @@@ import org.apache.ignite.IgniteCheckedE import org.apache.ignite.IgniteLogger; import org.apache.ignite.IgniteSystemProperties; import org.apache.ignite.cache.CacheMode; + import org.apache.ignite.cache.CacheRebalanceMode; import org.apache.ignite.cluster.ClusterNode; +import org.apache.ignite.configuration.CacheConfiguration; + import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.configuration.NearCacheConfiguration; import org.apache.ignite.events.DiscoveryEvent; import org.apache.ignite.internal.IgniteClientDisconnectedCheckedException; @@@ -69,9 -72,11 +73,12 @@@ import org.apache.ignite.internal.proce import org.apache.ignite.internal.processors.cache.ExchangeDiscoveryEvents; import org.apache.ignite.internal.processors.cache.GridCacheContext; import org.apache.ignite.internal.processors.cache.GridCacheMvccCandidate; +import org.apache.ignite.internal.processors.cache.GridCacheProcessor; import org.apache.ignite.internal.processors.cache.GridCacheSharedContext; + import org.apache.ignite.internal.processors.cache.LocalJoinCachesContext; import org.apache.ignite.internal.processors.cache.StateChangeRequest; + import org.apache.ignite.internal.processors.cache.WalStateAbstractMessage; + import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.latch.Latch; import org.apache.ignite.internal.processors.cache.distributed.dht.GridClientPartitionTopology; import org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtLocalPartition; import org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtPartitionState; @@@ -724,29 -789,7 +791,29 @@@ public class GridDhtPartitionsExchangeF cctx.database().readCheckpointAndRestoreMemory(startDescs); } - cctx.cache().startCachesOnLocalJoin(caches, initialVersion()); + cctx.cache().startCachesOnLocalJoin(locJoinCtx, initialVersion()); + +ensureClientCachesStarted(); +} + +/** + * Start client caches if absent. + */ +private void ensureClientCachesStarted() { +GridCacheProcessor cacheProcessor = cctx.cache(); + +Set cacheNames = new HashSet<>(cacheProcessor.cacheNames()); + +List notStartedCacheConfigs = new ArrayList<>(); + +for (CacheConfiguration cCfg : cctx.gridConfig().getCacheConfiguration()) { +if (!cacheNames.contains(cCfg.getName())) { +notStartedCacheConfigs.add(cCfg); +} +} + +if (!notStartedCacheConfigs.isEmpty()) +cacheProcessor.dynamicStartCaches(notStartedCacheConfigs, false, false); } /** http://git-wip-us.apache.org/repos/asf/ignite/blob/3daf8128/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ClientReconnectAfterClusterRestartTest.java -- diff --cc modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ClientReconnectAfterClusterRestartTest.java index ffb339c,505d373..8c0cb1a --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ClientReconnectAfterClusterRestartTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ClientReconnectAfterClusterRestartTest.java @@@ -17,11 -17,10 +17,13 @@@ package org.apache.ignite.internal.processors.cache; + import javax.cache.CacheException; +import java.util.ArrayList; +import java.util.LinkedHashMap; +import java.util.List; import org.apache.ignite.Ignite; import org.apache.ignite.IgniteCache; + import org.apache.ignite.IgniteClientDisconnectedException; import org.apache.ignite.IgniteDataStreamer; import org.apache.ignite.binary.BinaryObject; import org.apache.ignite.binary.BinaryObjectBuilder; @@@ -115,10 -114,14 +116,12 @@@ public class ClientReconnectAfterCluste /** */ public void testReconnectClient() throws Exception { try { -startGrid(0); - -Ignite client = startGrid(1); - +startGrid(SERVER_ID); +Ignite client = startGrid(CLIENT_ID); checkTopology(2); +
[2/5] ignite git commit: IGNITE-5789: code review fixes
IGNITE-5789: code review fixes Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/fb1fb643 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/fb1fb643 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/fb1fb643 Branch: refs/heads/ignite-5789-1 Commit: fb1fb643b41d951bf30e9af77eb6c190b76226cb Parents: bfa7dc4 Author: vkAuthored: Tue Apr 24 18:56:01 2018 +0300 Committer: vk Committed: Tue Apr 24 18:56:01 2018 +0300 -- .../dht/preloader/GridDhtPartitionsExchangeFuture.java | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/fb1fb643/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java index 31b7776..fb5c107 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java @@ -734,16 +734,19 @@ public class GridDhtPartitionsExchangeFuture extends GridDhtTopologyFutureAdapte */ private void ensureClientCachesStarted() { GridCacheProcessor cacheProcessor = cctx.cache(); + +Set cacheNames = new HashSet<>(cacheProcessor.cacheNames()); + List notStartedCacheConfigs = new ArrayList<>(); + for (CacheConfiguration cCfg : cctx.gridConfig().getCacheConfiguration()) { -if (!cacheProcessor.cacheNames().contains(cCfg.getName())) { +if (!cacheNames.contains(cCfg.getName())) { notStartedCacheConfigs.add(cCfg); } } -if (!notStartedCacheConfigs.isEmpty()) { +if (!notStartedCacheConfigs.isEmpty()) cacheProcessor.dynamicStartCaches(notStartedCacheConfigs, false, false); -} } /**
[3/5] ignite git commit: IGNITE-5789: added some comments
IGNITE-5789: added some comments Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/f92ea3e9 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/f92ea3e9 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/f92ea3e9 Branch: refs/heads/ignite-5789-1 Commit: f92ea3e9538ef9b629bc37b91312dba9b7d5a1e0 Parents: fb1fb64 Author: vkAuthored: Tue Apr 24 19:51:45 2018 +0300 Committer: vk Committed: Tue Apr 24 19:51:45 2018 +0300 -- .../processors/cache/ClientReconnectAfterClusterRestartTest.java | 3 +++ 1 file changed, 3 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/f92ea3e9/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ClientReconnectAfterClusterRestartTest.java -- diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ClientReconnectAfterClusterRestartTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ClientReconnectAfterClusterRestartTest.java index fb9cd91..ffb339c 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ClientReconnectAfterClusterRestartTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ClientReconnectAfterClusterRestartTest.java @@ -44,7 +44,10 @@ import org.jetbrains.annotations.NotNull; */ public class ClientReconnectAfterClusterRestartTest extends GridCommonAbstractTest { +/** Server id. */ private static final int SERVER_ID = 0; + +/** Client id. */ private static final int CLIENT_ID = 1; /** Cache params. */
[1/5] ignite git commit: IGNITE-5789: if server was restarted, client doesn't create caches defined in client's configuration
Repository: ignite Updated Branches: refs/heads/ignite-5789-1 [created] 3daf81286 IGNITE-5789: if server was restarted, client doesn't create caches defined in client's configuration 1. Modified test so it fails when client doesn't find its own cache after reconnect. 2. Fixed bug by recreating missing cache on local join. Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/bfa7dc4f Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/bfa7dc4f Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/bfa7dc4f Branch: refs/heads/ignite-5789-1 Commit: bfa7dc4f83307a58da475c87068f725e72a827b7 Parents: 726481c Author: vkAuthored: Mon Apr 23 21:06:23 2018 +0300 Committer: vk Committed: Mon Apr 23 21:50:09 2018 +0300 -- .../GridDhtPartitionsExchangeFuture.java| 22 ++ .../ClientReconnectAfterClusterRestartTest.java | 32 ++-- 2 files changed, 38 insertions(+), 16 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/bfa7dc4f/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java index 240b5f0..31b7776 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java @@ -41,6 +41,7 @@ import org.apache.ignite.IgniteLogger; import org.apache.ignite.IgniteSystemProperties; import org.apache.ignite.cache.CacheMode; import org.apache.ignite.cluster.ClusterNode; +import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.configuration.NearCacheConfiguration; import org.apache.ignite.events.DiscoveryEvent; import org.apache.ignite.internal.IgniteClientDisconnectedCheckedException; @@ -68,6 +69,7 @@ import org.apache.ignite.internal.processors.cache.ExchangeContext; import org.apache.ignite.internal.processors.cache.ExchangeDiscoveryEvents; import org.apache.ignite.internal.processors.cache.GridCacheContext; import org.apache.ignite.internal.processors.cache.GridCacheMvccCandidate; +import org.apache.ignite.internal.processors.cache.GridCacheProcessor; import org.apache.ignite.internal.processors.cache.GridCacheSharedContext; import org.apache.ignite.internal.processors.cache.StateChangeRequest; import org.apache.ignite.internal.processors.cache.distributed.dht.GridClientPartitionTopology; @@ -723,6 +725,25 @@ public class GridDhtPartitionsExchangeFuture extends GridDhtTopologyFutureAdapte } cctx.cache().startCachesOnLocalJoin(caches, initialVersion()); + +ensureClientCachesStarted(); +} + +/** + * Start client caches if absent. + */ +private void ensureClientCachesStarted() { +GridCacheProcessor cacheProcessor = cctx.cache(); +List notStartedCacheConfigs = new ArrayList<>(); +for (CacheConfiguration cCfg : cctx.gridConfig().getCacheConfiguration()) { +if (!cacheProcessor.cacheNames().contains(cCfg.getName())) { +notStartedCacheConfigs.add(cCfg); +} +} + +if (!notStartedCacheConfigs.isEmpty()) { +cacheProcessor.dynamicStartCaches(notStartedCacheConfigs, false, false); +} } /** @@ -3485,6 +3506,7 @@ public class GridDhtPartitionsExchangeFuture extends GridDhtTopologyFutureAdapte /** */ NONE } + /** * */ http://git-wip-us.apache.org/repos/asf/ignite/blob/bfa7dc4f/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ClientReconnectAfterClusterRestartTest.java -- diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ClientReconnectAfterClusterRestartTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ClientReconnectAfterClusterRestartTest.java index 392cdc7..fb9cd91 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ClientReconnectAfterClusterRestartTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ClientReconnectAfterClusterRestartTest.java @@ -17,6 +17,9 @@ package
ignite git commit: IGNITE-7896 FilePageStore truncate now actually remove redundant partition page file.
Repository: ignite Updated Branches: refs/heads/master 619d6c575 -> d154eec03 IGNITE-7896 FilePageStore truncate now actually remove redundant partition page file. Signed-off-by: Andrey GuraProject: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/d154eec0 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/d154eec0 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/d154eec0 Branch: refs/heads/master Commit: d154eec036a7c6a65bee14134c9244655b623862 Parents: 619d6c5 Author: Ivan Daschinskiy Authored: Thu May 10 20:00:12 2018 +0300 Committer: Andrey Gura Committed: Thu May 10 20:00:12 2018 +0300 -- .../cache/persistence/file/FilePageStore.java | 23 +-- .../IgnitePdsPartitionFilesTruncateTest.java| 153 +++ .../ignite/testsuites/IgnitePdsTestSuite2.java | 3 + 3 files changed, 170 insertions(+), 9 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/d154eec0/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/file/FilePageStore.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/file/FilePageStore.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/file/FilePageStore.java index fa02f5d..05f9421 100755 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/file/FilePageStore.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/file/FilePageStore.java @@ -260,26 +260,31 @@ public class FilePageStore implements PageStore { public void truncate(int tag) throws PersistentStorageIOException { lock.writeLock().lock(); +long pages = this.pages(); + try { if (!inited) return; this.tag = tag; -fileIO.clear(); - -long newAlloc = initFile(); - -long delta = newAlloc - allocated.getAndSet(newAlloc); - -assert delta % pageSize == 0; - -allocatedTracker.updateTotalAllocatedPages(delta / pageSize); +try { +fileIO.close(); +} +finally { +cfgFile.delete(); +} } catch (IOException e) { throw new PersistentStorageIOException(e); } finally { +inited = false; + +allocated.set(0); + +allocatedTracker.updateTotalAllocatedPages(-1L * pages); + lock.writeLock().unlock(); } } http://git-wip-us.apache.org/repos/asf/ignite/blob/d154eec0/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsPartitionFilesTruncateTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsPartitionFilesTruncateTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsPartitionFilesTruncateTest.java new file mode 100644 index 000..78c2453 --- /dev/null +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsPartitionFilesTruncateTest.java @@ -0,0 +1,153 @@ +/* + * 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.persistence; + +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.Arrays; +import java.util.regex.Matcher; +import java.util.regex.Pattern; +import org.apache.ignite.Ignite; +import org.apache.ignite.IgniteDataStreamer; +import org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunction; +import org.apache.ignite.configuration.CacheConfiguration; +import org.apache.ignite.configuration.DataRegionConfiguration; +import
ignite git commit: IGNITE-7535: SerialVersionUID added to exception.
Repository: ignite Updated Branches: refs/heads/ignite-2.5 d2719398a -> 46dac58cd IGNITE-7535: SerialVersionUID added to exception. (cherry picked from commit 619d6c5) Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/46dac58c Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/46dac58c Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/46dac58c Branch: refs/heads/ignite-2.5 Commit: 46dac58cdd1ee7e57fc165333e84452dc414cbf3 Parents: d271939 Author: dpavlovAuthored: Thu May 10 19:48:24 2018 +0300 Committer: dpavlov Committed: Thu May 10 19:51:49 2018 +0300 -- .../org/apache/ignite/internal/sql/SqlStrictParseException.java | 3 +++ 1 file changed, 3 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/46dac58c/modules/core/src/main/java/org/apache/ignite/internal/sql/SqlStrictParseException.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/sql/SqlStrictParseException.java b/modules/core/src/main/java/org/apache/ignite/internal/sql/SqlStrictParseException.java index 7c83197..119b854 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/sql/SqlStrictParseException.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/sql/SqlStrictParseException.java @@ -22,6 +22,9 @@ package org.apache.ignite.internal.sql; * statement isn't passed to H2 parser. */ public class SqlStrictParseException extends SqlParseException { +/** */ +private static final long serialVersionUID = 0L; + /** * Constructor. * @param e SQL parse exception.
ignite git commit: IGNITE-7535: SerialVersionUID added to exception.
Repository: ignite Updated Branches: refs/heads/master 492d4118e -> 619d6c575 IGNITE-7535: SerialVersionUID added to exception. Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/619d6c57 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/619d6c57 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/619d6c57 Branch: refs/heads/master Commit: 619d6c575a267ac8585a76fc82889d5073bfb861 Parents: 492d411 Author: dpavlovAuthored: Thu May 10 19:48:24 2018 +0300 Committer: dpavlov Committed: Thu May 10 19:48:24 2018 +0300 -- .../org/apache/ignite/internal/sql/SqlStrictParseException.java | 3 +++ 1 file changed, 3 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/619d6c57/modules/core/src/main/java/org/apache/ignite/internal/sql/SqlStrictParseException.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/sql/SqlStrictParseException.java b/modules/core/src/main/java/org/apache/ignite/internal/sql/SqlStrictParseException.java index 7c83197..119b854 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/sql/SqlStrictParseException.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/sql/SqlStrictParseException.java @@ -22,6 +22,9 @@ package org.apache.ignite.internal.sql; * statement isn't passed to H2 parser. */ public class SqlStrictParseException extends SqlParseException { +/** */ +private static final long serialVersionUID = 0L; + /** * Constructor. * @param e SQL parse exception.
svn commit: r1831353 - /ignite/site/trunk/community/resources.html
Author: dmagda Date: Thu May 10 16:13:31 2018 New Revision: 1831353 URL: http://svn.apache.org/viewvc?rev=1831353=rev Log: Added Ivan Rakov to committers' list Modified: ignite/site/trunk/community/resources.html Modified: ignite/site/trunk/community/resources.html URL: http://svn.apache.org/viewvc/ignite/site/trunk/community/resources.html?rev=1831353=1831352=1831353=diff == --- ignite/site/trunk/community/resources.html (original) +++ ignite/site/trunk/community/resources.html Thu May 10 16:13:31 2018 @@ -175,6 +175,7 @@ under the License. Igor SapegoGridGain Ilya Sterin *ChronoTrack Irina Vasilinets *WhatsApp +Ivan RakovGridGain/tr> Konstantin Boudnik * Nikita Ivanov *GridGain Nikolai IzhikovSberTech @@ -242,7 +243,6 @@ under the License. Ilya Lantukh Ilya Suntsov Ivan Veselovsky -Ivan Rakov Jens Hoffman John Levey Krome Plasma
ignite git commit: IGNITE-7535: SQL: Added encoding option to COPY command. This closes #3487.
Repository: ignite Updated Branches: refs/heads/ignite-2.5 741584330 -> d2719398a IGNITE-7535: SQL: Added encoding option to COPY command. This closes #3487. Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/d2719398 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/d2719398 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/d2719398 Branch: refs/heads/ignite-2.5 Commit: d2719398a90da2ca5e86e9c31b53ac6363d89d52 Parents: 7415843 Author: tledkov-gridgainAuthored: Thu May 10 18:12:41 2018 +0300 Committer: devozerov Committed: Thu May 10 18:13:28 2018 +0300 -- .../ignite/examples/sql/SqlJdbcCopyExample.java | 4 +- .../thin/JdbcThinBulkLoadAbstractSelfTest.java | 408 +++ .../src/test/resources/bulkload2_utf.csv| 2 - .../src/test/resources/bulkload2_utf8.csv | 2 + .../test/resources/bulkload2_windows1251.csv| 2 + .../ignite/internal/jdbc2/JdbcQueryTask.java| 2 +- .../bulkload/BulkLoadCacheWriter.java | 4 +- .../processors/bulkload/BulkLoadCsvFormat.java | 25 +- .../processors/bulkload/BulkLoadCsvParser.java | 19 +- .../processors/bulkload/BulkLoadFormat.java | 4 +- .../bulkload/pipeline/CharsetDecoderBlock.java | 15 +- .../bulkload/pipeline/PipelineBlock.java| 5 +- .../apache/ignite/internal/sql/SqlKeyword.java | 3 + .../ignite/internal/sql/SqlParseException.java | 13 + .../apache/ignite/internal/sql/SqlParser.java | 11 +- .../internal/sql/SqlStrictParseException.java | 32 ++ .../sql/command/SqlBulkLoadCommand.java | 32 +- .../internal/sql/SqlParserBulkLoadSelfTest.java | 64 ++- .../processors/query/h2/IgniteH2Indexing.java | 5 +- .../yardstick/upload/model/QueryFactory.java| 2 +- 20 files changed, 540 insertions(+), 114 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/d2719398/examples/src/main/java/org/apache/ignite/examples/sql/SqlJdbcCopyExample.java -- diff --git a/examples/src/main/java/org/apache/ignite/examples/sql/SqlJdbcCopyExample.java b/examples/src/main/java/org/apache/ignite/examples/sql/SqlJdbcCopyExample.java index 1271b39..394c3b0 100644 --- a/examples/src/main/java/org/apache/ignite/examples/sql/SqlJdbcCopyExample.java +++ b/examples/src/main/java/org/apache/ignite/examples/sql/SqlJdbcCopyExample.java @@ -58,8 +58,8 @@ public class SqlJdbcCopyExample { print("Created database objects."); // Load data from CSV file. -executeCommand(conn, "COPY FROM \"" + - IgniteUtils.resolveIgnitePath("examples/src/main/resources/sql/city.csv") + "\" " + +executeCommand(conn, "COPY FROM '" + + IgniteUtils.resolveIgnitePath("examples/src/main/resources/sql/city.csv") + "' " + "INTO City (ID, Name, CountryCode, District, Population) FORMAT CSV"); // Read data. http://git-wip-us.apache.org/repos/asf/ignite/blob/d2719398/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinBulkLoadAbstractSelfTest.java -- diff --git a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinBulkLoadAbstractSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinBulkLoadAbstractSelfTest.java index e9cb832..2a4c799 100644 --- a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinBulkLoadAbstractSelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinBulkLoadAbstractSelfTest.java @@ -22,9 +22,16 @@ import org.apache.ignite.cache.CacheMode; import org.apache.ignite.cache.QueryEntity; import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.configuration.NearCacheConfiguration; +import org.apache.ignite.internal.processors.bulkload.BulkLoadCsvFormat; +import org.apache.ignite.internal.processors.bulkload.BulkLoadCsvParser; import org.apache.ignite.internal.processors.query.QueryUtils; +import org.apache.ignite.lang.IgniteClosure; import org.apache.ignite.testframework.GridTestUtils; +import java.nio.ByteBuffer; +import java.nio.charset.Charset; +import java.nio.charset.CodingErrorAction; +import java.nio.charset.UnsupportedCharsetException; import java.sql.BatchUpdateException; import java.sql.PreparedStatement; import java.sql.ResultSet; @@ -35,7 +42,6 @@ import java.util.Collections; import java.util.Objects; import java.util.concurrent.Callable; -import static org.apache.ignite.IgniteSystemProperties.IGNITE_SQL_PARSER_DISABLE_H2_FALLBACK; import static org.apache.ignite.cache.CacheMode.PARTITIONED; import static
ignite git commit: IGNITE-7535: SQL: Added encoding option to COPY command. This closes #3487.
Repository: ignite Updated Branches: refs/heads/master 89aedb19f -> 492d4118e IGNITE-7535: SQL: Added encoding option to COPY command. This closes #3487. Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/492d4118 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/492d4118 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/492d4118 Branch: refs/heads/master Commit: 492d4118e715745eaabafdd9d50e4abd26ed34f2 Parents: 89aedb1 Author: tledkov-gridgainAuthored: Thu May 10 18:12:41 2018 +0300 Committer: devozerov Committed: Thu May 10 18:12:41 2018 +0300 -- .../ignite/examples/sql/SqlJdbcCopyExample.java | 4 +- .../thin/JdbcThinBulkLoadAbstractSelfTest.java | 408 +++ .../src/test/resources/bulkload2_utf.csv| 2 - .../src/test/resources/bulkload2_utf8.csv | 2 + .../test/resources/bulkload2_windows1251.csv| 2 + .../ignite/internal/jdbc2/JdbcQueryTask.java| 2 +- .../bulkload/BulkLoadCacheWriter.java | 4 +- .../processors/bulkload/BulkLoadCsvFormat.java | 25 +- .../processors/bulkload/BulkLoadCsvParser.java | 19 +- .../processors/bulkload/BulkLoadFormat.java | 4 +- .../bulkload/pipeline/CharsetDecoderBlock.java | 15 +- .../bulkload/pipeline/PipelineBlock.java| 5 +- .../apache/ignite/internal/sql/SqlKeyword.java | 3 + .../ignite/internal/sql/SqlParseException.java | 13 + .../apache/ignite/internal/sql/SqlParser.java | 11 +- .../internal/sql/SqlStrictParseException.java | 32 ++ .../sql/command/SqlBulkLoadCommand.java | 32 +- .../internal/sql/SqlParserBulkLoadSelfTest.java | 64 ++- .../processors/query/h2/IgniteH2Indexing.java | 5 +- .../yardstick/upload/model/QueryFactory.java| 2 +- 20 files changed, 540 insertions(+), 114 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/492d4118/examples/src/main/java/org/apache/ignite/examples/sql/SqlJdbcCopyExample.java -- diff --git a/examples/src/main/java/org/apache/ignite/examples/sql/SqlJdbcCopyExample.java b/examples/src/main/java/org/apache/ignite/examples/sql/SqlJdbcCopyExample.java index 1271b39..394c3b0 100644 --- a/examples/src/main/java/org/apache/ignite/examples/sql/SqlJdbcCopyExample.java +++ b/examples/src/main/java/org/apache/ignite/examples/sql/SqlJdbcCopyExample.java @@ -58,8 +58,8 @@ public class SqlJdbcCopyExample { print("Created database objects."); // Load data from CSV file. -executeCommand(conn, "COPY FROM \"" + - IgniteUtils.resolveIgnitePath("examples/src/main/resources/sql/city.csv") + "\" " + +executeCommand(conn, "COPY FROM '" + + IgniteUtils.resolveIgnitePath("examples/src/main/resources/sql/city.csv") + "' " + "INTO City (ID, Name, CountryCode, District, Population) FORMAT CSV"); // Read data. http://git-wip-us.apache.org/repos/asf/ignite/blob/492d4118/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinBulkLoadAbstractSelfTest.java -- diff --git a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinBulkLoadAbstractSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinBulkLoadAbstractSelfTest.java index e9cb832..2a4c799 100644 --- a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinBulkLoadAbstractSelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinBulkLoadAbstractSelfTest.java @@ -22,9 +22,16 @@ import org.apache.ignite.cache.CacheMode; import org.apache.ignite.cache.QueryEntity; import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.configuration.NearCacheConfiguration; +import org.apache.ignite.internal.processors.bulkload.BulkLoadCsvFormat; +import org.apache.ignite.internal.processors.bulkload.BulkLoadCsvParser; import org.apache.ignite.internal.processors.query.QueryUtils; +import org.apache.ignite.lang.IgniteClosure; import org.apache.ignite.testframework.GridTestUtils; +import java.nio.ByteBuffer; +import java.nio.charset.Charset; +import java.nio.charset.CodingErrorAction; +import java.nio.charset.UnsupportedCharsetException; import java.sql.BatchUpdateException; import java.sql.PreparedStatement; import java.sql.ResultSet; @@ -35,7 +42,6 @@ import java.util.Collections; import java.util.Objects; import java.util.concurrent.Callable; -import static org.apache.ignite.IgniteSystemProperties.IGNITE_SQL_PARSER_DISABLE_H2_FALLBACK; import static org.apache.ignite.cache.CacheMode.PARTITIONED; import static
ignite git commit: IGNITE-7968 IgniteAtomicSequence.incrementAndGet throws ClusterTopologyException: Failed to acquire lock for keys - Fixes #3868.
Repository: ignite Updated Branches: refs/heads/master e8e462663 -> 89aedb19f IGNITE-7968 IgniteAtomicSequence.incrementAndGet throws ClusterTopologyException: Failed to acquire lock for keys - Fixes #3868. Signed-off-by: dpavlovProject: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/89aedb19 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/89aedb19 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/89aedb19 Branch: refs/heads/master Commit: 89aedb19f4b679d1702173f6061f676d48c173a1 Parents: e8e4626 Author: pvinokurov Authored: Thu May 10 17:32:11 2018 +0300 Committer: dpavlov Committed: Thu May 10 17:32:11 2018 +0300 -- .../GridCacheAtomicSequenceImpl.java| 12 +++ ...eAbstractDataStructuresFailoverSelfTest.java | 34 ++-- 2 files changed, 36 insertions(+), 10 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/89aedb19/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheAtomicSequenceImpl.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheAtomicSequenceImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheAtomicSequenceImpl.java index fd4db4a..4e20267 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheAtomicSequenceImpl.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheAtomicSequenceImpl.java @@ -26,18 +26,15 @@ import java.io.ObjectStreamException; import java.util.concurrent.Callable; import java.util.concurrent.locks.Lock; import java.util.concurrent.locks.ReentrantLock; -import org.apache.ignite.IgniteCacheRestartingException; import org.apache.ignite.IgniteCheckedException; import org.apache.ignite.IgniteException; -import org.apache.ignite.IgniteLogger; import org.apache.ignite.internal.GridKernalContext; +import org.apache.ignite.internal.cluster.ClusterTopologyCheckedException; import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion; -import org.apache.ignite.internal.processors.cache.GridCacheContext; import org.apache.ignite.internal.processors.cache.IgniteInternalCache; import org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxLocal; -import org.apache.ignite.internal.util.future.GridFutureAdapter; -import org.apache.ignite.internal.util.future.IgniteFutureImpl; import org.apache.ignite.internal.util.tostring.GridToStringInclude; +import org.apache.ignite.internal.util.typedef.X; import org.apache.ignite.internal.util.typedef.internal.A; import org.apache.ignite.internal.util.typedef.internal.CU; import org.apache.ignite.internal.util.typedef.internal.S; @@ -223,7 +220,7 @@ public final class GridCacheAtomicSequenceImpl extends AtomicDataStructureProxy< updateCall = internalUpdate(l, updated); try { -return updateCall.call(); +return CU.retryTopologySafe(updateCall); } catch (IgniteCheckedException | IgniteException | IllegalStateException e) { throw e; @@ -359,7 +356,8 @@ public final class GridCacheAtomicSequenceImpl extends AtomicDataStructureProxy< return curLocVal; } catch (Error | Exception e) { -U.error(log, "Failed to get and add: " + this, e); +if(!X.hasCause(e, ClusterTopologyCheckedException.class)) +U.error(log, "Failed to get and add: " + this, e); throw e; } http://git-wip-us.apache.org/repos/asf/ignite/blob/89aedb19/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAbstractDataStructuresFailoverSelfTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAbstractDataStructuresFailoverSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAbstractDataStructuresFailoverSelfTest.java index 69a466d..9da1161 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAbstractDataStructuresFailoverSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAbstractDataStructuresFailoverSelfTest.java @@ -90,6 +90,9 @@ public abstract class
ignite git commit: IGNITE-8162 Handle ClassNotFoundException during deserialization of persisted cache configuration
Repository: ignite Updated Branches: refs/heads/master bec3e9bf9 -> e8e462663 IGNITE-8162 Handle ClassNotFoundException during deserialization of persisted cache configuration Signed-off-by: Anton VinogradovProject: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/e8e46266 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/e8e46266 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/e8e46266 Branch: refs/heads/master Commit: e8e4626633faf734b7acfb3237582503dc6a2ed1 Parents: bec3e9b Author: denis.garus Authored: Thu May 10 16:35:45 2018 +0300 Committer: Anton Vinogradov Committed: Thu May 10 16:35:45 2018 +0300 -- .../persistence/file/FilePageStoreManager.java | 9 ++ .../IgnitePdsCorruptedCacheDataTest.java| 148 +++ .../ignite/testsuites/IgnitePdsTestSuite2.java | 3 + 3 files changed, 160 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/e8e46266/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/file/FilePageStoreManager.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/file/FilePageStoreManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/file/FilePageStoreManager.java index de99724..18185c5 100755 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/file/FilePageStoreManager.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/file/FilePageStoreManager.java @@ -692,6 +692,15 @@ public class FilePageStoreManager extends GridCacheSharedManagerAdapter implemen throw new IgniteCheckedException("Failed to read cache configuration from disk for cache: " + conf.getAbsolutePath(), e); } +catch (IgniteCheckedException e) { +if (e.hasCause(ClassNotFoundException.class)) +throw new IgniteCheckedException("An error occurred during cache configuration loading from file [file=" + +conf.getAbsolutePath() + "]. You may want to remove the configuration file; cache will be running " + +"after next node start if static Ignite Configuration contains correct configuration of this cache. " + +"If it was started dynamically, you may need to start it again (all data will be present).", e); +else +throw e; +} } /** {@inheritDoc} */ http://git-wip-us.apache.org/repos/asf/ignite/blob/e8e46266/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsCorruptedCacheDataTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsCorruptedCacheDataTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsCorruptedCacheDataTest.java new file mode 100644 index 000..74613a8 --- /dev/null +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsCorruptedCacheDataTest.java @@ -0,0 +1,148 @@ +/* + * 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.persistence; + +import java.io.File; +import javax.cache.configuration.Factory; +import org.apache.ignite.IgniteCache; +import org.apache.ignite.IgniteCheckedException; +import org.apache.ignite.configuration.CacheConfiguration; +import org.apache.ignite.configuration.DataRegionConfiguration; +import org.apache.ignite.configuration.DataStorageConfiguration; +import org.apache.ignite.configuration.IgniteConfiguration; +import org.apache.ignite.internal.IgniteEx; +import org.apache.ignite.internal.processors.cache.GridCacheSharedContext; +import
ignite git commit: IGNITE-8424 Add directory sorting and skip duplicated config file in order to consistently start nodes.
Repository: ignite Updated Branches: refs/heads/master 98e22cbd7 -> bec3e9bf9 IGNITE-8424 Add directory sorting and skip duplicated config file in order to consistently start nodes. Signed-off-by: Andrey GuraProject: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/bec3e9bf Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/bec3e9bf Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/bec3e9bf Branch: refs/heads/master Commit: bec3e9bf9e0c9c5b4bbcda7eb226ffc821665b6e Parents: 98e22cb Author: Ivan Daschinskiy Authored: Thu May 10 14:56:35 2018 +0300 Committer: Andrey Gura Committed: Thu May 10 14:56:35 2018 +0300 -- .../persistence/file/FilePageStoreManager.java | 21 ++- ...nitePdsDuplicatedCacheConfigurationTest.java | 161 +++ .../ignite/testsuites/IgnitePdsTestSuite.java | 2 + 3 files changed, 182 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/bec3e9bf/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/file/FilePageStoreManager.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/file/FilePageStoreManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/file/FilePageStoreManager.java index 661694d..de99724 100755 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/file/FilePageStoreManager.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/file/FilePageStoreManager.java @@ -30,6 +30,7 @@ import java.nio.file.DirectoryStream; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.StandardCopyOption; +import java.util.Arrays; import java.util.Collections; import java.util.HashMap; import java.util.Map; @@ -623,6 +624,8 @@ public class FilePageStoreManager extends GridCacheSharedManagerAdapter implemen Map ccfgs = new HashMap<>(); +Arrays.sort(files); + for (File file : files) { if (file.isDirectory()) { if (file.getName().startsWith(CACHE_DIR_PREFIX)) { @@ -631,7 +634,14 @@ public class FilePageStoreManager extends GridCacheSharedManagerAdapter implemen if (conf.exists() && conf.length() > 0) { StoredCacheData cacheData = readCacheData(conf); -ccfgs.put(cacheData.config().getName(), cacheData); +String cacheName = cacheData.config().getName(); + +if (!ccfgs.containsKey(cacheName)) +ccfgs.put(cacheName, cacheData); +else { +U.warn(log, "Cache with name=" + cacheName + " is already registered, skipping config file " ++ file.getName()); +} } } else if (file.getName().startsWith(CACHE_GRP_DIR_PREFIX)) @@ -657,7 +667,14 @@ public class FilePageStoreManager extends GridCacheSharedManagerAdapter implemen if (!file.isDirectory() && file.getName().endsWith(CACHE_DATA_FILENAME) && file.length() > 0) { StoredCacheData cacheData = readCacheData(file); -ccfgs.put(cacheData.config().getName(), cacheData); +String cacheName = cacheData.config().getName(); + +if (!ccfgs.containsKey(cacheName)) +ccfgs.put(cacheName, cacheData); +else { +U.warn(log, "Cache with name=" + cacheName + " is already registered, skipping config file " ++ file.getName() + " in group directory " + grpDir.getName()); +} } } } http://git-wip-us.apache.org/repos/asf/ignite/blob/bec3e9bf/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsDuplicatedCacheConfigurationTest.java -- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsDuplicatedCacheConfigurationTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsDuplicatedCacheConfigurationTest.java new file mode 100644 index 000..66459bd --- /dev/null +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsDuplicatedCacheConfigurationTest.java @@ -0,0 +1,161 @@ +/* + * Licensed to the Apache Software
ignite git commit: Javadoc typo fix
Repository: ignite Updated Branches: refs/heads/master 3cdee5331 -> 98e22cbd7 Javadoc typo fix Signed-off-by: Anton VinogradovProject: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/98e22cbd Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/98e22cbd Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/98e22cbd Branch: refs/heads/master Commit: 98e22cbd78ee73e1db44715bec02fc17ad7035ea Parents: 3cdee53 Author: Anton Vinogradov Authored: Thu May 10 12:22:13 2018 +0300 Committer: Anton Vinogradov Committed: Thu May 10 12:22:13 2018 +0300 -- .../processors/cache/distributed/dht/GridDhtTopologyFuture.java| 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/98e22cbd/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTopologyFuture.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTopologyFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTopologyFuture.java index 0bcc4a8..bc0331c 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTopologyFuture.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTopologyFuture.java @@ -32,7 +32,7 @@ import org.jetbrains.annotations.Nullable; * safe to use when all transactions that involve moving primary partitions are completed and partition map * exchange is also completed. * - * When new new cache operation is started, it will wait for this future before acquiring new locks on particular + * When new cache operation is started, it will wait for this future before acquiring new locks on particular * topology version. */ public interface GridDhtTopologyFuture extends IgniteInternalFuture {
ignite git commit: IGNITE-8437: Control utility fails to connect to cluster if zookeeper discovery used. This closes #3950.
Repository: ignite Updated Branches: refs/heads/master 534fcec82 -> 3cdee5331 IGNITE-8437: Control utility fails to connect to cluster if zookeeper discovery used. This closes #3950. Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/3cdee533 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/3cdee533 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/3cdee533 Branch: refs/heads/master Commit: 3cdee5331dfb36c6f03a7da689952e3a9b6790ed Parents: 534fcec Author: ascherbakoffAuthored: Thu May 10 12:08:17 2018 +0300 Committer: devozerov Committed: Thu May 10 12:08:17 2018 +0300 -- modules/zookeeper/pom.xml | 49 .../resources/META-INF/classnames.properties| 18 +++ .../zk/ZookeeperDiscoverySpiTestSuite2.java | 4 +- 3 files changed, 70 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/3cdee533/modules/zookeeper/pom.xml -- diff --git a/modules/zookeeper/pom.xml b/modules/zookeeper/pom.xml index 2d47ece..0777f1e 100644 --- a/modules/zookeeper/pom.xml +++ b/modules/zookeeper/pom.xml @@ -172,6 +172,55 @@ + +org.codehaus.mojo +exec-maven-plugin +1.3.2 + + +org.apache.ignite +ignite-tools +${project.version} + + + + +process-classes + +java + + + true + org.apache.ignite.tools.classgen.ClassesGenerator + + ${project.basedir}/target/classes + + + +org.apache.ignite + + + + + + org.apache.felix http://git-wip-us.apache.org/repos/asf/ignite/blob/3cdee533/modules/zookeeper/src/main/resources/META-INF/classnames.properties -- diff --git a/modules/zookeeper/src/main/resources/META-INF/classnames.properties b/modules/zookeeper/src/main/resources/META-INF/classnames.properties new file mode 100644 index 000..34e842c --- /dev/null +++ b/modules/zookeeper/src/main/resources/META-INF/classnames.properties @@ -0,0 +1,18 @@ +# +# 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. +# + +org.apache.ignite.spi.discovery.zk.internal.ZookeeperClusterNode \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ignite/blob/3cdee533/modules/zookeeper/src/test/java/org/apache/ignite/spi/discovery/zk/ZookeeperDiscoverySpiTestSuite2.java -- diff --git a/modules/zookeeper/src/test/java/org/apache/ignite/spi/discovery/zk/ZookeeperDiscoverySpiTestSuite2.java b/modules/zookeeper/src/test/java/org/apache/ignite/spi/discovery/zk/ZookeeperDiscoverySpiTestSuite2.java index 3775aa1..ddb003b 100644 --- a/modules/zookeeper/src/test/java/org/apache/ignite/spi/discovery/zk/ZookeeperDiscoverySpiTestSuite2.java +++ b/modules/zookeeper/src/test/java/org/apache/ignite/spi/discovery/zk/ZookeeperDiscoverySpiTestSuite2.java @@ -21,7 +21,6 @@ import junit.framework.TestSuite; import org.apache.curator.test.TestingCluster; import org.apache.ignite.internal.ClusterNodeMetricsUpdateTest; import org.apache.ignite.internal.IgniteClientReconnectCacheTest; -import org.apache.ignite.internal.processors.cache.IgniteCacheEntryListenerAtomicTest; import
ignite git commit: IGNITE-8422: Zookeeper discovery split brain detection shouldn't consider client nodes. This closes #3951.
Repository: ignite Updated Branches: refs/heads/master 07cbe22da -> 534fcec82 IGNITE-8422: Zookeeper discovery split brain detection shouldn't consider client nodes. This closes #3951. Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/534fcec8 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/534fcec8 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/534fcec8 Branch: refs/heads/master Commit: 534fcec827bf7a95f100a2f1fbacb908b9d88878 Parents: 07cbe22 Author: Pavel KovalenkoAuthored: Thu May 10 12:05:37 2018 +0300 Committer: devozerov Committed: Thu May 10 12:05:37 2018 +0300 -- .../DefaultCommunicationFailureResolver.java| 367 +- .../internal/cluster/graph/BitSetIterator.java | 66 .../internal/cluster/graph/ClusterGraph.java| 207 ++ .../graph/FullyConnectedComponentSearcher.java | 341 + .../communication/tcp/TcpCommunicationSpi.java | 82 ++-- .../FullyConnectedComponentSearcherTest.java| 323 .../zk/internal/ZookeeperDiscoverySpiTest.java | 379 +++ 7 files changed, 1539 insertions(+), 226 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/534fcec8/modules/core/src/main/java/org/apache/ignite/configuration/DefaultCommunicationFailureResolver.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/configuration/DefaultCommunicationFailureResolver.java b/modules/core/src/main/java/org/apache/ignite/configuration/DefaultCommunicationFailureResolver.java index a4c6da9..9ccadf3 100644 --- a/modules/core/src/main/java/org/apache/ignite/configuration/DefaultCommunicationFailureResolver.java +++ b/modules/core/src/main/java/org/apache/ignite/configuration/DefaultCommunicationFailureResolver.java @@ -18,13 +18,21 @@ package org.apache.ignite.configuration; import java.util.BitSet; +import java.util.HashSet; +import java.util.Iterator; import java.util.List; +import java.util.Set; +import java.util.stream.Collectors; import org.apache.ignite.IgniteLogger; import org.apache.ignite.cluster.ClusterNode; +import org.apache.ignite.internal.cluster.graph.BitSetIterator; +import org.apache.ignite.internal.cluster.graph.ClusterGraph; import org.apache.ignite.internal.util.typedef.internal.CU; import org.apache.ignite.internal.util.typedef.internal.S; import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.resources.LoggerResource; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; /** * Default Communication Failure Resolver. @@ -36,266 +44,239 @@ public class DefaultCommunicationFailureResolver implements CommunicationFailure /** {@inheritDoc} */ @Override public void resolve(CommunicationFailureContext ctx) { -ClusterGraph graph = new ClusterGraph(log, ctx); +ClusterPart largestCluster = findLargestConnectedCluster(ctx); -ClusterSearch cluster = graph.findLargestIndependentCluster(); +if (largestCluster == null) +return; -List nodes = ctx.topologySnapshot(); +log.info("Communication problem resolver found fully connected independent cluster [" ++ "serverNodesCnt=" + largestCluster.srvNodesCnt + ", " ++ "clientNodesCnt=" + largestCluster.connectedClients.size() + ", " ++ "totalAliveNodes=" + ctx.topologySnapshot().size() + ", " ++ "serverNodesIds=" + clusterNodeIds(largestCluster.srvNodesSet, ctx.topologySnapshot(), 1000) + "]"); -assert nodes.size() > 0; -assert cluster != null; - -if (graph.checkFullyConnected(cluster.nodesBitSet)) { -assert cluster.nodeCnt <= nodes.size(); - -if (cluster.nodeCnt < nodes.size()) { -if (log.isInfoEnabled()) { -log.info("Communication problem resolver found fully connected independent cluster [" + -"clusterSrvCnt=" + cluster.srvCnt + -", clusterTotalNodes=" + cluster.nodeCnt + -", totalAliveNodes=" + nodes.size() + "]"); -} - -for (int i = 0; i < nodes.size(); i++) { -if (!cluster.nodesBitSet.get(i)) -ctx.killNode(nodes.get(i)); -} -} -else -U.warn(log, "All alive nodes are fully connected, this should be resolved automatically."); -} -else { -if (log.isInfoEnabled()) { -log.info("Communication problem resolver failed to find fully connected independent cluster."); -} -
[2/2] ignite git commit: IGNITE-7912: control.sh script should show used WAL-segments. This closes #3636. This closes #3965.
IGNITE-7912: control.sh script should show used WAL-segments. This closes #3636. This closes #3965. Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/07cbe22d Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/07cbe22d Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/07cbe22d Branch: refs/heads/master Commit: 07cbe22da57552986123e2ceacf09da55a3d2ee0 Parents: ab7a055 Author: Ivan DaschinskiyAuthored: Thu May 10 12:02:20 2018 +0300 Committer: devozerov Committed: Thu May 10 12:02:20 2018 +0300 -- .../apache/ignite/IgniteSystemProperties.java | 3 + .../ignite/internal/commandline/Arguments.java | 80 +++-- .../ignite/internal/commandline/Command.java| 5 +- .../internal/commandline/CommandHandler.java| 228 - .../pagemem/wal/IgniteWriteAheadLogManager.java | 10 + .../GridCacheDatabaseSharedManager.java | 20 ++ .../wal/FileWriteAheadLogManager.java | 28 ++ .../wal/FsyncModeFileWriteAheadLogManager.java | 30 ++ .../internal/visor/misc/VisorClusterNode.java | 129 +++ .../internal/visor/misc/VisorWalTask.java | 336 +++ .../internal/visor/misc/VisorWalTaskArg.java| 98 ++ .../visor/misc/VisorWalTaskOperation.java | 44 +++ .../internal/visor/misc/VisorWalTaskResult.java | 113 +++ .../resources/META-INF/classnames.properties| 6 + .../commandline/CommandHandlerParsingTest.java | 119 ++- .../db/IgnitePdsUnusedWalSegmentsTest.java | 202 +++ .../persistence/pagemem/NoOpWALManager.java | 7 +- .../ignite/testsuites/IgnitePdsTestSuite2.java | 3 + .../testsuites/IgniteUtilSelfTestSuite.java | 2 + .../ignite/util/GridCommandHandlerTest.java | 72 .../GridInternalTaskUnusedWalSegmentsTest.java | 153 + .../e2e/testcafe/page-models/pageSignin.js | 32 -- 22 files changed, 1634 insertions(+), 86 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/07cbe22d/modules/core/src/main/java/org/apache/ignite/IgniteSystemProperties.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/IgniteSystemProperties.java b/modules/core/src/main/java/org/apache/ignite/IgniteSystemProperties.java index 32fed05..008974c 100644 --- a/modules/core/src/main/java/org/apache/ignite/IgniteSystemProperties.java +++ b/modules/core/src/main/java/org/apache/ignite/IgniteSystemProperties.java @@ -277,6 +277,9 @@ public final class IgniteSystemProperties { /** System property to hold SSH host for visor-started nodes. */ public static final String IGNITE_SSH_HOST = "IGNITE_SSH_HOST"; +/** System property to enable experimental commands in control.sh script. */ +public static final String IGNITE_ENABLE_EXPERIMENTAL_COMMAND = "IGNITE_ENABLE_EXPERIMENTAL_COMMAND"; + /** System property to hold SSH user name for visor-started nodes. */ public static final String IGNITE_SSH_USER_NAME = "IGNITE_SSH_USER_NAME"; http://git-wip-us.apache.org/repos/asf/ignite/blob/07cbe22d/modules/core/src/main/java/org/apache/ignite/internal/commandline/Arguments.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/commandline/Arguments.java b/modules/core/src/main/java/org/apache/ignite/internal/commandline/Arguments.java index ce72693..0d4b38e 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/commandline/Arguments.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/commandline/Arguments.java @@ -53,12 +53,6 @@ public class Arguments { */ private String baselineArgs; -/** Ping timeout for grid client. See {@link GridClientConfiguration#pingTimeout}.*/ -private long pingTimeout; - -/** Ping interval for grid client. See {@link GridClientConfiguration#pingInterval}.*/ -private long pingInterval; - /** Transaction arguments. */ private final VisorTxTaskArg txArg; @@ -68,6 +62,22 @@ public class Arguments { private CacheArguments cacheArgs; /** + * Action for WAL command. + */ +private String walAct; + +/** + * Arguments for WAL command. + */ +private String walArgs; + +/** Ping timeout for grid client. See {@link GridClientConfiguration#pingTimeout}.*/ +private long pingTimeout; + +/** Ping interval for grid client. See {@link GridClientConfiguration#pingInterval}.*/ +private long pingInterval; + +/** * @param cmd Command. * @param host Host. * @param port Port. @@ -76,14 +86,16 @@ public class Arguments { * @param baselineAct Baseline action. * @param
[1/2] ignite git commit: IGNITE-7912: control.sh script should show used WAL-segments. This closes #3636. This closes #3965.
Repository: ignite Updated Branches: refs/heads/master ab7a0557c -> 07cbe22da http://git-wip-us.apache.org/repos/asf/ignite/blob/07cbe22d/modules/web-console/e2e/testcafe/page-models/pageSignin.js -- diff --git a/modules/web-console/e2e/testcafe/page-models/pageSignin.js b/modules/web-console/e2e/testcafe/page-models/pageSignin.js deleted file mode 100644 index 57031b6..000 --- a/modules/web-console/e2e/testcafe/page-models/pageSignin.js +++ /dev/null @@ -1,32 +0,0 @@ -/* - * 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. - */ - -import {Selector, t} from 'testcafe'; -import {CustomFormField} from '../components/FormField'; - -export const pageSignin = { -email: new CustomFormField({model: '$ctrl.data.email'}), -password: new CustomFormField({model: '$ctrl.data.password'}), -signinButton: Selector('button').withText('Sign In'), -selector: Selector('page-signin'), -async login(email, password) { -return await t -.typeText(this.email.control, email) -.typeText(this.password.control, password) -.click(this.signinButton); -} -};
[ignite] Git Push Summary
Repository: ignite Updated Branches: refs/heads/ignite-8457 [deleted] c3ca291b4
ignite git commit: IGNITE-8457 Fixed typo in MarshallerUtils.jdkMarshaller().
Repository: ignite Updated Branches: refs/heads/master be25a50db -> ab7a0557c IGNITE-8457 Fixed typo in MarshallerUtils.jdkMarshaller(). Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/ab7a0557 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/ab7a0557 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/ab7a0557 Branch: refs/heads/master Commit: ab7a0557c502e8d01b4e0faf18e26982c73693a4 Parents: be25a50 Author: Alexey KuznetsovAuthored: Thu May 10 15:34:00 2018 +0700 Committer: Alexey Kuznetsov Committed: Thu May 10 15:34:00 2018 +0700 -- .../main/java/org/apache/ignite/marshaller/MarshallerUtils.java| 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/ab7a0557/modules/core/src/main/java/org/apache/ignite/marshaller/MarshallerUtils.java -- diff --git a/modules/core/src/main/java/org/apache/ignite/marshaller/MarshallerUtils.java b/modules/core/src/main/java/org/apache/ignite/marshaller/MarshallerUtils.java index bec1f57..a9bc457 100644 --- a/modules/core/src/main/java/org/apache/ignite/marshaller/MarshallerUtils.java +++ b/modules/core/src/main/java/org/apache/ignite/marshaller/MarshallerUtils.java @@ -54,7 +54,7 @@ public class MarshallerUtils { public static JdkMarshaller jdkMarshaller(@Nullable String nodeName) { JdkMarshaller marsh = new JdkMarshaller(); -setNodeName(new JdkMarshaller(), nodeName); +setNodeName(marsh, nodeName); return marsh; }
ignite git commit: IGNITE-6140: JDBC thin driver: implemented data source. This closes #2826.
Repository: ignite Updated Branches: refs/heads/master 03a3e927c -> be25a50db IGNITE-6140: JDBC thin driver: implemented data source. This closes #2826. Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/be25a50d Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/be25a50d Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/be25a50d Branch: refs/heads/master Commit: be25a50dbbd2c4a28c19d5fe8e81acba8afe00b7 Parents: 03a3e92 Author: tledkov-gridgainAuthored: Thu May 10 11:01:50 2018 +0300 Committer: devozerov Committed: Thu May 10 11:01:50 2018 +0300 -- .../jdbc/suite/IgniteJdbcDriverTestSuite.java | 2 + .../jdbc/thin/JdbcThinDataSourceSelfTest.java | 429 + .../apache/ignite/IgniteJdbcThinDataSource.java | 614 +++ .../org/apache/ignite/IgniteJdbcThinDriver.java | 40 +- .../jdbc/thin/ConnectionPropertiesImpl.java | 20 +- 5 files changed, 1092 insertions(+), 13 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/be25a50d/modules/clients/src/test/java/org/apache/ignite/jdbc/suite/IgniteJdbcDriverTestSuite.java -- diff --git a/modules/clients/src/test/java/org/apache/ignite/jdbc/suite/IgniteJdbcDriverTestSuite.java b/modules/clients/src/test/java/org/apache/ignite/jdbc/suite/IgniteJdbcDriverTestSuite.java index a88ebe8..c0378b2 100644 --- a/modules/clients/src/test/java/org/apache/ignite/jdbc/suite/IgniteJdbcDriverTestSuite.java +++ b/modules/clients/src/test/java/org/apache/ignite/jdbc/suite/IgniteJdbcDriverTestSuite.java @@ -48,6 +48,7 @@ import org.apache.ignite.jdbc.thin.JdbcThinComplexQuerySelfTest; import org.apache.ignite.jdbc.thin.JdbcThinConnectionMultipleAddressesTest; import org.apache.ignite.jdbc.thin.JdbcThinConnectionSSLTest; import org.apache.ignite.jdbc.thin.JdbcThinConnectionSelfTest; +import org.apache.ignite.jdbc.thin.JdbcThinDataSourceSelfTest; import org.apache.ignite.jdbc.thin.JdbcThinDeleteStatementSelfTest; import org.apache.ignite.jdbc.thin.JdbcThinDynamicIndexAtomicPartitionedNearSelfTest; import org.apache.ignite.jdbc.thin.JdbcThinDynamicIndexAtomicPartitionedSelfTest; @@ -143,6 +144,7 @@ public class IgniteJdbcDriverTestSuite extends TestSuite { suite.addTest(new TestSuite(JdbcThinConnectionMultipleAddressesTest.class)); suite.addTest(new TestSuite(JdbcThinTcpIoTest.class)); suite.addTest(new TestSuite(JdbcThinConnectionSSLTest.class)); +suite.addTest(new TestSuite(JdbcThinDataSourceSelfTest.class)); suite.addTest(new TestSuite(JdbcThinPreparedStatementSelfTest.class)); suite.addTest(new TestSuite(JdbcThinResultSetSelfTest.class)); http://git-wip-us.apache.org/repos/asf/ignite/blob/be25a50d/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinDataSourceSelfTest.java -- diff --git a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinDataSourceSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinDataSourceSelfTest.java new file mode 100644 index 000..6040bed --- /dev/null +++ b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinDataSourceSelfTest.java @@ -0,0 +1,429 @@ +/* + * 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.jdbc.thin; + +import java.sql.Connection; +import java.sql.SQLException; +import java.util.HashMap; +import java.util.Hashtable; +import java.util.Map; +import java.util.concurrent.Callable; +import javax.naming.Binding; +import javax.naming.Context; +import javax.naming.InitialContext; +import javax.naming.Name; +import javax.naming.NameClassPair; +import javax.naming.NameParser; +import javax.naming.NamingEnumeration; +import javax.naming.NamingException; +import javax.naming.spi.InitialContextFactory; +import org.apache.ignite.IgniteJdbcThinDataSource; +import
ignite git commit: IGNITE-7343: JDBC thin driver: mutex to avoid unpredictable behavior when connection is accessed from multiple threads. This closes #3337.
Repository: ignite Updated Branches: refs/heads/ignite-2.5 a32e529f4 -> 741584330 IGNITE-7343: JDBC thin driver: mutex to avoid unpredictable behavior when connection is accessed from multiple threads. This closes #3337. Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/74158433 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/74158433 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/74158433 Branch: refs/heads/ignite-2.5 Commit: 7415843305efdd8d3e5e438aa2b24e9eae2e0485 Parents: a32e529 Author: tledkov-gridgainAuthored: Thu May 10 10:37:36 2018 +0300 Committer: devozerov Committed: Thu May 10 10:38:46 2018 +0300 -- .../jdbc/thin/JdbcThinConnectionSelfTest.java | 53 ++- .../internal/jdbc/thin/JdbcThinConnection.java | 21 ++- .../internal/jdbc/thin/JdbcThinTcpIo.java | 137 --- 3 files changed, 155 insertions(+), 56 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/74158433/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinConnectionSelfTest.java -- diff --git a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinConnectionSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinConnectionSelfTest.java index ed0b324..b462e46 100644 --- a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinConnectionSelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinConnectionSelfTest.java @@ -33,8 +33,10 @@ import java.util.Properties; import java.util.concurrent.Callable; import java.util.concurrent.Executor; import java.util.concurrent.Executors; +import java.util.concurrent.atomic.AtomicInteger; import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.configuration.IgniteConfiguration; +import org.apache.ignite.internal.IgniteInternalFuture; import org.apache.ignite.internal.binary.BinaryMarshaller; import org.apache.ignite.internal.jdbc.thin.JdbcThinConnection; import org.apache.ignite.internal.jdbc.thin.JdbcThinTcpIo; @@ -543,7 +545,7 @@ public class JdbcThinConnectionSelfTest extends JdbcThinAbstractSelfTest { assert conn.isClosed(); -assert !conn.isValid(2): "Connection must be closed"; +assert !conn.isValid(2) : "Connection must be closed"; GridTestUtils.assertThrows(log, new Callable() { @Override public Object call() throws Exception { @@ -1212,7 +1214,6 @@ public class JdbcThinConnectionSelfTest extends JdbcThinAbstractSelfTest { } }); - // Exception when called on closed connection checkConnectionClosed(new RunnableX() { @Override public void run() throws Exception { @@ -1930,6 +1931,54 @@ public class JdbcThinConnectionSelfTest extends JdbcThinAbstractSelfTest { } /** + * @throws Exception If failed. + */ +public void testMultithreadingException() throws Exception { +int threadCnt = 10; + +final boolean end[] = new boolean[] {false}; + +final SQLException exs [] = new SQLException[threadCnt]; + +final AtomicInteger exCnt = new AtomicInteger(0); + +try (final Connection conn = DriverManager.getConnection(URL)) { +final IgniteInternalFuture f = GridTestUtils.runMultiThreadedAsync(new Runnable() { +@Override public void run() { +try { +conn.createStatement(); + +while (!end[0]) +conn.createStatement().execute("SELECT 1"); + +conn.createStatement().execute("SELECT 1"); +} +catch (SQLException e) { +end[0] = true; +exs[exCnt.getAndIncrement()] = e; +} +catch (Exception e) { +e.printStackTrace(System.err); + +fail("Unexpected exception (see details above): " + e.getMessage()); +} +} +}, threadCnt, "run-query"); + +f.get(); + +boolean exceptionFound = false; + +for (SQLException e : exs) { +if (e != null && e.getMessage().contains("Concurrent access to JDBC connection is not allowed")) +exceptionFound = true; +} + +assertTrue("Concurrent access to JDBC connection is not allowed", exceptionFound); +} +} + +/** * @return Savepoint. */ private Savepoint getFakeSavepoint() {
ignite git commit: IGNITE-7343: JDBC thin driver: mutex to avoid unpredictable behavior when connection is accessed from multiple threads. This closes #3337.
Repository: ignite Updated Branches: refs/heads/master ecc18537f -> 03a3e927c IGNITE-7343: JDBC thin driver: mutex to avoid unpredictable behavior when connection is accessed from multiple threads. This closes #3337. Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/03a3e927 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/03a3e927 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/03a3e927 Branch: refs/heads/master Commit: 03a3e927cc39890a81c1e131fdec1bd8f6fe4b8f Parents: ecc1853 Author: tledkov-gridgainAuthored: Thu May 10 10:37:36 2018 +0300 Committer: devozerov Committed: Thu May 10 10:37:36 2018 +0300 -- .../jdbc/thin/JdbcThinConnectionSelfTest.java | 53 ++- .../internal/jdbc/thin/JdbcThinConnection.java | 21 ++- .../internal/jdbc/thin/JdbcThinTcpIo.java | 137 --- 3 files changed, 155 insertions(+), 56 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ignite/blob/03a3e927/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinConnectionSelfTest.java -- diff --git a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinConnectionSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinConnectionSelfTest.java index ed0b324..b462e46 100644 --- a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinConnectionSelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinConnectionSelfTest.java @@ -33,8 +33,10 @@ import java.util.Properties; import java.util.concurrent.Callable; import java.util.concurrent.Executor; import java.util.concurrent.Executors; +import java.util.concurrent.atomic.AtomicInteger; import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.configuration.IgniteConfiguration; +import org.apache.ignite.internal.IgniteInternalFuture; import org.apache.ignite.internal.binary.BinaryMarshaller; import org.apache.ignite.internal.jdbc.thin.JdbcThinConnection; import org.apache.ignite.internal.jdbc.thin.JdbcThinTcpIo; @@ -543,7 +545,7 @@ public class JdbcThinConnectionSelfTest extends JdbcThinAbstractSelfTest { assert conn.isClosed(); -assert !conn.isValid(2): "Connection must be closed"; +assert !conn.isValid(2) : "Connection must be closed"; GridTestUtils.assertThrows(log, new Callable() { @Override public Object call() throws Exception { @@ -1212,7 +1214,6 @@ public class JdbcThinConnectionSelfTest extends JdbcThinAbstractSelfTest { } }); - // Exception when called on closed connection checkConnectionClosed(new RunnableX() { @Override public void run() throws Exception { @@ -1930,6 +1931,54 @@ public class JdbcThinConnectionSelfTest extends JdbcThinAbstractSelfTest { } /** + * @throws Exception If failed. + */ +public void testMultithreadingException() throws Exception { +int threadCnt = 10; + +final boolean end[] = new boolean[] {false}; + +final SQLException exs [] = new SQLException[threadCnt]; + +final AtomicInteger exCnt = new AtomicInteger(0); + +try (final Connection conn = DriverManager.getConnection(URL)) { +final IgniteInternalFuture f = GridTestUtils.runMultiThreadedAsync(new Runnable() { +@Override public void run() { +try { +conn.createStatement(); + +while (!end[0]) +conn.createStatement().execute("SELECT 1"); + +conn.createStatement().execute("SELECT 1"); +} +catch (SQLException e) { +end[0] = true; +exs[exCnt.getAndIncrement()] = e; +} +catch (Exception e) { +e.printStackTrace(System.err); + +fail("Unexpected exception (see details above): " + e.getMessage()); +} +} +}, threadCnt, "run-query"); + +f.get(); + +boolean exceptionFound = false; + +for (SQLException e : exs) { +if (e != null && e.getMessage().contains("Concurrent access to JDBC connection is not allowed")) +exceptionFound = true; +} + +assertTrue("Concurrent access to JDBC connection is not allowed", exceptionFound); +} +} + +/** * @return Savepoint. */ private Savepoint getFakeSavepoint() {